Unit placement problems

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
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Unit placement problems

Post by SkinnyODST »

I want to place the ep3 officer at the bottom of the spawn selection screen, I did that but then I added another extra unit (the ep2 marine) and HE`s at the bottom instead of the officer. I`ve tried renaming the officer to "extra1" in the lua but that makes him disappear from the spawn selection screen all together. I just want the ep2 marine right above the officer, and the officer at the very bottom. Help?

Here`s my lua code:
Hidden/Spoiler:
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_inf_ep2_marine",
"rep_hover_fightertank",
"rep_hero_anakin",
"rep_inf_ep3_scorchco",
"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_hero_darthmaul",
"cis_hover_aat",
"cis_walk_spider",
"cis_hover_stap")


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

SetupTeams{
rep = {
team = REP,
units = 50,
reinforcements = 500,
soldier = { "rep_inf_ep3_rifleman",30,60},
assault = { "rep_inf_ep3_rocketeer",10, 20},
engineer = { "rep_inf_ep3_sniper",5, 10},
sniper = { "rep_inf_ep3_engineer",7, 20},
officer = { "rep_inf_ep3_jettrooper",3, 6},
extra1 = { "rep_inf_ep2_marine",8, 15},
special = { "rep_inf_ep3_officer",1, 1},

},
cis = {
team = CIS,
units = 60,
reinforcements = 500,
soldier = { "cis_inf_marine",30, 60},
assault = { "cis_inf_rocketeer",10, 20},
engineer = { "cis_inf_engineer",5, 15},
sniper = { "cis_inf_sniper",4, 10},
special = { "cis_inf_rifleman",4, 8},
officer = { "cis_inf_droideka",3, 7},
extra1 = { "cis_inf_officer",5, 10},
}
}


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_officer", "FleeLikeAHero", "1")

AddUnitClass(CIS, "cis_inf_officer",5,10)
AddUnitClass(REP, "rep_inf_ep2_marine",1,1)
Delta327
Master Sergeant
Master Sergeant
Posts: 160
Joined: Thu Jan 21, 2016 8:55 pm
Projects :: Shattered Galaxy
Games I'm Playing :: Swbf2
xbox live or psn: No gamertag set
Location: In the Mid Rim of the galaxy

Re: Unit placement problems

Post by Delta327 »

SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Re: Unit placement problems

Post by SkinnyODST »

That only tells me how to add them in, not how to move them around unfortunately
User avatar
GAB
1st Lieutenant
1st Lieutenant
Posts: 431
Joined: Sun Jul 03, 2011 8:56 pm
Location: Somewhere around the world
Contact:

Re: Unit placement problems

Post by GAB »

Try this code:

Code: Select all

soldier = { "rep_inf_ep3_rifleman",30,60},
assault = { "rep_inf_ep3_rocketeer",10, 20},
engineer = { "rep_inf_ep3_sniper",5, 10},
sniper = { "rep_inf_ep3_engineer",7, 20}, 
officer = { "rep_inf_ep3_jettrooper",3, 6},
special = { "rep_inf_ep2_marine",8, 15}, 
AddUnitClass(REP, "rep_inf_ep3_officer",1, 1)
Let me know if it works.
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Re: Unit placement problems

Post by SkinnyODST »

GAB wrote:Try this code:

Code: Select all

soldier = { "rep_inf_ep3_rifleman",30,60},
assault = { "rep_inf_ep3_rocketeer",10, 20},
engineer = { "rep_inf_ep3_sniper",5, 10},
sniper = { "rep_inf_ep3_engineer",7, 20}, 
officer = { "rep_inf_ep3_jettrooper",3, 6},
special = { "rep_inf_ep2_marine",8, 15}, 
AddUnitClass(REP, "rep_inf_ep3_officer",1, 1)
Let me know if it works.

Ok well it didn`t really work. I mean the ep2 marine sure isn`t below him anymore, HE`S AT THE VERY TOP! :funny2:
User avatar
GAB
1st Lieutenant
1st Lieutenant
Posts: 431
Joined: Sun Jul 03, 2011 8:56 pm
Location: Somewhere around the world
Contact:

Re: Unit placement problems

Post by GAB »

Now I'm intrigued. I have no idea why that would happen. Maybe someone else could shine some light on this.
Samee3
First Lance Corporal
First Lance Corporal
Posts: 123
Joined: Sun Jul 05, 2015 5:07 pm
Projects :: BF2 Refresh Mod
Games I'm Playing :: Empire at War
xbox live or psn: VaporousFern310
Location: California, USA

Re: Unit placement problems

Post by Samee3 »

Intriguing.

Code: Select all

 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_ep2_jettrooper",1, 4},
 special = { "rep_inf_ep3_jettrooper",1, 4},

Code: Select all

 AddUnitClass(REP, "rep_inf_ep2_marine",1 ,4)
 AddUnitClass(REP, "rep_inf_ep3_officer",1, 4)
This code produced the desired effect on my system.
Post Reply