Mod talk:Public Train

From ARK Wiki
Jump to navigation Jump to search

Deprecated method, but still functional

Older versions of this mod allowed to acquire train tracks using chat commands. This is no longer needed in latest version, as the mod now provides a new engram for train tracks. The Old configuration options, Old chat commands, and Old RCON commands are still available and functional in case you prefer the old way of acquiring train tracks, see below.

How does the old method works?

You first want to choose or create a tribe that will be the owner of the Public Railway. This tribe will be refered below as the "Public Railway Tribe".
Once you have a Public Railway Tribe, you want to find:

  • Its ID (It must be a positive integer).
  • Its owner ID (the in-game ID of the player who owns the tribe. It must be a positive integer).
  • Its owner name (the in-game name of the player who owns the tribe. It must be a string).

Once you have found the 3 elements above you will be able to configure and create a Public Railway.
The Public Railway Tribe will start by building some tracks on the map. These tracks are the Public Railway. Then, when a player uses the /acquiretraintrack chat command, they will temporarily acquire ownership of the track they are looking at. The ownership duration is defined by the AcquiredTrainTrackDuration= option. This allows them to connect their own tracks to the Public Railway (Note: it does not allow them to pickup/destroy the tracks they temporarily take ownership of).
To simplify maintenance, the server is able to perform 2 tasks automatically:

  • "Merge Train Tracks" task: Merges tracks that are connected to the Public Railway into the Public Railway Tribe (so that the entire railway belongs to the Public Railway Tribe instead of various tribes).
  • "Prevent Train Tracks Auto-Destroy" task: Disables auto-destroy on every tracks of the Public Railway (so that the railway does not despawn if "structures auto-destruction" is enabled on your server).

These 2 tasks are performed automatically every X seconds. You can configure the amount of seconds with MergeTrainTracksDelay= and PreventAutoDestroyDelay= options. The recommanded amount of seconds for these 2 tasks is 3600 (so that players have approximately 1 hour to build their railway before having to use the /acquiretraintrack chat command again).

Old configuration options

Option Possible values Default value Explanations Category
TrainTribeID= A tribe ID (integer) 0 The ID of the tribe that owns the Public Railway. Railway
TrainTribeOwnerName= A player name (string) The name of the player that owns the Public Railway Tribe. Railway
TrainTribeOwnerID= A player ID (integer) 0 The ID of the player that owns the Public Railway Tribe. Railway
AllowAcquireTrainTrack= true or false false If set to true, players will be able to use the /acquiretraintrack chat command. Railway
AcquireTrainTrackWhitelist= A coma separated list of player IDs If this option is set (contains at least 1 player ID), only admins and players listed in this whitelist will be able to use the /acquiretraintrack chat command. You can specify either regular IDs or EOS IDs (example: JoinTrainTribeWhitelist=11111111,b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2,33333333). Railway
AllowAcquireTrainTrackFromAnyTribe= true or false false If set to true, players will be able to temporarily acquire ownership of any train track using the /acquiretraintrack chat command (instead of tracks from the Public Railway Tribe only). Railway
AllowJoinTrainTribe= true or false false If set to true, players will be able to use the /jointraintribe and /leavetraintribe chat commands.
Important note: It is not recommanded to enable this feature, prefer using the /acquiretraintrack feature. It is not recommanded because players who joins the Public Railway Tribe will be able to do all sorts of things (like inviting new players, removing structures, and so on...) unless you setup tribe permissions and ranks properly, also because if they don't return to their tribe before the server stops/restarts they will get stuck inside Public Railway Tribe unless someone from their origin tribe invites them, and various other reasons... If you are sure that you want to enable this feature it is recommanded to also setup the JoinTrainTribeWhitelist= option (so that only admins and trusted players can use it).
Railway
JoinTrainTribeWhitelist= A coma separated list of player IDs If this option is set (contains at least 1 player ID), only admins and players listed in this whitelist will be able to use the /jointraintribe and /leavetraintribe chat commands. You can specify either regular IDs or EOS IDs (example: JoinTrainTribeWhitelist=11111111,b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2,33333333). Railway
MergeTrainTracksDelay= A number greater or equal to 60 (integer) 0 Defines the amount of time (in seconds) that server waits between two merging of Public Railway Tribe's tracks. Set to 0 to disable automatic tracks merging. Railway
PreventAutoDestroyDelay= A number greater or equal to 60 (integer) 0 Defines the amount of time (in seconds) that server waits between two auto-destroy disabling of Public Railway Tribe's tracks. Set to 0 to disable automatic auto-destroy disabling. Railway

Recommanded configuration options to add if you want to use the old method (in addition to the standard configuration options defined on the mod documentation main page):
TrainTribeID=PUBLIC_TRAIN_TRIBE_ID_HERE
TrainTribeOwnerName=PUBLIC_TRAIN_TRIBE_OWNER_NAME_HERE
TrainTribeOwnerID=PUBLIC_TRAIN_TRIBE_OWNER_ID_HERE
AllowAcquireTrainTrack=true
AcquireTrainTrackWhitelist=
AllowAcquireTrainTrackFromAnyTribe=false
AllowJoinTrainTribe=false
JoinTrainTribeWhitelist=
MergeTrainTracksDelay=3600
PreventAutoDestroyDelay=3600

Old chat commands

Chat command Explanations
/acquiretraintrack Temporarily acquire ownership of the train track you are looking at. This only works on the Public Railway Tribe's tracks (unless you enable the AllowAcquireTrainTrackFromAnyTribe= option).
/att Alias for /acquiretraintrack. Easier to type for console players. Added in v10.
/jointraintribe This makes you leave your current tribe and adds you into the Public Railway Tribe.
/leavetraintribe This makes you leave the Public Railway Tribe and adds you back into your tribe (the tribe you were in before using the /jointraintribe chat command).

Notes:

  • Only players belonging to a tribe can use chat commands.
  • When you use a chat command there is a 5 seconds wait time before you can use a chat command again.
  • If chat commands are not working, try to respawn your character (suicide or hover over the inventory implant for 5 seconds and click on "Respawn").
  • These commands are case-sensitive.

Old RCON commands

RCON command Explanations
ScriptCommand PublicTrain_SetTrainTribeInfo [TRIBE_ID],[TRIBE_OWNER_ID],[TRIBE_OWNER_NAME] Modifies the Public Railway Tribe info at runtime. Replace [TRIBE_ID] with the Public Railway Tribe's ID (an integer), [TRIBE_OWNER_ID] with the in-game ID of the player owning the Public Railway Tribe (an integer), and [TRIBE_OWNER_NAME] with the in-game name of the player owning the Public Railway Tribe (a string).
Note: It does not replace the values inside the GameUserSettings.ini file, so if you want a permanent change you will have to edit your ini file.
ScriptCommand PublicTrain_MergeTrainTracks Forces server to run the "Merge Train Tracks" task immediately (even if the task has been disabled by setting the delay to 0 inside GameUserSettings.ini).
ScriptCommand PublicTrain_PreventTracksAutoDestroy Forces server to run the "Prevent Train Tracks Auto-Destroy" task immediately (even if the task has been disabled by setting the delay to 0 inside GameUserSettings.ini).
ScriptCommand PublicTrain_SetTracksTribeRank [TRIBE_RANK] Updates the tribe rank on every tracks of the Public Railway Tribe. Replace [TRIBE_RANK] with the tribe rank (an integer between 0 and 9).
ScriptCommand PublicTrain_ServerWillShutdown Graceful shutdown of the Public Train mod's features. Using this RCON command is not mandatory, but using it before a server shutdown/restart is recommended if you do not display an in-game message "Server will shutdown in X seconds". It disables chat commands, disables acquiring train tracks, restores train tracks ownerships immediately (skips the AcquiredTrainTrackDuration= timer), and returns players to their origin tribes (those who joined the Public Railway Tribe with the chat command). This ensures that every train track returns to their owner and that every players return to their own tribe, in case someone acquires a train track or joins the Public Railway Tribe few seconds before server shutdowns/restarts.

Notes:

  • Admins can also run these commands from the console (example: cheat ScriptCommand PublicTrain_SetTrainTribeInfo 12345678,22222222,Marcel).
  • These commands are case-sensitive.