Increasing ai count over 32 in lua

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
kiprobin
First Lance Corporal
First Lance Corporal
Posts: 120
Joined: Wed Dec 11, 2019 3:52 pm
Projects :: Trench War
Games I'm Playing :: Swbf2
xbox live or psn: No gamertag set

Increasing ai count over 32 in lua

Post 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
User avatar
Delta-1035
Sith Master
Sith Master
Posts: 2651
Joined: Mon Aug 04, 2008 10:32 am
Projects :: TOR GCWII GCW1035 BF1035
xbox live or psn: Johnny_Sciroppo
Location: Pizza Land

Re: Increasing ai count over 32 in lua

Post by Delta-1035 »

You have to add "SetUberMode(1);" as explained here: http://www.gametoast.com/viewtopic.php?f=27&t=12147
kiprobin
First Lance Corporal
First Lance Corporal
Posts: 120
Joined: Wed Dec 11, 2019 3:52 pm
Projects :: Trench War
Games I'm Playing :: Swbf2
xbox live or psn: No gamertag set

Re: Increasing ai count over 32 in lua

Post by kiprobin »

Got it, thanks so much mate! It's great to have a community like this to help new ppl learn
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: Increasing ai count over 32 in lua

Post 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.
Post Reply