Advice Finding Structure Data

slinga

Member
I'm trying to find the RGB data for builtin wrestlers in Fire Pro Wrestling and I've hit a wall. By RGB data I mean literally the data stored with the wrestler template. See this image:

goldust.png
You can see that they are 34 RGB values.

For the user created wrestlers the structure looks like the following:


struct CREATED_WRESTLER
{
....
RGB colors[34]; 68 bytes of wrestler RGB values
...
}

// 2 byte struct
struct RGB{

unsigned char red:5;
unsigned char green:5;
unsigned char blue:5;
unsigned char unused:1;
}


The CREATED_WRESTLER struct has an array of RGB values. I've found and reversed the BUILTIN_WRESTLER structure and while they are mostly the same there are two key differences:
- the BUILTIN_WRESTLER has 6 attires whereas the CREATED_WRESTLER only has 1. This is expected.
- the BUILTIN_WRESTLER struct does not have an RGB array. I would expect 6 different RGB colors[34] to be present. I can't even find one.

Here's where I'm stuck. For wrestlers 160-203 (which are not actually in the game, just precreated templates for the player to create) I found the RGB array by searching for the bytes as expected. For wrestlers 0-159 I haven't had the same luck. If I search for Goldust, I can get matches on up to the first 8 bytes. Then it stops making sense.

For another wrestler with unique skin tone I would expect to find the bytes for their skin 6 times. I'm not seeing that. So I'm kind of stumped as to how this is encoded in the game. Any advice? Thanks in advance.
 

slinga

Member
It was a pain, but I finally figured it out. Instead of using 160 (number of wrestlers) * 6 (number of outfits per wrestler) * 68 (number of bytes per outfit for palette info) = 65,280 bytes they used an encoding scheme. Long story short they split the 68 byte palette into 10 parts. They use multiple arrays to hold the values.

Once I cleanup my code I'll check it into GitHub.
 

slinga

Member
I threw my scripts on GitHub: slinga-homebrew/6MS-Scripts

These scripts can:
  • list/insert wrestlers renames from/into a save game or directly into the game itself
  • list/insert promotion renames from/into a save game or directly into the game itself
  • dump builtin wrestlers from the game to JSON
  • dump create-a-wrestler edits from a save game to JSON
  • insert wrestlers to a save game
  • insert wrestlers overwriting a builtin wrestler
Some more advanced features:
  • create an edit that uses more than the 255 skill points
  • create an edit that has every move set to finisher
  • replace a builtin wrestler with an edit
  • copy a builtin wrestler to an edit slot, edit them, and copy them back
 
Top