Total War: WARHAMMER III

Total War: WARHAMMER III

Drunk Flamingo's Gnoblar Snacks
DrunkFlamingo  [developer] 7 Jun, 2022 @ 7:59am
Submod Template: Adding Gnoblar Units
This template is for adding new Gnoblar units to the system, so that they are edible in campaign.


Create a .lua file in script/campaign/mod.

Place the following code in that file.


local my_gnoblars = {
"my_custom_unit",
"my_second_custom_unit"
}

local gnoblar_snacks = core:get_static_object("df_gnoblar_snacks")
if gnoblar_snacks then
cm:add_first_tick_callback(function ()
for i = 1, #my_gnoblars do
gnoblar_snacks.set_unit_is_gnoblar(my_gnoblars[i])
end
end)
end

then put your main_units keys into the my_gnoblars list. All entries should be separated by a comma.


You can find an example packfile here: https://drive.google.com/file/d/1VA7eheHw1MuHbFWbfo-eyDz2jjD1ILhx/view?usp=sharing
Last edited by DrunkFlamingo; 7 Jun, 2022 @ 8:35am
< >
Showing 1-1 of 1 comments
Insane Uruk 29 Apr, 2023 @ 2:10am 
Thank you! I never modded. I'm thinking I could start now using this template to start practicing.
< >
Showing 1-1 of 1 comments
Per page: 1530 50