Please note that hex editing can be a time-consuming and tedious process. Furthermore, I'm rather new to hex editing myself, so bear with me as I attempt to explain the process. First, you'll need a Hex Editing utility and a calculator application that can convert decimal to hexadecimal and back. In this instance, I used Cheat Engine, and Microsoft Calculator Plus which you can download free from the following links :
http://www.cheatengine.org/index.php
http://www.microsoft.com/download/en/details.aspx?id=21622
Once you have the aforementioned, open up a blank notepad document, and minimize it. Do this for two reasons, one so you can take notes ( obviously ), and two, so your able to minimize the game using the Alt + Tab keys, which you normally can't do since the Tab key is "hardcoded" to the Inventory/Scoreboard function. Next, load a saved game or start a new one. Once you have a game loaded, minimize it to desktop and open up Cheat Engine and Microsoft Calculator Plus. Minimize Microsoft Calculator Plus, and do the following in Cheat Engine:
1: Click on the "Process List" icon in the upper left-hand corner, select the "Rage.exe" process from the pull-down list, and click the "Open" button.
2: Next, in the "Value type" field, select the "Array of Bytes" option from the pulldown list. Also make sure that the "Hex" check box next to the "Array of Bytes" field is checked.
3: Minimize Cheat Engine, and go back into the game. At this point it would be advisable to save your game, as this process can result in game crashing if not done correctly.
In the following example, I will change the number of currency units the player character has. Lets assume I currently have $50. The number 50 is represented as 32 in hexadecimal. Converting decimal to hexadecimal is easy with Microsoft Calculator. Simply open it up, check the "Dec" ( decimal ) radio button, enter the number you want to convert to hex, then check the "Hex" button, and the calculator will give you the hexadecimal conversion. In this instance, I'm going to increase the amount of cash I have from $50 to $250. Accordingly, in Cheat Engine do the following:
1: In the "Array of Bytes" field enter the following 8 byte array, then click the "New Scan" button:
68 FE 00 80 XX XX XX 32
2: In this case, my initial scan returned one address/array ( 68 FE 00 80 14 A0 09 32 ). The final byte, 32, represents the amount of cash I have ( i.e. $50 ), so all that needs to be done is to change the 32 into FA ( which is hex for 250 ). To do so, click the "Copy all selected items to the address list" icon ( red arrow icon ) in Cheat Engine, then highlight the array, right-click on it and select "Change record", then "Value" from the list.
3: In the "Value" field simply change the 32 to FA, and click the "OK" button. Minimize Cheat Engine, go back into the game, and check your cash amount. If all was done correctly, you should have $250. You can quicksave / load the game to be sure that the change "sticks".
I've determined that the first 3 or 4 bytes of any item's hex address seems to remain constant from campaign to campaign. However, the 5th - 7th bytes ( depending on the stacksize of the item ) will VARY from campaign to campaign, or even when you load different saved games. I'm not certain why this is the case. Perhaps someone with more advanced hex editing skills can enlighten us.
Now obviously $250 isn't exactly a fortune, but I selected that amount for the initial example because of what happens to numbers above 255 ( FF in hex ) when they're converted to hexadecimal. For example, the number 256 is represented as 100 in hexadecimal. HOWEVER, you would NOT simply tack the number 100 at the end of an array. 100 in hex must be entered into Cheat Engine as 00 01. Using the aforementioned example:
68 FE 00 80 14 A0 09 32 ( $50 )
68 FE 00 80 14 A0 09 00 01 ( $256 )
68 FE 00 80 14 A0 09 00 01 ( $256 )
Normally hex addresses are 8 byte arrays, and the addition of 00 01 to the bottom array makes it 9 bytes. In such cases, a window will pop up in Cheat Engine, warning you that the number of bytes typed isn't the same as the previous amount. Simply click the "Yes" button, as this dosen't seem to cause any issues under most circumstances.
Now save and reload the game, because something interesting will happen. The hex address for 256 currency units will change. The first byte, 68, is dropped and the "new" address will look something like this:
FE 00 80 64 A1 09 00 01
Near as I can determine, the byte, 68, is simply a "placeholder" of some sort, used only when the amount of cash, or an item's stacksize, is 255 or below. At 256 +, this "placeholder" is dropped, since the stacksize/amount now takes up two bytes ( e.g. 256 = 00 01 in hex ) in what normally should be an 8 byte array. For quick reference, I've listed some examples of numbers above 255 and their hex conversions as they should be entered into Cheat Engine:
300 = 2C 01
400 = 90 01
800 = 20 03
1000 = E8 03
5000 = 88 13
9999 = 0F 27
400 = 90 01
800 = 20 03
1000 = E8 03
5000 = 88 13
9999 = 0F 27
So what happens if you enter 68 FE 00 80 XX XX XX XX into Cheat Engine, and the initial scan returns nothing? Well, that's when the "trial and error" part of hex editing comes in. In cases such as this, it's best if you load a saved game where you're in a merchant's shop. That way you can purchase/sell items and vary the amount of cash, or stacksize of items you have and "track" it with Cheat Engine.
For example, lets say I want to find the exact hex address for the 20 Wingsticks in my inventory. The general address for 20 Wingsticks is:
6B FE 00 40 XX XX XX 14
So I enter the aforementioned array into Cheat Engine, and for some weird reason, I get nothing. Simply do the following:
1: Enter the array XX XX XX XX XX XX XX 14 into Cheat Engine's "Array of Bytes" field and click the "New Scan" button.
2: The initial scan will return several thousand addresses, but don't panic! Minimize Cheat Engine, go back into the game, and sell ONE Wingstick. This will leave you with 19 Wingsticks ( which is 13 in hex ).
3: Minimize the game, and change the "14" at the end of the aforementioned array to "13". Now click the "Next Scan" button, NOT the "New Scan" button! This time the scan will return fewer addresses. Repeat this process 3 or 4 times, and you'll be able to isolate the exact hex address for your Wingsticks. Note that you can use this method to find virtually any item in the game, except certain weapons ( e.g. the firearms ), weapon upgrades, and vehicles. For some reason, I haven't had any luck isolating those.
That more or less covers the basics. Later, I'll post my "working list" of hex addresses for the items I've managed to locate.