Page 1 of 1

Cant get simple side change to work [Solved]

Posted: Thu Nov 19, 2009 8:17 am
by ukrai
i followed the tutorial here:

http://www.gametoast.com/forums/viewtop ... 27&t=12729

and i dont beleive i missed anything, all im trying to do is take the endor map and change the alliance side to be different assets from other maps, eg GCW troopers versus CIS troopers.

ive now got my own mod that when loaded will load up the endor map but the sides are still the same, they dont change, no errors, here is my lua
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

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

---------------------------------------------------------------------------
-- ScriptPostLoad
---------------------------------------------------------------------------
function ScriptPostLoad()
cp1 = CommandPost:New{name = "CP1"}
cp2 = CommandPost:New{name = "CP2"}
cp4 = CommandPost:New{name = "CP4"}
cp5 = CommandPost:New{name = "CP5"}
cp6 = CommandPost:New{name = "CP6"}
cp10 = CommandPost:New{name = "CP10"}

--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(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)
conquest:AddCommandPost(cp10)

conquest:Start()

EnableSPHeroRules()
end

---------------------------------------------------------------------------
-- ScriptInit
---------------------------------------------------------------------------
function ScriptInit()
StealArtistHeap(1150*1024)

-- Designers, these two lines *MUST* be first.
SetPS2ModelMemory(2460000)
ReadDataFile("ingame.lvl")

SetWorldExtents(1277.3)

local ALL = 1
local IMP = 2
local ATT = 1
local DEF = 2

ReadDataFile("sound\\end.lvl;end1gcw")

SetTeamAggressiveness(ALL, 1.0)
SetTeamAggressiveness(IMP, 0.7)

SetMaxFlyHeight(43)
SetMaxPlayerFlyHeight(43)

ReadDataFile("SIDE\\all.lvl",
"imp_inf_rifleman",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_inf_rocketeer",
"all_inf_officer_jungle",
"all_hero_hansolo_tat",
"all_inf_wookiee")


ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_hero_darthvader",
"imp_hover_speederbike",
"imp_walk_atst_jungle")

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

ReadDataFile("SIDE\\ewk.lvl",
"ewk_inf_basic")

SetupTeams{
all = {
team = ALL,
units = 29,
reinforcements = 150,
soldier = { "imp_inf_rifleman",10, 25},
assault = { "imp_inf_officer",1,4},
engineer = { "imp_inf_dark_trooper",1,4},
sniper = { "imp_inf_rocketeer",1,4},
officer = {"all_inf_officer_jungle",1,4},
special = { "all_inf_wookiee",1,4},
},
imp = {
team = IMP,
units = 29,
reinforcements = 150,
soldier = { "imp_inf_rifleman",10, 25},
assault = { "imp_inf_rocketeer",1,4},
engineer = { "imp_inf_engineer",1,4},
sniper = { "imp_inf_sniper",1,4},
officer = {"imp_inf_officer",1,4},
special = { "imp_inf_dark_trooper",1,4},
}
}

SetHeroClass(ALL, "all_hero_hansolo_tat")
SetHeroClass(DEF, "imp_hero_darthvader")

---[[ Ewoks
SetTeamName(3, "locals")
AddUnitClass(3, "ewk_inf_trooper", 3)
AddUnitClass(3, "ewk_inf_repair", 3)
SetUnitCount(3, 6)

SetTeamAsFriend(3,ATT)
SetTeamAsEnemy(3,DEF)
SetTeamAsFriend(ATT, 3)
SetTeamAsEnemy(DEF, 3)
--]]

--temp until you rescript this mission
AddAIGoal(1,"Conquest",100);
AddAIGoal(2,"Conquest",100);
AddAIGoal(3,"Conquest",100);
--temp until you rescript this mission

-- Level Stats
ClearWalkers()
AddWalkerType(0, 0) -- droidekas(special case: 0 leg pairs)
AddWalkerType(1, 3) -- ATSTs (1 leg pair)
AddWalkerType(2, 0) -- spider walkers with 2 leg pairs each
AddWalkerType(3, 0) -- attes with 3 leg pairs each

local weaponCnt = 240
SetMemoryPoolSize("ActiveRegion", 4)
SetMemoryPoolSize("Aimer", 27)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 100)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityFlyer", 9) -- 3xATST + rocket upgrade
SetMemoryPoolSize("EntityHover", 9)
SetMemoryPoolSize("EntityLight", 23)
SetMemoryPoolSize("EntityMine", 8)
SetMemoryPoolSize("EntitySoundStatic", 95)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("MountedTurret", 6)
SetMemoryPoolSize("Navigator", 39)
SetMemoryPoolSize("Obstacle", 745)
SetMemoryPoolSize("PathFollower", 39)
SetMemoryPoolSize("PathNode", 100)
SetMemoryPoolSize("ShieldEffect", 0)
SetMemoryPoolSize("SoundSpaceRegion", 6)
SetMemoryPoolSize("TentacleSimulator", 14)
SetMemoryPoolSize("TreeGridStack", 600)
SetMemoryPoolSize("UnitAgent", 39)
SetMemoryPoolSize("UnitController", 39)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("end\\end1.lvl", "end1_conquest")
SetDenseEnvironment("true")
AddDeathRegion("deathregion")
SetStayInTurrets(1)

-- Sound
voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "all_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "gcw_music")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\end.lvl", "end1gcw")
OpenAudioStream("sound\\end.lvl", "end1gcw")
OpenAudioStream("sound\\end.lvl", "end1gcw_emt")

SetBleedingVoiceOver(ALL, ALL, "all_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(ALL, IMP, "all_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, ALL, "imp_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, IMP, "imp_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(ALL, IMP, "all_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(1, "allleaving")
SetOutOfBoundsVoiceOver(2, "impleaving")

SetAmbientMusic(ALL, 1.0, "all_end_amb_start", 0,1)
SetAmbientMusic(ALL, 0.8, "all_end_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.2, "all_end_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_end_amb_start", 0,1)
SetAmbientMusic(IMP, 0.8, "imp_end_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.2, "imp_end_amb_end", 2,1)

SetVictoryMusic(ALL, "all_end_amb_victory")
SetDefeatMusic(ALL, "all_end_amb_defeat")
SetVictoryMusic(IMP, "imp_end_amb_victory")
SetDefeatMusic(IMP, "imp_end_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
-- SetSoundEffect("BirdScatter", "birdsFlySeq1")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")

SetAttackingTeam(ATT)

--Endor
--Shield Bunker
AddCameraShot(0.997654, 0.066982, 0.014139, -0.000949, 155.137131, 0.911505, -138.077072)
--Village
AddCameraShot(0.729761, 0.019262, 0.683194, -0.018033, -98.584869, 0.295284, 263.239288)
--Village
AddCameraShot(0.694277, 0.005100, 0.719671, -0.005287, -11.105947, -2.753207, 67.982201)
end
seems like a simple ask really but i must be doing something wrong, and i supposed to tick extra boxes before munge?

Re: Cant get simple side change to work

Posted: Thu Nov 19, 2009 9:12 am
by DarthD.U.C.K.
you posted the shipped lua without any sidechange... if this really is your lua this may be the problem :P

Re: Cant get simple side change to work

Posted: Thu Nov 19, 2009 11:57 am
by Darth_Spiderpig
So, you do want to play as CIS against the Empire?

so, if you want to add the stock cis side, make this:
Hidden/Spoiler:
[code]ReadDataFile("SIDE\\all.lvl",
"imp_inf_rifleman",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_inf_rocketeer",
"all_inf_officer_jungle",
"all_hero_hansolo_tat",
"all_inf_wookiee")


ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_hero_darthvader",
"imp_hover_speederbike",
"imp_walk_atst_jungle")

[/code]
To this:
Hidden/Spoiler:
[quote]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")


ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_hero_darthvader",
"imp_hover_speederbike",
"imp_walk_atst_jungle")

[/quote]
or have you just edited some skins, you need this:
Hidden/Spoiler:
[code]ReadDataFile:("dc:SIDE\\blablabla.lvl",[/code]

Re: Cant get simple side change to work

Posted: Thu Nov 19, 2009 9:08 pm
by ukrai
ok, what about this section?
Hidden/Spoiler:
SetupTeams{
all = {
team = ALL,
units = 29,
reinforcements = 150,
soldier = { "all_inf_rifleman_jungle",10, 25},
assault = { "all_inf_rocketeer_jungle",1,4},
engineer = { "all_inf_engineer_jungle",1,4},
sniper = { "all_inf_sniper_jungle",1,4},
officer = {"all_inf_officer_jungle",1,4},
special = { "all_inf_wookiee",1,4},
},
imp = {
team = IMP,
units = 29,
reinforcements = 150,
soldier = { "imp_inf_rifleman",10, 25},
assault = { "imp_inf_rocketeer",1,4},
engineer = { "imp_inf_engineer",1,4},
sniper = { "imp_inf_sniper",1,4},
officer = {"imp_inf_officer",1,4},
special = { "imp_inf_dark_trooper",1,4},
}
do i change those to reflect the new msh's?

Re: Cant get simple side change to work

Posted: Thu Nov 19, 2009 9:49 pm
by Fiodis
Those are odf names, referenced above.

And note that it should be like this, instead of what Spiderpig posted:

Code: Select all

ReadDataFile("DC:SIDE\\side.lvl",

Re: Cant get simple side change to work

Posted: Thu Nov 19, 2009 10:06 pm
by AceMastermind
Fiodis wrote:And note that it should be like this, instead of what Spiderpig posted:

Code: Select all

ReadDataFile("DC:SIDE\\side.lvl",
You only need dc: if you're adding custom content to your side, CIS vs Imperials+Alliance doesn't require a custom side since all units can be loaded from shipped side lvls.

Re: Cant get simple side change to work

Posted: Thu Nov 19, 2009 10:58 pm
by Fiodis
Apologies - I thought he was adding custom content. My mistake.
Spiderpig's is missing the quotations and ending comma, though.

Re: Cant get simple side change to work

Posted: Thu Nov 19, 2009 11:48 pm
by ukrai
thanks guys, i still dont understand the SetupTeams bit, does this actually set what choices the player has when they start the map? while the first part just loads them into memory?

Re: Cant get simple side change to work

Posted: Fri Nov 20, 2009 3:20 am
by DarthD.U.C.K.
yes, the readdatafile in this section loads the units (and vehicles and turrets if required)
and the setup teams sets upt which units are used for which class in which team (the clas only determinates in which height/position the unit is listed)

Re: Cant get simple side change to work

Posted: Fri Nov 20, 2009 8:39 am
by ukrai
i cant get this to work, i can load up my map (replica of endor) but the class choices are still the default ones.

here is what ive done step by step:

1. Made a new map called HAR and munged it.

2. Went to …\BF2_ModTools\data_HAR\Worlds\HAR and deleted the world1 folder.

3. Went to …\BF2_ModTools\assets\worlds\END and copied all the contained folders

4. Pasted those folders to: …\BF2_ModTools\data_HAR\Worlds\HAR.

5. Went to …\BF2_ModTools\assets\scripts\end and copied the contents of end1g_con.lua script. Pasted the copied contents into …\BF2_ModTools\data_HAR\Common\scripts\HAR\HENg_con.lua, deleting the old contents

and the new lua is here (changed parts in red):
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

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

---------------------------------------------------------------------------
-- ScriptPostLoad
---------------------------------------------------------------------------
function ScriptPostLoad()
cp1 = CommandPost:New{name = "CP1"}
cp2 = CommandPost:New{name = "CP2"}
cp4 = CommandPost:New{name = "CP4"}
cp5 = CommandPost:New{name = "CP5"}
cp6 = CommandPost:New{name = "CP6"}
cp10 = CommandPost:New{name = "CP10"}

--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(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)
conquest:AddCommandPost(cp10)

conquest:Start()

EnableSPHeroRules()
end

---------------------------------------------------------------------------
-- ScriptInit
---------------------------------------------------------------------------
function ScriptInit()
StealArtistHeap(1150*1024)

-- Designers, these two lines *MUST* be first.
SetPS2ModelMemory(2460000)
ReadDataFile("ingame.lvl")

SetWorldExtents(1277.3)

local ALL = 1
local IMP = 2
local ATT = 1
local DEF = 2

ReadDataFile("sound\\end.lvl;end1gcw")

SetTeamAggressiveness(ALL, 1.0)
SetTeamAggressiveness(IMP, 0.7)

SetMaxFlyHeight(43)
SetMaxPlayerFlyHeight(43)

ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3trooper",
"rep_inf_feluciatrooper",
"rep_inf_trooper",
"rep_inf_ep3jettropper",
"rep_inf_arctrooper",
"all_inf_luke",
"rep_inf_ep3anakin")



ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_hero_darthvader",
"imp_hover_speederbike",
"imp_walk_atst_jungle")

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

ReadDataFile("SIDE\\ewk.lvl",
"ewk_inf_basic")

SetupTeams{
rep = {
team = REP,
units = 29,
reinforcements = 150,
soldier = { "rep_inf_ep3trooper",10, 25},
assault = { "rep_inf_feluciatrooper",1,4},
engineer = { "rep_inf_trooper",1,4},
sniper = { "rep_inf_ep3jettropper",1,4},
officer = {"rep_inf_arctrooper",1,4},
special = { "all_inf_luke",1,4},
},
imp = {
team = IMP,
units = 29,
reinforcements = 150,
soldier = { "imp_inf_rifleman",10, 25},
assault = { "imp_inf_rocketeer",1,4},
engineer = { "imp_inf_engineer",1,4},
sniper = { "imp_inf_sniper",1,4},
officer = {"imp_inf_officer",1,4},
special = { "imp_inf_dark_trooper",1,4},
}
}

SetHeroClass(ALL, "all_hero_hansolo_tat")
SetHeroClass(DEF, "imp_hero_darthvader")

---[[ Ewoks
SetTeamName(3, "locals")
AddUnitClass(3, "ewk_inf_trooper", 3)
AddUnitClass(3, "ewk_inf_repair", 3)
SetUnitCount(3, 6)

SetTeamAsFriend(3,ATT)
SetTeamAsEnemy(3,DEF)
SetTeamAsFriend(ATT, 3)
SetTeamAsEnemy(DEF, 3)
--]]

--temp until you rescript this mission
AddAIGoal(1,"Conquest",100);
AddAIGoal(2,"Conquest",100);
AddAIGoal(3,"Conquest",100);
--temp until you rescript this mission

-- Level Stats
ClearWalkers()
AddWalkerType(0, 0) -- droidekas(special case: 0 leg pairs)
AddWalkerType(1, 3) -- ATSTs (1 leg pair)
AddWalkerType(2, 0) -- spider walkers with 2 leg pairs each
AddWalkerType(3, 0) -- attes with 3 leg pairs each

local weaponCnt = 240
SetMemoryPoolSize("ActiveRegion", 4)
SetMemoryPoolSize("Aimer", 27)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 100)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityFlyer", 9) -- 3xATST + rocket upgrade
SetMemoryPoolSize("EntityHover", 9)
SetMemoryPoolSize("EntityLight", 23)
SetMemoryPoolSize("EntityMine", 8)
SetMemoryPoolSize("EntitySoundStatic", 95)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("MountedTurret", 6)
SetMemoryPoolSize("Navigator", 39)
SetMemoryPoolSize("Obstacle", 745)
SetMemoryPoolSize("PathFollower", 39)
SetMemoryPoolSize("PathNode", 100)
SetMemoryPoolSize("ShieldEffect", 0)
SetMemoryPoolSize("SoundSpaceRegion", 6)
SetMemoryPoolSize("TentacleSimulator", 14)
SetMemoryPoolSize("TreeGridStack", 600)
SetMemoryPoolSize("UnitAgent", 39)
SetMemoryPoolSize("UnitController", 39)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("end\\end1.lvl", "end1_conquest")
SetDenseEnvironment("true")
AddDeathRegion("deathregion")
SetStayInTurrets(1)

-- Sound
voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "all_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "gcw_music")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\end.lvl", "end1gcw")
OpenAudioStream("sound\\end.lvl", "end1gcw")
OpenAudioStream("sound\\end.lvl", "end1gcw_emt")

SetBleedingVoiceOver(ALL, ALL, "all_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(ALL, IMP, "all_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, ALL, "imp_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, IMP, "imp_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(ALL, IMP, "all_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(1, "allleaving")
SetOutOfBoundsVoiceOver(2, "impleaving")

SetAmbientMusic(ALL, 1.0, "all_end_amb_start", 0,1)
SetAmbientMusic(ALL, 0.8, "all_end_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.2, "all_end_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_end_amb_start", 0,1)
SetAmbientMusic(IMP, 0.8, "imp_end_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.2, "imp_end_amb_end", 2,1)

SetVictoryMusic(ALL, "all_end_amb_victory")
SetDefeatMusic(ALL, "all_end_amb_defeat")
SetVictoryMusic(IMP, "imp_end_amb_victory")
SetDefeatMusic(IMP, "imp_end_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
-- SetSoundEffect("BirdScatter", "birdsFlySeq1")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")

SetAttackingTeam(ATT)

--Endor
--Shield Bunker
AddCameraShot(0.997654, 0.066982, 0.014139, -0.000949, 155.137131, 0.911505, -138.077072)
--Village
AddCameraShot(0.729761, 0.019262, 0.683194, -0.018033, -98.584869, 0.295284, 263.239288)
--Village
AddCameraShot(0.694277, 0.005100, 0.719671, -0.005287, -11.105947, -2.753207, 67.982201)
end
i then munged it from my HAR folder with only 'common' box ticked, NOTHING in the sides box and HAR in the worlds box.

what am i missing here? i noticed in my game directory/gamedata/addon/HAR/data/_LVL_PC/HAR folder there is both a end1.lvl and HAR.lvl file, not sure if something wrong there. also when i go to play game, i have option of HARg_con and HARc_con options, both have the default class options but HARc seems like there is no map, empty, its HARg i want anyway.

Re: Cant get simple side change to work

Posted: Fri Nov 20, 2009 8:59 am
by CodaRez
ukrai wrote:
Hidden/Spoiler:
SetupTeams{
rep = {
team = REP,
units = 29,
reinforcements = 150,
soldier = { "rep_inf_ep3trooper",10, 25},
assault = { "rep_inf_feluciatrooper",1,4},
engineer = { "rep_inf_trooper",1,4},
sniper = { "rep_inf_ep3jettropper",1,4},
officer = {"rep_inf_arctrooper",1,4},
special = { "all_inf_luke",1,4},
},
imp = {
team = IMP,
units = 29,
reinforcements = 150,
soldier = { "imp_inf_rifleman",10, 25},
assault = { "imp_inf_rocketeer",1,4},
engineer = { "imp_inf_engineer",1,4},
sniper = { "imp_inf_sniper",1,4},
officer = {"imp_inf_officer",1,4},
special = { "imp_inf_dark_trooper",1,4},
GAAH why did you change the REP things in the setup thing.
IMO, you should change those back to ALL. Now, let me elaborate *clearly* on the part everbody is talking about:
Hidden/Spoiler:
ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_hero_darthvader",
"imp_hover_speederbike",
"imp_walk_atst_jungle")
Lets say this was your custom side. You OBVIOUSLY forgot one thing, everybody has been trying to tell you to add "dc:" to ur custom side option.

So, do what I did in blue:
Hidden/Spoiler:
ReadDataFile("dc:SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_hero_darthvader",
"imp_hover_speederbike",
"imp_walk_atst_jungle")
For example. And THATS when you have the said files in ur side folder

If you want to just add STOCKS, then you can do what you just did(load a rep.lvl for rep stock units) BUT you MUST add the unit for the roster(this method adds, not replaces btw)
AddUnitClass(SIDENAME, "unit.odfname",1,4)
Simple?

Re: Cant get simple side change to work

Posted: Fri Nov 20, 2009 10:11 am
by eliminator
Hidden/Spoiler:
SetupTeams{
all= {
team = ALL,
units = 29,
reinforcements = 150,
soldier = { "rep_inf_ep3trooper",10, 25},
assault = { "rep_inf_feluciatrooper",1,4},
engineer = { "rep_inf_trooper",1,4},
sniper = { "rep_inf_ep3jettropper",1,4},
officer = {"rep_inf_arctrooper",1,4},
special = { "all_inf_luke",1,4},
},

you mustn't change the team name only why you add some different troopers,
it depends on the Att and Def team you see here:
Hidden/Spoiler:
local ALL = 1
local IMP = 2
local ATT = 1
local DEF = 2
the rest should be right i think

Re: Cant get simple side change to work

Posted: Fri Nov 20, 2009 4:54 pm
by ukrai
ok ok, still not working, still loads with default class options in instant action game, here is what i have now:
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

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

---------------------------------------------------------------------------
-- ScriptPostLoad
---------------------------------------------------------------------------
function ScriptPostLoad()
cp1 = CommandPost:New{name = "CP1"}
cp2 = CommandPost:New{name = "CP2"}
cp4 = CommandPost:New{name = "CP4"}
cp5 = CommandPost:New{name = "CP5"}
cp6 = CommandPost:New{name = "CP6"}
cp10 = CommandPost:New{name = "CP10"}

--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(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)
conquest:AddCommandPost(cp10)

conquest:Start()

EnableSPHeroRules()
end

---------------------------------------------------------------------------
-- ScriptInit
---------------------------------------------------------------------------
function ScriptInit()
StealArtistHeap(1150*1024)

-- Designers, these two lines *MUST* be first.
SetPS2ModelMemory(2460000)
ReadDataFile("ingame.lvl")

SetWorldExtents(1277.3)

local ALL = 1
local IMP = 2
local ATT = 1
local DEF = 2

ReadDataFile("sound\\end.lvl;end1gcw")

SetTeamAggressiveness(ALL, 1.0)
SetTeamAggressiveness(IMP, 0.7)

SetMaxFlyHeight(43)
SetMaxPlayerFlyHeight(43)

ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_sniper_felucia",
"rep_inf_ep2_sniper",
"rep_inf_ep3_jettrooper",
"rep_inf_ep2_rocketeer",
"rep_hero_anakin",
"rep_hero_yoda")



ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_hero_darthvader",
"imp_hover_speederbike",
"imp_walk_atst_jungle")

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

ReadDataFile("SIDE\\ewk.lvl",
"ewk_inf_basic")

SetupTeams{
all = {
team = ALL,
units = 29,
reinforcements = 150,
soldier = { "all_inf_rifleman_jungle",10, 25},
assault = { "all_inf_rocketeer_jungle",1,4},
engineer = { "all_inf_engineer_jungle",1,4},
sniper = { "all_inf_sniper_jungle",1,4},
officer = {"all_inf_officer_jungle",1,4},
special = { "all_inf_wookiee",1,4},
},
imp = {
team = IMP,
units = 29,
reinforcements = 150,
soldier = { "imp_inf_rifleman",10, 25},
assault = { "imp_inf_rocketeer",1,4},
engineer = { "imp_inf_engineer",1,4},
sniper = { "imp_inf_sniper",1,4},
officer = {"imp_inf_officer",1,4},
special = { "imp_inf_dark_trooper",1,4},
}
}

SetHeroClass(ALL, "all_hero_hansolo_tat")
SetHeroClass(DEF, "imp_hero_darthvader")

AddUnitClass(rep, "rep_inf_ep3_rifleman",1,4)
AddUnitClass(rep, "rep_inf_ep3_sniper_felucia",1,4)
AddUnitClass(rep, "rep_inf_ep2_sniper",1,4)
AddUnitClass(rep, "rep_inf_ep3_jettrooper",1,4)
AddUnitClass(rep, "rep_inf_ep2_rocketeer",1,4)
AddUnitClass(rep, "rep_hero_anakin",1,4)
AddUnitClass(rep, "rep_hero_yoda",1,4)


---[[ Ewoks
SetTeamName(3, "locals")
AddUnitClass(3, "ewk_inf_trooper", 3)
AddUnitClass(3, "ewk_inf_repair", 3)
SetUnitCount(3, 6)

SetTeamAsFriend(3,ATT)
SetTeamAsEnemy(3,DEF)
SetTeamAsFriend(ATT, 3)
SetTeamAsEnemy(DEF, 3)
--]]

--temp until you rescript this mission
AddAIGoal(1,"Conquest",100);
AddAIGoal(2,"Conquest",100);
AddAIGoal(3,"Conquest",100);
--temp until you rescript this mission

-- Level Stats
ClearWalkers()
AddWalkerType(0, 0) -- droidekas(special case: 0 leg pairs)
AddWalkerType(1, 3) -- ATSTs (1 leg pair)
AddWalkerType(2, 0) -- spider walkers with 2 leg pairs each
AddWalkerType(3, 0) -- attes with 3 leg pairs each

local weaponCnt = 240
SetMemoryPoolSize("ActiveRegion", 4)
SetMemoryPoolSize("Aimer", 27)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 100)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityFlyer", 9) -- 3xATST + rocket upgrade
SetMemoryPoolSize("EntityHover", 9)
SetMemoryPoolSize("EntityLight", 23)
SetMemoryPoolSize("EntityMine", 8)
SetMemoryPoolSize("EntitySoundStatic", 95)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("MountedTurret", 6)
SetMemoryPoolSize("Navigator", 39)
SetMemoryPoolSize("Obstacle", 745)
SetMemoryPoolSize("PathFollower", 39)
SetMemoryPoolSize("PathNode", 100)
SetMemoryPoolSize("ShieldEffect", 0)
SetMemoryPoolSize("SoundSpaceRegion", 6)
SetMemoryPoolSize("TentacleSimulator", 14)
SetMemoryPoolSize("TreeGridStack", 600)
SetMemoryPoolSize("UnitAgent", 39)
SetMemoryPoolSize("UnitController", 39)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("end\\end1.lvl", "end1_conquest")
SetDenseEnvironment("true")
AddDeathRegion("deathregion")
SetStayInTurrets(1)

-- Sound
voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "all_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "gcw_music")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\end.lvl", "end1gcw")
OpenAudioStream("sound\\end.lvl", "end1gcw")
OpenAudioStream("sound\\end.lvl", "end1gcw_emt")

SetBleedingVoiceOver(ALL, ALL, "all_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(ALL, IMP, "all_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, ALL, "imp_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, IMP, "imp_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(ALL, IMP, "all_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(1, "allleaving")
SetOutOfBoundsVoiceOver(2, "impleaving")

SetAmbientMusic(ALL, 1.0, "all_end_amb_start", 0,1)
SetAmbientMusic(ALL, 0.8, "all_end_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.2, "all_end_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_end_amb_start", 0,1)
SetAmbientMusic(IMP, 0.8, "imp_end_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.2, "imp_end_amb_end", 2,1)

SetVictoryMusic(ALL, "all_end_amb_victory")
SetDefeatMusic(ALL, "all_end_amb_defeat")
SetVictoryMusic(IMP, "imp_end_amb_victory")
SetDefeatMusic(IMP, "imp_end_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
-- SetSoundEffect("BirdScatter", "birdsFlySeq1")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")

SetAttackingTeam(ATT)

--Endor
--Shield Bunker
AddCameraShot(0.997654, 0.066982, 0.014139, -0.000949, 155.137131, 0.911505, -138.077072)
--Village
AddCameraShot(0.729761, 0.019262, 0.683194, -0.018033, -98.584869, 0.295284, 263.239288)
--Village
AddCameraShot(0.694277, 0.005100, 0.719671, -0.005287, -11.105947, -2.753207, 67.982201)
end
thanks for the help so far guys, surely im just missing something simple!

Re: Cant get simple side change to work

Posted: Fri Nov 20, 2009 6:43 pm
by eliminator
Hidden/Spoiler:
soldier = { "all_inf_rifleman_jungle",10, 25},
assault = { "all_inf_rocketeer_jungle",1,4},
engineer = { "all_inf_engineer_jungle",1,4},
sniper = { "all_inf_sniper_jungle",1,4},
officer = {"all_inf_officer_jungle",1,4},
special = { "all_inf_wookiee",1,4},
you didnt read this guys only add:
ReadDataFile("SIDE\\all.lvl",
the ones who stand in hide

Re: Cant get simple side change to work

Posted: Sun Nov 22, 2009 7:35 pm
by ukrai
well, i found my problem, i was a victim to this:

http://www.gametoast.com/forums/viewtop ... 73#p295373

after fixing my munge files and following your instructions, all good, thanks for you help guys, much appreciated.