[Resource] Unofficial Lua Scripting and Modding Documentation

I’ve been working on a comprehensive scripting reference wiki. It’s a work-in-progress. The idea is to produce in-depth API documentation to support modders.

I have data to fill out all the class pages, but it will take some time to format everything.

Pages that exist:

6 Likes

Very interesting and helpful work! I’m a big follower of your great mods on Nexusmods.

Did you investigate the process if we can update/overwrite entries in the DB without the need to fully replace the whole .XML + including a zero .TBL file?

As far as I can tell, WH is using CryEngine’s built-in XML/TBL loader, so that’s not really possible without writing a new loader. It might be possible to use the DLC loader, but that would add a lot of complexity to creating mods, nevermind requiring mod names to be patched into WHGame.dll at runtime.

That said, and this doesn’t really help with patching in data, there’s a command I haven’t tested, which could force the game to load XML files first - eliminating the need to create empty TBL files.

The game may also support loading data from an SQL database. These commands exist:

wh_sys_PreferredDB SQL,XML,TBL
wh_sys_SQLServer
wh_sys_SQLDatabase
wh_sys_SQLUser
wh_sys_SQLPassword
wh_sys_SQLBranch
wh_sys_SQLWritable

But I have no idea if SQL is only available to the game in DevMode running through the CryEngine Editor.

1 Like

thanks for making the documentation… will be a great help in making future mods

Thanks a lot for your informations!
So it seems very complicated or probably not even possible.

I asked this here as I’m absolutely not an experienced scripter or programmer. I just thought this info could be helpful somehow for thinking about it.

I know from modding Civilization 6 that SQL Databases which use .XML files can be updated with “Update” codes in own .XML files. So that only the values within a .XML file which we want to change are touched. So far I didn’t had any luck that it works.

Something like:

	<Update>
		<Where rpg_param_key="BaseInventoryCapacity"/>
		<Set rpg_param_value="200"/>
	</Update>

But as you wrote, if this update process is locked from the engine or CryEngine, then we can’t even update directly the database to overwrite only specific entries.

Hopefully the developers will give us some insight or a hint if updating certain rows in a .XML file is even possible. As if each mod has to contain always the whole .XML file, then so many mods will be highly incompatible to each other.

Just added a new table of RPG parameters and their descriptions. See original post or wiki for link.

Note: The descriptions were dumped directly from the game; there are typos and misspellings, but the parameter names are correct. The descriptions will be cleaned up later.

1 Like

Very nice and thanks a lot for the new RPG list!

Updated the RPG Parameters table with default values.

1 Like

first and foremost, thanks for putting this together.

Not easy to read wiki tables on my phone. not clear why monks considered low class. In medieval times, the church wielded considerable power and as in the game some were youngest sons of nobility. so, WH coded the monks and father(s) as low class?

I’m interested in the resources (objects). Is there a list of all raw food type (garlic, carrot, etc), fabric (damask, etc), alchemy ingredients (belladonna, etc), farm animals, etc

I can put that together later tonight.

Thank you 10 chars