Page 1 of 1
side classes [SOLVED]
Posted: Wed Sep 05, 2007 2:35 am
by RAymo
whats the maximum classes u can have for a side?
the defaults are soldier, assault, engineer, sniper, officer, special, pilot, and marine.
thats 8, but there are 9 spots in hero assault in the conversion pack.
Re: side classes
Posted: Wed Sep 05, 2007 2:38 am
by Penguin
Think the max units per team is 12 (beyond that they dissappear off screen)
Max classes is 8.
Re: side classes
Posted: Wed Sep 05, 2007 2:41 am
by RAymo
so how would i go about adding another unit?
dont u need another class to do that?
Re: side classes
Posted: Wed Sep 05, 2007 2:47 am
by Penguin
Look in the eli .luas

Re: side classes
Posted: Wed Sep 05, 2007 2:49 am
by RAymo
i have been looking at it, and now that i look more carefully, ive found it
AddUnitClass(ALL,"all_hero_leia", 1,2)
the things you don't notice when u dont look carefully LOL
thanks again penguin
this can be locked now btw

Re: side classes [SOLVED]
Posted: Wed Sep 05, 2007 2:59 am
by -_-
I'm pretty sure it's 9 classes + 1 hero.. which is 10?
Re: side classes [SOLVED]
Posted: Wed Sep 05, 2007 8:55 pm
by RAymo
its 8 classes + 1 hero from all the .luas i looked through, but if there is 9, whats the class?
Re: side classes [SOLVED]
Posted: Wed Sep 05, 2007 9:38 pm
by Teancum
It's 10 total actually. The SWBF pack hero assault modes all have 10 on 10.
Re: side classes [SOLVED]
Posted: Wed Sep 05, 2007 10:12 pm
by Master Fionwë
I found out how to add units from an lua that comes with the moddingtools. In scripts, you will find all those luas which include the conquest objective and gamemodes, all that stuff. There is one in there called setup_teams. Look through that, it explains quite clearly how to add units, and the right way to do so if you want them in order on the roster.
Here it is for those who don't wish to look for it:
function SetupTeams(sides)
-- HACKish: load the turret .odf here (this is the easiest place to put it where it will
-- be executed in every level
--ReadDataFile("SIDE\\tur.lvl", --disabled for now until we settle on where exactly the .odf will end up
-- "tur_bldg_defensegridturret")
-- list of types
local typeList = { "soldier", "pilot", "assault", "sniper", "marine", "engineer", "officer", "special" }
-- items for each team code
local teamItems = nil
if ScriptCB_IsMissionSetupSaved() then
local missionSetup = ScriptCB_LoadMissionSetup()
teamItems = missionSetup.units
end
-- for each specified side...
for name, side in pairs(sides) do
local team = side.team
-- set team properties
local name = string.lower(name)
SetTeamName(team, name)
SetTeamIcon(team, name .. "_icon", "hud_reinforcement_icon", "flag_icon")
SetUnitCount(team, side.units)
SetReinforcementCount(team, side.reinforcements)
-- add unit classes in type order for _, type in ipairs(typeList) do
if side[type] and (not teamItems or not teamItems[name] or teamItems[name][type]) then
AddUnitClass(team, side[type][1], side[type][2], side[type][3])
end
end
-- add hero class if available
if side[hero] then
AddHeroClass(side[hero])
end
end
end
I thought that there might be some more interesting things like that hidden away there, but many of them I can't even understand the purpose of.