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
Enabled
Name
Type
Source
Order
Parameters
Script
[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.