My XL mode forces me on team 1 [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
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

My XL mode forces me on team 1 [Solved]

Post by AnthonyBF2 »

I am trying to make an XL mod for stock Mos Eisley and it is forcing me on team 1 and I don't know what to do to fix it.

Lua:
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveTDM")
ScriptCB_DoFile("custom_fc_commands")
function ScriptPostLoad()

ScriptCB_SetGameRules("instantaction")
--This defines the CPs. These need to happen first
TDM = ObjectiveTDM:New{teamATT = 1, teamDEF = 2,
multiplayerScoreLimit = 100,
textATT = "game.modes.tdm",
textDEF = "game.modes.tdm2",

multiplayerRules = true,
isCelebrityDeathmatch = true}
TDM:Start()
AddAIGoal(1, "conquest", 1000)
AddAIGoal(2, "conquest", 1000)
AddAIGoal(3, "conquest", 1000)
EnableSPHeroRules()
SetUberMode(1);
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()
-- Designers, these two lines *MUST* be first!
StealArtistHeap(256*1024)
SetPS2ModelMemory(2097152 + 65536 * 10)
ReadDataFile("dc:SIDE\\ingame.lvl")
ReadDataFile("ingame.lvl")

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



SetTeamAggressiveness(REP, 1.0)
SetTeamAggressiveness(CIS, 1.0)

SetMaxFlyHeight(100)
SetMaxPlayerFlyHeight(100)

ReadDataFile("sound\\tat.lvl;tat2cw")
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_sniper",
"rep_inf_ep3_engineer",
"rep_inf_ep3_jettrooper",
"rep_inf_ep3_officer",
"rep_hero_obiwan")

ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_hero_darthmaul",
"cis_inf_droideka")

ReadDataFile("dc:SIDE\\des.lvl",
"tat_inf_jawa")

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

SetAttackingTeam(ATT)

SetupTeams{
rep = {
team = REP,
units = 1000,
reinforcements = -1,
soldier = { "rep_inf_ep3_rifleman",75,200},
assault = { "rep_inf_ep3_rocketeer",75,200},
engineer = { "rep_inf_ep3_engineer",75,200},
sniper = { "rep_inf_ep3_sniper",75,200},
officer = {"rep_inf_ep3_officer",75,200},
special = { "rep_inf_ep3_jettrooper",75,200},

},
cis = {
team = CIS,
units = 1000,
reinforcements = -1,
soldier = { "cis_inf_rifleman",75,200},
assault = { "cis_inf_rocketeer",75,200},
engineer = { "cis_inf_engineer",75,200},
sniper = { "cis_inf_sniper",75,200},
officer = {"cis_inf_officer",75,200},
special = { "cis_inf_droideka",75,200},
}
}

-- Jawas --------------------------
SetTeamName (3, "locals")
AddUnitClass (3, "tat_inf_jawa", 7)
SetUnitCount (3, 7)
SetTeamAsFriend(3,ATT)
SetTeamAsFriend(3,DEF)
SetTeamAsFriend(ATT,3)
SetTeamAsFriend(DEF,3)
-----------------------------------

AddUnitClass(CIS, "cis_hero_darthmaul",0,1)
AddUnitClass(REP, "rep_hero_obiwan",0,1)

-- Level Stats
ClearWalkers()
AddWalkerType(0, 3) -- 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 = 230
SetMemoryPoolSize("Aimer", 23)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 325)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 19)
SetMemoryPoolSize("EntityFlyer", 6) -- to account for rocket upgrade
SetMemoryPoolSize("EntityHover", 1)
SetMemoryPoolSize("EntitySoundStream", 2)
SetMemoryPoolSize("EntitySoundStatic", 43)
SetMemoryPoolSize("MountedTurret", 15)
SetMemoryPoolSize("Navigator", 50)
SetMemoryPoolSize("Obstacle", 667)
SetMemoryPoolSize("PathFollower", 50)
SetMemoryPoolSize("PathNode", 256)
SetMemoryPoolSize("TreeGridStack", 325)
SetMemoryPoolSize("UnitAgent", 50)
SetMemoryPoolSize("UnitController", 50)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:TAT\\tat2.lvl", "tat2_con")
SetDenseEnvironment("false")


-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "des_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "cw_music")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\tat.lvl", "tat2")
OpenAudioStream("sound\\tat.lvl", "tat2")

SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(1, "repleaving")
SetOutOfBoundsVoiceOver(2, "cisleaving")

SetAmbientMusic(REP, 1.0, "rep_tat_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_tat_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2,"rep_tat_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_tat_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_tat_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2,"cis_tat_amb_end", 2,1)

SetVictoryMusic(REP, "rep_tat_amb_victory")
SetDefeatMusic (REP, "rep_tat_amb_defeat")
SetVictoryMusic(CIS, "cis_tat_amb_victory")
SetDefeatMusic (CIS, "cis_tat_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
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)
AddCameraShot(0.732291, -0.007608, -0.680912, -0.007074, 1.681833, 6.042514, 71.172432);
AddCameraShot(0.880830, -0.176249, 0.430862, 0.086213, 72.088852, 13.009782, 96.135429);
AddCameraShot(0.951425, -0.235086, -0.193006, -0.047690, 98.008606, 25.922222, 85.982498);
AddCameraShot(0.702385, -0.187812, 0.663271, 0.177353, 114.897949, 25.922222, 10.746059);
AddCameraShot(-0.141467, 0.044846, -0.942694, -0.298838, 97.121613, 25.922222, -65.803253);
AddCameraShot(-0.448951, 0.112747, -0.859719, -0.215904, 70.666542, 25.922222, -88.996330);
AddCameraShot(0.596313, -0.151264, 0.764169, 0.193843, 35.047939, 25.922222, -96.187553);
AddCameraShot(0.428975, -0.362181, -0.632304, -0.533851, -114.695259, 42.337784, -54.538460);
AddCameraShot(0.485286, -0.160731, -0.815869, -0.270223, -114.695259, 42.337784, -54.538460);
AddCameraShot(0.250177, -0.138466, -0.838399, -0.464031, -89.626076, 42.337784, -2.431808);
AddCameraShot(0.628286, -0.315611, 0.635421, 0.319195, -39.402264, 42.337784, 20.201601);
AddCameraShot(0.885964, -0.348802, -0.284377, -0.111958, -94.222435, 42.337784, 52.911922);
AddCameraShot(0.868043, -0.226361, -0.427586, -0.111502, -35.816402, 42.337784, 44.052761);
AddCameraShot(0.962938, -0.266344, -0.041009, -0.011343, 10.288770, 42.337784, 83.115334);
AddCameraShot(0.901188, -0.377287, 0.196792, 0.082388, 10.626176, 42.337784, 71.256241);
end[/code]
Last edited by AnthonyBF2 on Thu Sep 22, 2016 6:15 am, edited 1 time in total.
Ascertes
Private Second Class
Posts: 65
Joined: Thu Aug 18, 2016 3:42 pm
Projects :: Space Carida
xbox live or psn: No gamertag set

Re: My XL mode forces me on team 1

Post by Ascertes »

I'm not sure these necessarily have anything to do with your particular issue, but what exactly are the contents of your "ScriptCB_DoFile("custom_fc_commands")" script? I don't think that's a default script? If that's a custom script I'd look there first.

Secondly, in your MemoryPool area your Aimer pool is only set to 23. I'm not entirely certain this would have anything to do with your issue, but for XL shouldn't that be higher...?

Otherwise, I'm not seeing any real offenders in your LUA. This is very strange...
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: My XL mode forces me on team 1 [Solved]

Post by AnthonyBF2 »

I got it now, I had too many AI bots. I had to set them under 250 per side or less to be able to access both sides again.
Ascertes
Private Second Class
Posts: 65
Joined: Thu Aug 18, 2016 3:42 pm
Projects :: Space Carida
xbox live or psn: No gamertag set

Re: My XL mode forces me on team 1 [Solved]

Post by Ascertes »

AnthonyBF2 wrote:I got it now, I had too many AI bots. I had to set them under 250 per side or less to be able to access both sides again.
Glad you got that sorted out :)
Post Reply