deleting a character
Moderator: Moderators
- jedimaster745
- First Lance Corporal

- Posts: 136
- Joined: Sun Sep 07, 2008 5:05 pm
deleting a character
how do i delete characters from a level? like, deleting classes so i could only play as, lets say for an example, only the sniper and engineer. i suppose it has something to do with the lua, but whatever i change pertaining to the characters doesnt help much. please help me :jango:
-
Xavious
- Sith Master

- Posts: 2783
- Joined: Mon Jun 12, 2006 3:46 pm
Re: deleting a character
Simply comment out the units you don't want to use.
Like so:
^ That will let you play as only snipers and engineers on either side. A double dash (--) comments out a line, meaning the game won't read it. It's better to comment out lines opposed to deleting them, because if you want to go back to how you had it before, all you have to do is remove the "--" in front of the line of code.
EDIT, Ah, whoops. As you might be able to tell, I haven't modded in a while. I fixed the code.
Like so:
Code: Select all
ReadDataFile("sound\\yav.lvl;yav1cw")
ReadDataFile("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_hover_fightertank",
--"rep_hero_anakin",
--"rep_hover_barcspeeder")
ReadDataFile("SIDE\\cis.lvl",
--"cis_inf_rifleman",
--"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper")
--"cis_inf_officer",
--"cis_inf_droideka",
--"cis_hero_darthmaul",
--"cis_hover_aat")
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_laser",
"tur_bldg_tower")
SetupTeams{
rep = {
team = REP,
units = 20,
reinforcements = 150,
--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_ep3_officer",1, 4},
--special = { "rep_inf_ep3_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},
}
}EDIT, Ah, whoops. As you might be able to tell, I haven't modded in a while. I fixed the code.
Last edited by Xavious on Sat Oct 04, 2008 5:51 pm, edited 2 times in total.
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: deleting a character
But you have to be careful what you comment out. The code posted above will give you a munge error. The ReadDataFiles have their ending ) commented out, but it shouldn't be. You have to be watchful for extra or missing commas too.
- jedimaster745
- First Lance Corporal

- Posts: 136
- Joined: Sun Sep 07, 2008 5:05 pm
Re: deleting a character
ok thanks guys, this is exactly what i need 
EDIT
also, is there a way to rename a class or change how many points are needed to unlock a class(like jet trooper)?
EDIT
also, is there a way to rename a class or change how many points are needed to unlock a class(like jet trooper)?
-
AQT
- Gametoast Staff

- Posts: 4910
- Joined: Sat Nov 03, 2007 4:55 pm
- Location: SoCal, USA
Re: deleting a character
In the rep_inf_default_jettrooper.odf, look for this line:
change it to:
where x is an integer greater than or equal to 0. I suppose it could be negative but who wants that? Same goes for any other unit.
Code: Select all
PointsToUnlock = 12Code: Select all
PointsToUnlock = x- jedimaster745
- First Lance Corporal

- Posts: 136
- Joined: Sun Sep 07, 2008 5:05 pm
Re: deleting a character
thank you...is there anything after or prior to this change in order for it to work, like copying the folder to my modid folder or adding something to the lua?
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: deleting a character
If you want to change the unlock properties for a stock class without adding a custom side, add this line in after the setupteams section:
Obviously the name will change depending on the unit you want to remove unlock requirements for.
Code: Select all
SetClassProperty("rep_inf_ep3_jettrooper", "PointsToUnlock", 0)