Page 1 of 1

Rank/class for additional soldiers?

Posted: Sun Jun 07, 2009 8:26 am
by yukisuna
What should i type in in a .lua for a map, when trying to add more soldiers?

soldier
assault
sniper

all the way down to
special

but after special class, what is next?

Re: rank/class?

Posted: Sun Jun 07, 2009 9:13 am
by MercuryNoodles
soldier, assault, sniper, officer, special, engineer, pilot, marine

You can also use AddUnitClass.

Re: rank/class?

Posted: Sun Jun 07, 2009 10:07 am
by Fiodis
Or you can add in more custom ranks via the setup_teams.lua. Look through the FAQ thread for information on both these methods.



Edited for accuracy -Staff

Re: rank/class?

Posted: Sun Jun 07, 2009 3:56 pm
by Commander_Keller
one of my lua's looks like this:
Hidden/Spoiler:
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_fly_assault_dome",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_jettrooper",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_commando",
"rep_fly_gunship_dome",
"rep_walk_oneman_atst",
"rep_hover_fightertank",
"rep_hero_macewindu")


ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_hover_aat",
"cis_fly_gunship_dome",
"cis_inf_officer",
"cis_inf_droideka",
"cis_inf_commando",
"cis_hero_ventress")

ReadDataFile("dc:SIDE\\rep.lvl",
"rep_walk_oneman_atst")

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



SetupTeams{

rep={
team = REP,
units = 32,
reinforcements = 200,
soldier = {"rep_inf_ep3_rifleman", 9, 25},
assault = {"rep_inf_ep3_rocketeer", 1, 5},
engineer = {"rep_inf_ep3_engineer", 1, 4},
sniper = {"rep_inf_ep3_sniper", 1, 5},
officer = {"rep_inf_ep3_jettrooper", 1, 4},
special = {"rep_inf_commando",1, 4},
},



cis={
team = CIS,
units = 32,
reinforcements = 200,
soldier = {"cis_inf_rifleman", 9, 25},
assault = {"cis_inf_rocketeer", 1, 5},
engineer = {"cis_inf_engineer", 1, 5},
sniper = {"cis_inf_sniper", 1, 5},
officer = {"cis_inf_officer", 1, 4},
special = {"cis_inf_droideka", 1, 4},
}
}



AddUnitClass(REP, "rep_inf_ep3_officer", 1, 1)
AddUnitClass(CIS, "cis_inf_commando",1, 4)

-- Hero Setup Section --

SetHeroClass(REP, "rep_hero_macewindu")
SetHeroClass(CIS, "cis_hero_ventress")
and don't forget to add your custom units to the side's req file.
as you have surely read in the FAQ the munge application is kinda picky concerning the order of AddUnitClass and SetHeroClass. it has to be in this order. i have no idea why but obviously that's how it is. ;)