A Beginners Guide to Making an Inventory Editor

A section for guides, manuals, and walkthroughs on how to use Cheat Engine functions and advanced features.

Post Reply
User avatar
Friggin rando
Table Maker
Table Maker
Novice Hacker
Novice Hacker
Posts: 27
Joined: Thu Aug 04, 2022 8:20 pm
Answers: 0
x 41

A Beginners Guide to Making an Inventory Editor

Post by Friggin rando »

Hey guys, I hope everyone's doing well. Now I know what you're all thinking, what the heck bro, you're supposed to be working on halo 2, why the heck are you hear talking about inventory editors?! Hear me out everyone, I... got distracted :P . Sorry everyone, but instead of working on halo like I promised, I went down a rabbit hole of making inventory editor for fable (the hard stuff is long done... like weeks ago, and the easy stuff is being properly procrastinated lol, but is 3/4 done).

DISCLAIMER: the guide below is not an end all be all guide, nor is it a catch all guide that will work in all situations, inventory editing can be complex and in many causes will be outside of the scope of this guide, this is a step three guide (assuming you're familiar with basic game hacking by using cheat engine) written for the sole purpose of helping beginners to understand the basics (we will not go into arrays or the use of any tools outside of cheat engine) and allow them to edit their inventory is a large amount of games (while still requiring little skill and experience).

with that said, welcome to STUPID FRIGGIN RANDO's guide to inventory editing!

I first learned basic inventory editing from a guide I read somewhere on the internet (cheat engine forums maybe?) years ago, written by someone who I dont remember. So anonymous credit to that person. Their guide covered inventory editing in 007 goldeneye emulated through project 64. it was a very basic guide that gave step by step instructions that introduced the concept of inventory editing in a noob friendly manner. Using those same strategies we are able to create inventory editors for other games as well.

Fable anniversary will be our example game for this guide.

In fable you have multiple item slots (you just dont see them). Every time you purchase an item it gets assigned to a slot in your inventory. your inventory is split into multiple sections based on item type. regardless of where you are in the game, the method for finding an item slot will be the same. With this information we can get started.

1- first things first, we need to identify a starting point. for the sake of ease, lets start with the consumable portion of your inventory. let us assume that your first item in this section of inventory is the healing potion. we will go to a vendor and take note of the number of healing potions in your inventory. we now do a 4 byte scan for that number. after getting the results we will sell one potion and continue this process until we find the address of your healing potion count.

2- with this address in our possession we will now browse this memory region. the first address it will bring you too is of course your potion value address.

2.5- at this point we are going to set the display type in the region memory browse to 2 byte decimal (these are 2 byte values and will just make things easier to manage then hex).

3- from your potion value address in the memory browser, expand the memory browse section (we dont need the dissembler for this anyway) and scroll up a bit (for reference the item value and item slot address is only 4 bytes apart) now sell all of your health potions and buy something else that you dont own, for example green apples. you should see a change a couple addresses behind your value address (this is the tiem id for green apples), and your value address should now contain the number of apples that you own.

4- testing again for good measure, you can take note of the item id of green apples and sell them (note that once again the value 4 bytes behind your item value changes to 0). now buy back your healing potions and note that once again the value 4 bytes behind your item value changes. take note of the new item id.

5- right click on the item id of your healing potions and go ahead and add the address to your table. this is your first consumable inventory slot. changing its value will change item currently stored in that inventory slot.

6- repeating this process with the consumable in slot 2, lets say mana potions, will yield the offset in between inventory slots (for fable this is 14). alternatively you can find the opcode that writes your item ids into inventory slots (i did this for clothing, mentioned in section 8.5)

6.5- item IDs can be found by buying and selling different items in known inventory slots.

7- this process can be repeated for weapons, as you can own multiple of them

8- clothing is a little different, and while not hard, you have to go about it a different way (as you cant own 6 pairs of the same pants). Now you have a few options, one way is to track down the item id. So all item ids are greater than zero. my suggestion is to do an unknown value scan, then sell an item, scan for zero, buy item, scan for increased value, wash rinse repeat(all the item ids in fable are between between 1000 and 9999).

8.5- what i did for fable is finding the op code that wrote to the inventory slots and using a break point (using "find out what adresses this instruction accesses") on that to find the inventory slots for clothing.

9- after you have found all the inventory slots (remember to find pointers for them) and your list of item ids has been made. your ready to create a drop down menu inventory editor.

this guide will be updated later to further elaborate on how to adapt this to other games, for now think of it as an example guide to get you started. this guide displayed a few methods of identifying inventory slots. This Should give you a decent starting place to build on for other games. if you have any questions, post them below, and I will answer them when I have time.


Post Reply