Total War: ROME II - Emperor Edition

Total War: ROME II - Emperor Edition

69 ratings
Consul Scriptum | Rome 2 Scripting Console
4
2
2
   
Award
Favorite
Favorited
Unfavorite
Tags: mod, UI
File Size
Posted
Updated
621.485 KB
27 Feb @ 2:26pm
9 Apr @ 6:00am
14 Change Notes ( view )

Subscribe to download
Consul Scriptum | Rome 2 Scripting Console

Description
For full (AI generated) documentation see https://deepwiki.com/bukowa/ConsulScriptum

Consul: In ancient Rome, a consul was one of the two highest-ranking elected officials who jointly governed the republic. The term later came to denote high-ranking officials or diplomats in other contexts.

Scriptum: This means "written" (from the verb scribere, "to write"). It can refer to a document, text, or written work.

Literally, "Consul Scriptum" translates to "written consul" or "the consul's writing." However, this phrasing is not a standard Latin expression or historical term. Its meaning would depend on context: It could metaphorically imply "the written authority" or "a document issued by a consul." In a creative or modern context, it might be used as a title for a fictional work, legal decree, or diplomatic text.

In reality, this is a scripting console for Total War: Rome II.



The overall concept is split into three parts:

Console
The console gives you raw access to Lua and all the extra commands I implement and distribute with the mod.

Consul (Non-Technical)
A window with a list of scripts that you can activate with a click. This provides a non-technical way to use scripts included in the mod—such as the character-kill script—without needing to interact with the console, making it more immersive.



Scriptum (Technical)
This allows you to write your own scripts, place them in the game data folder, and execute them with a click. No need to restart the game—just reopen the Consul to load new scripts (this is not required after changing an existing script).

Included Scripts
Few simple scripts are already included:
  • Ad Rebellos - Spawns a rebellion in the selected settlement.
  • Adice Provinciam - Transfers settlement ownership.
  • Exterminare - Kills any unit or character.

Extra Features
  • You can drag & drop the window.
  • You can minimize Consul and Scriptum by clicking on the arrows, so the console doesn't take up half your screen.
  • The tool remembers your position, so it always opens in the same spot.
  • Soon, I'll add a feature to remember which panels you have minimized.

Limitations
  • Cannot use ENTER to send command.
  • Cannot use arrow keys to navigate command history.
  • Cannot use TAB key for command autocomplete.
  • Cannot use the mouse to select text from command history.
  • Cannot paste long commands - but you can type them...?!🤷 (I have no idea how to handle this and this is very annoying. Current workaround: use scripting files via Scriptum, as they load dynamically.)
  • Scriptum accepts only 10 custom scripts for now (I can't find a way to dynamically create components - if anyone needs more, just let me know).
  • Doesn't work in battle (I can't find a way to access UIComponent in battle - it’s probably restricted on purpose by CA).
  • To use consul in campaign battles switch with command `/use_in_battle`
  • Vertical Slider won't scroll back to the top automatically (*I can't find a way to do this)

FAQ

  • I received "unfinished string near '<eof>'" when pasting a long command:
    - This happens because I can't properly handle long input. To work around this, paste the command into `scriptum.lua` in the game directory and execute it from the Scriptum menu by clicking on `scriptum.lua`.
    - I'll try to fix this—it's really annoying.

Tags
- scripting, console, debug

Load order
Modifies only these files, and should be placed above all others.


Source code
- https://github.com/bukowa/ConsulScriptum
Feel free to reuse and redistribute and do whatever you like.

Bugs
Please report any bugs in the GitHub repository, as it's difficult to track them here.

Credits
- DEI Modding Workshop discord channel and everyone there, especially for the Latin names

This mod wouldn't be possible without
- https://github.com/taw/etwng
- https://github.com/Cpecific/twwh2_ctm
- extra information from Jake Armitage

For editing the UI files I created this little plugin
- https://github.com/bukowa/twuiplug
- https://plugins.jetbrains.com/plugin/26431-twuiplug

Some game API documentation:

https://wiki.totalwar.com/w/Total_War:_ATTILA_KIT_-_Campaign_Script_Interface (Rome 2 is similiar to Attila)
https://chadvandy.github.io/tw_modding_resources/Troy/index.html (Rome 2 is similiar to Troy)
https://tw-modding.com/wiki/Main_Page
I started building one docs myself https://bukowa.github.io/twr2docs/
64 Comments
bukowa  [author] 25 Jun @ 7:17pm 
Hey, no time atm
Dark Diamond 23 Jun @ 4:27am 
Nice, could you make a civil war one?
Felixdogdog1314 16 Jun @ 8:02am 
ok, thank you i will take a look at it and learn to create one
bukowa  [author] 16 Jun @ 7:15am 
Rome 2 has no docs for API but most of the Atilla or Troy works https://wiki.totalwar.com/w/Total_War:_ATTILA_KIT_-_Campaign_Script_Interface
https://chadvandy.github.io/tw_modding_resources/Troy/index.html
https://tw-modding.com/wiki/Main_Page
I started building one docs myself https://bukowa.github.io/twr2docs/
Look into source code of Consul to see how its used
Felixdogdog1314 15 Jun @ 9:19pm 
hi may i ask how do i find other command scripts like add money to my faction or give movement point to my troops? is there a list of command script i can look for?
oujosh29 2 Jun @ 11:49pm 
Can you dm me? I'm willing to pay for some mods or scripts.
bukowa  [author] 29 May @ 4:15am 
I dont know this mod
oujosh29 28 May @ 6:35pm 
I asked in that discord. I've asked in a couple, no luck. All I've learned is the Major Factions mod is definitely not working.
bukowa  [author] 28 May @ 5:46pm 
oujosh29 27 May @ 3:27pm 
I'm really trying to learn scripting to fix the Major Factions auto resolve mod. Is there any chance you can dm me help with please?