Advertisement
kleevah

AA2 character data format

Jun 20th, 2014
1,926
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. I'll try to detail some of my findings of the AA2 character data file format here as I'm working on it for my online AA2 trait editor (http://aa2.zawiarr.com). I did most of the work charting this info myself, but some fellow anons in /hgg/ helped out initially so big thanks to them.
  2.  
  3. The data is stored inside a PNG container, and all offsets are based of the first IEND (49 45 4E 44) of the file. All values are in hex (0x) unless otherwise specified.
  4.  
  5. | Offset | What | Length | Value/Info
  6. +--------+----------------------+--------+-----------------------------------------
  7. | 0 | PNG IEND | 4 | (49 45 4E 44)
  8. | 1D | Last name text | 104 | Null terminated, so effectively 259 characters max. Text format info below.
  9. | 121 | First name text | 104 | Same as above.
  10. | 225 | Profile text | FF | Editor says max 255 chars, but keeps reading if not terminated.
  11. | 692 | Intelligence | 1 | 00 to 04: Lowest -> Highest.
  12. | 698 | Strength | 1 | 00 to 04: Lowest -> Highest.
  13. | 6A3 | Sociability | 1 | 00 to 04: Lowest -> Highest.
  14. | 6A4 | Fighting style | 1 | 00 to 02: No restraint, One blow, Irregular.
  15. | 6A5 | Virtue | 1 | 00 to 04: Lowest -> Highest.
  16. | 6A6 | Sexual orientation | 1 | 00 to 04: Hetero, Lean hetero, Bisexual, Lean homo, Homo.
  17. | 6A7 | Sexual experience | 1 | 00 or 01 (False or True)
  18. | 6A8 | Anal experience | 1 | 00 or 01
  19. | 6AA | Character traits | 26 | There are 38 traits each one byte, value is either 00 or 01. Order same as in the editor.
  20. | 6D0 | Rainbow status | 1 | 00 or 01
  21. | 6D1 | Sexual Preferences | D | Same as the traits, but only 13.
  22.  
  23. ¤ These are the confirmed values for now. I assume most of the other follows roughly in the same order they are presented in the character editor, as that seems to be the common pattern. I will edit in more values once I have confirmed them properly.
  24.  
  25. Text format
  26. ------------
  27. The text format was a real pain to figure out. The text is coded in japanese Shift-JIS encoding, and then all the bytes are flipped for some weird reason I really don't understand. So to read it back you first need to extract a text block, then do a bitwise inversion on all bytes (xor FF or ~). You then get Shift-JIS (where ASCII is readable at least) which can be converted to something actually useful (UTF-8). To write back you just reverse the process. Also note that since this seems to be using C-strings you should terminate all text with null (\0) before inverting (or FF (~\0) after the invert).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement