Terraria

Terraria is a PC game. Data for this page is based off version 1.1.1 and may not be accurate for all versions.

Main notes

 * Invis timer: 13C0DC64
 * Health current: 13C0DD34
 * Mana current: 13C0DD38

These change between sessions, of course, but it's a good place marker.

Inventory hacking
Inventory hacks are difficult to accomplish in Terraria due to the values jumping around every so often. Whether this is intentional or a byproduct of the design of the game itself, I have no idea. If you're patient, though, you can work through it without too much trouble.

All inventory items have a certain structure that I'm still working on deciphering, so the table is unfortunately incomplete as to what certain things do. All addresses are in groups of 4 bytes.


 * 1) Base code (BC) and Session Code 1 (SC1). For me, BC is always 9ED4. SC1 changes between sessions. (xxxx9ED4)
 * 2) Primary ID (P1) and SC2. P1 is the most important thing in every address; if you change it and then exit the game and return, the item will have changed to what you set this to be. Also controls the item's name in mouseover text.  Since this changes so much, I've avoided absolutes and instead recorded the offsets starting from Dirt Block (since that's the easiest to find).
 * 3) Tooltip ID (TT) and SC2. TT is for tooltip flavor text, like demonite's 'Pulsing with dark energy.' If it's 0000, this SC2 is also 0000; otherwise SC2 is the same as in #2.
 * 4) Unknown ID 1 (U1).
 * 5) Unknown ID 2 (U2).
 * 6) Timer 1, counts down after dropping an item; when it hits 0, the item can be picked up.
 * 7) Timer 2, counts up after dropping an item; keeps track of the total time the item has laid on the ground. Not sure what exactly this is for, perhaps for despawn or whatnot.
 * 8) Not sure, but always FFFFFFFF (henceforth ~F) so far.
 * 9) Not sure, but always 00000000 (henceforth ~0) so far.
 * 10) Not sure, but always ~0 so far.
 * 11) Primary ID 2 (P2). Controls the physical appearance of the item. In the case of buckets (water/lava), controls actual function.
 * 12) Unknown ID 3 (U3).
 * 13) Unknown ID 4 (U4).
 * 14) Unknown ID 5 (U5).
 * 15) Unknown ID 6 (U6).
 * 16) Current quantity. Tested good up to 65000; resets/truncates on logout/login if over max stack size.
 * 17) Maximum quantity. Changing this manually does not allow you to stack more or less.
 * 18) Pickaxe power, 01 = 1%. All power levels reset on logout/login.
 * 19) Axe power, 01 = 5%.
 * 20) Hammer power, 01 = 1%.
 * 21) Not sure, ~0.
 * 22) Placing effect 1 (PE1). Can be used to place things not available as inventory items. ~F for unplaceable items.
 * 23) Placing effect 2 (PE2). As PE1, but for background (walls).
 * 24) Swaps between certain similar effects, like placing a different kind of seed or chest.  Nominally ~0, exceptions noted where they occur.
 * 25) Damage value for weapons and ammo.
 * 26) Not sure, ~0.
 * 27) Health regain value for recovery items.
 * 28) Mana regain value for recovery items.

Abs and Rel are the item's P1 variance from Dirt Block (Abs) and the previously listed item (Rel). As of 1.1.1, Dirt Block's P1 seems to switch between  and.

The Chest item (P2 0030) appears in the listing with all other relevant info, but its P1 varies so much from the norm that Abs/Rel are filled with #s. The exact difference (1.1.1, anyway) is -25E7C.

In the PE column, background placing effects (PE2) are noted with a 2- prefix.

Placing effects
For placement of non-inventory-item things. Items here get removed if a matching inventory item is found. As above, the 2- prefix in the PE column indicates that the value is for PE2, not PE1.

Technique notes
If the item you're attempting to get is a placeable one, one way you can do it (and not need to figure out your version of SC/P1) is to get a stack of something cheap like dirt, find where the inventory info is kept, and change the quantity and PE1 (or PE2 for background items). Despite the item itself remaining the same (since P1 is unchanged), you can place what you want, and then mine it again to return the actual item to your inventory. This is also handy for placing demonic altars in your craft area, since they're otherwise unmovable.