Total War: WARHAMMER III

Total War: WARHAMMER III

106 ratings
Modding Development Tools: Lua Console!
2
3
   
Award
Favorite
Favorited
Unfavorite
ui
Tags: mod
File Size
Posted
Updated
381.010 KB
9 Apr, 2022 @ 11:02am
7 Sep, 2022 @ 4:57pm
8 Change Notes ( view )

Subscribe to download
Modding Development Tools: Lua Console!

Description
Happy Warhammer III! This one is a relatively simple mod, used for running Lua code within the game. Built heavily off of existing Creative Assembly scripts and UI files, which have been changed pretty majorly for further functionality.

How To Use
In-game, press "Shift+F3". This will open up the Lua Console window. From there, you can move the window around, type in your code into it, and execute it using the "Run" button. You can also use the "Clear" button to empty out the console completely.

You can run `console_print()` to print things out to the console (either from within the console, or within your external Lua files), or you can `return` things to get them printed out to the console. The console will also print out an error if any is found in your code.

Right now, there is support for only 8 lines of code, but each line can go as long as you would like. Next patch will include a vertical scroll so there can be a much higher limit of lines.

Any Lua variable that exists within the global scope (ie. it isn't defined as "local") can be accessed within the Lua Console - it can trigger listeners, print out info, call "cm" if it's available, and so on.

If you aren't planning on using Lua, this mod probably isn't necessary for you.

If you'd like easier-to-use commands, a la older Age of Empires games, use
https://steamproxy.net/sharedfiles/filedetails/?id=2791241084.

API
The following global functions are added by this mod:

console_print(text) -- prints out the text provided to the Console itself. console_printf(text, ...) -- prints out the text provided to the Console itself, after using string.format() on the text provided. You can use, for instance, `console_printf("My name is %s", "Charles")` to print "My name is Charles". More info at http://www.cplusplus.com/reference/cstdio/printf/ t_get(table, index) -- returns the value found in the table at index. Long-hand workaround for `value = table[index]`. t_set(table, index, value) -- sets the value to the table at index. Long-hand workaround for `table[index] = value`
Roadmap
Future updates will include Quality of Life improvements, as well as introductions of other forms of modding development tools - more ways to access game information, quick-use buttons to interact with the world similar to RimWorld's development tools, etc.

Check out the planned updates, the progress, and download the updated packs at https://github.com/chadvandy/devtools


[discord.gg]
Popular Discussions View All (1)
0
7 Sep, 2022 @ 8:49pm
Help
Zacarriss
33 Comments
Xeonzs 5 Jul @ 5:57pm 
This remains to be a life saver when it comes to joy.
Drycha remains suicidal, refusing to confed even when she's down to her last army, but I want coeddil to be with his fellow first ancient treeman durthu, brothers in arms.
I just spawn my own coeddil with this mod.
zerkeron 22 May @ 2:15pm 
Hi, thanks for the mod.
Thanks to you I could create a workaround for a bug regarding the "Nurgle Plagues Locked".
The Plagues button was not unlocking, even after acquiring 6000+ infections.
So I wrote a LUA-Script that just manually unlocks the button, and ran it with your mod.
Klissan 23 Mar @ 11:46pm 
Thank you for the mod - saved me a lot of time especially to test things in multiplayer
MobǂActarion 4 Nov, 2023 @ 7:16am 
No worries :) thanks for the head up!
Groove Wizard  [author] 30 Oct, 2023 @ 1:41pm 
No news yet. Haven't had much time or energy to do any modding. This and MCT are probably going to get an update maybe this or next quarter, they need a big facelift and they both have big in-progress rewrites. Sorry I don't have better info, modding has been a drag lately.
MobǂActarion 28 Oct, 2023 @ 8:08pm 
Hello, Not wanting to be a pain but, any news about update ? :) thanks
Not effective
kyokamaru 17 Jul, 2023 @ 9:25am 
shift F3 does nothing.
Mortarch Of Blood 13 Jul, 2023 @ 11:38am 
Nice one, I look forward to seeing what you do with it! GL
Groove Wizard  [author] 12 Jul, 2023 @ 6:46am 
Not yet, I'm giving the Lua Console a pretty major facelift atm which does include the button and some fixed functionality.