全面战争:战锤3

全面战争:战锤3

153 个评价
Modding Development Tools: Lua Console!
2
3
   
奖励
收藏
已收藏
取消收藏
ui
标签: mod
文件大小
发表于
更新日期
381.010 KB
2022 年 4 月 9 日 上午 11:02
2022 年 9 月 7 日 下午 4:57
8 项改动说明 ( 查看 )

订阅以下载
Modding Development Tools: Lua Console!

描述
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://psteamcommunity.yuanyoumao.com/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]
热门讨论 查看全部(1)
0
2022 年 9 月 7 日 下午 8:49
Help
Zacarriss
36 条留言
Xeonzs 9 月 14 日 上午 10:52 
Actually it seems the entire copy feature is broken, even lines without ' or " won't paste.
Xeonzs 9 月 14 日 上午 10:38 
Considering this hasn't been updated, will the paste feature be fixed someday?
It used to work just a few months ago, but now it doesn't and hovering over the button this appears to be a known issue.

I always had a script saved so that when I started a new Durthu campaign I could add Coeddil to my faction, as Drycha usually died before she'd confed me.
Typing out the entire thing would be too prone to errors and it's a relatively long script compared to the "gimme resources" commands.
matheusgames 2 月 5 日 下午 12:26 
Hello, is there any command to restart or force completion of the Malakai adventure missions?
Xeonzs 2024 年 7 月 5 日 下午 5:57 
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 2024 年 5 月 22 日 下午 2:15 
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 2024 年 3 月 23 日 下午 11:46 
Thank you for the mod - saved me a lot of time especially to test things in multiplayer
MobǂActarion 2023 年 11 月 4 日 上午 7:16 
No worries :) thanks for the head up!
Groove Wizard  [作者] 2023 年 10 月 30 日 下午 1:41 
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 2023 年 10 月 28 日 下午 8:08 
Hello, Not wanting to be a pain but, any news about update ? :) thanks
等等我,正在使用健胃消食片 2023 年 10 月 16 日 上午 7:44 
Not effective