Page 1 of 1

Increasing ai count over 32 in lua

Posted: Sun Apr 05, 2020 3:19 pm
by kiprobin
All the modding tutorials on editing lua scripts i've found say that i can increase the bot count in lua files, and while i have been able to manipulate the bot count using this method, whenever i set it above 32 it just doesnt do it. here is the exact code i have:

SetupTeams{
all = {
team = ALL,
units = 64,
reinforcements = 500,
soldier = { "all_inf_rifleman_snow",30, 45},
assault = { "all_inf_rocketeer_snow",5,10},
engineer = { "all_inf_engineer_snow",5,10},
sniper = { "all_inf_sniper_snow",2,5},
officer = { "all_inf_officer_snow",1,4},
special = { "all_inf_wookiee_snow",1,4},

},
imp = {
team = IMP,
units = 64,
reinforcements = 500,
soldier = { "imp_inf_rifleman_snow",30, 45},
assault = { "imp_inf_rocketeer_snow",5,10},
engineer = { "imp_inf_engineer_snow",5,10},
sniper = { "imp_inf_sniper_snow",2,5},
officer = { "imp_inf_officer_snow",1,4},
special = { "imp_inf_dark_trooper",1,4},
},

When I munge and run it, it does have the 500 reinforcements but still only has the standard number of ai

Re: Increasing ai count over 32 in lua

Posted: Sun Apr 05, 2020 4:20 pm
by Delta-1035
You have to add "SetUberMode(1);" as explained here: http://www.gametoast.com/viewtopic.php?f=27&t=12147

Re: Increasing ai count over 32 in lua

Posted: Sun Apr 05, 2020 4:28 pm
by kiprobin
Got it, thanks so much mate! It's great to have a community like this to help new ppl learn

Re: Increasing ai count over 32 in lua

Posted: Sun Apr 05, 2020 8:51 pm
by AnthonyBF2
You can also use ScriptCB_SetGameRules("campaign") to force spawn the max units (64) but using that command forces everyone on team 1.