RAT 4

RAT 4 4.2.1.2

Fixed
An issue with chat messages not parsing if you use CPM and colored chat names/text. If you don't use CPM and colored chat names/text, you don't need to upgrade to this version.
Release 4.2.1.1

Fixed


Various chat issues due to the changes made in the latest 7days server release, including support for CPM, etc.
If you use CPM and have either chat name colors or command suppression enabled, then you will want to make sure that the "Chat Mod Enabled" is checked in Groups -> Misc tab​
Thanks to BadPlayer for the extensive testing/help on this.​

Added

Logs & Folders -> Game Data to quickly go to your game data folder when running a local server
Cooldowns and schedules are now part of the backup set
Automatic Restore functionality for backups (Requested by: Levithemetalguy)
You can selectively choose what to restore: game world, save game, serverconfig.xml, RAT DB, etc...​
Support for the new serverconfig.xml variable: QuestProgressionDailyLimit, this is located in Settings -> Server Configuration ->Game Settings 2, General Settings
Release 4.2.0.3

Fixed
Missing player table column (Reported by: Eky)
Updated player data fields to match Allocs player data changes
Switched to .NET framework 4.8.1 so hopefully those running WinServer no longer have issues. (Reported By: Neagu)
Sending commands to Allocs API were failing with a "forbidden(403)" error. (Reported by: BadPlayer)
This should hopefully resolve issues some people are having with upgrading. Please let me know if you continue to have any issues!
Release 4.2.0.0

New Features

New Event: Wandering Horde Start
New Event: Wandering Horde End
Added Main toolbar menu from Tools -> Delete all player teleports (Requested by: keyboardkilla)
Added right click player menu item: Delete Player Teleports (Requested by: keyboardkilla)
Add each player coord as its own variable for events. (Requested by: Badplayer)
These are available every time any event variables for a player exist, which is most of the time.​

New Event Vars​
player_posx​
player_posy​
player_posz​

When opening the Group Editor, RAT will now select the "DEFAULT" group, by... default.
Added .CALC RAT script function (Requested by: Capt. Lykke)
Example:
Code:
.CALC:myVar:(1+5) * 10 -3
Result: {myVar} = 57​
You can also use variables, like: .CALC:myVar:1+{anotherValue}+9​

.REGEX (or .MATCH) RAT Command
Returns the matching text into a RAT variable​
Example:​
.REGEX:var_name:expression||content​
var_name is the RAT variable to put the content in​
expression is the regular expression​
content is the content to evaluate the expression against​
Note that the expression and content are separated by double | pipes. ||​
ISREGEX (or ISMATCH) RAT Conditional
Returns true/false based on if the expression matches the content​
Example:​
ISMATCH:{content}:expression​
If the incoming message was a player chat message, then content is the chat message.​
If the incoming message is NOT a chat message, then content is the entire log line (what is sent to the console).​
Teleport wait time can now be set to 0 for unlimited teleporting (Requested by: BadPlayer)
Added some indexes to player data, etc.
Added Discord Account Linking to your game account
Changed format for RAT command CHECKDISCORDROLE, format is now .CHECKDISCORDROLE:<op>:<username/Id>
OP can be any of the following:​
= - Does the user have the role you pass in on the script line​
< - Is the users highest role, less than the passed in role on the script line​
<= - Is the users highest role, less than or equal to the passed in role on the script line​
> - Is the users highest role, higher than the passed in role on the script line​
>= - Is the users highest role, higher than or equal to the passed in role on the script line​
By default on new RAT installs, all events are shown by default in the Event Editor (Requested by: Y4NN1CK (and so so many others))
RAT Command: ADMINREMOVETELEPORT:<playerId>:<teleportName> (Requested by: BadPlayer)
RAT Command: ADMINLISTTELEPORTS:<playerId> (Requested by: BadPlayer)
RAT command .BANKTRANSFER that allows a player to send credits to another player: .BANKTRANSFER:<PayerId>:<Amount>:<showReply>:<PayeeId> (Requested by: BadPlayer)
All payee user data is available just like player data, but in the format {player_payee_XXXXX} where XXXXX is the key of the data you want (just like player_whatever)​
Added event variable discord_display_name to display a players discord name instead of discord username (Requested by: BadPlayer)
Update Discord Status values - BP
Valid Values are: None, Playing, Streaming, Listening to, Watching and Competing in​
Added tooltips to various columns on the player list in an effort to clean up the player row as well as provide more information.
Added icons for all of the various IDs a player has (Steam, Cross, XBL, Discord, etc) to the player list. You can now also reorder the columns in the player list, as well as you could before, choose which columns to display in the player list, etc.
You can mouse over a cell to get a tooltip for the various data like SteamID. You can also still right click and copy the value from the cell to your clipboard​
Added support for new serverconfig.xml option IgnoreEOSSanctions (in settings, Game Settings 1 tab), you must first manually add it to your serverconfig.xml file. Yeah, I don't like it either, I'll refactor it another day though.
Added three new event variables for the airdrop event (Requested by: BadPlayer)
airdrop_coord_x​
airdrop_coord_y​
airdrop_coord_z​
This should allow you to display the coords however you'd like. You can still use the existing airdrop_coords variable that will display the entire set of coords at once.​
You can now ignore specific lines of text in the console log, so if you're getting spammed something or just don't want to see something in the console log (Its still written to the game server log though). Create a file called "logIgnoreList.txt" in your RAT data folder (Tools -> RAT Logs & Folders -> RAT Data Folder". Enter each thing to ignore per line. This is a "contains" check, so any matching text, anyway in the log line will trigger the ignore. Any changes to the file require you to restart RAT as the file is only read on startup. (Requested by: BadPlayer)
When deleting RAT player data, the player's inventory history is now deleted as well. (Requested by: BadPlayer)
Added the following event variables {hour{} {minutes} {seconds} (Requested by: Capt. Lykke)
You can now import/update items/custom items easier.
Select Tools -> Import Items​
This will export the current items from the game into the file items.json (Located in your RAT data folder)​
It will them import those items into RAT.​
If you wish you import custom items, create a file in the RAT data folder named items_custom.json and follow the same format as in items.json​
Then again select Tools -> Import Items. The games default items will be reimported as well as your custom items.​
This allows you to maintain a list of custom items, outside of the default game items, so you can import them at will.​

Bug Fixes

ISWanderingHorde is not parsing correctly - Capt. Lykke
Cleanup the webtoken resets, again. It doesn't work right for multiple RAT connections. - (Reported by: Drinka1ity)
Now storing webtokens information within the RAT DB. This will allow multiple instances of RAT to be run at the same time, connected to different game servers.
When adding a player with an admin level, add SteamID as well as EOS ID
Editing admin level in the player list directly, throws an exception: Reported by: g-rex21
Remove double click to restore backup until the functionality exists again, throws exception. (Reported by: Maxx)
Make teleport names case insensitive (Reported by: keyboardkilla)
.BANKMODIFY find the wrong player when sent a cross_id, if there is another player with the same name in the RAT DB. (Reported by: BIA_RIGGS)
Trapped exception thrown when invalid parameters are sent when shutting down the server. (Reported by: Ciro)
Query error for DPLAYERSRAW command (Reported by: BadPlayer)
ERROR: Unable to write Custom Server Startup file when using RAT as Remote. (Reported by BadPlayer)
Player Kicked event error when a player is attempting to join the server while it is still starting up. (Reported by: BadPlayer)
Event Wandering Horde End was failing to fire (Reported by: BadPlayer)
Setting a global variable internally could sometimes crash RAT (Reported by: BadPlayer)
Error in ModifyFunds that could sometimes cause RAT to crash, exception properly logged now. (Reported by: BadPlayer)
Added error handling when parsing event tokens that could cause RAT to throw an exception. (Reported by: BadPlayer)
Trapped or fixed multiple exceptions (Reported by: BadPlayer)
Event variables changed:
player_steamid = the players actual steam ID as steam would need it​
player_steam = Steam_playerSteamId​
Please update your events as needed. Most events should be using player_crossid now however. Only use steamId where it is required by the mod/event you are using.​
Country Flags should now show the correct flag for each player (Reported by: Vasko, Everyone)
Changed the way the RAT database writes happen, hopefully this will help prevent database corruption issues.
Updated most of the libraries RAT uses under the hood.
Teleport names are no longer case sensitive when using them for things like activating a teleport or deleting a teleport. (Reported by: BadPlayer)
Cleaned up some of the indexes on the database for performance reasons.
Player Killed Zombie event was firing when a zombie killed an animal, or vice versa (Reported by: BadPlayer)
Fixed issue with multiple webtokens being written to the database instead of updating existing token data.
Player stat variables now clear on refresh (Reported by: BadPlayer)
Player disconnect message events are inconsistently trapped (Reported by: BadPlayer)
New Player Connected event doesn't add variables to events (Reported by: BadPlayer)
Setting a wait time to 0 for time between teleports, still caused the player to wait up to 60 seconds (Reported by: BadPlayer)
When listing teleports, the first teleport was displaying for each saved teleport (Reported by: BadPlayer)
Hovering the mouse over the RAT tray icon, displayed the wrong RAT version (Reported by: hameleon0128)
RAT version update check not working due to my primary website changing domains.
Fixed backup bug when using User Data Folder settings (Reported by: Capt. Lykke)
When opening the backup window and no backups had been performed yet, an error was thrown in the RAT Log (Reported by: Capt. Lykke)
This release fixes a few issues that some people are experiencing with RAT crashing after a while, etc. So if you're experiencing some random crashes, install this version. It is the same as 4.1.0.1, just bug fixes.
Please note, you may see an error popup window when upgrading, this is expected and all is well. Its fixing something I broke in the last upgrade script.

Fixed
  • Issue where in some instances, not all items were being imported
  • Missing closing double quote on the CPM Player Killed Zombie event (Reported by: BadPlayer)
  • Editing a global variable does not save the value. (Reported by: Capt. Lykke)
  • Global variables are not parsed for their values in RAT Script. (Reported by: Capt. Lykke)
  • Unable to delete a Global Variable (Reported by: Capt. Lykke)
  • The contents of the Global Variable window do not scale when the window size is changed.

Added
  • Password filter on Create Server screen so people don't share their passwords in screenshots.
  • Added group attribute inventory_tracker_days. Default is 7, for 7 days. Every hour a cleanup is run on the inventory history, entries older than inventory_tracker_days, are removed.
  • When generating a new world, get the last created folder name from the install folder and then set the Game World Name and Save Game Name. This should help reduce a lot of the problems newer RAT admins have when they generate worlds.
  • Rewrote the entire backup system, now seeing backups ~50% less in size than before! (Requested by: BIA_RIGGS)
  • Add a global cooldown, so a command can only be used once by anyone for an X amount of time. (Requested by: BadPlayer)
    • Added optional parameter :[boolean]
      This means, if you don’t set the parameter, the default is false. Cooldowns work as they have, per player.

      If set to true, this command can only be activated once, by anyone, until it cools down.

      Examples:
      COOLDOWN:1H
      This works as normal, each player can do the command once within 1 hour

      COOLDOWN:1H:true
      This is a global cooldown and the command can only be activated once (by anyone), within 1 hour
  • Added a new optional parameter to .GETGRABBAG and .GETRANDOMBAG
    • .GETGRABBAG:{player_steamid}:<BagName>:<ItemCount>:[allowDuplicates]

      allowDuplicates is an optional parameter, the default is: true
      Setting this to false, when an item is chosen from a bag, it is removed from the bag so that it is not chosen again during this call to this function.
      Be aware that if you set <ItemCount> to say 5, and there are only 4 items in the bag, they'll only get 4 items as there won't be any items left to give.
  • Added "Distance" field to Player inventory tracker to show how many blocks away the player was, from your search position. (Requested by: BadPlayer)
  • Added "Clean View" to player inventory tracker. This should make looking for the data you want much easier.
  • Added Export to CSV option for Player Inventory History
  • New Custom Server Startup section on the Settings -> Local Server -> Server Startup. (Requested by: Capt. Lykke)
    • Settings -> Local Server -> Server Startup
    • By default, this will populate with the startdedicated.bat file. When you close the settings window, a new file "rat_server_start.bat" will be written.

      If you check the Use Custom Startup checkbox, then the rat_server_start.bat file will be used to start your server. If you don’t, RAT will start your server the way it always has.

      This file is also part of the backup set if you have RAT backup your game server.
  • Added new Event Type: Wandering Horde (Player) (Requested by: Capt. Lykke)
    • Variables: entity_type - Example: EntityPlayer horde_distance - Example: 57.32314 player_* - Example: All of the standard player variables, relating to the player this horde is targeting
  • Added new Event Type: Wandering Horde (Wait)
    • This event triggers off of the "AIDirector: Spawn Horde, find targets, wait 12 hours" event

      • Variables:
        horde_wait_time - Example: 12
  • Added to optional parameter to .RANDOMNUMBER
    • You can now do: .RANDOMNUMBER:1,100:die_roll
      and the result would be in the variable {die_roll}

      or leave it off, like before: .RANDOMNUMBER:1,100
      and the result will be in the variable {random_number}
Release 4.1.0.0

Fixed
  • Player positions are not being written correctly (Reported by: BadPlayer)
  • Item spawner/Grag bag item spawning was failing when CPM was enabled with giveplus command. (Reported by: BadPlayer)
  • Player Inventory Tracker lags UI
  • Support for latest Allocs mod. No longer uses legacy commands and updates calls to get player inventory data now. This was also the cause of "Error getting Response from WebAPI" messages in the RAT Log. (Reported by: BadPlayer)
  • Duke Casino tokens and Cash were not listed in the item spawner, if you're updating RAT, click Tools -> Import Items to get the new items to display. (Reported by: keyboardkilla)
  • Removed unused "Spawn Near Backpack" setting in serverconfig.xml as it was deprecated by TFP. (Reported by: BadPlayer)
  • Discord kick reason not populating as well as player name on occasion. (Reported by: Vasko)
  • Changed default value for rat_ignore_game_chat_string from / to # character. This is why some Discord commands don't appear when someone types something in game chat. If you're upgrading, you'll need to change this value yourself in the Group Attribute Editor. (Reported by: Capt. Lykke)
  • Cleaned up some display issues when installing Allocs mod automatically.
  • Exception thrown when doing a manual backup and you don't have Allocs mod installed. (Reported by: Capt. Lykke)
Added
  • RAT script command .RANDOMARRAY
    • Syntax:
      .RANDOMARRAY:<VariableName>:<list,of,values>

      Example:
      .RANDOMARRAY:mytest:eek:ne,two,3,four,testing,stuff

      Result:
      Set the variable mytest to one of the listed values
      mytest=testing
  • New Group Attribute: banned_items_enabled, use this to check play inventory for banned items (Requires Allocs Mod currently)
  • New Group Attribute: check_inventory_interval, How often in seconds to check/track a players inventory. Minimum value is 60 seconds. (Requires Allocs Mod currently)
  • New player inventory tracking window. Listed off of the main RAT toolbar. You can now see what items a player had in their inventory at a specific time. You can search for players within a location on the map and X blocks from that position. This is most helpful for public servers or when someone says "I wasn't anywhere near there, I didn't steal all of that and exploit a bug!" kinda stuff.
  • Global RAT Script variables (Requested by: Capt. Lykke)
    • Click the Dropdown on the Events button on the main RAT Toolbar to view global variables. All of these variables are available within your RAT Scripts. You can view/edit/create new variables from this window, or using RAT Script commands as noted below.
    • You can create/modify/remove your own global variables using RAT Script.
    • These variables are referenced like any other RAT variable {VariableName}
    • Global variables are persisted across restarts of RAT. *** NOTE *** Global variable data is written to disk when you close RAT. This means if there's a crash or something, these variables will not have been updated.
  • New RAT Script commands to support Global Variables
    • Set a global variable
      .GSVAR:<key>:<value>

      Get a global variable
      .GVAR:<key>

      Clear a global variable (removes it completely)
      .GCVAR:<key>
  • Local Event Variables
    • Local event variables only exist for the duration of an event being processed. The work the same as Global variables, but as they are very limited in life span, there is no editor window like Global variables, etc.
    • Set a variable
      .SVAR:<key>:<value>

      Get a variable
      .VAR:<key>

      Clear a variable (removes it completely)
      .CVAR:<key>
  • Like
Reactions: damianchill
Fixed
  • RAT was installing experimental build, even if you had stable selected
  • Event Server Restart had "shutdown" at the bottom of the script, causing the countdown to be skipped and the server immediately shutting down. If upgrading, please remove this yourself in the event. New installs won't have this issue. (Reported by: Blackmadman)
  • Fixes to the /who Discord script as well as internal changes (Reported by: Blackmadman)
  • Discord channel list was displaying message threads, as channels.
  • Numeric columns on the player list, were sorting alpha instead of numerically (Reported by: Goshawkdm)
  • RAT freezing at times. This is due to the banned items check being done. This was enable by default, it is now disabled by default. I've improved this, but its not 100% yet. If you are upgrading, in order to disable this (if you're having problems or just don't want it done)
    • Open the Group Editor in RAT
    • Select the DEFAULT group
    • Click the Custom Variables tab
    • Select 'Banned Item Check Interval'
    • Set the Value to 0
    • Click 'Save Attribute'
    • Close and reopen RAT.
  • Game time should now display with a leading 0 for hours and minutes when necessary (Reported by: Blackmadman)
Added
  • Dye colors to the item list, this means they will appear in the item spawner as well as Grab bag items
  • Quest Reward bundles to the item list, this means they will appear in the item spawner as well as Grab bag items (Requested by: Edzia)
  • Like
Reactions: damianchill
This fixes some issues where player chat was not firing the events, some grabbag issues as well as I added a Check for Updates menu item from the Help menu, so you can manually check for updates, not just on RAT startup.