It's possible to add class with 'hex-editing' some files

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
CdtFox
2nd Lieutenant
2nd Lieutenant
Posts: 379
Joined: Wed Feb 17, 2016 8:51 am
Projects :: BUC and Designated Days
Games I'm Playing :: SWBF2+EAW+Subnautica
xbox live or psn: No gamertag set
Location: France
Contact:

It's possible to add class with 'hex-editing' some files

Post by CdtFox »

Hi,

I want to know if it's possible to add a custom class with hex-editing the mission.lvl file only. If yes, how I can do this?

As usual thanks for the help guys :wink:
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: It's possible to add class with 'hex-editing' some files

Post by Marth8880 »

I'm pretty sure it's possible, yeah, but I'm even more sure that it'd require offsetting bytes and whatnot, which I don't know how to do lol, so I wouldn't be of much help, rip
User avatar
commanderawesome
Field Commander
Field Commander
Posts: 971
Joined: Tue Aug 13, 2013 11:58 pm
Projects :: Skin Changer - Warfront - Other stuff
Games I'm Playing :: SWBF SWTOR KotOR EaW
xbox live or psn: AaTc_CmdrAwesome
Location: The Universe

Re: It's possible to add class with 'hex-editing' some files

Post by commanderawesome »

But, why? You can accomplish the same thing using the mod tools and notepad.
User avatar
Kingpin
Jedi
Jedi
Posts: 1096
Joined: Fri Sep 13, 2013 7:09 pm
Projects :: The Sith Wars II
Location: Denver, CO
Contact:

Re: It's possible to add class with 'hex-editing' some files

Post by Kingpin »

commanderawesome wrote:But, why? You can accomplish the same thing using the mod tools and notepad.
This is correct. You can load in nearly anything from any mod within LUA, if you know how to ;)
CdtFox
2nd Lieutenant
2nd Lieutenant
Posts: 379
Joined: Wed Feb 17, 2016 8:51 am
Projects :: BUC and Designated Days
Games I'm Playing :: SWBF2+EAW+Subnautica
xbox live or psn: No gamertag set
Location: France
Contact:

Re: It's possible to add class with 'hex-editing' some files

Post by CdtFox »

Kingpin wrote:
commanderawesome wrote:But, why? You can accomplish the same thing using the mod tools and notepad.
This is correct. You can load in nearly anything from any mod within LUA, if you know how to ;)
That's a good point I know that's possible, cool! But now I don't know how... I'll do some try this afternoon. Thanks all :D
User avatar
Kingpin
Jedi
Jedi
Posts: 1096
Joined: Fri Sep 13, 2013 7:09 pm
Projects :: The Sith Wars II
Location: Denver, CO
Contact:

Re: It's possible to add class with 'hex-editing' some files

Post by Kingpin »

Say you wanted to add your own custom side to the stock Kamino map. Just copy over the script from (assets/scripts/kam/kam1c_con) to your mod scripts, load it in as a mission, and tweak it to add your custom unit. That is probably the easiest way.
http://www.gametoast.com/viewtopic.php? ... 96#p287596
CdtFox
2nd Lieutenant
2nd Lieutenant
Posts: 379
Joined: Wed Feb 17, 2016 8:51 am
Projects :: BUC and Designated Days
Games I'm Playing :: SWBF2+EAW+Subnautica
xbox live or psn: No gamertag set
Location: France
Contact:

Re: It's possible to add class with 'hex-editing' some files

Post by CdtFox »

Yep I know that, i already made some custom sides with a new era, but now i want to try with the mission file...Thanks anyways Kingpin :D
User avatar
commanderawesome
Field Commander
Field Commander
Posts: 971
Joined: Tue Aug 13, 2013 11:58 pm
Projects :: Skin Changer - Warfront - Other stuff
Games I'm Playing :: SWBF SWTOR KotOR EaW
xbox live or psn: AaTc_CmdrAwesome
Location: The Universe

Re: It's possible to add class with 'hex-editing' some files

Post by commanderawesome »

You can override stock missions with addon missions. Just do as Kingpin said but don't change the name of the script.
CdtFox
2nd Lieutenant
2nd Lieutenant
Posts: 379
Joined: Wed Feb 17, 2016 8:51 am
Projects :: BUC and Designated Days
Games I'm Playing :: SWBF2+EAW+Subnautica
xbox live or psn: No gamertag set
Location: France
Contact:

Re: It's possible to add class with 'hex-editing' some files

Post by CdtFox »

commanderawesome wrote:You can override stock missions with addon missions. Just do as Kingpin said but don't change the name of the script.
..lol...That's why I want to know how to add a class via hex-editing the mission .lvl file
User avatar
commanderawesome
Field Commander
Field Commander
Posts: 971
Joined: Tue Aug 13, 2013 11:58 pm
Projects :: Skin Changer - Warfront - Other stuff
Games I'm Playing :: SWBF SWTOR KotOR EaW
xbox live or psn: AaTc_CmdrAwesome
Location: The Universe

Re: It's possible to add class with 'hex-editing' some files

Post by commanderawesome »

CdtFox wrote:
commanderawesome wrote:You can override stock missions with addon missions. Just do as Kingpin said but don't change the name of the script.
..lol...That's why I want to know how to add a class via hex-editing the mission .lvl file
What i'm saying is that's unnecessary. You can replace those same missions without even touching mission.lvl.

Just follow the new era/mode tutorial without changing the scripts' names and only adding this to your addme.lua:

Code: Select all

AddDownloadableContent("stockworld","name_of_stock_script",4)
The stock missions will be changed just like if you edited mission.lvl.
CdtFox
2nd Lieutenant
2nd Lieutenant
Posts: 379
Joined: Wed Feb 17, 2016 8:51 am
Projects :: BUC and Designated Days
Games I'm Playing :: SWBF2+EAW+Subnautica
xbox live or psn: No gamertag set
Location: France
Contact:

Re: It's possible to add class with 'hex-editing' some files

Post by CdtFox »

Thanks Commander! :thumbs:
Post Reply