Is there a way to read character inventory? menu

User Tag List

Results 1 to 6 of 6
  1. #1
    Edg's Avatar Member
    Reputation
    1
    Join Date
    Aug 2016
    Posts
    4
    Thanks G/R
    3/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is there a way to read character inventory?

    You can get inventory from website but it updates every couple of mins but I need way to read it instantly. Is it possible to read it from memory where and what items are in inventory?

    Is there a way to read character inventory?
  2. #2
    TehCheat's Avatar ★ Elder ★
    Reputation
    2558
    Join Date
    Oct 2013
    Posts
    1,896
    Thanks G/R
    347/2260
    Trade Feedback
    5 (100%)
    Mentioned
    32 Post(s)
    Tagged
    1 Thread(s)
    Inventory or stash?

    If stash. no, because PoE only loads the first 4 (?) tabs when you enter an area. You either have to grab them from the internet or go through each tab in game.

    As I mentioned in the sub forum, if your inventory is open, you can read it (as HUD does in the inventory preview plugin).

  3. #3
    Edg's Avatar Member
    Reputation
    1
    Join Date
    Aug 2016
    Posts
    4
    Thanks G/R
    3/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by TehCheat View Post
    Inventory or stash?

    If stash. no, because PoE only loads the first 4 (?) tabs when you enter an area. You either have to grab them from the internet or go through each tab in game.

    As I mentioned in the sub forum, if your inventory is open, you can read it (as HUD does in the inventory preview plugin).
    I want to read inventory. Im making helper application and I need reliable inventory reading. I could do that through website but it updates every couple of mins or so.
    In HUD it also gets all info about item (name, level, stats, if its unindentified..)? I looked through code few times and its bit confusing

  4. #4
    TehCheat's Avatar ★ Elder ★
    Reputation
    2558
    Join Date
    Oct 2013
    Posts
    1,896
    Thanks G/R
    347/2260
    Trade Feedback
    5 (100%)
    Mentioned
    32 Post(s)
    Tagged
    1 Thread(s)
    Originally Posted by Edg View Post
    I want to read inventory. Im making helper application and I need reliable inventory reading. I could do that through website but it updates every couple of mins or so.
    In HUD it also gets all info about item (name, level, stats, if its unindentified..)? I looked through code few times and its bit confusing
    I'll explain it as best I can. Feel free to ask questions if I'm not clear at any point. I'll also assume you don't have a framework in place (and this is with vanilla, if you need offsets adjusted for Steam/Garena, let me know).

    First, to read the player's inventory, you need the base pointer, which you can grab with this pattern:

    Code:
    0x50, 0x64, 0x89, 0x25, 0x00, 0x00, 0x00, 0x00,
    0x81, 0xEC, 0xB0, 0x00, 0x00, 0x00, 0xA1, 0x00,
    0x00, 0x00, 0x00, 0x85, 0xC0, 0x0F, 0x95, 0xC1,
    0x84, 0xC9, 0x56, 0x0F, 0x94, 0xC1, 0x84, 0xC9
    and this mask:
    Code:
    "xxxxxxxxxxxxxxx????xxxxxxxxxxxxx"
    The base pointer is read at offset 0xF (the 4 ?s in the mask). (Also, there are other patterns/masks out there, you don't have to use the one I'm using.)

    To get to the player's inventory from there (I'll put the HUD class names in parenthesis as I get to them):
    Code:
    Base->0x4->0xFC(TheGame)->0x11C(IngameState)->0x5E8(IngameUI)->0xA24(InventoryPanel)->0x9D0(InventoryZone)
    Once you have the address for InventoryZone, there's a list of entity pointers that you can iterate through in InventoryZone. That list is pointed to at 0x788 and the end of the list is at 0x78C.
    You'd do something like this to iterate through them, depending on your programming language:
    Code:
    List<Entity> InventoryList = new List<Entity>();
    Start = readint(InventoryZone + 0x788);
    End = readint(InventoryZone + 0x78C);
    CurrPointer = Start;
    While(CurrPointer < End)
    {
        InventoryList.Add(Entity(CurrPointer));
        CurrPointer += 4;
    }
    And Entity would look something like:
    Code:
    class Entity(Address)
    {
    	private int ComponentLookup => ReadInt(Address, 0x30, 0x18, 0);
    	private int ComponentList => ReadInt(Address + 4);
    	public string Path => ReadStringU(ReadInt(Address, 0x14));
    	public int Id => ReadInt(Address + 0x14);
    	public int InventoryId => ReadInt(Address + 0x18);
    	public long LongId => (long)Id << 32 ^ Path.GetHashCode();
    	public bool IsValid => ReadInt(Address, 0x14, 0) == 0x65004D; // Check for 'Me' at start of Path
    	public bool IsHostile => (ReadByte(Address + 0x19) & 1) == 0;
    }
    If you need help with iterating through components (where you're going to find mods, rarity, sockets, etc.), let me know.
    Last edited by TehCheat; 08-15-2016 at 09:53 AM.

  5. Thanks Edg, Parog, Laykith, CeliborCrash (4 members gave Thanks to TehCheat for this useful post)
  6. #5
    Edg's Avatar Member
    Reputation
    1
    Join Date
    Aug 2016
    Posts
    4
    Thanks G/R
    3/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Didnt expected so informative reply, Thanks! I didnt thought that inventory reading will be so complicated.
    Ill try to study HUD code to get started (my programming language is also C#). Which classes you suggest to look into?
    Last edited by Edg; 08-15-2016 at 11:32 AM.

  7. #6
    TehCheat's Avatar ★ Elder ★
    Reputation
    2558
    Join Date
    Oct 2013
    Posts
    1,896
    Thanks G/R
    347/2260
    Trade Feedback
    5 (100%)
    Mentioned
    32 Post(s)
    Tagged
    1 Thread(s)
    Originally Posted by Edg View Post
    Didnt expected so informative reply, Thanks! I didnt thought that inventory reading will be so complicated.
    Ill try to study HUD code to get started (my programming language is also C#). Which classes you suggest to look into?
    It really shouldn't be as complicated as it is. It's the result of a code that's based off of a decompile of the optimized and compiled code. I took a ton of time to strip structures out of HUD and I have them as an external reference because I had such a hard time understanding the HUD code when I first started taking ownership of it.


    Inventory contains a list of Entities, so you'll want to look at Entity.cs and see what it does there. Paying careful attention to the GetComponent and HasComponent functions. You'd use a similar function to see if an item in inventory has a component that you want to look closer at.

    As far as which component classes to look at, it depends on what your plans are. ObjectMagicProperties.cs, Mods.cs, Sockets.cs, Weapon.cs, Quality.cs, are probably among the ones you'd want to check out. Map.cs is essentially empty, but you can check if it exists in the component lookup to know if an entity is a map (SkillGem.cs is similar), then you can check ObjectMagicProperties to see the rarity, and also check Mods to see what mods are rolled on it, Quality as well. Just to give you an idea of how you'd want to use the components that an entity has.
    Last edited by TehCheat; 08-15-2016 at 03:13 PM.

  8. Thanks Edg, Parog, ferrokarr (3 members gave Thanks to TehCheat for this useful post)

Similar Threads

  1. Is there a way to macro empty inventory on the ground ?
    By mmoivo in forum Diablo 3 General
    Replies: 7
    Last Post: 05-01-2014, 01:15 AM
  2. Replies: 1
    Last Post: 03-27-2010, 05:47 PM
  3. Is there a way to play WoW without connecting to any server or anything?
    By BumCowMan in forum World of Warcraft General
    Replies: 4
    Last Post: 03-27-2007, 10:40 PM
  4. is there any way i can make my own models?
    By Avianar47 in forum World of Warcraft Model Editing
    Replies: 6
    Last Post: 08-30-2006, 07:22 PM
  5. Is there a way to see herbs and metal at the same time?
    By Rustin in forum World of Warcraft General
    Replies: 7
    Last Post: 07-19-2006, 06:16 PM
All times are GMT -5. The time now is 04:18 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search