Hero's in Spacemaps?

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
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Hero's in Spacemaps?

Post by Aman/Pinguin »

Hm...
I've got a Problem / Question:
I want to create a Space map and want that I can play a Hero, so:
What have i to do?
Here is a part of my lua:

Code: Select all

function SetupUnits()
    ReadDataFile("dc:SIDE\\rep.lvl",   
        "rep_inf_ep3_pilot",
        "rep_inf_ep2_marine",
        "rep_inf_ep2_rifleman",
        "rep_inf_ep3_rocketeer",
        "rep_inf_ep3_sniper",
        "rep_inf_ep3_engineer",
        "rep_inf_ep3_officer",
        "rep_fly_anakinstarfighter_sc",
        "rep_fly_arc170fighter_sc",        
        "rep_fly_gunship_sc",
        "rep_fly_vwing",
        "rep_hero_oddball",
        "rep_veh_remote_terminal")

    ReadDataFile("dc:SIDE\\cis.lvl",
        "cis_inf_pilot",
        "cis_inf_marine",
        "cis_inf_rifleman",
        "cis_inf_rocketeer",
        "cis_inf_sniper",
        "cis_inf_engineer",
        "cis_inf_officer",
        "cis_fly_droidfighter_sc",  
        "cis_fly_droidgunship",
        "cis_fly_greviousfighter",
        "cis_fly_tridroidfighter",
        "cis_hero_zam")

    ReadDataFile("dc:SIDE\\tur.lvl",
        "tur_bldg_spa_cis_beam",
        "tur_bldg_spa_cis_chaingun",
        "tur_bldg_spa_rep_beam",
        "tur_bldg_spa_rep_chaingun",
        "tur_bldg_chaingun_roof"
    )
end

myTeamConfig = {
    rep = {
        team = REP,
        units = 32,
        reinforcements = -1,
        pilot    = { "rep_inf_pilot",26},
        marine   = { "rep_inf_ep2_marine",26},
        soldier  = { "rep_inf_ep2_rifleman",10, 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},
    },
    cis = {
        team = CIS,
        units = 32,
        reinforcements = -1,
        pilot    = { "cis_inf_pilot",26},
        marine  = { "cis_inf_marine",26},
        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},

    }

}
    SetHeroClass(REP, "rep_hero_oddball")
    SetHeroClass(CIS, "cis_hero_zam") 
I hope somebody can help me =/


ps.: The Units are working i tested them already as a normal unit
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Post by MercuryNoodles »

What kind of problem are you experiencing? This doesn't really give me even so much as a clue as to what the problem is.

Btw your max units for all classes should add up to exactly the value you put in for "Units =". I can't remember if this causes any major malfunctions, but those max values of 26 and such won't do much good when the team is limited to 32 units total.
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Post by Aman/Pinguin »

MercuryNoodles wrote:What kind of problem are you experiencing? This doesn't really give me even so much as a clue as to what the problem is.

Btw your max units for all classes should add up to exactly the value you put in for "Units =". I can't remember if this causes any major malfunctions, but those max values of 26 and such won't do much good when the team is limited to 32 units total.
Problem:
The Message "Play now as "Commander Oddball". Press F1 ..." dont appears!
I dont know why =/
Is there any other thing i have to write into the lua or some other files?
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Post by MercuryNoodles »

I think I figured it out. After a little reading, I found this:

EnableSPHeroRules()


^You need that in your lua. Read the Lua Guide documentation to see where it goes.
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Post by Aman/Pinguin »

:D Yeah!!! Thanks I will test it in a few minutes... Thanks man! :D
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Post by Aman/Pinguin »

ok i tested it but it still dont works... is there maybe another thing i have to put into my .lua?
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Post by MercuryNoodles »

You did tell it to munge the Common folder (via the checkbox) when you munged, right?

If so, what do your error logs say?
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Post by Aman/Pinguin »

Yes i munged the common folder, in the MungeLog is no error about my lua or another thing with the heros =/
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Post by MercuryNoodles »

There is one other thing you could try. Well, two actually. Try cleaning and remunging. If that doesn't help, you could try doing a manual clean, and remunging everything.

Well, the main munge log only gives so much information. It might be a good idea to check the one the bf2_modtools.exe spits out, and I'm also interested in what the logs say in _Build/Worlds/***.

Let's try cleaning, first, though. If the that doesn't help, then we should check those error logs.
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Post by Aman/Pinguin »

I cant use the BF2_modtools.exe because i've got the german DVD version...
I already cleaned and remunged =/ i manual remunged and cleaned it too... well if heros in spacemaps dont work i will put them as a normal unit ^^
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Post by MercuryNoodles »

In that case, perhaps checking the error logs in the _Build folder will shed some light on the situation. I don't think there's any reason for a hero to not work in space, so I feel there's something still missing/incorrect.
Post Reply