xnm3YQNfEx / GOCSaveEditor

Gangsters Organized Crime Save Editor
MIT License
2 stars 0 forks source link

GOCSaveEditor

Gangsters Organized Crime Save and Scenario Editor

This is an attempt at reversing the save file format for the 1998 classic Gangsters Organized Crime. Very much a work in progress, will likely be bugs, and likely a project that will be abandoned when I get bored.

Building

Running

Main goals

Updates

2024-10-12

2024-07-24

2024-07-14

2024-07-10

Save File Details

High level details of how the compression works

Save file structure

| Offset | Size  | Description                                          |
| ------ | ----- | ---------------------------------------------------- |
| 0x00   | byte  | some index or id value                               |
| 0x04   | dword | pointer to data on heap                              |
| 0x08   | dword | unknown, haven't seen it used yet                    |
| 0x0c   | dword | size of allocation on heap                           |
| 0x10   | dword | size of data in save                                 | 
| 0x14   | dword | unknown, generally 0x00000000 read in from save data |
| 0x18   | dword | pointer to next item in list                         |

Here's how the base structure of the decompressed South of the River scenario looks, the saves use the same structure

image image

Here's one of the sections for one of the gangs

image

And their starting money:

image

Sections

Section numbers here are integer values rather than the hex representation. Only sections with some findings are listed below.

1 - Economy Data

Section is mostly just the same data found in xtx data files. The game doesn't read in this data from xtx files when loading a save/scenario with the exception of the strings from economics.xtx and illegal economics.xtx. Assumption is they are more so a template to make localisation easy. When starting a new game from a scenario, the number of businesses within the two xtx files that strings are read from must match the number of businesses in the scenario. It does appear to be possible to change the number of businesses if you don't use scenarios, and start a new game. There's 69 bytes of data (nice) that I'm still not sure what it's for. I think 64 bytes are related to Economics.xtx in some way. Appears to be 16 u32 values?

0, 117, 150, 152, 151, 153, 156, 170, 2, 2, 2, 2, 79, 30, 33, 23

Hex View  00 01 02 03 04 05 06 07  08 09 0A 0B 0C 0D 0E 0F

00000000  00 00 00 00 75 00 00 00  96 00 00 00 98 00 00 00  ....u...........
00000010  97 00 00 00 99 00 00 00  9C 00 00 00 AA 00 00 00  ................
00000020  02 00 00 00 02 00 00 00  02 00 00 00 02 00 00 00  ................
00000030  4F 00 00 00 1E 00 00 00  21 00 00 00 17 00 00 00  O.......!.......

Contains data from these files:

6

7

8

9

13

17

18

24

25