yellow command post for third local team ? [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
wsa30h
Rebel Sergeant
Rebel Sergeant
Posts: 208
Joined: Thu Jul 26, 2018 12:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: star wars bf2
xbox live or psn: No gamertag set

yellow command post for third local team ? [Solved]

Post by wsa30h »

how do I make a command post yellow for the third tusken team ?
Last edited by wsa30h on Sun Sep 09, 2018 7:03 pm, edited 1 time in total.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: yellow command post for third local team ?

Post by Marth8880 »

Use the "neu" team name for the Tusken side.
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Re: yellow command post for third local team ?

Post by SkinnyODST »

Marth8880 wrote:Use the "neu" team name for the Tusken side.
(just to clarify cause this`ll be very useful for me too) By that do you mean using neu as the 3 character team name? Like rep, cis, all, and imp? Will that automatically make the CP`s yellow?
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: yellow command post for third local team ?

Post by Marth8880 »

I mean using "neu" in SetupTeams (or SetTeamName), like so:

Code: Select all

SetupTeams{
	rep = {
		team = REP,
		units = 1,
		reinforcements = 150,
		soldier  = { "rep_inf_ep3_rifleman",9, 25},
		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 = 1,
		reinforcements = 150,
		soldier  = { "cis_inf_rifleman",9, 25},
		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},
	},
	neu = {
		team = whateverTeamIdVariable,
		units = 1,
		blahblahblah etcetcetc lmfao
	}
}
(note that whateverTeamIdVariable must be an existing variable, like how REP and CIS are defined at the top of the script)
wsa30h
Rebel Sergeant
Rebel Sergeant
Posts: 208
Joined: Thu Jul 26, 2018 12:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: star wars bf2
xbox live or psn: No gamertag set

Re: yellow command post for third local team ?

Post by wsa30h »

ok so I added those lines but its still red

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

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

---------------------------------------------------------------------------
-- 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 ScriptPostLoad()
AddAIGoal(3, "Deathmatch", 100)
cp1 = CommandPost:New{name = "cp1"}
cp10 = CommandPost:New{name = "cp10"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp7 = CommandPost:New{name = "cp7"}
--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, text = "level.geo1.objectives.conquest", multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp10)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp7)
conquest:Start()
SetUberMode(1);
EnableSPHeroRules()

AddDeathRegion("deathregion")
AddDeathRegion("deathregion2")
AddDeathRegion("deathregion3")
AddDeathRegion("deathregion4")
AddDeathRegion("deathregion5")

end
function ScriptInit()
StealArtistHeap(800*1024)
-- Designers, these two lines *MUST* be first.
SetPS2ModelMemory(3500000)
ReadDataFile("dc:ingame.lvl")
ReadDataFile("ingame.lvl")
-- REP Attacking (attacker is always #1)
local REP = 1
local CIS = 2
local NEU = 3
-- These variables do not change
local ATT = 1
local DEF = 2
local NEU = 3
SetTeamAggressiveness(CIS, 1.0)
SetTeamAggressiveness(REP, 1.0)

SetMemoryPoolSize("Music", 40)


ReadDataFile("sound\\tat.lvl;tat2cw")
ReadDataFile("SIDE\\rep.lvl",
--"rep_bldg_forwardcenter",
"rep_fly_assault_dome",
--"rep_fly_gunship",
"rep_fly_gunship_dome",
"rep_fly_jedifighter_dome",
"rep_inf_ep2_rocketeer",
"rep_inf_ep2_rifleman",
"rep_inf_ep2_jettrooper",
"rep_inf_ep2_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep2_engineer",
"rep_hero_macewindu",
"rep_walk_atte")

ReadDataFile("SIDE\\cis.lvl",
"cis_fly_droidfighter_dome",
--"cis_fly_geofighter",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_engineer",
"cis_hero_countdooku",
"cis_inf_droideka",
"cis_tread_hailfire",
--"cis_hover_stap",
"cis_walk_spider")
ReadDataFile("SIDE\\des.lvl",
"tat_inf_tuskenhunter",
"tat_inf_tuskenraider");
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_laser",
"tur_bldg_tat_barge",
"tat_hover_skiff")
SetAttackingTeam(ATT);

SetSpawnDelay(10.0, 0.25)

SetupTeams{

rep = {
team = REP,
units = 40,
reinforcements = 250,
soldier = { "rep_inf_ep2_rifleman",10, 25},
assault = { "rep_inf_ep2_rocketeer",1, 4},
engineer = { "rep_inf_ep2_engineer",1, 4},
sniper = { "rep_inf_ep2_sniper",1, 4},
officer = {"rep_inf_ep3_officer",1, 4},
special = { "rep_inf_ep2_jettrooper",1, 4},

},
cis = {
team = CIS,
units = 40,
reinforcements = 200,
soldier = { "cis_inf_rifleman",10, 25},
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(REP, "rep_hero_macewindu")
SetHeroClass(CIS, "cis_hero_countdooku")



-- Local Stats
SetTeamName(3, "neu")
AddUnitClass(3, "tat_inf_tuskenraider", 5);
AddUnitClass(3, "tat_inf_tuskenhunter", 2);
SetUnitCount(3, 14)

-- Level Stats
ClearWalkers()
AddWalkerType(0, 8)
SetMemoryPoolSize("EntityHover", 16)
SetMemoryPoolSize("EntityFlyer", 5)
-- SetMemoryPoolSize("EntityBuildingArmedDynamic", 16)
-- SetMemoryPoolSize("EntityTauntaun", 0)
SetMemoryPoolSize("MountedTurret", 22)
SetMemoryPoolSize("PowerupItem", 60)
SetMemoryPoolSize("EntityMine", 40)
SetMemoryPoolSize("Aimer", 200)
SetMemoryPoolSize("Obstacle", 725)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:TA1\\TAT1.lvl", "TAT1_conquest")
SetDenseEnvironment("false")
AddDeathRegion("Sarlac01")
SetMaxFlyHeight(90)
SetMaxPlayerFlyHeight(90)

-- Sound Stats
OpenAudioStream("sound\\tat.lvl", "tatcw_music");
OpenAudioStream("sound\\tat.lvl", "tat1");
OpenAudioStream("sound\\tat.lvl", "tat1");
OpenAudioStream("sound\\cw.lvl", "cw_vo");
OpenAudioStream("sound\\cw.lvl", "cw_tac_vo");
OpenAudioStream("sound\\tat.lvl", "tat1_emt");

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);

SetOutOfBoundsVoiceOver(1, "Repleaving");
SetOutOfBoundsVoiceOver(2, "Cisleaving");

SetAmbientMusic(REP, 1.0, "rep_tat_amb_start", 0,1);
SetAmbientMusic(REP, 0.99, "rep_tat_amb_middle", 1,1);
SetAmbientMusic(REP, 0.1,"rep_tat_amb_end", 2,1);
SetAmbientMusic(CIS, 1.0, "cis_tat_amb_start", 0,1);
SetAmbientMusic(CIS, 0.99, "cis_tat_amb_middle", 1,1);
SetAmbientMusic(CIS, 0.1,"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");

SetPlanetaryBonusVoiceOver(CIS, CIS, 0, "CIS_bonus_CIS_medical");
SetPlanetaryBonusVoiceOver(CIS, REP, 0, "CIS_bonus_REP_medical");
SetPlanetaryBonusVoiceOver(CIS, CIS, 1, "");
SetPlanetaryBonusVoiceOver(CIS, REP, 1, "");
SetPlanetaryBonusVoiceOver(CIS, CIS, 2, "CIS_bonus_CIS_sensors");
SetPlanetaryBonusVoiceOver(CIS, REP, 2, "CIS_bonus_REP_sensors");
SetPlanetaryBonusVoiceOver(CIS, CIS, 3, "CIS_bonus_CIS_hero");
SetPlanetaryBonusVoiceOver(CIS, REP, 3, "CIS_bonus_REP_hero");
SetPlanetaryBonusVoiceOver(CIS, CIS, 4, "CIS_bonus_CIS_reserves");
SetPlanetaryBonusVoiceOver(CIS, REP, 4, "CIS_bonus_REP_reserves");
SetPlanetaryBonusVoiceOver(CIS, CIS, 5, "CIS_bonus_CIS_sabotage");--sabotage
SetPlanetaryBonusVoiceOver(CIS, REP, 5, "CIS_bonus_REP_sabotage");
SetPlanetaryBonusVoiceOver(CIS, CIS, 6, "");
SetPlanetaryBonusVoiceOver(CIS, REP, 6, "");
SetPlanetaryBonusVoiceOver(CIS, CIS, 7, "CIS_bonus_CIS_training");--advanced training
SetPlanetaryBonusVoiceOver(CIS, REP, 7, "CIS_bonus_REP_training");--advanced training

SetPlanetaryBonusVoiceOver(REP, REP, 0, "REP_bonus_REP_medical");
SetPlanetaryBonusVoiceOver(REP, CIS, 0, "REP_bonus_CIS_medical");
SetPlanetaryBonusVoiceOver(REP, REP, 1, "");
SetPlanetaryBonusVoiceOver(REP, CIS, 1, "");
SetPlanetaryBonusVoiceOver(REP, REP, 2, "REP_bonus_REP_sensors");
SetPlanetaryBonusVoiceOver(REP, CIS, 2, "REP_bonus_CIS_sensors");
SetPlanetaryBonusVoiceOver(REP, REP, 3, "REP_bonus_REP_hero");
SetPlanetaryBonusVoiceOver(REP, CIS, 3, "REP_bonus_CIS_hero");
SetPlanetaryBonusVoiceOver(REP, REP, 4, "REP_bonus_REP_reserves");
SetPlanetaryBonusVoiceOver(REP, CIS, 4, "REP_bonus_CIS_reserves");
SetPlanetaryBonusVoiceOver(REP, REP, 5, "REP_bonus_REP_sabotage");--sabotage
SetPlanetaryBonusVoiceOver(REP, CIS, 5, "REP_bonus_CIS_sabotage");
SetPlanetaryBonusVoiceOver(REP, REP, 6, "");
SetPlanetaryBonusVoiceOver(REP, CIS, 6, "");
SetPlanetaryBonusVoiceOver(REP, REP, 7, "REP_bonus_REP_training");--advanced training
SetPlanetaryBonusVoiceOver(REP, CIS, 7, "REP_bonus_CIS_training");--advanced training

-- Camera Stats
--Tat 1 - Dune Sea
--Crawler
AddCameraShot(-0.404895, 0.000992, -0.914360, -0.002240, -85.539894, 20.536297, 141.699493);
--Homestead
AddCameraShot(0.040922, 0.004049, -0.994299, 0.098381, -139.729523, 17.546598, -34.360893);
--Sarlac Pit
AddCameraShot(-0.312360, 0.016223, -0.948547, -0.049263, -217.381485, 20.150953, 54.514324);

end[/code]
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: yellow command post for third local team ?

Post by Marth8880 »

You might also need to include SetTeamAsNeutral for NEU with the other teams.

https://github.com/marth8880/SWBF2-Lua- ... oclua#L514
https://sites.google.com/site/swbf2modt ... post_notes
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11079
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: yellow command post for third local team ?

Post by Teancum »

I've never seen anyone successfully have a third color for a command post. SWBF2 either treats CPs as enemy or friendly, so their either red or blue. SWBF1 you could have team 3 be yellow.
wsa30h
Rebel Sergeant
Rebel Sergeant
Posts: 208
Joined: Thu Jul 26, 2018 12:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: star wars bf2
xbox live or psn: No gamertag set

Re: yellow command post for third local team ?

Post by wsa30h »

this will sound silly but I don't know where to tell it that the tuskens are neutral. ok so I got it working but their command post and map blips are white but when I aim at them their yellow but I need the cp color to be yellow as well here is my lua
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

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

---------------------------------------------------------------------------
-- 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 ScriptPostLoad()
AddAIGoal(3, "Deathmatch", 100)
cp10 = CommandPost:New{name = "cp10"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp7 = CommandPost:New{name = "cp7"}

--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, text = "level.geo1.objectives.conquest", multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp10)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp7)

conquest:Start()

EnableSPHeroRules()

AddDeathRegion("deathregion")
AddDeathRegion("deathregion2")
AddDeathRegion("deathregion3")
AddDeathRegion("deathregion4")
AddDeathRegion("deathregion5")

end
function ScriptInit()
StealArtistHeap(800*1024)
-- Designers, these two lines *MUST* be first.
SetPS2ModelMemory(3500000)
ReadDataFile("ingame.lvl")

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

SetMemoryPoolSize("Music", 40)

ReadDataFile("sound\\geo.lvl;geo1cw")
ReadDataFile("SIDE\\rep.lvl",
--"rep_bldg_forwardcenter",
"rep_fly_assault_dome",
--"rep_fly_gunship",
"rep_fly_gunship_dome",
"rep_fly_jedifighter_dome",
"rep_inf_ep2_rocketeer",
"rep_inf_ep2_rifleman",
"rep_inf_ep2_jettrooper",
"rep_inf_ep2_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep2_engineer",
"rep_hero_macewindu",
"rep_walk_atte")

ReadDataFile("SIDE\\cis.lvl",
"cis_fly_droidfighter_dome",
--"cis_fly_geofighter",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_engineer",
"cis_hero_countdooku",
"cis_inf_droideka",
"cis_tread_hailfire",
--"cis_hover_stap",
"cis_walk_spider")
ReadDataFile("SIDE\\des.lvl",
"tat_inf_tuskenhunter",
"tat_inf_tuskenraider")

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

-- Level Stats

ClearWalkers()
SetMemoryPoolSize("EntityWalker", -1)
AddWalkerType(0, 3) -- 8 droidekas (special case: 0 leg pairs)
AddWalkerType(2, 3) -- 2 spider walkers with 2 leg pairs each
AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each
local weaponcnt = 240
SetMemoryPoolSize("Aimer", 50)
SetMemoryPoolSize("AmmoCounter", weaponcnt)
SetMemoryPoolSize("BaseHint", 100)
SetMemoryPoolSize("CommandWalker", 1)
SetMemoryPoolSize("EnergyBar", weaponcnt)
SetMemoryPoolSize("EntityFlyer", 6)
SetMemoryPoolSize("EntityHover", 9)
SetMemoryPoolSize("EntityLight", 50)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("MountedTurret", 10)
SetMemoryPoolSize("Navigator", 50)
SetMemoryPoolSize("Obstacle", 450)
SetMemoryPoolSize("PathFollower", 50)
SetMemoryPoolSize("PathNode", 100)
SetMemoryPoolSize("TreeGridStack", 300)
SetMemoryPoolSize("UnitAgent", 50)
SetMemoryPoolSize("UnitController", 50)
SetMemoryPoolSize("Weapon", weaponcnt)

SetSpawnDelay(10.0, 0.25)

SetupTeams{

rep = {
team = REP,
units = 28,
reinforcements = 150,
soldier = { "rep_inf_ep2_rifleman",10, 25},
assault = { "rep_inf_ep2_rocketeer",1, 4},
engineer = { "rep_inf_ep2_engineer",1, 4},
sniper = { "rep_inf_ep2_sniper",1, 4},
officer = {"rep_inf_ep3_officer",1, 4},
special = { "rep_inf_ep2_jettrooper",1, 4},

},
cis = {
team = CIS,
units = 28,
reinforcements = 150,
soldier = { "cis_inf_rifleman",10, 25},
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(REP, "rep_hero_macewindu")
SetHeroClass(CIS, "cis_hero_countdooku")


-- Attacker Stats

--teamATT = ConquestTeam:New{team = ATT}
--teamATT:AddBleedThreshold(21, 0.75)
--teamATT:AddBleedThreshold(11, 2.25)
--teamATT:AddBleedThreshold(1, 3.0)
--teamATT:Init()
SetTeamAsEnemy(ATT,3)
SetTeamAsEnemy(3,ATT)

-- Defender Stats

--teamDEF = ConquestTeam:New{team = DEF}
--teamDEF:AddBleedThreshold(21, 0.75)
--teamDEF:AddBleedThreshold(11, 2.25)
--teamDEF:AddBleedThreshold(1, 3.0)
--teamDEF:Init()
SetTeamAsEnemy(DEF,3)

-- Local Stats
SetTeamName(3, "neu")
SetUnitCount(3, 7)
AddUnitClass(3, "tat_inf_tuskenraider", 5)
AddUnitClass(3, "tat_inf_tuskenhunter", 2)
SetTeamAsEnemy(3, DEF)
--SetTeamName(4, "locals")
--AddUnitClass(4, "rep_inf_jedimale",1)
--AddUnitClass(4, "rep_inf_jedimaleb",1)
--AddUnitClass(4, "rep_inf_jedimaley",1)
--SetUnitCount(4, 3)
--SetTeamAsFriend(4, ATT)

ReadDataFile("dc:TA1\\TAt1.lvl", "TAt1_conquest")

SetDenseEnvironment("false")
SetMinFlyHeight(-65)
SetMaxFlyHeight(50)
SetMaxPlayerFlyHeight(50)



-- Birdies
--SetNumBirdTypes(1)
--SetBirdType(0.0,10.0,"dragon")
--SetBirdFlockMinHeight(90.0)

-- Sound

voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_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\\geo.lvl", "geo1cw")
OpenAudioStream("sound\\geo.lvl", "geo1cw")

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_GEO_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_GEO_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_GEO_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_GEO_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_GEO_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_GEO_amb_end", 2,1)

SetVictoryMusic(REP, "rep_geo_amb_victory")
SetDefeatMusic (REP, "rep_geo_amb_defeat")
SetVictoryMusic(CIS, "cis_geo_amb_victory")
SetDefeatMusic (CIS, "cis_geo_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")


--ActivateBonus(CIS, "SNEAK_ATTACK")
--ActivateBonus(REP, "SNEAK_ATTACK")

SetAttackingTeam(ATT)

--Opening Satalite Shot
--Geo
--Mountain
AddCameraShot(0.996091, 0.085528, -0.022005, 0.001889, -6.942698, -59.197201, 26.136919)
--Wrecked Ship
AddCameraShot(0.906778, 0.081875, -0.411906, 0.037192, 26.373968, -59.937874, 122.553581)
--War Room
--AddCameraShot(0.994219, 0.074374, 0.077228, -0.005777, 90.939568, -49.293945, -69.571136)
end[/code]
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: yellow command post for third local team ?

Post by Marth8880 »

I don't remember 100% if it'll actually make them yellow, but you'd need to use SetTeamAsNeutral for NEU with ATT, NEU with DEF, ATT with NEU, and DEF with NEU - and get rid of all SetTeamAsEnemy calls that affect NEU.

However, I realized just now that SetTeamAsNeutral will cause the teams to not attack each other, which I assume is not what you want for tuskens. With that said, I don't think there's any valid solution here.
wsa30h
Rebel Sergeant
Rebel Sergeant
Posts: 208
Joined: Thu Jul 26, 2018 12:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: star wars bf2
xbox live or psn: No gamertag set

Re: yellow command post for third local team ?

Post by wsa30h »

I guess your right but I got it semi working here is my lua if your interested in trying it out.
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

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

---------------------------------------------------------------------------
-- 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 ScriptPostLoad()
AddAIGoal(3, "Deathmatch", 100)
cp10 = CommandPost:New{name = "cp10"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp7 = CommandPost:New{name = "cp7"}

--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, text = "level.geo1.objectives.conquest", multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp10)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp7)
SetUberMode(1);
conquest:Start()

EnableSPHeroRules()

AddDeathRegion("deathregion")
AddDeathRegion("deathregion2")
AddDeathRegion("deathregion3")
AddDeathRegion("deathregion4")
AddDeathRegion("deathregion5")

end
function ScriptInit()
StealArtistHeap(800*1024)
-- Designers, these two lines *MUST* be first.
SetPS2ModelMemory(3500000)
ReadDataFile("dc:ingame.lvl")
ReadDataFile("ingame.lvl")

-- REP Attacking (attacker is always #1)
local REP = 1
local CIS = 2
locals = 3
-- These variables do not change
local ATT = 1
local DEF = 2
SetTeamAggressiveness(CIS, 1.0)
SetTeamAggressiveness(REP, 1.0)

SetMemoryPoolSize("Music", 40)

ReadDataFile("sound\\tat.lvl;tat2cw")
ReadDataFile("SIDE\\rep.lvl",
--"rep_bldg_forwardcenter",
"rep_fly_assault_dome",
--"rep_fly_gunship",
"rep_fly_gunship_dome",
"rep_fly_jedifighter_dome",
"rep_inf_ep2_rocketeer",
"rep_inf_ep2_rifleman",
"rep_inf_ep2_jettrooper",
"rep_inf_ep2_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep2_engineer",
"rep_hero_macewindu",
"rep_hover_fightertank")

ReadDataFile("SIDE\\cis.lvl",
"cis_fly_droidfighter_dome",
--"cis_fly_geofighter",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_engineer",
"cis_hero_countdooku",
"cis_inf_droideka",
"cis_tread_hailfire",
--"cis_hover_stap",
"cis_hover_aat")
ReadDataFile("SIDE\\des.lvl",
"tat_inf_tuskenhunter",
"tat_inf_tuskenraider")

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

-- Level Stats

ClearWalkers()
SetMemoryPoolSize("EntityWalker", -1)
AddWalkerType(0, 3) -- 8 droidekas (special case: 0 leg pairs)
AddWalkerType(2, 3) -- 2 spider walkers with 2 leg pairs each
AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each
local weaponcnt = 240
SetMemoryPoolSize("Aimer", 50)
SetMemoryPoolSize("AmmoCounter", weaponcnt)
SetMemoryPoolSize("BaseHint", 100)
SetMemoryPoolSize("CommandWalker", 1)
SetMemoryPoolSize("EnergyBar", weaponcnt)
SetMemoryPoolSize("EntityFlyer", 6)
SetMemoryPoolSize("EntityHover", 9)
SetMemoryPoolSize("EntityLight", 50)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("MountedTurret", 10)
SetMemoryPoolSize("Navigator", 50)
SetMemoryPoolSize("Obstacle", 450)
SetMemoryPoolSize("PathFollower", 50)
SetMemoryPoolSize("PathNode", 100)
SetMemoryPoolSize("TreeGridStack", 300)
SetMemoryPoolSize("UnitAgent", 50)
SetMemoryPoolSize("UnitController", 50)
SetMemoryPoolSize("Weapon", weaponcnt)

SetSpawnDelay(10.0, 0.25)

SetupTeams{

rep = {
team = REP,
units = 40,
reinforcements = 250,
soldier = { "rep_inf_ep2_rifleman",10, 25},
assault = { "rep_inf_ep2_rocketeer",1, 4},
engineer = { "rep_inf_ep2_engineer",1, 4},
sniper = { "rep_inf_ep2_sniper",1, 4},
officer = {"rep_inf_ep3_officer",1, 4},
special = { "rep_inf_ep2_jettrooper",1, 4},

},
cis = {
team = CIS,
units = 40,
reinforcements = 250,
soldier = { "cis_inf_rifleman",10, 25},
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(REP, "rep_hero_macewindu")
SetHeroClass(CIS, "cis_hero_countdooku")


-- Attacker Stats

--teamATT = ConquestTeam:New{team = ATT}
--teamATT:AddBleedThreshold(21, 0.75)
--teamATT:AddBleedThreshold(11, 2.25)
--teamATT:AddBleedThreshold(1, 3.0)
--teamATT:Init()
SetTeamAsNeutral(ATT,3)


-- Defender Stats

--teamDEF = ConquestTeam:New{team = DEF}
--teamDEF:AddBleedThreshold(21, 0.75)
--teamDEF:AddBleedThreshold(11, 2.25)
--teamDEF:AddBleedThreshold(1, 3.0)
--teamDEF:Init()
SetTeamAsNeutral(DEF,3)
SetTeamAsNeutral(3,DEF)
SetTeamName(3, "locals")
SetUnitCount(3, 7)
AddUnitClass(3, "tat_inf_tuskenraider", 5)
AddUnitClass(3, "tat_inf_tuskenhunter", 2)
SetTeamAsEnemy(3, DEF)
--SetTeamName(4, "locals")
--AddUnitClass(4, "rep_inf_jedimale",1)
--AddUnitClass(4, "rep_inf_jedimaleb",1)
--AddUnitClass(4, "rep_inf_jedimaley",1)
--SetUnitCount(4, 3)
--SetTeamAsEnemy(4, ATT)

ReadDataFile("dc:TA1\\TAt1.lvl", "TAt1_conquest")

SetDenseEnvironment("false")
SetMinFlyHeight(-65)
SetMaxFlyHeight(50)
SetMaxPlayerFlyHeight(50)



-- Birdies
--SetNumBirdTypes(1)
--SetBirdType(0.0,10.0,"dragon")
--SetBirdFlockMinHeight(90.0)

-- Sound

voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_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\\geo.lvl", "geo1cw")
OpenAudioStream("sound\\geo.lvl", "geo1cw")

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_GEO_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_GEO_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_GEO_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_GEO_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_GEO_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_GEO_amb_end", 2,1)

SetVictoryMusic(REP, "rep_geo_amb_victory")
SetDefeatMusic (REP, "rep_geo_amb_defeat")
SetVictoryMusic(CIS, "cis_geo_amb_victory")
SetDefeatMusic (CIS, "cis_geo_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")


--ActivateBonus(CIS, "SNEAK_ATTACK")
--ActivateBonus(REP, "SNEAK_ATTACK")

SetAttackingTeam(ATT)

-- Camera Stats
--Tat 1 - Dune Sea
--Crawler
AddCameraShot(-0.404895, 0.000992, -0.914360, -0.002240, -85.539894, 20.536297, 141.699493);
--Homestead
AddCameraShot(0.040922, 0.004049, -0.994299, 0.098381, -139.729523, 17.546598, -34.360893);
--Sarlac Pit
AddCameraShot(-0.312360, 0.016223, -0.948547, -0.049263, -217.381485, 20.150953, 54.514324);

end[/code]
User avatar
Rayman1103
Private Second Class
Posts: 72
Joined: Mon Aug 02, 2010 10:54 am
Location: Wisconsin

Re: yellow command post for third local team ?

Post by Rayman1103 »

Hello everyone, just wanted to let you all know that I've looked into this and I've found a solution that works, which allows for Team 3 to have yellow command posts.

Place the following code in ScriptInit (make sure not to have any SetTeamAsEnemy functions here):

Code: Select all

SetTeamName(3, "locals")
SetTeamAsNeutral(1, 3)
SetTeamAsNeutral(3, 1)
SetTeamAsNeutral(2, 3)
SetTeamAsNeutral(3, 2)
Then place the following in ScriptPostLoad:

Code: Select all

SetTeamAsEnemy(1, 3)
SetTeamAsEnemy(3, 1)
SetTeamAsEnemy(2, 3)
SetTeamAsEnemy(3, 2)
When the map loads, Team 3 will have yellow CPs and they will still attack the other teams, and the other teams will attack them.

Here's a screenshot showing yellow CPs

Edit: To make sure Team 3 appears yellow their name needs to be set to "locals". Otherwise they will appear white.
Last edited by Rayman1103 on Sun Sep 09, 2018 11:13 am, edited 2 times in total.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11079
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: yellow command post for third local team ?

Post by Teancum »

Very clever idea. I've bookmarked this for future use. Now if we can just figure out how to set the player's team to green instead of blue. Most of the values are set in the HUD, but I don't know if anyone consistently got everything to be green for the player team.
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Re: yellow command post for third local team ?

Post by SkinnyODST »

I placed all that code in the correct areas in my lua but the CP`s aren`t yellow, they`re white, exactly like neutral/uncaptured CP`s. Also when I kill one of the units who spawn from it, the text in the kill feed is white, which is probably supposed to happen. Also, is it possible for the team to have a yellow CP but be friendly for the Republic team?

My lua
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

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

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

AmbushTeam1 = 6
WPA = AmbushTeam1

function ScriptPostLoad()

SetTeamAsEnemy(1, 3)
SetTeamAsEnemy(3, 1)
SetTeamAsEnemy(2, 3)
SetTeamAsEnemy(3, 2)

SetProperty("cp3", "AISpawnWeight", 10)

SetProperty("cp7", "AISpawnWeight", 20)

KillObject("kas2_prop_sea_walldoor11")
KillObject("kas2_prop_sea_walldoor12")

ActivateRegion("wamparegion")
testfunction = OnEnterRegion(
function(region, player)
if IsCharacterHuman (player) then
KillObject("yav2_bldg_window_ruin_30")
KillObject("rep_prop_deadclonearma")
end
end,
"wamparegion"
)

ActivateRegion("fleetflyover")
testfunction = OnEnterRegion(
function(region, player)
if IsCharacterHuman (player) then
PlayAnimation("gunshiprise")
PlayAnimation("fleetflyover")
end
end,
"fleetflyover"
)

ActivateRegion("dropofftrigger")
testfunction = OnEnterRegion(
function(region, player)
if IsCharacterHuman (player) then
PlayAnimation("dropoff")
end
end,
"dropofftrigger"
)

ActivateRegion("crashplace")
testfunction = OnEnterRegion(
function(region, player)
if IsCharacterHuman (player) then
PlayAnimation("gunshipcrash")
end
end,
"crashplace"
)

ActivateRegion("jokeralex")
testfunction = OnEnterRegion(
function(region, player)
if IsCharacterHuman (player) then
ShowMessageText("level.CCC.jokeralex")
DeactivateRegion("jokeralex")
end
end,
"jokeralex"
)

ActivateRegion("kevin")
testfunction = OnEnterRegion(
function(region, player)
if IsCharacterHuman (player) then
ShowMessageText("level.CCC.kevin")
DeactivateRegion("kevin")
end
end,
"kevin"
)

AllowAISpawn(REP, false)

timername = CreateTimer("RepSpawn")
SetTimerValue(timername, 10.0)
StartTimer(timername)
OnTimerElapse(
function(timer)

AllowAISpawn(REP, true)

DestroyTimer(timer)
end,
timername
)

AddAIGoal(3, "Deathmatch", 100)

SetClassProperty("cis_inf_rifleman", "NoEnterVehicles", "1")


--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 = "Local_CP"}
cp7 = CommandPost:New{name = "cp7"}



--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:Start()

SetUberMode(1);

EnableSPHeroRules()

SetupAmbushTrigger("wamparegion", "wampapath", 8, 6)

SetupAmbushTrigger("ambushregion", "ambushpath", 8, 4)

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()
WeatherMode = math.random(1,4)

SetTeamAsNeutral(1, 3)
SetTeamAsNeutral(3, 1)
SetTeamAsNeutral(2, 3)
SetTeamAsNeutral(3, 2)

SetTeamAggressiveness(CIS, 2.2)
SetTeamAggressiveness(REP, 1.2)

ReadDataFile("ingame.lvl")

AISnipeSuitabilityDist(336)

SetMaxFlyHeight(62)
SetMaxPlayerFlyHeight (62)

SetMemoryPoolSize ("ClothData",62)
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("dc:SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_medic",
"rep_inf_ep3_sniper",
"rep_inf_ep3_commander_needo",
"rep_inf_ep3_jettrooper",
"rep_inf_ep3_captain",
"rep_inf_ep2_marine",
"rep_inf_captain_moss",
"rep_inf_ep2_jettrooper_rifleman",
"rep_inf_sergeant_barck",
"rep_inf_yavin_scout_rocketeer",
"rep_inf_ep2_pilot",
"rep_hover_fightertank",
"rep_walk_atte",
"rep_hover_barcspeeder")
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_marine",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_inf_marine",
"cis_inf_officer_hunt",
"cis_inf_pilot",
"cis_hero_grievous",
"cis_hover_aat",
"cis_hover_stap",
"cis_walk_spider")

ReadDataFile("dc:SIDE\\tur.lvl",
"tur_bldg_laser",
"tur_bldg_tower",
"tur_bldg_chaingun",
"tur_bldg_built_chaingun",
"tur_yav_bldg_watchtower",
"tur_bldg_recoilless_fel_auto",
"tur_bldg_recoilless_kas",
"tur_bldg_recoilless_lg",
"tur_bldg_recoilless_md",
"tur_bldg_recoilless_myg_auto",
"tur_bldg_recoilless_nab_auto")

ReadDataFile("dc:SIDE\\snw.lvl",
"snw_inf_wampa")

SetupTeams{
rep = {
team = REP,
units = 162,
reinforcements = 1600,
soldier = { "rep_inf_ep3_rifleman",62, 80},
assault = { "rep_inf_ep3_rocketeer",20, 30},
engineer = { "rep_inf_ep3_sniper",10, 20},
sniper = { "rep_inf_ep3_medic",10, 20},
officer = { "rep_inf_ep3_captain",6,16},
special = { "rep_inf_ep3_jettrooper",10, 20},
AddUnitClass(REP, "rep_inf_ep3_commander_needo",1, 1)

},
cis = {
team = CIS,
units = 200,
reinforcements = 1400,
soldier = { "cis_inf_marine",80, 100},
assault = { "cis_inf_rocketeer",15, 25},
engineer = { "cis_inf_engineer",15, 25},
sniper = { "cis_inf_sniper",20, 30},
special = { "cis_inf_pilot",10, 25},
officer = { "cis_inf_droideka",10, 20},
extra1 = { "cis_inf_rifleman",15, 25},
AddUnitClass(CIS, "cis_inf_officer",10, 20)

},
abt = {
team = ABT,
units = 8,
reinforcements = -1,
sniper = { "cis_inf_sniper", 8, 8},

},
wpa = {
team = WPA,
units = 10,
reinforcements = -1,
sniper = { "snw_inf_wampa", 8, 8},

}
}

AddAIGoal(3, "Deathmatch", 100)
AddAIGoal(6, "Deathmatch", 100)

AddUnitClass (3, "rep_inf_ep2_pilot", 10,19)
AddUnitClass (3, "rep_inf_yavin_scout_rocketeer", 3,6)
AddUnitClass (3, "rep_inf_sergeant_barck", 1,1)
SetUnitCount (3, 26)
AddAIGoal(3, "Deathmatch", 100)

SetTeamName (4, "snipers")
SetTeamAsFriend(ABT, CIS)
SetTeamAsFriend(CIS, ABT)
SetTeamAsEnemy(ABT, REP)
SetTeamAsEnemy(REP, ABT)
ClearAIGoals(ABT)
AddAIGoal(ABT, "Deathmatch", 100)

SetTeamName (6, "fompa")
SetTeamAsEnemy(WPA, CIS)
SetTeamAsEnemy(CIS, WPA)
SetTeamAsEnemy(WPA, REP)
SetTeamAsEnemy(REP, WPA)
ClearAIGoals(WPA)
AddAIGoal(WPA, "Deathmatch", 100)

SetClassProperty("cis_inf_marine", "WeaponName1", "cis_weap_inf_rifle")
SetClassProperty("cis_inf_marine", "WeaponName2", "cis_weap_inf_pistol")
SetClassProperty("cis_inf_marine", "WeaponName3", "cis_weap_inf_thermaldetonator")
SetClassProperty("rep_inf_ep3_commander_needo", "FleeLikeAHero", "1")
SetClassProperty("rep_inf_ep2_sniper", "FleeLikeAHero", "1")
SetClassProperty("rep_inf_ep3_barck", "FleeLikeAHero", "1")
SetClassProperty("rep_inf_captain_moss", "FleeLikeAHero", "1")

AddUnitClass(CIS, "cis_inf_rifleman",15, 25)

AddUnitClass(REP, "rep_inf_ep2_marine",10, 20)
AddUnitClass(REP, "rep_inf_captain_moss",1,1)




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

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:CCC\\CCC.lvl", "CCC_conquest")
if WeatherMode == 1 then
ReadDataFile("dc:CCC\\sky.lvl", "heavyrain")
elseif WeatherMode == 2 then
ReadDataFile("dc:CCC\\sky.lvl", "night")
elseif WeatherMode == 3 then
ReadDataFile("dc:CCC\\sky.lvl", "rain")
elseif WeatherMode == 4 then
ReadDataFile("dc:CCC\\sky.lvl", "day")
end
SetDenseEnvironment("false")




-- Sound

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")

voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_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\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1_emt")

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)

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

SetAmbientMusic(REP, 1.0, "rep_yav_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_yav_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_yav_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_yav_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_yav_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_yav_amb_end", 2,1)

SetVictoryMusic(REP, "rep_yav_amb_victory")
SetDefeatMusic (REP, "rep_yav_amb_defeat")
SetVictoryMusic(CIS, "cis_yav_amb_victory")
SetDefeatMusic (CIS, "cis_yav_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("BirdScatter", "birdsFlySeq1")
--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")


--OpeningSateliteShot
AddCameraShot(0.025255, 0.003492, -0.990256, 0.136902, 64.629364, 1.095097, -55.487732);
end

[/code]
Last edited by SkinnyODST on Sun Sep 09, 2018 1:49 am, edited 1 time in total.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: yellow command post for third local team ?

Post by Marth8880 »

Teancum wrote:Now if we can just figure out how to set the player's team to green instead of blue. Most of the values are set in the HUD, but I don't know if anyone consistently got everything to be green for the player team.
can we not pls thx

Green vs. red is an awful color scheme - really sucks for colorblind people such as myself. It was a legitimate huge problem for me in SWBF, I'd constantly not be able to tell who CPs belonged to from a distance and such.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11079
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: yellow command post for third local team ?

Post by Teancum »

Huh, I hadn't thought of that. Which type of colorblind are you? Would a darker green have made a difference at the time?
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: yellow command post for third local team ?

Post by Marth8880 »

I'm protanopic. Darker green possibly would've helped, yeah - the shade of green they used was preeeeeetty bright.
User avatar
Rayman1103
Private Second Class
Posts: 72
Joined: Mon Aug 02, 2010 10:54 am
Location: Wisconsin

Re: yellow command post for third local team ?

Post by Rayman1103 »

SkinnyODST wrote:I placed all that code in the correct areas in my lua but the CP`s aren`t yellow, they`re white, exactly like neutral/uncaptured CP`s. Also when I kill one of the units who spawn from it, the text in the kill feed is white, which is probably supposed to happen.
It appears we need to set the name of Team 3 (or whichever team) to "locals", in order for the yellow color to appear, otherwise it'll be white when setting them to Neutral.

In ScriptInit add the following line:

Code: Select all

SetTeamName(3, "locals")
----------
SkinnyODST wrote:Also, is it possible for the team to have a yellow CP but be friendly for the Republic team?
Yes it is possible, however they would still be able to take over CPs if they're standing near a friendly or hostile CP. So you may need to set "CapturePosts" to 0 for those units on that team. But then they wont be able to take back any of their own territory if they lost any.
wsa30h
Rebel Sergeant
Rebel Sergeant
Posts: 208
Joined: Thu Jul 26, 2018 12:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: star wars bf2
xbox live or psn: No gamertag set

Re: yellow command post for third local team ?

Post by wsa30h »

thanks guys it works flawlessly now also sorry for the late response am on holiday so I haven't been on much lately and also, atm don't have to usr a proxy server to get here which is good.
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Re: yellow command post for third local team ?

Post by SkinnyODST »

Rayman1103 wrote:
SkinnyODST wrote:I placed all that code in the correct areas in my lua but the CP`s aren`t yellow, they`re white, exactly like neutral/uncaptured CP`s. Also when I kill one of the units who spawn from it, the text in the kill feed is white, which is probably supposed to happen.
It appears we need to set the name of Team 3 (or whichever team) to "locals", in order for the yellow color to appear, otherwise it'll be white when setting them to Neutral.

In ScriptInit add the following line:

Code: Select all

SetTeamName(3, "locals")
----------
SkinnyODST wrote:Also, is it possible for the team to have a yellow CP but be friendly for the Republic team?
Yes it is possible, however they would still be able to take over CPs if they're standing near a friendly or hostile CP. So you may need to set "CapturePosts" to 0 for those units on that team. But then they wont be able to take back any of their own territory if they lost any.
Works perfectly, thanks
Post Reply