Total War: WARHAMMER III

Total War: WARHAMMER III

Drunk Flamingo's Gnoblar Snacks
DrunkFlamingo  [udvikler] 7. juni 2022 kl. 7:59
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
Sidst redigeret af DrunkFlamingo; 7. juni 2022 kl. 8:35
< >
Viser 1-1 af 1 kommentarer
Insane Uruk 29. apr. 2023 kl. 2:10 
Thank you! I never modded. I'm thinking I could start now using this template to start practicing.
< >
Viser 1-1 af 1 kommentarer
Per side: 1530 50