Anyway I've got a Mac and despite getting PyGTK installed from darwinports.com I've got compilation problems.
Code: Select all
Traceback (most recent call last):
File "./eschalon_b1_char.py", line 211, in <module>
sys.exit(main())
File "./eschalon_b1_char.py", line 202, in main
from eschalonb1.maingui import MainGUI
File "/Applications/Eschalon Book I/eschalon_b1_utils-0.4.2/eschalonb1/maingui.py", line 24, in <module>
import cairo
ImportError: No module named cairo
What you could help me with is post here a simple list of how the bytes are structured in the character file, then I can port it to Java for all to easily enjoy via executable. I'm not really interested in doing this for the map editor at this time... I've looked at your source code which has the file reading in it, and you have readInt and all that, but still a simple little list of byte ordering would be awesome.
Thank you sir.
[EDIT]
Instead of just whining I thought I'd be helpful. I've managed to edit my save files on Mac OS X using the free program HexEdit (http://www.versiontracker.com/dyn/moreinfo/macosx/10658) and an online hex-to-decimal converter (http://www.permadi.com/tutorial/numConvJs/index.html) and xoltol's save file editor. How?
Basically you can go in and check out the hex in the save file, and using the byte ordering that xoltol already found you can easily adjust the code to be what you want.
Code: Select all
# Start processing
self.unknown.initzero = self.df.readint()
# Character info
self.name = self.df.readstr()
self.unknown.charstring = self.df.readstr()
self.origin = self.df.readstr()
self.axiom = self.df.readstr()
self.classname = self.df.readstr()
self.unknown.charone = self.df.readint()
self.strength = self.df.readint()
self.dexterity = self.df.readint()
self.endurance = self.df.readint()
self.speed = self.df.readint()
self.intelligence = self.df.readint()
self.wisdom = self.df.readint()
self.perception = self.df.readint()
self.concentration = self.df.readint()
Code: Select all
00 00 00 00 46 6F 72 64 61 6C 65 0D 0A 0D 0A 42
61 72 72 65 61 6E 0D 0A 56 69 72 74 75 6F 75 73
0D 0A 52 61 6E 67 65 72 0D 0A
Now that we got past that, we can get to meaty portion of our character file.
Code: Select all
01 00 00 00 1A 00 00 00 14 00 00 00 14 00 00 00
17 00 00 00 0D 00 00 00 0D 00 00 00 0D 00 00 00
0E 00 00 00 05 00 00 00 04 00 00 00 05 00 00 00
03 00 00 00
According to xoltol's parser, strength is first. Looks like I have a 1A there. One thing to remember is that the files here are stored in little endian format - that is, instead of a million being like 1,000,000 it's like 000,000,1. So, the first byte, the 1A, represents all values up to 256. That means that unless you're cheating you're only going to need to change that first byte in all your stats. So, my strength is "1A 00 00 00" which using our online hex converter we can see is 26. I check my actual character and that matches up. Cool! If I wanted a few billion strength, I could change it to "00 00 00 01" (put 10000000 into the hex converter to see what that actually equals), or I could be more modest and just change 1A to 2A, giving myself 42 strength instead of 26.
Editing the rest of your stats should be pretty easy. Just remember that integers come in 4 bytes, so count by 4's to remember which stat is what. Also you can check values of stats to see what they match up with in your actual game file. And remember also that you can easily keep the game running to quickly see what changes you've made, just reload your save.
BUT, a word of CAUTION! Editing hex like this can make it VERY easy to destroy your save file! Back it up! Back it up! Back up your save!
And that's all she wrote...