Page 1 of 1

Change Heroes on Shipped maps (hex editing)

Posted: Sun Dec 13, 2009 12:14 am
by vonfrank
I would really like to switch around some of the heroes on some of the maps that were included with the game. For example, I want to have Count Dooku on Kashyyyk instead of Jango Fett.
I think that this will involve hex editing the mission.lvl file in the GameData / Data / _lvl_pc folder but i dont really know.
I would appreciate any help on a way to do this :D

Re: Change Heroes on Shipped maps

Posted: Sun Dec 13, 2009 12:19 am
by Deviss
vonfrank wrote:I would really like to switch around some of the heroes on some of the maps that were included with the game. For example, I want to have Count Dooku on Kashyyyk instead of Jango Fett.
I think that this will involve hex editing the mission.lvl file in the GameData / Data / _lvl_pc folder but i dont really know.
I would appreciate any help on a way to do this :D
well in that place the file mission.lvl open with hex editor for search the map you like for example jabba's palace so tat3cw (there is 2 conquest and flag) and search rep_hero_aalya change to rep_hero_yoda hex editing :P

EDIT: so sorry i didn't read good go to kas2cw (there are 2) and search cis_hero_jangofett and change it to cis_hero_countdooku :thumbs:

Re: Change Heroes on Shipped maps

Posted: Sun Dec 13, 2009 2:31 pm
by vonfrank
well i tried that but the game just crashed to the desktop when it was loading the kashyyyk map

i was looking in the kashyyyk LUA that is supplied with the BF2 Mod Tools and i noticed that Jango Fett is written twice in there, Here is the part of the file with Jango in it:


ReadDataFile("sound\\kas.lvl;kas2cw")
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_sniper_felucia",
"rep_inf_ep3_engineer",
"rep_inf_ep3_jettrooper",
"rep_inf_ep3_officer",
"rep_hero_yoda",
"rep_hover_fightertank",
"rep_fly_cat_dome",
"rep_hover_barcspeeder")
ReadDataFile("SIDE\\cis.lvl",
"cis_tread_snailtank",
"cis_inf_rifleman",
-- "cis_fly_gunship_dome",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_hover_stap",
"cis_inf_officer",
-- "cis_walk_spider",
"cis_hero_jangofett",
"cis_inf_droideka")
ReadDataFile("SIDE\\wok.lvl",
"wok_inf_basic")

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_beam",
"tur_bldg_recoilless_kas")

SetupTeams{

rep={
team = REP,
units = 29,
reinforcements = 150,
soldier = {"rep_inf_ep3_rifleman",10, 25},
assault = {"rep_inf_ep3_rocketeer",1, 4},
engineer = {"rep_inf_ep3_engineer",1, 4},
sniper = {"rep_inf_ep3_sniper_felucia",1, 4},
officer = {"rep_inf_ep3_officer",1, 4},
special = {"rep_inf_ep3_jettrooper",1, 4},


},

cis={
team = CIS,
units = 29,
reinforcements = 150,
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},
special = {"cis_inf_droideka",1, 4},
}
}

SetHeroClass(REP, "rep_hero_yoda")

SetHeroClass(CIS, "cis_hero_jangofett")



as you can see, he is mentioned in the part that loads the unit types and in the part that tells the game what hereo is for which side

in the mission.lvl file in the battlefront directory, Jango doesn't show up for the second time. It says SetHeroClass but then its just blank.

i'm at a loss :?
is there something im doing wrong?

Re: Change Heroes on Shipped maps

Posted: Mon Dec 14, 2009 2:55 am
by BF2-Master
^ That's not the problem.

The issue is the names don't line up. That little HEX doe you replaced to add the 'u' actually is somehow important, unfortunately...

C O U N T D O O K U
J A N G O F E T T

Re: Change Heroes on Shipped maps (hex editing)

Posted: Mon Dec 14, 2009 1:37 pm
by vonfrank
yeah, i found out that is it.

I cant add cis_hero_countdooku because his name is longer than cis_hero_jangofett.

would it be possible to modify the side folder in BF2 mod tools and make a new CIS.lvl file for the game that had another version of Count Dooku, i could call him CountDooku instead of cis_hero_countdooku. that would be shorter than cis_hero_jangofett so it should work.

has anyone tried this before? or is there a better way to do it?

Re: Change Heroes on Shipped maps (hex editing)

Posted: Mon Dec 14, 2009 2:53 pm
by Deviss
vonfrank wrote:yeah, i found out that is it.

I cant add cis_hero_countdooku because his name is longer than cis_hero_jangofett.

would it be possible to modify the side folder in BF2 mod tools and make a new CIS.lvl file for the game that had another version of Count Dooku, i could call him CountDooku instead of cis_hero_countdooku. that would be shorter than cis_hero_jangofett so it should work.

has anyone tried this before? or is there a better way to do it?
don't work better idea, make a mod modifing that mission :wink: