No more AI spawn after the initial start of the map [Solved]

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
LordVGames
Private Recruit
Posts: 21
Joined: Fri Mar 16, 2018 6:27 pm
Games I'm Playing :: BF2+a little of BF1

No more AI spawn after the initial start of the map [Solved]

Post by LordVGames »

Once I start a map with my modded sides, AI will spawn fine, no problems. There isn't a class that doesn't spawn at least once at the start, either. But, after all the AI die, they aren't able to respawn. I'm able to hear the sound of their primary weapon as they attempt to spawn, but there's nothing there. This happens with both sides, too.

Here's the SetupTeams part of one of my luas. My modded side replaces GCW sides, but I don't think that makes a difference.
Hidden/Spoiler:
[code] SetupTeams{
all = {
team = ALL,
units = 20,
reinforcements = 150,
soldier = { "tf2_inf_scout",3,15},
assault = { "tf2_inf_soldier",3,15},
engineer = { "tf2_inf_engi",3,15},
sniper = { "tf2_inf_demoman",3,15},
officer = { "tf2_inf_heavy",3,15},
special = { "tf2_inf_pyro",3,15}
},
imp = {
team = IMP,
units = 20,
reinforcements = 150,
soldier = { "tf2_inf_scout",3,15},
assault = { "tf2_inf_soldier",3,15},
engineer = { "tf2_inf_engi",3,15},
sniper = { "tf2_inf_demoman",3,15},
officer = { "tf2_inf_heavy",3,15},
special = { "tf2_inf_pyro",3,15}
},
}[/code]
When the AI are trying to respawn, in the debug log, I get a lot of this message:
Hidden/Spoiler:
[code]Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Character.cpp(1217)
Trying to spawn a character with no class. Skipping this character. Perhaps the UnitClassCounts are too low?[/code]
I thought the UnitClassCounts were the 2 numbers after the class name in the SetupTeams part. Did I not change the right numbers? Or is it something else?

Thanks for the help!
Last edited by LordVGames on Thu Mar 14, 2019 11:52 am, edited 1 time in total.
User avatar
angolandelegate
Private Third Class
Posts: 55
Joined: Sun Jan 14, 2018 7:02 pm
Projects :: BF2 Expanded The Post Endor Era
Games I'm Playing :: SWBF3 Legacy
xbox live or psn: No gamertag set
Contact:

Re: No more AI spawn after the initial start of the map

Post by angolandelegate »

All you properly reading all the classes that are being referenced in the Set Up Teams? If you commented out tf2_inf_pyro in your read section, for example, that could be the cause of the issue.
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: No more AI spawn after the initial start of the map

Post by Delta-1035 »

Do you have a mod that spawns hero AIs installed?
LordVGames
Private Recruit
Posts: 21
Joined: Fri Mar 16, 2018 6:27 pm
Games I'm Playing :: BF2+a little of BF1

Re: No more AI spawn after the initial start of the map

Post by LordVGames »

Delta-1035 wrote:Do you have a mod that spawns hero AIs installed?
Sorry for the super late reply, but actually yes, I have the swbf2 remastered mod that gives the 1080p menu and AI heroes. And yes, disabling the option to have AI heros fixes it. Maybe because I've removed the lines in my map luas to give each side a hero?

Anyways, thanks!
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: No more AI spawn after the initial start of the map

Post by Delta-1035 »

LordVGames wrote:Maybe because I've removed the lines in my map luas to give each side a hero?
I had the same no spawn error on a couple of stock maps with my custom era, the issue was that the setheroclass was calling for a certain hero (ex. hansolo) but I was loading leia from the all.lvl. It was the same with both maps.
My guess is that the ai hero script is trying to spawn the hero, but it can't find it so it messes up all the unit spawns somehow.
Post Reply