Reply To: Increddible asset of modding tools

Home / Forums / Modders Corner / Mafia Editing / Mafia mods / Increddible asset of modding tools / Reply To: Increddible asset of modding tools

Bank Notes: 1,090
September 3, 2012 at 8:25 am #15405

Forgive me for asking it’ date=’ but I’m fasinated![/quote’]

At first you have to be able reading binary files with hex editor. When you understand for data structure, it isn’t problem to write some editor for it. To write programs you have to know any programming language, like C or C++ …

 

Little example with menu.def file:

[img]//djbozkosz.wz.cz/screen09.jpg&key=98d38776f2a3154477b19defa0993b20866c14e2e9d1171f5a6974dc227089bb[/img]

Fig. 1

When you open menu.def file, you will see like this.

 

Fig. 2

Then, you see some strings: srev, tniw, txtc, etc… Maybe, it is in every item in the file. You don’t know what does it mean, but it indicates fixed length of every item – 36 bytes.

 

Fig. 3

Then, you can identify every item.

 

Fig. 4

Then, you have to identify every values in the item. But you have to know something about storing data types.

Int is an integer number stored on four bytes. Float is real number stored on four bytes too.

But every these number are stored with inverted byte order. I’m using for converting Base Converter with set byte order to Intel. I included this tool to Road.bin Editor archive.

In most cases have int zeros in the right and floats have zeros in the left. Then, you can safely identify all values in the item.

 

Fig. 5

Then, you have to indentify what for are all these values in the item. You haven’t got a lot of choices, so you have to change these values and find any changes in windows in the game.

 

When you identify all values, you have decoded whole file.

 

Note: For programming editor – in the file is little problem, because you haven’t know, how many items are in the file. So you have to reading items to the end of file.