Difference between revisions of "Save Game Format (.CHR)"

From WTFwiki
Jump to navigation Jump to search
Line 1: Line 1:
From raptor's post here: http://www.omf2097.com/~forum/viewthread.php?tid=149
+
.CHR files are 'encrypted':
 +
 
 +
For bytes 0-0x1C0, XOR with (0xAC + file position).
 +
Then at position 0xF6 in the file is a BYTE indicating the number of opponents.
 +
The size of the opponents block (sb) = 68 * number of opponents
 +
For bytes 0x1C0-0x1C0 + sb, XOR with (file position + sb - 0x1C0)
 +
 
 +
Once decrypted, the contents of the files are as described below (from raptor's post here: http://www.omf2097.com/~forum/viewthread.php?tid=14)
  
 
<pre>
 
<pre>
- NOTE:: For this DOC to be effective, you first
 
- need to Decode the .chr file with: OMFTRANS.EXE
 
IMPORTANT - - You need at least v1.5 of OMFTRANS for the info
 
IMPORTANT - - of the opponents to make any sense at all.
 
- Please refer to end of DOC for more information
 
 
 
__________________________________________________________________________
 
__________________________________________________________________________
 
Offset Function / Values / Description
 
Offset Function / Values / Description
Line 170: Line 171:
 
Does he have ANY enhancements??
 
Does he have ANY enhancements??
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*1C0-203 Opponent at Rank 1's Information
+
1C0-203 Opponent at Rank 1's Information
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*204-248 Opponent at Rank 2's Information
+
204-248 Opponent at Rank 2's Information
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*248-28C Opponent at Rank 3's Information
+
248-28C Opponent at Rank 3's Information
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*... ...
+
... ...
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*Opponent Each Opponent occupies 44h bytes in file, starting at offset
+
Opponent Each Opponent occupies 44h bytes in file, starting at offset
 
Info: 1C0h
 
Info: 1C0h
 
.
 
.
Line 184: Line 185:
 
. of a single opponent.
 
. of a single opponent.
 
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*00 - 0F Opponent's Name:
+
00 - 0F Opponent's Name:
 
.
 
.
 
. Stored in standard IBM ASCII
 
. Stored in standard IBM ASCII
 
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*12 + 13 Opponent's Wins
+
12 + 13 Opponent's Wins
 
.
 
.
 
. Stored in standard byte-swapped-order.
 
. Stored in standard byte-swapped-order.
 
. MSB = 13, LSB = 12
 
. MSB = 13, LSB = 12
 
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*14 + 15 Opponent's Loses
+
14 + 15 Opponent's Loses
 
.
 
.
 
. Stored in standard byte-swapped-order.
 
. Stored in standard byte-swapped-order.
 
. MSB = 15, LSB = 14
 
. MSB = 15, LSB = 14
 
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*16 . Opponent's Rank:
+
16 . Opponent's Rank:
 
.
 
.
 
. Stored as normal HEX value
 
. Stored as normal HEX value
 
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*17 . Opponent's Robot Type:
+
17 . Opponent's Robot Type:
 
.
 
.
 
. Refer to Player's Robot Type above.
 
. Refer to Player's Robot Type above.
 
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*19 + 1A Opponent's Arm Power, Leg Power and Arm Speed:
+
19 + 1A Opponent's Arm Power, Leg Power and Arm Speed:
 
.
 
.
 
. Refer to Player's Arm Power, Leg Power and Arm Speed above.
 
. Refer to Player's Arm Power, Leg Power and Arm Speed above.
 
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*1B + 1C Opponent's Leg Speed, Armor and Stun Res:
+
1B + 1C Opponent's Leg Speed, Armor and Stun Res:
 
.
 
.
 
. Refer to Player's Leg Speed, Armor and Stun Res above.
 
. Refer to Player's Leg Speed, Armor and Stun Res above.
 
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*1D . 1E Opponent's Power and Agility:
+
1D . 1E Opponent's Power and Agility:
 
.
 
.
 
. Refer to Player's Power and Agility above.
 
. Refer to Player's Power and Agility above.
 
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*1F . Opponent's Endurance:
+
1F . Opponent's Endurance:
 
.
 
.
 
. Refer to Player's Endurance above.
 
. Refer to Player's Endurance above.
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
* = Needs at least OMFTRANS.EXE v1.5
 
  
 
Portions contributed by Michael Nicolella, Mighty Wombat, Carl Manzi
 
Portions contributed by Michael Nicolella, Mighty Wombat, Carl Manzi
 
Hex editing obtained from Todd Copeland and Ray Kirkland  
 
Hex editing obtained from Todd Copeland and Ray Kirkland  
 
</pre>
 
</pre>

Revision as of 06:03, 27 November 2009

.CHR files are 'encrypted':

For bytes 0-0x1C0, XOR with (0xAC + file position). Then at position 0xF6 in the file is a BYTE indicating the number of opponents. The size of the opponents block (sb) = 68 * number of opponents For bytes 0x1C0-0x1C0 + sb, XOR with (file position + sb - 0x1C0)

Once decrypted, the contents of the files are as described below (from raptor's post here: http://www.omf2097.com/~forum/viewthread.php?tid=14)

__________________________________________________________________________
Offset Function / Values / Description
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
04 - 13 Pilot Name:

Stored in standard IBM ASCII
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16 + 17 Wins:

Stored in standard byte-swapped-order.
MSB = 17, LSB = 16
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 + 19 Loses:

Stored in standard byte-swapped-order.
MSB = 19, LSB = 18
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1A Rank:

Stored as normal HEX value
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1B Robot Type:

Values: 00 = Jaguar 01 = Shadow 02 = Thorn
03 = Pyros 04 = Electra 05 = Katana
06 = Shredder 07 = Flail 08 = Gargoyle
09 = Chronos 0A = Nova
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1C + 1D Arm Power, Leg Power and Arm Speed:

Offset: 1D 1C
Bits: x0000000 00000000 x = unused
\___/\____/\___/ AS = Arm Speed
AS LP AP LP = Leg Power
AP = Arm Power

Note: 5 Bits needed for each Attribute, expect erratic
behaviour if attribute is changed above Level 10
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1E + 1F Leg Speed, Armor and Stun Res:

Offset: 1F 1E
Bits: x0000000 00000000 x = unused
\___/\____/\___/ SR = Stun Res
SR A LS A = Armor
LS = Leg Speed

Note: 5 Bits needed for each Attribute, expect erratic
behaviour if attribute is changed above Level 10
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 + 21 Power and Agility:

Offset: 21 20
Bits: xx000000 00000000 x = unused
\______/\_____/ PWR = Power
PWR AGL AGL = Agility

Note: 7 Bits needed for each Attribute
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 Endurance:

Bits: x0000000 x = unused
\_____/
Endurance

Note: 7 Bits needed for Attribute
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28 - 2B Money:

Stored in standard byte-swapped-order.
MSB = 2B, LSB = 28
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2C - 2E Robot Color:

Offset: 2E - Main Body Color
2C - Secondary Body Color
2D - Third Body Color

Values: 00 = Light Blueish 08 = Dark Gray
01 = Red 09 = Black
02 = Cyan - Greenish 0A = Light Gray
03 = Light Magenta 0B = Light Orange
04 = Dark Yellow 0C = Dark Orange
05 = Dark Blue 0D = Light Yellow
06 = Orange 0E = Dark Magenta
07 = Light White 0F = Light Cyan
10 = Default colors for pilot

NOTE: Im not sure what happens when you choose values other
than these, but I think it just assumes the default
color for the current pilot.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9B Difficulty Level:

Bits: 00000000 = 00 = Aluminum (Easy)
00001000 = 08 = Iron (Medium)
00010000 = 10 = Steel (Hard)
00011000 = 18 = Heavy Metal
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A6 Jaguar Enhancment:

00 - No Enhancement
01 - Double Concussion Cannon [ D,B+P ]
Air Jaguar Leap [ (Jump) D,F+P ]
02 - Triple Concussion Cannon [ D,B+P ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A7 Shadow Enhancement:

00 - No Enhancement
01 - Air Shadow Grab [ (Jump) D,B+P ]
03 - Ice Freeze [ F,D,B+P ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A8 Thorn Enhancement:

00 - No Enhancement
01 - Air Speed Kick [ (Jump) D,F+K ]
03 - Air Off-Wall Attack [ (Jump) D,B+K ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A9 Pyros Enhancement:

00 - No Enhancement
01 - Air Super Thrust [ (Jump) F,F+P ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AA Electra Enhancement:

00 - No Enhancement
01 - Double Ball Lightning [ D,B+P ]
Long Range Electric Shards [ D,F+P ]
02 - Triple Ball Lightning [ D,B+P ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AB Katana Enhancemnt:

00 - No Enhancement
01 - Quadruple Rising Blade [ B,D,F+P ]
03 - Quintiple Rising Blade [ B,D,F+P ]
Fire Ball [ D,B+P ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AC Shredder Enhancement:

00 - No Enhancement
01 - Long Range Flying Hands [ D,B+P ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AD Flail Enhancement:

00 - No Enhancement
01 - Moving Slow Swinging Chains [ D,K (while moving) ]
02 - Moving Fast Swinging Chains [ D,P (while moving) ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AE Gargoyle Enhancement:

00 - No Enhancement
01 - Air Wing Charge [ (jump) F,F+P ]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AF Chronos Enhancement:

Does he have ANY enhancements??
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
B0 Nova Enhancement??

Does he have ANY enhancements??
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1C0-203 Opponent at Rank 1's Information
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
204-248 Opponent at Rank 2's Information
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
248-28C Opponent at Rank 3's Information
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
... ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opponent Each Opponent occupies 44h bytes in file, starting at offset
Info: 1C0h
.
. The offsets that follow are relative to the starting location
. of a single opponent.
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00 - 0F Opponent's Name:
.
. Stored in standard IBM ASCII
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12 + 13 Opponent's Wins
.
. Stored in standard byte-swapped-order.
. MSB = 13, LSB = 12
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 + 15 Opponent's Loses
.
. Stored in standard byte-swapped-order.
. MSB = 15, LSB = 14
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16 . Opponent's Rank:
.
. Stored as normal HEX value
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 . Opponent's Robot Type:
.
. Refer to Player's Robot Type above.
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19 + 1A Opponent's Arm Power, Leg Power and Arm Speed:
.
. Refer to Player's Arm Power, Leg Power and Arm Speed above.
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1B + 1C Opponent's Leg Speed, Armor and Stun Res:
.
. Refer to Player's Leg Speed, Armor and Stun Res above.
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1D . 1E Opponent's Power and Agility:
.
. Refer to Player's Power and Agility above.
~~~~.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1F . Opponent's Endurance:
.
. Refer to Player's Endurance above.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'

Portions contributed by Michael Nicolella, Mighty Wombat, Carl Manzi
Hex editing obtained from Todd Copeland and Ray Kirkland