全面战争:战锤3

全面战争:战锤3

Drunk Flamingo's Gnoblar Snacks
DrunkFlamingo  [开发者] 2022 年 6 月 7 日 上午 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
最后由 DrunkFlamingo 编辑于; 2022 年 6 月 7 日 上午 8:35
< >
正在显示第 1 - 1 条,共 1 条留言
Insane Uruk 2023 年 4 月 29 日 上午 2:10 
Thank you! I never modded. I'm thinking I could start now using this template to start practicing.
< >
正在显示第 1 - 1 条,共 1 条留言
每页显示数: 1530 50