Localization [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
User avatar
bobfinkl
Rebel Colonel
Rebel Colonel
Posts: 593
Joined: Sun Jul 13, 2008 9:01 am
Projects :: Lots of unreleased stuff
Games I'm Playing :: Life
xbox live or psn: No gamertag set
Location: The quaint little city gametoast.

Localization [Solved]

Post by bobfinkl »

I recently decided to add campaign mode to my map and I have made good progress, I made the campaign script work (first objective only) and ambush worked in a test map, but now my ambush doesn't want to work in my map.

here is my lua:
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("Ambush")
ScriptCB_DoFile("MultiObjectiveContainer")
ScriptCB_DoFile("ObjectiveGoto")
ScriptCB_SetGameRules("Campaign")

-- Empire Attacking (attacker is always #1)
local ALL = 2
local IMP = 1
-- These variables do not change
local ATT = 1
local DEF = 2
ForestAmbush = 3
FAM = ForestAmbush

function ScriptPostLoad()

SetAIDifficulty(0, 2, "hard")
ScriptCB_SetGameRules("campaign")


onfirstspawn = OnCharacterSpawn(
function(character)
if IsCharacterHuman(character) then
ReleaseCharacterSpawn(onfirstspawn)
onfirstspawn = nil
objectives_timer = CreateTimer("objectives_timer")
SetTimerValue(objectives_timer, 2)
StartTimer(objectives_timer)
begin_objectives = OnTimerElapse(
function(timer)
StartObjectives ()
ScriptCB_EnableCommandPostVO(0)
end,
objectives_timer
)
end
end
)

--Head towards bunker objective #1 (attack)
Objective1 = ObjectiveGoto:New{TeamATT = ATT, -- objective made
text = "Moveout1", popupText = "Moveout1", -- show objective on screen
regionName = "goto", mapIcon = "hud_objective_icon_circle", AIGoalWeight = 0}
Objective1.OnStart = function(self)
ATT_obj1_aigoal = AddAIGoal(ATT, "Deathmatch", 100)
MapAddEntityMarker("goto", "hud_objective_icon", 3.0, 1, "YELLOW", true) -- AI objective
end


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

--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{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:Start()

SetUberMode(1)

EnableSPHeroRules()

SetupAmbushTrigger("forestambush", "forestpath", 6, 3)

end

function StartObjectives()
objectiveSequence = MultiObjectiveContainer:New{delayVictoryTime = 4.0 }
objectiveSequence:AddObjectiveSet(Objective1)
objectiveSequence:Start()
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(40)
SetMaxPlayerFlyHeight(40)


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\\nab.lvl;nab2gcw")
ReadDataFile("SIDE\\all.lvl",
"all_inf_rifleman_snow",
"all_inf_rocketeer_snow",
"all_inf_sniper_snow",
"all_inf_engineer_snow",
"all_inf_officer_snow",
"all_inf_wookiee_snow",
"all_hero_chewbacca")

ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman_snow",
"imp_inf_rocketeer_snow",
"imp_inf_engineer_snow",
"imp_inf_sniper_snow",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_hero_darthvader",
"imp_hover_fightertank" )

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

SetupTeams{
all = {
team = ALL,
units = 20,
reinforcements = -1,
soldier = { "all_inf_rifleman_snow",9, 35},
assault = { "all_inf_rocketeer_snow",1,14},
engineer = { "all_inf_engineer_snow",1,14},
sniper = { "all_inf_sniper_snow",1,14},
officer = { "all_inf_officer_snow",1,4},
special = { "all_inf_wookiee_snow",1,4},

},
imp = {
team = IMP,
units = 20,
reinforcements = 50,
soldier = { "imp_inf_rifleman_snow",9, 35},
assault = { "imp_inf_rocketeer_snow",1,14},
engineer = { "imp_inf_engineer_snow",1,14},
sniper = { "imp_inf_sniper_snow",1,14},
officer = { "imp_inf_officer",1,4},
special = { "imp_inf_dark_trooper",1,4},
},
fam = {
team = FAM,
units = 6,
reinforcements = -1,
soldier = { "all_inf_rifleman_snow",6,6},
}
}

SetTeamName(FAM, ALL)
SetTeamAsFriend(FAM, ALL)
SetTeamAsFriend(ALL, FAM)
SetTeamAsEnemy(FAM, IMP)
SetTeamAsEnemy(IMP, FAM)
ClearAIGoals(FAM)
AddAIGoal(FAM, "Deathmatch", 100)

SetHeroClass(ALL, "all_hero_chewbacca")
SetHeroClass(IMP, "imp_hero_darthvader")

-- Level Stats
ClearWalkers()
AddWalkerType(0, 0) -- 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", 2024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 41)
SetMemoryPoolSize("EntityFlyer", 2)
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:GAD\\GAD.lvl", "GAD_eli")
SetDenseEnvironment("false")
And here are the most suspicious messages on my BFront2.log
Hidden/Spoiler:
Message Severity: 2
.\Source\LuaCallbacks_Mission.cpp(2523)
Timer "dittyTimer" not found
release self.dittyTimerResponse
idx in = 3
idx use = 3 side = 1
icon fast mode

Message Severity: 2
.\Source\Team.cpp(884)
Missing a localized team name for this level, level.GAD.local

Message Severity: 2
.\Source\Team.cpp(884)
Missing a localized team name for this level, level.GAD.local

Message Severity: 2
.\Source\Team.cpp(884)
Missing a localized team name for this level, level.GAD.local

Message Severity: 2
.\Source\Team.cpp(884)
Missing a localized team name for this level, level.GAD.local

Message Severity: 2
.\Source\Team.cpp(884)
Missing a localized team name for this level, level.GAD.local

Message Severity: 2
.\Source\Team.cpp(884)
Missing a localized team name for this level, level.GAD.local

Message Severity: 2
.\Source\Team.cpp(439)
level.GAD.locals not localized

Message Severity: 2
.\Source\ActiveRegion.cpp(186)
Region "forestambush" not found

Message Severity: 2
.\Source\LuaCallbacks_Mission.cpp(2523)
Timer "victoryTimer" not found

Message Severity: 2
.\Source\LuaCallbacks_Mission.cpp(2523)
Timer "delayTimer" not found

Message Severity: 2
.\Source\LuaCallbacks_Mission.cpp(635)
Entity "goto" not found
Note: My Ambushregion is called forestambush and it's properties are ambushregion, my Ambushpath is called forestpath, goto region is called goto and properties are goto. More information if I rename FAM (the forest ambush team) the cps disappear ingame.

Anyone have any clue why the ambush isn't working?
Last edited by bobfinkl on Thu Nov 27, 2008 3:14 pm, edited 3 times in total.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Campaign ambush refuses to work

Post by Maveritchell »

Yeah, your region has a different name and properties. The properties of "forestambush" should be "forestambush." Just as a matter of course, always set the properties of a region the same as the name (unless it's a ZE-defined region, like a rainshadow region or something). Also, you shouldn't be setting

Code: Select all

fam = {
your team to something that's not defined. Set up local teams like this:

Code: Select all

   	SetTeamName(3, "your_localize_key_here")
   	AddUnitClass (3, "all_inf_rifleman_snow", 6, 6)
   	SetUnitCount (3, 6)
   	--first number is numteam, second is numunits
   	AddAIGoal(3, "Deathmatch", 100)
...and save yourself a lot of consternation.
User avatar
bobfinkl
Rebel Colonel
Rebel Colonel
Posts: 593
Joined: Sun Jul 13, 2008 9:01 am
Projects :: Lots of unreleased stuff
Games I'm Playing :: Life
xbox live or psn: No gamertag set
Location: The quaint little city gametoast.

Re: Campaign ambush refuses to work

Post by bobfinkl »

Thanks it works now.
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: Campaign ambush refuses to work

Post by [RDH]Zerted »

Its ok to use custom keys in the setup team section. It won't hurt anything. If you want it to use the standard localization strings, put your team key as local (or was it locals or both work...)
User avatar
bobfinkl
Rebel Colonel
Rebel Colonel
Posts: 593
Joined: Sun Jul 13, 2008 9:01 am
Projects :: Lots of unreleased stuff
Games I'm Playing :: Life
xbox live or psn: No gamertag set
Location: The quaint little city gametoast.

Re: Campaign ambush refuses to work

Post by bobfinkl »

I'll see what I can do with that I'm still testing everything out and the ambush team localization seems to be my only problem at the moment.

Edit:
I have non localizing ambush teams, here is my lua (there is no munge log at all).
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("ObjectiveAssault")
ScriptCB_DoFile("Ambush")
ScriptCB_DoFile("MultiObjectiveContainer")
ScriptCB_DoFile("ObjectiveGoto")
ScriptCB_SetGameRules("Campaign")

-- Empire Attacking (attacker is always #1)
local ALL = 2
local IMP = 1
-- These variables do not change
local ATT = 1
local DEF = 2

ForestAmbush = 3

function ScriptPostLoad()

SetAIDifficulty(0, 2, "hard")
SetAIDifficulty(0, 3, "hard")
ScriptCB_SetGameRules("campaign")
KillObject("cp2")
KillObject("cp3")
KillObject("cp4")
KillObject("cp5")
KillObject("cp6")
EnableBarriers("nobunker1")
EnableBarriers("nobunker2")
BlockPlanningGraphArcs("nobunkerplan1")
BlockPlanningGraphArcs("nobunkerplan2")
BlockPlanningGraphArcs("nobunkerplan3")
BlockPlanningGraphArcs("nobunkerplan4")
SetupAmbushTrigger("goto", "forestpath", 16, 3)
SetupAmbushTrigger("goto1", "secondpath", 16, 3)

onfirstspawn = OnCharacterSpawn(
function(character)
if IsCharacterHuman(character) then
ReleaseCharacterSpawn(onfirstspawn)
onfirstspawn = nil
objectives_timer = CreateTimer("objectives_timer")
SetTimerValue(objectives_timer, 2)
StartTimer(objectives_timer)
begin_objectives = OnTimerElapse(
function(timer)
StartObjectives ()
ScriptCB_EnableCommandPostVO(0)
end,
objectives_timer
)
end
end
)

--Head towards bunker objective #1
Objective1 = ObjectiveGoto:New{TeamATT = ATT, -- objective made
text = "moveout1", popupText = "moveout2", -- show objective on screen
regionName = "goto", mapIcon = "hud_objective_icon_circle", AIGoalWeight = 0}
Objective1.OnStart = function(self)
ATT_obj1_aigoal = AddAIGoal(ATT, "Deathmatch", 100)
ATT_obj1_aigoal2 = AddAIGoal(ATT, "Defend", 300, "objective")
MapAddEntityMarker("goto", "hud_objective_icon", 3.0, 1, "YELLOW", true) -- AI objective
AddAIGoal(3, "Defend", 300, "objective")
Objective2.OnComplete = function(self)
ClearAIGoals(3)
end
end
-- Kill rebel ambushers
Objective2 = ObjectiveAssault:New{teamATT = ATT, text = "killambush1", popupText = "killambush1.pop", AIGoalWeight = 0, timeLimit = 12, timeLimitWinningTeam = ATT}
Objective2.OnStart = function(self)
att_obj2_aigoal = AddAIGoal(ATT, "Defend", 100, "objective")

Objective2.OnComplete = function(self)
ATT_ReinforcementCount = GetReinforcementCount(ATT)
SetReinforcementCount(ATT, ATT_ReinforcementCount + 10)
ClearAIGoals(ATT)
end
end

--keep moving towards bunker objective #3
Objective3 = ObjectiveGoto:New{TeamATT = ATT, -- objective made
text = "movefurther1", popupText = "movefuther1.pop", -- show objective on screen
regionName = "goto1", mapIcon = "hud_objective_icon_circle", AIGoalWeight = 0}
Objective3.OnStart = function(self)
ATT_obj3_aigoal = AddAIGoal(ATT, "Defend", 300, "objective2")
MapAddEntityMarker("goto1", "hud_objective_icon", 3.0, 1, "YELLOW", true) -- AI objective
Objective2.OnComplete = function(self)
ClearAIGoals(ATT)
end
end

-- Kill rebel ambushers again
Objective4 = ObjectiveAssault:New{teamATT = ATT, text = "killambush2", popupText = "killambush2.pop", AIGoalWeight = 0, timeLimit = 12, timeLimitWinningTeam = ATT}

Objective4.OnStart = function(self)
att_obj4_aigoal = AddAIGoal(ATT, "Defend", 100, "objective2")
AddAIGoal(3, "Defend", 200, "objective2")

Objective4.OnComplete = function(self)
ATT_ReinforcementCount = GetReinforcementCount(ATT)
SetReinforcementCount(ATT, ATT_ReinforcementCount + 50)
RespawnObject("cp3")
RespawnObject("cp2")
RespawnObject("cp4")
KillObject("cp1")
ClearAIGoals(ATT)
ClearAIGoals(3)
end
end

-- Objective 5 surround the bunker
Objective5CP = CommandPost:New{name = "cp3"}
Objective5 = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, text = "level.hoth.c.s", popupText = "level.hoth.c.pop.s", AIGoalWeight = 0}
Objective5:AddCommandPost(Objective5CP)

Objective5.OnStart = function(self)
UnlockHeroForTeam(1)
AddAIGoal(ATT, "Defend", 900, "cp3")
AddAIGoal(DEF, "Defend", 200, "cp3")
AddAIGoal(DEF, "Deathmatch", 50, "cp3")
end

Objective5.OnComplete = function(self)
ShowMessageText("game.objectives.complete", ATT)
RespawnObject("cp5")
RespawnObject("cp6")
ATT_ReinforcementCount = GetReinforcementCount(ATT)
SetReinforcementCount(ATT, ATT_ReinforcementCount + 10)
DEF_UnitCount = GetUnitCount(DEF)
SetUnitCount(DEF, DEF_UnitCount + 10)
DisableBarriers("nobunker1")
DisableBarriers("nobunker2")
DisableBarriers("nobunker3")
UnblockPlanningGraphArcs("nobunkerplan1")
UnblockPlanningGraphArcs("nobunkerplan2")
UnblockPlanningGraphArcs("nobunkerplan3")
UnblockPlanningGraphArcs("nobunkerplan4")

end

-- hold cp3 until reinforcements arrive
Objective6CP = CommandPost:New{name = "cp3"}
Objective6 = ObjectiveConquest:New{teamATT = DEF, teamDEF = ATT, text = "objective6.gad", popupText = "objective6.gad.pop",
timeLimit = 120, timeLimitWinningTeam = ATT}
Objective6:AddCommandPost(Objective6CP)

Objective6.OnStart = function(self)
AddAIGoal(ATT, "Defend", 900, "cp2")
AddAIGoal(ATT, "Defend", 900, "cp5")
AddAIGoal(DEF, "Defend", 200, "cp2")
AddAIGoal(DEF, "Defend", 200, "cp5")
Objective6.OnComplete = function(self)
ATT_UnitCount = GetUnitCount(ATT)
SetUnitCount(ATT, ATT_UnitCount + 45)
ClearAIGoals(ATT)
ClearAIGoals(DEF)
RespawnObject("cp5")
SetProperty("cp4", "CaptureRegion", "eli_cp4_capture")
SetProperty("cp6", "CaptureRegion", "eli_cp6_capture")
ATT_ReinforcementCount = GetReinforcementCount(ATT)
SetReinforcementCount(ATT, ATT_ReinforcementCount + 80)

end
end

Objective7CP = CommandPost:New{name = "cp6"}
Objective7 = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, text = "objective7.gad", popupText = "objective7.gad.popup", AIGoalWeight = 0}
Objective7:AddCommandPost(Objective7CP)

Objective6.OnStart = function(self)
AddAIGoal(DEF, "Defend", 300, "cp6")
AddAIGoal(ATT, "Defend", 500, "cp6")
AddAIGoal(ATT, "Deathmatch", 100)
AddAIGoal(DEF, "Deathmatch", 100)
Objective6.OnComplete = function(self)
ClearAIGoals(ATT)
AddAIGoal(ATT, "Defend", 500, "cp4")
end
end

Objective7CP = CommandPost:New{name = "cp6"}
Objective7 = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, text = "lastobjective.gad", popupText = "lastobjective.gad.popup", AIGoalWeight = 0}
Objective7:AddCommandPost(Objective7CP)

Objective6.OnStart = function(self)
AddAIGoal(DEF, "Defend", 300, "cp4")
AddAIGoal(ATT, "Deathmatch", 100)
AddAIGoal(DEF, "Deathmatch", 100)
end

SetUberMode(1)

EnableSPHeroRules()

end

function StartObjectives()
objectiveSequence = MultiObjectiveContainer:New{delayVictoryTime = 0.0 }
objectiveSequence:AddObjectiveSet(Objective1)
objectiveSequence:AddObjectiveSet(Objective2)
objectiveSequence:AddObjectiveSet(Objective3)
objectiveSequence:AddObjectiveSet(Objective4)
objectiveSequence:AddObjectiveSet(Objective5)
objectiveSequence:AddObjectiveSet(Objective6)
objectiveSequence:AddObjectiveSet(Objective7)
objectiveSequence:Start()
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(40)
SetMaxPlayerFlyHeight(40)


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\\nab.lvl;nab2gcw")
ReadDataFile("SIDE\\all.lvl",
"all_inf_rifleman_snow",
"all_inf_rocketeer_snow",
"all_inf_sniper_snow",
--"all_inf_engineer_snow",
--"all_inf_officer_snow",
--"all_inf_wookiee_snow",
"all_hero_chewbacca")

ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman_snow",
"imp_inf_rocketeer_snow",
"imp_inf_engineer_snow",
"imp_inf_sniper_snow",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_hero_darthvader",
"imp_hover_fightertank" )

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

SetupTeams{
all = {
team = ALL,
units = 40,
reinforcements = -1,
soldier = { "all_inf_rifleman_snow",9, 35},
assault = { "all_inf_rocketeer_snow",1,14},
engineer = { "",0,0},
sniper = { "all_inf_sniper_snow",1,14},
officer = { "",0,0},
special = { "",0,0},

},
imp = {
team = IMP,
units = 32,
reinforcements = 50,
soldier = { "imp_inf_rifleman_snow",9, 35},
assault = { "imp_inf_rocketeer_snow",1,14},
engineer = { "imp_inf_engineer_snow",1,14},
sniper = { "imp_inf_sniper_snow",1,14},
officer = { "imp_inf_officer",1,4},
special = { "imp_inf_dark_trooper",1,4},
}
}

AddUnitClass(3, "all_inf_rifleman_snow")
SetUnitCount(3, 16)
SetTeamName(3, ALL)
SetTeamAsFriend(ALL, 3)
SetTeamAsFriend(3, ALL)
SetTeamAsEnemy(3, IMP)
SetTeamAsEnemy(IMP, 3)
ClearAIGoals(3)
AddAIGoal(3, "Deathmatch", 100)

SetHeroClass(ALL, "all_hero_chewbacca")
SetHeroClass(IMP, "imp_hero_darthvader")

-- Level Stats
ClearWalkers()
AddWalkerType(0, 0) -- 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)
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: Campaign ambush(solved)

Post by [RDH]Zerted »

Ummm, so is this solved or not?
User avatar
bobfinkl
Rebel Colonel
Rebel Colonel
Posts: 593
Joined: Sun Jul 13, 2008 9:01 am
Projects :: Lots of unreleased stuff
Games I'm Playing :: Life
xbox live or psn: No gamertag set
Location: The quaint little city gametoast.

Re: Campaign ambush(solved)

Post by bobfinkl »

Sorry for the confusion, I've localized the objectives and fixed the ambush but the ambushers (AI ambush units) are still [NULL].
Yodakid
Second Lance Corporal
Second Lance Corporal
Posts: 117
Joined: Sat Nov 22, 2008 5:43 pm
Projects :: Something old
Games I'm Playing :: TES Online AC Unity
xbox live or psn: No gamertag set
Location: Finland

Re: Localization(unsolved)

Post by Yodakid »

HI bob, it's me again! Try to do it like...like...it's set up on hoth. (just look at the red marked text)
Like this:
SetupTeams{

all={
team = ALL,
units = 23,
reinforcements = -1,
soldier = {"all_inf_rifleman_snow"},
assault = {"all_inf_rocketeer_snow"},
-- engineer = {"all_inf_engineer_snow"},
sniper = {"all_inf_sniper_snow", 4},
--officer = {"all_inf_officer_snow"},
--special = {"all_inf_wookiee_snow"},

},

imp={
team = IMP,
units = 17,
reinforcements = 35,
soldier = {"imp_inf_rifleman_snow"},
assault = {"imp_inf_rocketeer_snow"},
engineer = {"imp_inf_engineer_snow"},
sniper = {"imp_inf_sniper_snow"},
officer = {"imp_inf_officer", 2, 4},
special = {"imp_inf_dark_trooper", 2, 4},
}
}

--Setting up Heros--

SetHeroClass(IMP, "imp_hero_darthvader")
--SetHeroClass(ALL, "all_hero_luke_jedi")

--Ambush Teams true

SetTeamName(rebels1, "all")
SetUnitCount(rebels1, 8)
AddUnitClass(rebels1, "all_inf_rifleman_snow", 2)
AddUnitClass(rebels1, "all_inf_rocketeer_snow", 2)
AddUnitClass(rebels1, "all_inf_engineer_snow", 2)
AddUnitClass(rebels1, "all_inf_sniper_snow", 2)
SetReinforcementCount(rebels1, -1)

SetTeamAsEnemy(rebels1, IMP)
SetTeamAsFriend(rebels1, ALL)
SetTeamAsFriend(ALL, rebels1)


Not:
SetTeamName(3, ALL)


Don't care about the "rebels1" thing. Just look att the difference: all, ALL

I don't know if this is going to work, but give it a try and good luck!
User avatar
bobfinkl
Rebel Colonel
Rebel Colonel
Posts: 593
Joined: Sun Jul 13, 2008 9:01 am
Projects :: Lots of unreleased stuff
Games I'm Playing :: Life
xbox live or psn: No gamertag set
Location: The quaint little city gametoast.

Re: Localization(unsolved)

Post by bobfinkl »

Thanks yodakid that was exactly the problem.
Post Reply