[DOC] RAT Events (Intro)

Trekkan

NomadSoft Owner/Developer
Staff member
Oct 11, 2011
3,568
176
63
53
Hillsboro, OR
www.nomadsoft.net
Creating events in RAT may look a bit daunting at first, but hopefully with the below explanation things will be more clear. One thing to know is that you don't HAVE to ever touch the RAT events. The system exists in case you would like to modify events (such as localization of text), or create new events. RAT comes with all of the default events already created for you.

[GALLERY=media, 70]Rat_event_editor_ss by Trekkan posted Dec 25, 2016 at 6:22 PM[/GALLERY]
Please reference the screenshot above, as all below statements will be in reference to it.

Event List

The event list is simple a list of all events that RAT has in the database. Clicking on an event will allow you to edit it.​

Enabled

Whether or not the event is enabled. This way, you can create events, test them, turn them off, or otherwise disable a feature that you might not want to use. You can then re-enable it later if you wish.​

Name

This is just a friendly name for you to remember the event, it can be any thing you wish as it is not used anywhere but in the event editor.​

Type

RAT has many different types of events, depending on the event you choose, different variables (data) are available to you. More will be explained on that later.​

Source

This is set to "User" for all events you'll create. This way I can keep track of the events required by RAT, and not overwrite your events. It is possible this will be deprecated soon, but I wanted to comment on it as it is currently there.​

Order

The order in which an event will be processed. Meaning, if you have 5 events for "Player Connected", you might want them to fire off in a specific order. Setting the order here will do just that.​

Parameters

The content of this field will vary greatly depending on the event type. Generally it is not used, but is mostly used for the "Player Public Chat" event. In that case, you would add in say "!test" to perform the commands in the "Script" section when a player types !test in the game chat.​

Script

Everything above, leads to this. Each line within this section will be processed. You can include the Custom RAT commands, or any console command available to you from the default 7D2D server, or any mods you might have installed. I'll go into more detail in another post on this section, but for now, please view the events already created to get a general understanding of what you can do.​
 
Event Name: TEXT MATCH

Description: Matches any text that comes through the console. This *IS* CaSe SenSiTivE!

Parameters:
CONTAINS:MatchText
STARTSWITH:MatchText
ENDSWITH:MatchText

Notes:
You can have multiple parameters by separating them with two || (pipes).
Example: CONTAINS:Time||ENDSWITH:MB
All parameters are considered as OR logic, meaning either one will be considering a match. There is currently no AND logic.
 
Where is the Event Editor located? I have installed Rat along with the Alloc & BCManager. Everything is working great but I can not seem to find the event editor dialog.
 
Where is the Event Editor located? I have installed Rat along with the Alloc & BCManager. Everything is working great but I can not seem to find the event editor dialog.

Hey there, it is the gear icon on the toolbar, and make sure you install the HOTFIX as well over the top of the current version. With that version, there is another link to the event editor (as well as the current one) to help make it more visible.
 
Haha oh whoops! I feel so silly.. Thank you for the quick response!

People like you make open source software amazing!
 
Where do you download the hotfix, i must be blind as I cant find downloads lol
 
Thanks for that!
Another issue I am having, for some reason very few of the events will work, and I cant get chat back to the Discord from the game, I have tried every suggestion on the board and the examples of using the !say command, but nothing. However if I send a message from the console within RAT it comes through.. So the link between is working but the events for Public chat are not.
 
Your best bet for help on that is to join the Discord server and ask there. That way you can get help in real time. =) The link for the Discord server is here on this website, on the upper left, click Join Server.
 
i dont see anything that says join server in the upper left, i do see a discord tab but it is broken.?
1145
 
I dont think im seeing something right, if i click on the JFF Gaming Logo all i see is:
1146