How do I add locals?

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
Darth-Derkie
1st Lieutenant
1st Lieutenant
Posts: 453
Joined: Thu Feb 03, 2005 6:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The Netherlands

How do I add locals?

Post by Darth-Derkie »

I want to have the geonosians in my map. In my lua:

ReadDataFile("sound\\geo.lvl;geo1cw")
ReadDataFile("dc:sound\\sou1.lvl;sou1cw")
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep2_rifleman",
"rep_inf_ep2_rocketeer",
"rep_inf_ep2_engineer",
"rep_inf_ep2_sniper",
"rep_inf_ep2_rocketeer_chaingun",
"rep_inf_ep2_jettrooper",
"rep_hover_fightertank",
"rep_walk_atte",
"rep_fly_gunship",
"rep_hero_macewindu",
"rep_hover_barcspeeder")
ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_fly_geofighter",
"cis_inf_sniper",
"cis_walk_spider",
"cis_tread_hailfire",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_countdooku",
"cis_hover_aat")
ReadDataFile("SIDE\\geo.lvl",
"gen_inf_geonosian")
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_fly_geofighter")

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


SetupTeams{
rep = {
team = REP,
units = 20,
reinforcements = 150,
soldier = { "rep_inf_ep2_rifleman",9, 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_ep2_rocketeer_chaingun",1, 4},
special = { "rep_inf_ep2_jettrooper",1, 4},

},
cis = {
team = CIS,
units = 20,
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},
}
}

SetHeroClass(CIS, "cis_hero_countdooku")
SetHeroClass(REP, "rep_hero_macewindu")

-- 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()
SetTeamAsFriend(DEF,3)

-- Local Stats
SetTeamName(3, "locals")
SetUnitCount(3, 7)
AddUnitClass(3, "geo_inf_geonosian", 7)
SetTeamAsFriend(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)

ZeroEditor:
I have a path for the Geonosians.
Image
Image

What am I doing wrong, because there are still no Geonosians spawning.
Jawa_Killer
Brigadier General
Brigadier General
Posts: 629
Joined: Thu Jun 23, 2005 6:06 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

RE: How do I add locals?

Post by Jawa_Killer »

team 3 in the CP field?
Darth-Derkie
1st Lieutenant
1st Lieutenant
Posts: 453
Joined: Thu Feb 03, 2005 6:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The Netherlands

Post by Darth-Derkie »

I thought locals could spawn from a ally's cp. Maybe I have to make invisible cp's...

Edit: That didn't work. They were visible, but not on the minimap. The Geonosians weren't spawning either.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
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

Post by Teancum »

Hmm...my only guess is that you don't have them initialized at the very top of the lua (where ATT / DEF stuff is) -- take a look at kas2.lua or tat2_hunt.lua to see how they changed local spawning for BF2. Other than that, I'm stumped. For BF1, it would have worked fine. The only other guess I would have if my first suggestion doesn't work is to look for spelling errors or case-sensitive errors.
Darth-Derkie
1st Lieutenant
1st Lieutenant
Posts: 453
Joined: Thu Feb 03, 2005 6:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The Netherlands

Post by Darth-Derkie »

Hm... I think I've found it:

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

WookieTeam= 3

In the geonosis lua wasn't something like that. Thanks, Teancum. I hope it works :D

Edit: It didn't work, still no Geonosians...
Post Reply