Units Wont Spawn After Minor Changes

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

Alexandus
Private Recruit
Posts: 18
Joined: Thu Sep 25, 2008 7:23 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Units Wont Spawn After Minor Changes

Post by Alexandus »

I made a map with some (what I thought would be) minor changes..but I have happened upon 2 problems:

-Units on both sides wont spawn (yes I defined all the CP's in the script file, generally I thought that was my problem)
-This is a Clone Wars era map...it wont let me switch to the CIS.


Any ideas on why this happens?
I have 8 CP's, 4 for each team..i double checked to make sure all the basics were in place (capture zones, spawn paths etc.)

EDIT: just as a note...all i did was change terrain height, add trees/other objects for scenery, add total of 8 CPs and modify the script to reflect added CPs and increased unit count.
obiboba3po
2008 Most Technically Challenging Avatar
Posts: 2376
Joined: Tue Feb 12, 2008 7:46 pm
Projects :: No Mod project currently.
Games I'm Playing :: League of Legends
xbox live or psn: No gamertag set
Location: NJ, USA

Re: Units Wont Spawn After Minor Changes

Post by obiboba3po »

this happens sometimes if in youre lua theres more or less cps being called up than are actually in the map. you might wanna post youre lua.
Alexandus
Private Recruit
Posts: 18
Joined: Thu Sep 25, 2008 7:23 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: Units Wont Spawn After Minor Changes

Post by Alexandus »

ok i fixed the spawning problem after looking at the LUA again...one of the numbers of a CP was posted twice...oops!! simple mistakes always give the biggest headaches lol

anyways does anyone know why i cant switch to the CIS?
woner11
Sith
Sith
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The lost world of pickels
Contact:

Re: Units Wont Spawn After Minor Changes

Post by woner11 »

Post your lua.
Alexandus
Private Recruit
Posts: 18
Joined: Thu Sep 25, 2008 7:23 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: Units Wont Spawn After Minor Changes

Post by Alexandus »

heres my LUA...the map will be for a "canyon ambush" map...CIS in the middle with AATs getting attacked by clones on either side of the hill...charging down with a couple TX-130's

EDIT: hopefully this isn't a simple "remove the -- from the walkers comment" thats the last thing i haven't tried..trying that now.
For the record though with this LUA none of my veh spawns will work..I have been able to get ATTE's working on other maps I've made though...wasn't sure of the principles on non legged vehicles..
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")

-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;


function ScriptPostLoad()


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp5 = CommandPost:New{name = "cp5"}
cp6 = CommandPost:New{name = "cp6"}
cp7 = CommandPost:New{name = "cp7"}
cp8 = CommandPost:New{name = "cp8"}
cp9 = CommandPost:New{name = "cp9"}




--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)
conquest:AddCommandPost(cp7)
conquest:AddCommandPost(cp8)
conquest:AddCommandPost(cp9)


conquest:Start()
SetUberMode(1);
DisableSPHeroRules()

end


---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()

ReadDataFile("ingame.lvl")


SetMaxFlyHeight(30)
SetMaxPlayerFlyHeight (30)

SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo

ReadDataFile("sound\\yav.lvl;yav1cw")
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_hover_fightertank",
"rep_hero_anakin",
"rep_hover_barcspeeder")
ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul",
"cis_hover_aat")


ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_laser",
"tur_bldg_tower")

SetupTeams{
rep = {
team = REP,
units = 2000,
reinforcements = 500,
soldier = { "rep_inf_ep3_rifleman",50, 1000},
assault = { "rep_inf_ep3_rocketeer",1, 4},
engineer = { "rep_inf_ep3_engineer",1, 4},
sniper = { "rep_inf_ep3_sniper",1, 4},
officer = {"rep_inf_ep3_officer",1, 4},
special = { "rep_inf_ep3_jettrooper",1, 4},

},
cis = {
team = CIS,
units = 3000,
reinforcements = 500,
soldier = { "cis_inf_rifleman",100, 2000},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_inf_droideka",1, 4},
}
}

SetHeroClass(CIS, "cis_hero_darthmaul")
SetHeroClass(REP, "rep_hero_anakin")


-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 4) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:AMB\\AMB.lvl", "AMB_conquest")
ReadDataFile("dc:AMB\\AMB.lvl", "AMB_conquest")
SetDenseEnvironment("false")
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Units Wont Spawn After Minor Changes

Post by [RDH]Zerted »

Alexandus wrote:...anyways does anyone know why i cant switch to the CIS?
Are your game options set to prevent team switching?
Alexandus
Private Recruit
Posts: 18
Joined: Thu Sep 25, 2008 7:23 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: Units Wont Spawn After Minor Changes

Post by Alexandus »

I havent touched them...on any other map I can switch without problem...it seems to only happen to my maps after I start making modifications to the original munge done by ZE
User avatar
Tourny
Command Sergeant Major
Command Sergeant Major
Posts: 289
Joined: Sat Sep 27, 2008 5:58 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Crifton
Contact:

Re: Units Wont Spawn After Minor Changes

Post by Tourny »

I found two things I'm not sure about...

1. textATT = "game.modes.con",
textDEF = "game.modes.con2",

is that always there?

and 2.

SHouldn't there be a return between ReadDataFile Rep and ReadDAtaFIle CIS?
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Units Wont Spawn After Minor Changes

Post by Frisbeetarian »

It's as easy as checking the template conquest Lua from the ModTools... and the answer is yes that text is always there, and no there doesn't need to be a space.
User avatar
Tourny
Command Sergeant Major
Command Sergeant Major
Posts: 289
Joined: Sat Sep 27, 2008 5:58 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Crifton
Contact:

Re: Units Wont Spawn After Minor Changes

Post by Tourny »

I would have, but I don;t happen to have mod tools installed on my current computer XD
Alexandus
Private Recruit
Posts: 18
Joined: Thu Sep 25, 2008 7:23 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: Units Wont Spawn After Minor Changes

Post by Alexandus »

it now seems that I can add as many AATs as i want without a problem..but adding a republic hover veh isn't working at all.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Units Wont Spawn After Minor Changes

Post by [RDH]Zerted »

Thats something that would be producing output in the error log. Find your's and post it.
Alexandus
Private Recruit
Posts: 18
Joined: Thu Sep 25, 2008 7:23 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: Units Wont Spawn After Minor Changes

Post by Alexandus »

found something in the addme file that looks like an error log but it says:

Logging ScriptMunge
02:01:2509/29/08
0 Errors 0 Warnings

that was the last time i munged the lvl.

also in the VisualMunge file itself it says:

Munging AMB.PTH
Munging AMB_conquest.PTH
Munging AMB.req
Munging AMB.req
The system cannot find the path specified.
The system cannot find the path specified.
Munging addme.lua...done.
Copying files to Battlefront II directory:
"C:\Program Files\LucasArts\Star Wars Battlefront II\GameData"
Addon dir exists, continuing...

this help at all?
-_-
Gametoast Staff
Gametoast Staff
Posts: 2678
Joined: Sat May 07, 2005 1:22 pm

Re: Units Wont Spawn After Minor Changes

Post by -_- »

Alexandus wrote: SetupTeams{
rep = {
team = REP,
units = 2000,
reinforcements = 500,
soldier = { "rep_inf_ep3_rifleman",50, 1000},
assault = { "rep_inf_ep3_rocketeer",1, 4},
engineer = { "rep_inf_ep3_engineer",1, 4},
sniper = { "rep_inf_ep3_sniper",1, 4},
officer = {"rep_inf_ep3_officer",1, 4},
special = { "rep_inf_ep3_jettrooper",1, 4},
},
cis = {
team = CIS,
units = 3000,
reinforcements = 500,
soldier = { "cis_inf_rifleman",100, 2000},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_inf_droideka",1, 4},
}
}
lol? I remember seeing something that Penguin posted regarding the max units per team being around the 150's.
Alexandus
Private Recruit
Posts: 18
Joined: Thu Sep 25, 2008 7:23 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: Units Wont Spawn After Minor Changes

Post by Alexandus »

i was testing something with extremely high numbers to see how it affected gameplay...it didn't do a whole lot, i dont have a screen full of units...its a lot, but not as many as i wanted (I have a high end system, wanted to see how many i could get on there)
-_-
Gametoast Staff
Gametoast Staff
Posts: 2678
Joined: Sat May 07, 2005 1:22 pm

Re: Units Wont Spawn After Minor Changes

Post by -_- »

No, it has nothing to do with having a high end system or not. It's the game. It doesn't matter what values you put if it stops spawning at a certain amount of AI per team.
Alexandus
Private Recruit
Posts: 18
Joined: Thu Sep 25, 2008 7:23 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: Units Wont Spawn After Minor Changes

Post by Alexandus »

I wasn't aware of the limits of the system if you activated ubermode...BUT i have good news! (at least for me)
I toned the units down to 150 and now I can switch teams again...I guess the system really didn't like that high number..just went :eek:

I still cant spawn any TX-130's though..which is odd...to note all i did for the AATs was in ZE for the CISDEF field I put cis_hover_aat....the same as in the Republics spawn points under REPATK I put rep_hover_fightertank

am i missing something?
User avatar
Culvar
1st Lieutenant
1st Lieutenant
Posts: 429
Joined: Thu Jul 10, 2008 10:36 am

Re: Units Wont Spawn After Minor Changes

Post by Culvar »

Do you have alot of AATs? If so, you may have filled up the hove mem pool.
Alexandus
Private Recruit
Posts: 18
Joined: Thu Sep 25, 2008 7:23 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: Units Wont Spawn After Minor Changes

Post by Alexandus »

no i tried with having 2 TX-130's and no AATs with no luck...then adding only 1 AAT let ONLY the AAT to appear...
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: Units Wont Spawn After Minor Changes

Post by MercuryNoodles »

The lua looks fine on the vehicular front, so I think the problem lay in the world somewhere. In any case, we need to see an error log. Run the map using bf2_modtools.exe, and it'll write an error log named Bfront2.log.
Post Reply