Oddworld Forums > Zulag One > Oddworld Discussion > Oddworld Mods & Hacks


 
Thread Tools
 
  #1  
03-14-2015, 07:26 AM
Fincer
Zappfly
 
: Feb 2015
: Finland
: 12
Rep Power: 0
Fincer  (76)
Tutorial: How to modify New 'n' Tasty - common instructions

IN-GAME SCRIPTS

Modifying New 'n' Tasty in-game functions/scripts (i.e. "how the game world reacts to your actions") is possible with .NET Reflector decompiler + Reflexil Add-In tool (Windows only).

1) Install .NET Reflector
2) Extract and put Reflexil main directory to .NET Reflector's Addins directory, eg.

C:\Program Files (x86)\Red Gate\.NET Reflector\Desktop 8.5\Addins

3) Make a backup copy of your NNT_Data\Managed directory (with all dll contents included, of course)
4) Open .NET Reflector. Go to Tools -> Add-Ins... and add Reflexil.Reflector.dll to the list.
5)To open a dll file, go to File -> Open Assembly

Basically you want open dll libraries located in your NNT_Data\Managed folder.

6) Have fun! Make yourself familiar with Reflexil tool, it shouldn't be too hard to learn it.

7) To reassemble your modified dll file, simply right-click the parent of your dll assembly file name -> Reflexil v1.9 -> Inject assembly reference -> Save as... -> Replace the original dll file and check out the in-game changes.

I say this only once: Incorrect modifications may cause the game to act in weird ways. Always, always take backups!. You've been warned so do not blame me if you need to re-install your game because you just broke your game. Thank you.

-------------------------------------------------------

What are these dll files? What do they contain?

Assembly-CSharp.dll library file contains all compiled in-game scripts written in C# programming language.
Assembly-CSharp-firstpass.dll contains all compiled scripts which are compiled during the first-pass in Unity (C# language).

For more information, use Google.

Scripts are output to either Assembly-CSharp-firstpass, Assembly-UnityScript-firstpass, or Assembly-Boo-firstpass, depending on the language. (Unity 3D Wiki)

-------------------------------------------------------

About animation functions

For every animation function, there are three stages: Enter, Execute and Exit. These are for...

Enter = Actions while starting animation sequence
Execute = Actions while executing the animation
Exit = Actions while exiting the animation sequence

-------------------------------------------------------

How to find a feature?

1) An example regarding to slaves' chattering feature. How did I disable it?

I had done some background work so I knew what I was looking for: a string called "workidle". At that time, I had already searched for that string inside every binary file in NNT_Data. No match, not even a single one. Still I knew there *must* be a match somewhere. How did I know it? How did I know particularly to look for "workidle" string?

Because

a) soundbank xml files had many variable references to that string
b) sound files referred under that "workidle" variable and played with RavioliGametools matched 100% with the in-game sounds for Mudokon slaves while they were washing floors

After all, finding "workidle" string was bit tricky. None of the binary files didn't match and that's why I ended up focusing on dll files inside NNT_Data\Managed\ folder. I found many references for "Mudokon" in Assembly-CSharp.dll file with several Linux command line tools which drew my attention.

If you look inside Assembly-CSharp.dll file with a hex editor or with any editor that is capable to look for human-readable strings, you can't find a single reference to "workidle" string. It's highly probable that the dll file is encrypted or compressed somehow. However, with proper tools, you can easily open, modify and reassemble it.

So, eventually, I found an efficient way to look inside Assembly-CSharp.dll file with Red Gate .NET Reclector decompiler. Soon after that I finally found a string match: CleanFloorExecute() function in MudokonSlave class had a string "Play_vox_mudslave_workidle". It was not just a match but perfect one, too! All I had to do was to rename the string from "Play_vox_mudslave_workidle" -> "", reassemble Assembly-CSharp.dll file and put it back into the game. Vola! Silent slaves!

2) How to make Abe die instantly from high falls?

a) Open Assembly-CSharp.dll with Red Gate .NET Reclector decompiler + Reflexil
b) Go to Abe -> LandDamageExecute () : Void
c) Make the LandDamageExecute function to look like this:



d) Reassemble Assembly-CSharp.dll file

-------------------------------------------------------

Interesting findings

1) Your mudokon savior status is determined by the following percentages:

0% = Traitor
1% - 24% = Flunky
25% - 49% = Slacker
50% - 75% = Shepherd
75 - 99% = Savior
100% = Messiah

You can change these percentage values to whichever you want.

The values can be found from

MudokonList -> GetRescueStatusForPercentage(Int32) : RescueStatus

2) There are several level stuff, classified as "Not Used":

LevelList -> ScriptedEventLevels ->

NotUsed_Paramonia_Background
NotUsed_Paramonia_p1_2
NotUsed_Paramonia_p2_3
NotUsed_Paramonia_p3_4
NotUsed_Zulag4_p5

What were these supposed to be used for? Dunno. Maybe some transitions between scenes.

-------------------------------------------------------

OPENING UNITY ASSETS

I still don't know an efficient way to modify Unity Assets (eg. modifying in-game textures or models). Anyway, you can explore them with editors such as:

The output of these different Unity editors varies. Disunity is best for the models and fonts. Disunity extracts models in obj format which can be opened on 3ds Max. UVW Maps included.

Asset Editor is handy to preview texture files (though laggy).

With Assets Explorer you can extract assets such as .mat (Unity material file) and .ani (mesh animation) files better than with Asset Editor.

For some reason, extracted textures look drastically darker than if just previewed in Unity Asset Editor. The reason is unclear to me.

Several New 'n' Tasty assets and files they include:
  • resources.assets: all language files, lots of Unity shaders, dds/tga textures
  • sharedassets0.assets: movies, fonts, Unity shaders, dds/tga textures (gamepad, mudokon head...)
  • sharedassets2.assets: 3D mesh files for in-game menus, dds/tga textures for menu meshes more shaders, movie preview images
  • sharedassets3.assets: Abe, Slig, Elum, Slave etc. meshes and textures

etc. etc...

Btw. FYI. You can't modify .mat files easily because they are relatively linked with meshes inside assets. I've managed to remove texture and illumination effect from Abe's eyes but nothing else so far.
Reply With Quote
  #2  
03-14-2015, 07:37 AM
Varrok's Avatar
Varrok
Wolvark Grenadier
 
: Jun 2009
: Beartopia
: 7,301
Blog Entries: 52
Rep Power: 25
Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)

:
I've managed to remove texture and illumination effect from Abe's eyes but nothing else so far.

how could you
Reply With Quote
  #3  
03-14-2015, 07:51 AM
Fincer
Zappfly
 
: Feb 2015
: Finland
: 12
Rep Power: 0
Fincer  (76)

Open sharedassets3.assets file with a hex editor.

Find string

:
5F 4D 61 69 6E 54 65 78 00 00 00 00 AC
and replace it with

:
00 00 00 00 00 00 00 00 00 00 00 00 00
Result:



Reply With Quote
  #4  
03-14-2015, 07:54 AM
Varrok's Avatar
Varrok
Wolvark Grenadier
 
: Jun 2009
: Beartopia
: 7,301
Blog Entries: 52
Rep Power: 25
Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)Varrok  (7896)

we're amazed
Reply With Quote
  #5  
03-14-2015, 08:33 AM
Strnadik's Avatar
Strnadik
Stingbee
 
: Apr 2014
: Czech Republic
: 87
Rep Power: 11
Strnadik  (100)Strnadik  (100)

I.. I have no words! I'm really happy to see someone who's as excited into modding NnT as me, and I thank you very much for this tutorial which will definitely help me in modding NnT even further! Kuddos to you!
__________________
"If New 'n' Tasty is going to be modable, I will mod the f*** out of it!"

Reply With Quote
  #6  
03-14-2015, 09:18 AM
Fischkopf's Avatar
Fischkopf
Fuzzle
 
: Nov 2009
: Germany
: 149
Rep Power: 16
Fischkopf  (87)

I wonder if it's possible to replace ALL of the sligs with the classic visor sligs. Because for some strange reason there are both pilot mask and visor sligs in the game, i'd like to get rid of the pilot mask ones completely...
Reply With Quote
  #7  
03-14-2015, 09:33 AM
Fincer
Zappfly
 
: Feb 2015
: Finland
: 12
Rep Power: 0
Fincer  (76)

@Strnadik

It's my pleasure to help Oddworld community a little bit and investigate possibilities and capabilities of modding New 'n' Tasty and thus to make modding of this game possible in some level at least.

However, two or two major modding issues still remain:
  • How to change/add/remove sounds (bnk, wem, wwise)
  • How to change/add/remove models, textures and levels (this is a commonly known topic among modders interested in Unity games because New 'n' Tasty is not the only game which has this issue still unsolved)

Unless third-party Unity modding tools will not be developed to the point where replacing files inside Unity assets will become possible, there is not much we can do because Oddworld Inhabitants has not either developed or, at least, released any modding tools.

@Fischkopf

Yeah, I've thought it, too. Not examined a lot, however. You need either
  • replace new Slig models and textures with the old ones or
  • tell the game to use only old Slig models (code modifications required)

At this point, I think the second approach might be easier. I'm not sure, however.
Reply With Quote
  #8  
03-14-2015, 09:35 AM
Holy Sock's Avatar
Holy Sock
Outlaw Shooter
 
: Jun 2010
: Northern Ireland
: 1,317
Blog Entries: 3
Rep Power: 15
Holy Sock  (859)Holy Sock  (859)Holy Sock  (859)Holy Sock  (859)Holy Sock  (859)Holy Sock  (859)Holy Sock  (859)

For some strange reason? Could it possibly be that there are now two Slig variants and JAW thought it would be cool to include both in game - in order to preserve lore continuity?

I you want you can pretend the single visor Sligs are elite Sligs.
Reply With Quote
  #9  
03-14-2015, 09:42 AM
Fincer
Zappfly
 
: Feb 2015
: Finland
: 12
Rep Power: 0
Fincer  (76)

:
For some strange reason? Could it possibly be that there are now two Slig variants and JAW thought it would be cool to include both in game - in order to preserve lore continuity?
Hmm yeah. That's actually a valid reason for including the both models in the game.

:
I you want you can pretend the single visor Sligs are elite Sligs.
That's good reasoning. However, then they should act like elite class - eg. giving abilities which normal sligs don't have (like seeing inside steam, more powerful weapons, faster walking speed or anything equivalent but still not too unfair to the player)
Reply With Quote
  #10  
03-14-2015, 09:49 AM
Holy Sock's Avatar
Holy Sock
Outlaw Shooter
 
: Jun 2010
: Northern Ireland
: 1,317
Blog Entries: 3
Rep Power: 15
Holy Sock  (859)Holy Sock  (859)Holy Sock  (859)Holy Sock  (859)Holy Sock  (859)Holy Sock  (859)Holy Sock  (859)

Perhaps for future titles but that might disrupt gameplay for current releases.

Similarly one can pretend that Glukkons are cheapskates on only give single visors to some Sligs - it doesn't mean the Sligs themselves are really any better. Or that the single visor is the old visor and the cheaper pilot masks are slowly replacing them.

Really you can sort of pretend anything if it bothers you.
Reply With Quote
  #11  
03-14-2015, 09:55 AM
Fincer
Zappfly
 
: Feb 2015
: Finland
: 12
Rep Power: 0
Fincer  (76)

Or you can try to find a way to modify their in-game behavior if you're keen enough.
Reply With Quote
  #12  
03-14-2015, 09:59 AM
Strnadik's Avatar
Strnadik
Stingbee
 
: Apr 2014
: Czech Republic
: 87
Rep Power: 11
Strnadik  (100)Strnadik  (100)

:
@Strnadik

It's my pleasure to help Oddworld community a little bit and investigate possibilities and capabilities of modding New 'n' Tasty and thus to make modding of this game possible in some level at least.

However, two or two major modding issues still remain:
  • How to change/add/remove sounds (bnk, wem, wwise)
  • How to change/add/remove models, textures and levels (this is a commonly known topic among modders interested in Unity games because New 'n' Tasty is not the only game which has this issue still unsolved)

Unless third-party Unity modding tools will not be developed to the point where replacing files inside Unity assets will become possible, there is not much we can do because Oddworld Inhabitants has not either developed or, at least, released any modding tools.

@Fischkopf

Yeah, I've thought it, too. Not examined a lot, however. You need either
  • replace new Slig models and textures with the old ones or
  • tell the game to use only old Slig models (code modifications required)

At this point, I think the second approach might be easier. I'm not sure, however.
I was very close in solving the .bnk, .wem files problem, everything seemed like the correct thing to do, but in the end, it didn't work. I have explained my problems on the "New n Tasty modability" thread. It's probably impossible without original Wwise .wproj OR some repacker.

If I pack it myself, it won't work because the game will address non-existing IDs that were wiped and replaced by creating the new files. I managed to match BNK ID and Play_vox_alloya ID, but not the alloya wav ID, and it was impossible for me to change that one. But we are really really close!

LEVELS.. that's.. something I wanted to change since the announcement of NnT.. well no, since AO (Which was eventually possible thanks to Paul's tools). I tried to open stuff in Unity Pro, but the only things which worked were materials and the assembly dlls. the levels have no file extension and I can't seem to open them anyhow, even by converting.

I'll continue in researching the ways to solve the problems and I'll let you know!
__________________
"If New 'n' Tasty is going to be modable, I will mod the f*** out of it!"

Reply With Quote
  #13  
03-14-2015, 01:20 PM
Shrykull43's Avatar
Shrykull43
Thudslug
 
: Feb 2015
: United States
: 169
Blog Entries: 6
Rep Power: 10
Shrykull43  (60)

Has anyone figured out how to turn down bloom yet??
__________________
:
We are the absolute wrong people to try to show this to.
We are cunts. Every one of us, down to a man

Reply With Quote
  #14  
03-14-2015, 02:35 PM
Strnadik's Avatar
Strnadik
Stingbee
 
: Apr 2014
: Czech Republic
: 87
Rep Power: 11
Strnadik  (100)Strnadik  (100)

It was being discussed here http://steamcommunity.com/app/314660...4106419263539/

And the 1.02 patch WILL have togglable Bloom and some other GFX sliders.
__________________
"If New 'n' Tasty is going to be modable, I will mod the f*** out of it!"

Reply With Quote
  #15  
03-30-2015, 04:51 AM
Fischkopf's Avatar
Fischkopf
Fuzzle
 
: Nov 2009
: Germany
: 149
Rep Power: 16
Fischkopf  (87)

That's just great! You gotta love JAW for listening to the community that much.
Reply With Quote


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 








 
 
- Oddworld Forums - -