Locals problem

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
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Locals problem

Post by elfie »

I followed the tutorial on adding locals from the FAQ, but oddly when I go to play my map no locals show up. I am loading them from an edited wookie side also, Here is my lua:
Hidden/Spoiler:
[code] -- Empire Attacking (attacker is always #1)
local ALL = 2
local IMP = 1
-- These variables do not change
local ATT = 1
local DEF = 2

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"}


--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:Start()
SetUberMode(1);
EnableSPHeroRules()

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(410)
SetMaxPlayerFlyHeight(410)


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\\end.lvl;end1gcw")
ReadDataFile("dc:SIDE\\all.lvl",
"all_inf_rifleman",
"all_inf_rocketeer",
"all_inf_sniper",
"all_inf_engineer",
"all_inf_officer",
"all_inf_wookiee",
"all_hero_leia",
"all_fly_kwing",
"all_hero_obiwan")

ReadDataFile("dc:SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer_gray",
"imp_inf_dark_trooper",
"imp_hero_bobafett",
"imp_hero_darthvader",
"imp_fly_trooptrans",
"rep_hero_cloakedanakin")

ReadDataFile("dc:SIDE\\wok.lvl",
"wok_inf_warrior",
"wok_inf_rocketeer",
"wok_inf_mechanic")


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

SetupTeams{
all = {
team = ALL,
units = 35,
reinforcements = 160,
soldier = { "all_inf_rifleman",19, 28},
assault = { "all_inf_rocketeer",4,6},
engineer = { "all_inf_engineer",4,6},
sniper = { "all_inf_sniper",4,6},
officer = { "all_inf_officer",3,4},
special = { "all_inf_wookiee",2,3},

},
imp = {
team = IMP,
units = 35,
reinforcements = 160,
soldier = { "imp_inf_rifleman",19, 28},
assault = { "imp_inf_rocketeer",4,6},
engineer = { "imp_inf_engineer",4,6},
sniper = { "imp_inf_sniper",4,6},
officer = { "imp_inf_officer_gray",3,4},
special = { "imp_inf_dark_trooper",2,3},
},
}

SetTeamName (3, "wookies")
AddUnitClass(3, "wok_inf_warrior",5)
AddUnitClass(3, "wok_inf_rocketeer",5)
AddUnitClass(3, "wok_inf_mechanic",5)
SetUnitCount (5, 10)
AddAIGoal(3, "Deathmatch", 100)
SetTeamAsEnemy(ATT,3)
SetTeamAsEnemy(3,ATT)
SetTeamAsEnemy(DEF,3)
SetTeamAsEnemy(3,DEF)

AddUnitClass(IMP, "imp_hero_darthvader",1,1)
AddUnitClass(ALL, "all_hero_leia",1,1)

SetHeroClass(ALL, "all_hero_obiwan")
SetHeroClass(IMP, "rep_hero_cloakedanakin")[/code]
So is it my lua or did I screw up the sides?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Locals problem

Post by Maveritchell »

Did you give them somewhere to spawn from?
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Re: Locals problem

Post by elfie »

Yeah, local_cp from the tutorial. I followed all the steps too, I am surprised nothing showed up, I also compared the lua to the Kashyyk one, but I found no errors in mine.
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Locals problem

Post by DarthD.U.C.K. »

do you have the wok sinde in your sidefolder?
if yes, can you post your bf2log?
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Locals problem

Post by AceMastermind »

Unless you altered your custom wok side req, the 3 classes should be loaded like this:

Code: Select all

ReadDataFile("dc:SIDE\\wok.lvl",
                             "wok_inf_basic")
Post Reply