[HEX] Item Properties Listed Inside (WIP)

KoitenshinKoitenshin Posts: 116
edited March 2012 in TL General Discussions
Okay. I don't know how many people will use this but here goes. This is a listing of all the item properties is the game.
Very useful if you hex edit your items. The item properties are 9 bytes after the end of an item Property's name.
Item property example is highlighted.
And now on to the list.

00 +# Melee Damage
01 +# Ranged Damage
02 +# Defense Attribute Bonus
03 +# Magic Attribute Bonus
04 +# Mana
05 +# Health
06 # Mana Recovery per second
07 # Health Recovery per second
08 +# Armor
0A +# Damage
0B Damage Taken Increased by #
0C +# Knockback
0D +# Sight Bonus
0E +# View Angle Bonus
0F +#% Melee Damage Bonus
10 +#% Ranged Damage Bonus
11 +#% Defense Bonus
12 +#% Magic Bonus
13 +#% Mana
14 +#% Health
15 #% Faster Movement
16 #% Faster Attack
17 +#% to Armor
18 [BETA?] % Attack Rating Bonus
19 Increases All Damage by #%
1A Damage Taken is Increased by #%
1B #% Increased Magic Find
1C #% Increased Gold Find
1D #% Faster Cast Speed
1E #% Health Stolen
1F #% Mana Stolen
20 #% Damage Reflected Back on Attacker
21 +#% Increased Chance to Block
22 #% Reduced Level Requirements
23 +# Armor
24 +# Magic Defense
25 +# Fire Resistance
26 +# Ice Resistance
27 +# Electrical Resistance
28 +# Poison Resistance
29 #% Sight Bonus
2A #% View Angle Bonus
2B +# Knockback
2D [NOT USABLE] Create Town Portal
2E [NOT USABLE] Identify Item
2F [NOT USABLE] 14 Seconds Summon Duration
30 # Damage Reflected
31 # Health Stolen on Hit
32 # Mana Stolen on Hit
33 +# Increased Gold Drop
34 +# Damage
35 #% Knock Back Resistance
36 # Armor Degraded per Hit
37 +# Critical Hit Chance
38 +#% Interrupt Chance
39 [NOT USABLE] Transform into a ??? for # seconds
3C [ENCHANT TO FIX] #% Chance to Reflect 0% of Missile Damage
3E #% Chance to Block
40 #% Chance to Stun
41 [NOT USABLE] Learn ???
42 # Armor Degraded per Hit
43 [NOT USABLE] Desummon a ???
44 #% Increased Experience Gain
45 +# Strength Attribute Bonus
46 +# Dexterity Attribute Bonus
47 +#% Strength Bonus
48 +#% Dexterity Bonus
49 [NOT USABLE] Transform into a ??? permanently
4A [BETA?] #% Chance to Cast ???
4B [BETA?] #% Chance to Cast (Item Property Name) on Target
4C [BETA?] #% Chance to Cast ??? at Target
4D #% Increased Fame Gain
4E Increases Missile Range by # meter(s)
4F #% Chance that Target Flees for 4294966296 seconds [136 years]
50 #% Chance to Force Target to Fight for You for 4294966296 seconds [136 years]
51 [BETA?] #% Chance to Cast ??? when you get hit
52 [BETA?] +# Level to ??? Skill
53 % Decrease in Vendor Prices
54 #% Increased Fishing Luck
55 +# to Attack Spell levels
56 +# to Defense Spell levels
57 +# to Charm Spell Levels
58 #% Damage Bonus when Dual-Wielding
59 #% Bonus to Critical Damage
5A +#% Potion Effectiveness
5B +#% Pet and Minion Damage
5C +#% Pet and Minion Speed
5D -# to all Item Requirements
5E -# to Armor Equipment Requirements
5F -# to Spell Learning Requirements
60 #% Decreased Pet Town Travel Time
61 +#% Pet and Minion Armor
62 -# to Martial Equipment Requirements
63 +#% Martial Weapon Damage
64 -# to Ranged Equipment Requirements
65 -# to Mage Equipment Requirements
66 +#% Ranged Weapon Damage
67 +#% Mage Weapon Damage
68 +#% Pet and Minion Health
69 [BETA?] #% Chance to Cast ??? on death
6A #% Chance to Freeze Target
6B #% Chance to Burn Target
6C #% Chance to Poison Target
6D #% Chance to Shock Target


  • Updated List. Any comments or help needed?
  • How do you add multiple properties to an item? Also, could you theoretically change the rarity and name of the item by using the hex editor?
    "Modder" =/= "Cheater"
    "Modder" > "Cheater"

    The difference between constructive criticism and whining is the ability to provide a realistic solution.

    Felicia Day plays Torchlight!
  • CHEATacular. :evil:
  • KoitenshinKoitenshin Posts: 116
    edited October 2009
    Eviathluc wrote:
    CHEATacular. :evil:
    Please take your lesser intelligence elsewhere. This discussion is for people who are curious about the item format.
    kybarsfang wrote:
    How do you add multiple properties to an item?
    I don't know how to do this yet. I've just been enchanting my items first and going from there.

    Actually, changing the name is a bit harder but yes it can be done.

    I just created the "Epic Boomstick from S-Mart"

    Two bytes before the first letter of an items name is a hex digit signifying how man characters are in the name.

    For example:

    0E 00 45 00 70 00 69 00 63 00 20 00 42 00 6F 00 | ..E.p.i.c. .B.o.
    6F 00 6D 00 73 00 74 00 69 00 63 00 6B 00 00 00 | o.m.s.t.i.c.k...

    The bold digit is how many characters are in the item name.

    Now for the second part.

    12 00 5B 00 49 00 54 00 45 00 4D 00 5D 00 20 00 | ..[.I.T.E.M.]. .
    66 00 72 00 6F 00 6D 00 20 00 53 00 2D 00 4D 00 | f.r.o.m. .S.-.M.
    61 00 72 00 74 00 DE 11 5E C5 A1 36 89 C2 00 00 | a.r.t...^..6....

    Obviously yours will look different but that's how to change the item names. Also. You MUST use 00 between characters as the files are in Unicode format.
  • AkimboAkimbo Posts: 46
    Nice work so far, topic bookmarked. I learnt how to hexedit recently, so I'm practicing when I can :) I'll make a character purely for messing around with I think.
  • Koitenshin wrote:
    Eviathluc wrote:
    CHEATacular. :evil:
    Please take your lesser intelligence elsewhere. This discussion is for people who are curious about the item format.

    You don't really need to know these item format details to mod with the editor. Being curious is an euphemism here...
  • Well I like many other people, simply don't want to wait. Plus I like a good challenge. Figuring out the item format seems like a good time waster to me.
  • 220683220683 Posts: 29
    What does (WIP) mean? And what hex editor are you using?
  • SrikandiSrikandi Posts: 334
    WIP means "work in progress".
  • I'm using Hex Workshop but you can use any Hex Editor you want to.
  • 220683 wrote:
    What does (WIP) mean?
    WIP = Work In Progress
  • 220683220683 Posts: 29
    Thanks! 8-) I was wondering about that.
  • darkcougdarkcoug Posts: 152
    Interesting. Hopefully they have that chance to cast skill/spell on melee/strike/death/on hit etc. workable by the time TorchED comes out so we can add all sorts of things like Crushing Blow, weapon effects, etc.
  • Eviathluc wrote:
    Being curious is an euphemism here...

    Euphemism for "rad" - keep it up.
  • Well....I found how the sockets are done. Also found out Coordinates, How to get rid of the Level Requirement, Defense, Damage
    Defense and damage don't seem to take hold, they might be hardcoded.

    IE. If you have a 20,480 Max Damage Weapon that requires no stats, and the game thinks it's outside the normal range it will use a value that it likes without changing the item.
    That's why my "Epic Boomstick of S-Mart" doesn't work like it should.

    One piece of shoulder armor has 255 sockets.
    45 of them are filled....so far.
    Game still runs smoothly.

    This game is going to be a modder's **** come true.
  • 220683220683 Posts: 29
    edited October 2009
    Koitenshin how would you change the value of the item property? In your first example, the 0D (+# Sight Bonus) is the property type but how do you change the quantity?
  • Still working on that, have yet to find two items of the same property with different numbers.
  • NukeninNukenin Posts: 157
    Koitenshin wrote:
    Eviathluc wrote:
    CHEATacular. :evil:
    Please take your lesser intelligence elsewhere. This discussion is for people who are curious about the item format.

    Someone has an opinion. It's not to your liking. Don't diminish your efforts by succumbing to vitriol.
  • I've only run into a snag because I'm stumped. It seems the stash.bin and your character file are more inter-related than I thought.
    For some reason the graphics of the items weren't displaying right on my installation. Now they are, which is weird.
    Also I cannot figure out how to remove multiple Requirements without breaking the item.

    Each item has 6 bytes that manage Level , Str, Dex, Mag, & Def Requirements.
    They also manage quality, etc. I'll crack it eventually but it might take some time.
  • KoitenshinKoitenshin Posts: 116
    edited November 2009
    Okay. I found out some more stuff today.
    If you don't know what this means, feel free to ask.

    Last letter of item name + 6 = Start of item hash (Do not touch)
    + D = End of Item code (Do not touch)
    + 27 = Number of times passed down (Maximum of 0A), just pass item down, reset this to 01 [01 so you don't end up with player's player's sword of swiftness For example] and viola!
    NOTE: You can only lower an item's requirements by 5 levels and 10 stats

    +93 = Amount of sockets an item has [An item can have 255 sockets, just try filling them up. I'm up to 45 sockets so far. Lost interest in it after that many]

    More will be posted as I come across them.
  • OmnifasOmnifas Posts: 3,440 ✭✭✭
  • I used Sharedstash.bin as it is purely the items.
  • Nice work, paves the way to a character editor like Jamella's for D2 :P
  • Good work on figuring this stuff out.

    I don't have any experience with this but I'm curious about it. I thought I'd try to write a script to pull out character name, class and pet name. I started with class.

    Comparing two save files of characters with different classes (I've broken things up into three regions):

    Before: 16 00 00 00 0A 00
    Name:   56 00 61 00 6E 00 71 00 75 00 69 00 73 00 68 00 65 00 72
    After:  00 03 00 00 00 00 00 00 00 00 00 00 DE

    Before: 16 00 00 00 09 00
    Name:   44 00 65 00 73 00 74 00 72 00 6F 00 79 00 65 00 72
    After:  00 01 00 00 00 00 00 00 00 00 00 00 DE

    - The first byte, 0x16, could be a start byte
    - The fifth byte is the length of the class name
    - The class name itself is 0x00-padded. Are they supporting UTF-32 or something? (I haven't tested)
    - The second byte after the class name looks significant. I wonder if the Alchemist has a 0x02 here.
    - The 0xDE sequence comes 13 bytes after the end of the class name. Looks like a stop byte.

    I don't know what the usual practices are when writing file formats like this but do offsets play a role or is the data indicated by a specific start/stop sequence (or is it a combination?)?

    Any help would be greatly appreciated.
  • I have absolutely no idea how the game does it, but the sharedstash.bin and your character save files are usually recompiled periodically so offsets WILL change. That's why I had to go with something definitive like offset from the item name to get to the data I want.


    Yeah the second byte is significant. It's your difficulty. Just like the 7th byte after the Class Name is "How many ancestors you have in the journal"

    So with that said.

    Last letter of Class Name + 2 = Difficulty (0-3 only)
    Last letter of Class Name + 7 = # of Ancestors in Journal
  • Thanks for the reply.

    I haven't done format cracking but it makes the most sense to me to approach the problem asking how the game implements the parsing rather than just looking at the data file.

    Given the approach you're describing, I would either walk through the file byte-by-byte (naive) or apply a huge set of regexes (slow). Both of those options sound silly. Are all of the non-zero bytes between information that can be converted from hex to ASCII just junk? They can't be (or can they?).
  • The files MUST remain in Unicode format for the game to read them.

    And yeah I know it isn't the best way for me to describe the offsets but that's how they coded the game :?
  • I wasn't trying to imply anything about encoding. I said ASCII just to refer to the ASCII-Unicode overlap for those particular Unicode offsets.
  • Nailed the stat values. Woohoo. The game does something funky to the values, so below is just what I'm using based from a +1 Skill item (which NEVER changes)

    01: 803F0000003F0000003F0000003F
    02: 803F000000400000004000000040
    03: 803F000040400000404000004040
    04: 803F000080400000804000008040
    05: 803F0000A0400000A0400000A040
    06: 803F0000C0400000C0400000C040
    07: 803F0000E0400000E0400000E040
    08: 803F000000410000004100000041
    09: 803F000010410000104100001041
    10: 803F000020410000204100002041
    11: 803F000030410000304100003041
    12: 803F000040410000404100004041
  • mattdeslmattdesl Posts: 157
    edited December 2009
    Sorry for the bump, but I figured somebody might find this useful. Right now I'm looking into the possibility of an inventory/stash organizer. Here's what I've been finding...

    Using 16 bytes per row, all offsets described in decimal values, and bytes described in hex values.
    The file is unicode (UTF-16LE), so strings will have '00' bytes after each character.

    The first byte of the file is '17'.

    Note: Immediately before class/player/item names, a short (2 bytes) describes the number of characters in the string. My offsets describe the point at which this short is located.

    4 bytes into the file is the cass name.
    Another 40 bytes in is the cheat flag -- '4E' for non-cheaters and 'D6' for cheaters.
    Another 40 bytes in is the player name.

    Approximately 300 bytes later the player's spells will come up. I didn't look into this much, since I didn't need it. There's also some mod info in here, which varies from player to player.

    From there, look for the first group of exactly 12 consecutive 'FF's (generally around offset ~500, with no spells), then go back 8 bytes to find the gold count. The most gold the game seems to allow is 2,147,483,506 gp (which looks like '72 FF FF 7F' in a hex editor).

    Not far after that, the file begins to describe inventory items. The 'DE' byte denotes a new item. 7 bytes after 'DE' is the item display name. Another 'DE' byte denotes the end of the item name (generally 4 bytes after the end of the item name, but not always).

    40 bytes after that is the item location in the inventory. A hex value of '13' describes the first (upper-left) slot in the inventory, and the value increases by one for each slot after that (from left to right). Item location of '00' seems to indicate that the item is not in the inventory (which generally means it's equipped) and 'FF' seems to indicate that the item has been socketed into an item.

    Further in, the bytes '80 3F' together denote some form of "quantity". I'm still looking for a more stable pattern, but for now I've found that the item quantity generally shows up after the last pair of '80 3F' bytes, before a group of 'FF's.

    When you've hit 'FF DE 11 33 9E', you've reached the end of the player's inventory.


    For the sharedstash.bin, the spec is similar. After 8 bytes, items begin (with the 'DE' byte as above).

    If anyone has any better ideas, please let me know. I'll update this once I nail down the pet and stash inventories.
    Torchtools - An open-source save editing toolset
    Rename characters & pets, transfer gold, change difficulty, etc.
Sign In or Register to comment.