Posts Tagged ‘a kingdom for keflings’
Savefile hacking – A Kingdom For Keflings PC
[This was drafted many months ago, and never posted. Not sure why.. I've decided it's worthy.]
I wouldn’t post this if this were about hacking the XBox live arcade version of this game; because that would provide information which people could abuse to cheat on the game’s global list of high scorers (leaderboards). I hope I’m not mistaken, but first looking at this game on the PC, I don’t think there’s any kind of global high score boards.
I’ve been taking video capture of this game as part of a video portfolio, and found myself messing around with a funny bug I found, and.. otherwise exploring the game.
I’ve figured out how to hack the save files for this game (the PC version) to change the number of items in resource piles. Here’s an example:
- While playing the game, find a resource pile and identify how many of that resources are in it. For this example I found a pile of 139 Carved wood.
- Second, find your savefile. Mine is named:
C:\Program Files\NinjaBee\AKingdomForKeflings\Saved\S0000030272500Xf50000L9IHXvmr9a.kef
Back up that save file.
- Using a hex editor like hexedit, open your save file and search for that pile of 139 carved wood thusly (click the thumbnail image for a larger detail):
- Unless you happen to know how to translate decimal to hex quickly or in your head, open Windows Calculator. Click the view menu->Scientific. Punch in 139, then click the “hex” radio button. This will display 139 in hexadecimal which is (8B).
- In hexedit, click the edit->find menu, then in the popup dialog click the “hex” tab. Type in:
01010000[the hex value you are looking for, in my case 8B]
- so that you are searching for
010100008B
and click “Find Next”. You may need to search from the beginning if prompted.
- Using Windows Calculator, figure out hex for a much larger number, say, erm.. 16,777,215, or FFFFFF
Starting at the offset in your savefile where you found 8B (which is followed by 0000), type that right into hex edit, then save the file (I had to tell hexedit yes, I want to change to write mode). - Load up your game and go examine this hex-modified resource pile. It may look something like the following: (click the thumbnail image for a larger detail)
A Kingdom for Keflings gag promo 1
Made by the folks at Ninjabee. I did sound and particle effects work for the promoted game.


