Change Heroes on Shipped maps (hex editing)

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
vonfrank
Private
Posts: 31
Joined: Sun Dec 13, 2009 12:07 am

Change Heroes on Shipped maps (hex editing)

Post 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
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Change Heroes on Shipped maps

Post 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:
vonfrank
Private
Posts: 31
Joined: Sun Dec 13, 2009 12:07 am

Re: Change Heroes on Shipped maps

Post 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?
BF2-Master
Captain
Captain
Posts: 469
Joined: Thu Mar 02, 2006 7:08 pm

Re: Change Heroes on Shipped maps

Post 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
vonfrank
Private
Posts: 31
Joined: Sun Dec 13, 2009 12:07 am

Re: Change Heroes on Shipped maps (hex editing)

Post 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?
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Change Heroes on Shipped maps (hex editing)

Post 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:
Post Reply