Changing the default hero (Solved)
Moderator: Moderators
- elfie
- Field Commander

- Posts: 931
- Joined: Fri Jan 25, 2008 8:26 pm
- xbox live or psn: no live
- Location: Coruscant, Jedi Temple
- Contact:
Changing the default hero (Solved)
Hey guys. I am fairly new to modding and gametoast and I know this must sound like a stupid question, but is there a trick to changing the hero? Everytime i try to change the hero on my map it crashes. I didn't get the exact message from BF2Log but it said something like there was an error with the lua. So if anyone has any experience with changing the hero i would appreciate it tons. Thank you! 
-
Grev
- Hoth Battle Chief

- Posts: 3132
- Joined: Sun Dec 09, 2007 11:45 pm
- Projects :: No Mod project currently.
- Location: A Certain Box Canyon
Re: Changing the default hero
In the .lua, you must go to the hero set part, and in team layout with what people you can play as, put the hero there too..
The hero odf name must be put in i think.
The hero odf name must be put in i think.
- authraw
- 1st Lieutenant

- Posts: 445
- Joined: Mon Jun 26, 2006 3:45 pm
Re: Changing the default hero
If you post your lua, we might be able to see where you went wrong. 
-
Fingerfood
- Sith

- Posts: 1262
- Joined: Fri Nov 30, 2007 9:40 pm
Re: Changing the default hero
Just on a sidenote, put it in [/code]tags. And isn't there a topic on this in the Evrything You Need thread?
EDIT:
My bad. It was a Hero/Unit list.
http://www.gametoast.com/forums/viewtop ... =27&t=2780
Code: Select all
[code]Insert .lua hereEDIT:
My bad. It was a Hero/Unit list.
http://www.gametoast.com/forums/viewtop ... =27&t=2780
- elfie
- Field Commander

- Posts: 931
- Joined: Fri Jan 25, 2008 8:26 pm
- xbox live or psn: no live
- Location: Coruscant, Jedi Temple
- Contact:
Re: Changing the default hero
Where is the team layout part? is that also in the lua? and where should i put the hero odf?Grev wrote:In the .lua, you must go to the hero set part, and in team layout with what people you can play as, put the hero there too..
The hero odf name must be put in i think.
- DarthD.U.C.K.
- Master of the Force

- Posts: 6027
- Joined: Wed Sep 27, 2006 11:05 am
- Location: Duckburg, Germany
Re: Changing the default hero
if you want to have the emperor as imp hero
Code: Select all
ReadDataFile("SIDE\\all.lvl",
"all_inf_rifleman",
"all_inf_rocketeer",
"all_inf_sniper",
"all_inf_engineer",
"all_inf_officer",
"all_inf_wookiee",
"all_hero_hansolo_tat")
ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_hero_bobafett",
///add this: "imp_hero_emperor",
"imp_fly_destroyer_dome")
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_tat_barge",
"tur_bldg_laser")
/// if you want to load the hero from your own side, add thgese lines: ReadDataFile("DC:SIDE\\YourSide.lvl",
/// "imp_hero_emperor",
SetupTeams{
all = {
team = ALL,
units = 20,
reinforcements = 150,
soldier = { "all_inf_rifleman",9, 25},
assault = { "all_inf_rocketeer",1,4},
engineer = { "all_inf_engineer",1,4},
sniper = { "all_inf_sniper",1,4},
officer = { "all_inf_officer",1,4},
special = { "all_inf_wookiee",1,4},
},
imp = {
team = IMP,
units = 20,
reinforcements = 150,
soldier = { "imp_inf_rifleman",9, 25},
assault = { "imp_inf_rocketeer",1,4},
engineer = { "imp_inf_engineer",1,4},
sniper = { "imp_inf_sniper",1,4},
officer = { "imp_inf_officer",1,4},
special = { "imp_inf_dark_trooper",1,4},
},
}
SetHeroClass(ALL, "all_hero_hansolo_tat")
SetHeroClass(IMP, "imp_hero_bobafett") ///change this line to this: SetHeroClass(IMP, "imp_hero_emperor")
-
The_Emperor
- Supreme Galactic Ruler
- Posts: 2118
- Joined: Sat Dec 10, 2005 6:30 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Waaaaay over there.
Re: Changing the default hero
Colortags 'n stuff don't work with code tags, here's the fixed stuft.
Hidden/Spoiler:
- elfie
- Field Commander

- Posts: 931
- Joined: Fri Jan 25, 2008 8:26 pm
- xbox live or psn: no live
- Location: Coruscant, Jedi Temple
- Contact:
Re: Changing the default hero
thanks guys, i'll give it a shot
- elfie
- Field Commander

- Posts: 931
- Joined: Fri Jan 25, 2008 8:26 pm
- xbox live or psn: no live
- Location: Coruscant, Jedi Temple
- Contact:
Re: Changing the default hero
eureka it works! thanxs soo much for helping me guys!
So please remember to edit your first post and add 'Solved' to the topic title -Staff
So please remember to edit your first post and add 'Solved' to the topic title -Staff
