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

Private Recruit
Posts: 18
Joined: Fri Mar 16, 2018 6:27 pm
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront 2
xbox live or psn: No gamertag set

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

Postby LordVGames » Sat Mar 09, 2019 4:12 pm

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: Select all
   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}
      },
   }


When the AI are trying to respawn, in the debug log, I get a lot of this message:
Hidden/Spoiler:
Code: Select all
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?


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.

Private
User avatar
Posts: 42
Joined: Sun Jan 14, 2018 7:02 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF3 Legacy
xbox live or psn: No gamertag set

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

Postby angolandelegate » Sun Mar 10, 2019 11:25 pm

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.

Sith Master
User avatar
Posts: 2638
Joined: Mon Aug 04, 2008 10:32 am
Location: Pizza Land
Projects :: TOR GCWII GCW1035
xbox live or psn: Johnny_Sciroppo

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

Postby Delta-1035 » Mon Mar 11, 2019 11:15 am

Do you have a mod that spawns hero AIs installed?

Private Recruit
Posts: 18
Joined: Fri Mar 16, 2018 6:27 pm
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront 2
xbox live or psn: No gamertag set

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

Postby LordVGames » Thu Mar 14, 2019 11:51 am

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!

Sith Master
User avatar
Posts: 2638
Joined: Mon Aug 04, 2008 10:32 am
Location: Pizza Land
Projects :: TOR GCWII GCW1035
xbox live or psn: Johnny_Sciroppo

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

Postby Delta-1035 » Fri Mar 15, 2019 4:13 am

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.

Return to SWBF2 Modding

Who is online

Users browsing this forum: No registered users and 1 guest