- Introduction
- Background Script Setup
- Enable Script Logging
- Triggers, conditions, events & commands
- RomeShell Commands List
Rome Remastered supports the same scripting langauge as the original Rome Total War however script support has been extended so a mod can now run a background script.
- Create the following file inside your mod, you can use a copy the file from game data as a starting point.
data/world/maps/campaign/imperial_campaign/descr_strat.txt
- At the bottom of the
descr_strat.txt
file add in the name of your custom script. - Create a script txt file in the following location
data/world/maps/campaign/imperial_campaign/
and make sure it matches the the file name listed in point 2.
When scripting you can get errors and items not triggering that need to be debugged. To assist with this we have a seperate verbose script logging mode. You need to add the string verbose_script_logging
to the advanced options (see screenshot).
Once enabled you will find an extra file in the following location:
/VFS/Local/Rome/logs/scripting_log.txt
This option can be combined with other options like enable_logging
. Please be aware the verbose script logging is very verbose. This is great for debugging issues line by line but the text file will start to get quite large if you play for an extended time and/or have complex scripts.
When the game is launched the game will generate 3 files inside /VFS/Local/Rome/documentation
these will document the following available commands, conditions and events you can use in scripts.
These three files are similar to the ones you may have seen for the original game but do contain some new commands. A list of the new items can be seen below but refer to the full documenation files for further details.
There are also the following UI elements and console commands that can be used, files listing all of the individual commands and elements are linked below:
Items below highlighted
are potentially very useful to complex modding scripts.
In total around 100 new events have been added to the dictionary for the Remaster. The majority of the new commands are linked to the ability to track user interaction with the game related to the in campaign tutorial system.
However there are a few new events that have been added to improve modding control and support new features these include:
TakeOffice
- Supports new senate modding capabilitiesLeaveOffice
- Supports new senate modding capabilitiesNewTurnStart
- Allows scripts to trigger at the beginning of a turnScriptPromptCallback
- A script prompt has received player inputFactionDestroyed
- Allows scripts to react to when a faction is destroyed
You can find out more details of all the new features on the Scripts Events page.
In total just over 50 new conditions have been added to the dictionary for the Remaster. The majority of these new commands are aimed to improve modding control of the game play and support new features the highlights include:
- Diplomatic status - Check diplomatic status between two factions
IsAlly
IsProtectorate
IsProtector
IsSameSuperfaction
at_war
- Settlement Checks - Check the status of a settlement or region.
IsCapital
- Is this settlement the faction capitalI_SettlementOwnerCulture
- Is this settlement controlled by a faction with this culture?I_SettlementLevel
- Is this settlement at this level?SettlementCapabilityLevel
- Test to see if the settlement has a capability at a particular levelSettlementOrderLevel
- Test to see if the settlements order factor is at a particular levelHomeSettlementBuildingExists
- Test to see if the home settlement of the triggering character has a building at a particular levelHasResource
- Does the region have this resource?SettlementRevoltingFrom
- Used with revolt faction spawning script ability
- Character Checks - Check details of a specific character
CharacterName
- Checks for a given characters nameDistanceCapital
- Does the characters distance to the faction capital exceed the given threshold?I_CharacterNameNearTile
- Is a particular character near a particular tile?HasOffice
- Checks if a character holds a senate office
FactionIsAlive
- Checks if the given faction is aliveMajorEventActive
- Supports new multiple major event feature (marian reforms etc).I_CompareCounter
- Compare a script counter to a valueLangIs
- Test game language, can use to warn players if language is unsupported in mod.
You can find out more details of all the new features on the Scripts Conditions page.
In total around 100 new events have been added to the dictionary for the Remaster. The majority of the new commands are linked to the ability to track user interaction with the game related to the in campaign tutorial system.
However there are a few new events that have been added to improve modding control and support new features these include:
message_prompt
- Creates a new news message with a simple yes/no prompt and will pass the users responce back to the game for processing.- Senate - The senate(s) can now be modded so has the following commands
override_superfaction_popularity
- Disable normal superfaction popularity processing so that it can be controlled by a scriptset_faction_senate_standing
- Set the senate standing of a given factionset_faction_people_standing
- Set the senate standing of a given faction
- Scripting Features
declare_persistent_counter
- declare a counter that will be persistent between saves (these counters are stored inside the players save game)break
- immediately exit the current scopereturn
- return a value from the script and terminate, used for faction spawn scriptscounter_operation
- Sets the result counter to the result of the expression.store_counter
- Stores a counter with the label specifiedretrieve_counter
- Extacts a counter with the given labelfor_each
- Iterate through all instances of a certain type within a given scopegoto
- jump to a place in the script marked by a labelset_label
- Set a label that can be jumped to with a Goto statementif_not
- conditions to satisfy to execute the scopescript_log
- logs a message to the log file (if enabled)while_not
- start a while not loop
- Control Ambient Objects on Campaign Map
set_ao_visible
- Control a specific objectset_all_ao_visible
- Toggle all ambient objects
- Regional and Settlement Commands
add_religion
- Add commitment to a given religion into a regionadd_hidden_resource
- add a hidden resource to a given regioncreate_mercenary_pool
- Create a mercenary pooldestroy_building
- destroy a building in a settlementmove_to_settlement
- Moves the camera position to a settlementremove_hidden_resource
- remove a hidden resource to a given regionrename_settlement_in_region
- rename a settlement to a given name
spawn_character_child
- Spawns a new character with given parameters and a given fathertrigger_marriage_proposal
- Triggers a marriage proposal for a player
You can find out more details of all the new features on the Scripts Commands page.
We output the commands for RomeShell into a docudemon file. When the game is launched the game will generate the file in your /VFS/Local/Rome/documentation
folder.
You can find a copy of the file on the RomeShell page.