The above video goes away if you are a member and logged in, so log in now!
Anyone know checksum method for FFXII
Anyone know checksum method for FFXII –
i've coded a couple simple checksum loops, but none of them yield the proper checksum that is actually stored at the beginning of the save file and -0x08 bytes from the end of the save file.
i haven't been able to find the save checksum creator (yet) from disassasembling and checking out the asm of the elf file.
by simple i have something like this:
i've also tried stepping the offset by 1,2,and 3. and also by doing ^=, -=; instead of just +=.
calcdchecksum += dwordval;
offset += 4;
} while(offset < filesize);
this is a simplistic way to do it, but i figured i'd give it a shot. after all, hdl uses this simplistic method for getting checksums.
anyway, if anyone knows, please post it here. thanks
Try CRC32 rather than your existing method which looks like a variation of checksum32. Checksum32 should add each byte together and is used in such games as the GTA series so I'd alter your code to read a byte at a time.
Hex Workshop is great for testing checksums as it comes with many of the common ones built in
yeah, i did try crc32 (and others) that are built into winhex hash calcs. but none of those returned the correct checksums either
i even tried getting standard crc32 hashes OF other longer hashes like md5, sha, etc. but that still didn't work.
any other ideas?
crc32 DOES WORK!.
i was using the wrong start offset of 0x04, when in fact you should start at 0x08
thanks for getting me to try this way again. i'll make a little checksum fixer tool (and perhaps a general ffxii save file cheat tool if i have the time).
Last edited by thereal_zap; 11-06-2006 at 11:26 AM.
So it's definitely a CRC32?
Glad I could help
thereal_zap could tell me how to hack money and lp?
money and lp are the easy ones. i've also found an array field for qty of weapons/items, but it acts strange. by strange i mean that the game sees that you have all these things, but the items aren't listed in your inventory. an example of this is to choose 'optimize' in the equip menu. you'll be given some non-descript, red-colored font weapon name 'reserved' with a 201 atk power. and a shield with 90 evade (altho this shield has major status effects on your character). but in any case, these items don't show up in your inventory and you can't sell them or browse thru a list to equip them. also this makes buying any 'new' weapons impossible cuz shops show that you have them already.
but anyway, back the offsets... (these offsets are based on a uLaunchElf copy of the gamefile and NOT ANY game save hardware device!!!)
what the above means is this: gil is at offset 0x08 statically. there are other numbers in this group too that pertain to hunter points, steps taken, etc.
to interpret the lp/exp for each character, use the character's offset and then add to that the exp_ptr/lp_ptr.
character1 is at 0x2200, so add (0x2200 + 0x194) and you get 0x2394. this is where THAT character's exp is stored.
when you're all done, select the block from offset 0x08 all the way down to -0x08 bytes of the end of the file (you'll see the crc value stored there as well as offset 0x00) and get the crc32 checksum for the selected block. change the checksum values at 0x00 and -0x08 of the filesize by writing it little endian and save it. transfer back to your memory card, and you'll be good to go.
if anyone has any insight as to where item flags are stored please let me know. (not the item qty values, i got that already) what i need is for the game to see the items in my inventory. also trying to figure out where the esper flags for each char are stored as well.
also, a side note, if you extract the main save data from a jap save game and rename it to the us name, it'll work just fine.
(the last 2 digits are for which slot it is stored)
Just a thought, I don't have the game so I'm just throwing out an idea here, but maybe the items are stored in a binary format, 4 items to a byte.
An example with four items:
item 1 (you do not have this)
item 2 (you do have this)
item 3 (you do have this)
item 4 (you do not have this)
The bytes binary layout for these 4 items would be: 0 1 1 0 (1 = have item)
Hope I've explained that clearly, I'm in a bit of a rush
Last edited by gothi; 11-08-2006 at 03:48 PM.
i have thought about that, certainly. the problem is that i haven't quite nailed down where this is saved in the file. more testing is needed.
Originally Posted by gothi
here's a start of a tool that is far from complete, but it will at least let you set the gil, exp, lp of each player.
please read the following closely:
THIS IS ONLY FOR USE ON AN uLaunchElf RAW SAVED FILE!!!! THE FILENAME SHOULD LOOK LIKE THIS: "BASLUS-20963FF1200" (LAST TWO DIGITS WILL BE THE SLOT WHERE YOU SAVED).
IT WILL NOT SUCCESSFULLY ALTER ANY HARDWARE SAVE-FILE FORMATS SUCH AS ARMAX, CODEBREAKER, ETC. EVEN IF IT SAYS IT DOES.
WHEN YOU UPDATE THE FILE, IT IS OVERWRITTEN, SO IF YOU'RE UNSURE ABOUT THE USE OF THIS TOOL, THEN BACKUP YOUR ORIGINAL FILE!!!
now that you've read that, please enjoy
v0.02 - minor update. now can patch 'steps taken' and 'clan rank points'. also there's an experimental 'all access' option which gives you all weapons/armor/items, etc. you may not want to use this as it also gives you all key items and seems to open all maps as well. i haven't really tested it much so it could even flag events as finished altho i'm not really sure.
keep in mind also that you when savegame patching, you can't just arbitrarily set your hp/mp/level/stats like you can with memory patching (codebreaker, etc). the only patches that will hold are for things like exp, inventory items, etc.
Last edited by thereal_zap; 11-09-2006 at 03:04 PM.
Keep up the good work thereal_zap, I 'm always glad to see others working on save hacking tools
By any chance are you coding this in a Borland enviroment such as their C compiler?
Last edited by gothi; 11-11-2006 at 05:56 PM.
yeah, borland just makes it easy to code fast gui projects. using bds.
Originally Posted by gothi