What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Bag Slots

erxxlu

New Member
Joined
Jan 8, 2013
Messages
177
Reaction score
0
Maybe I understood something wrong about this but here's my problem.


my settings are as follows

Free Bag Slots for Town Run: 1
Free Bag slots in town 10

first three columns are protected bag slots

11 Free Slots for 2-Slot Items +1 1-Slot Item so 23 free Slots in total.

Trinity says: No more space to pickup a 2-slot item
 
Change your Free Bag Slots for Town Run to 4-6 :)
Change your Town Run Bag Slots to 20 :)
 
That didn't work for me.

[Trinity] No more space to pickup a 2-slot item, now running town-run routine.

When there still is more than enough space for 2-slot items.
 
Same here.
It's like 4th topic about it - looks like some people are having troubles with that and others don't...
 
Same here, seems to go back to town whenever I have less than 25-26 free slots (while settings say 4) out of the 40 unprotected ones in my backpack (2 bottom rows are protected and filled with items). I even went to check Trinity code, but the logic is fine as expected. Unless DemonBuddy is sending wrong information to Trinity about what is where (but then nothing rrrix can do to fix it)

And question for those that don't have any issue with it: where are your protected slots and are they filled?

Edit: think I found the cause, testing some Trinity changes then I'll post if it works
 
Last edited:
The bug is that Trinity is counting items in protected slots twice (once for being a protected slot, a second time for the actual item in it) when checking the amount of free bag slots left.

To fix it (in Trinity 1.9.1 at least), open ...\Plugins\Trinity\Items\ItemHandling.cs and look for that code around line 989 (at the end of the file)

Code:
// Map out all the items already in the backpack
foreach (ACDItem item in ZetaDia.Me.Inventory.Backpack)
{
    if (!item.IsValid)
        continue;

    int inventoryRow = item.InventoryRow;
    int inventoryColumn = item.InventoryColumn;

    // Mark this slot as not-free
    BackpackSlotBlocked[inventoryColumn, inventoryRow] = true;
    freeBagSlots--;

    // Try and reliably find out if this is a two slot item or not
    if (item.IsTwoSquareItem && inventoryRow < 5)
    {
        BackpackSlotBlocked[inventoryColumn, inventoryRow + 1] = true;
        freeBagSlots--;
    }
}

And replace it by this:

Code:
// Map out all the items already in the backpack
foreach (ACDItem item in ZetaDia.Me.Inventory.Backpack)
{
    if (!item.IsValid)
        continue;

    int inventoryRow = item.InventoryRow;
    int inventoryColumn = item.InventoryColumn;

    // Mark this slot as not-free
    if (!BackpackSlotBlocked[inventoryColumn, inventoryRow])
    {
        freeBagSlots--;
        BackpackSlotBlocked[inventoryColumn, inventoryRow] = true;

        // Try and reliably find out if this is a two slot item or not
        if (item.IsTwoSquareItem && inventoryRow < 5 && !BackpackSlotBlocked[inventoryColumn, inventoryRow + 1])
        {
            freeBagSlots--;
            BackpackSlotBlocked[inventoryColumn, inventoryRow + 1] = true;
        }
    }  
}
 
Last edited:
The bug is that Trinity is counting items in protected slots twice (once for being a protected slot, a second time for the actual item in it) when checking the amount of free bag slots left.

To fix it (in Trinity 1.9.1 at least), open ...\Plugins\Trinity\Items\ItemHandling.cs and look for that code around line 989 (at the end of the file)

Code:
// Map out all the items already in the backpack
foreach (ACDItem item in ZetaDia.Me.Inventory.Backpack)
{
    if (!item.IsValid)
        continue;

    int inventoryRow = item.InventoryRow;
    int inventoryColumn = item.InventoryColumn;

    // Mark this slot as not-free
    BackpackSlotBlocked[inventoryColumn, inventoryRow] = true;
    freeBagSlots--;

    // Try and reliably find out if this is a two slot item or not
    if (item.IsTwoSquareItem && inventoryRow < 5)
    {
        BackpackSlotBlocked[inventoryColumn, inventoryRow + 1] = true;
        freeBagSlots--;
    }
}

And replace it by this:

Code:
// Map out all the items already in the backpack
foreach (ACDItem item in ZetaDia.Me.Inventory.Backpack)
{
    if (!item.IsValid)
        continue;

    int inventoryRow = item.InventoryRow;
    int inventoryColumn = item.InventoryColumn;

    // Mark this slot as not-free
    if (!BackpackSlotBlocked[inventoryColumn, inventoryRow])
    {
        freeBagSlots--;
        BackpackSlotBlocked[inventoryColumn, inventoryRow] = true;

        // Try and reliably find out if this is a two slot item or not
        if (item.IsTwoSquareItem && inventoryRow < 5 && !BackpackSlotBlocked[inventoryColumn, inventoryRow + 1])
        {
            freeBagSlots--;
            BackpackSlotBlocked[inventoryColumn, inventoryRow + 1] = true;
        }
    }  
}

Or you can just download my version of the file to replace it if that's easier for you (again, only tested in Trinity 1.9.1). Also if anyone already has everything setup to send a merge request to rrrix, feel free to do it (Edit: finally figured that Git stuff, so sent a merge request for the changes)


Thank you very sir.

I first noticed this a few hours ago and started tinkering with the settings before searching and found this thread. My issue is that it will actually leave a legendary on the ground and leave the game in something like a Ghom run. Even with your fixes, it would still have the chance that it is too full to loot and will go to town then leave game (much less of a chance, but it's still there). I know this because I watched it leave a legendary (that I didn't care about) that dropped while running.

It isn't actually running a town-run routine when it says it will.

EDIT: As of writing that post, it tried leaving a Zuni piece behind.
 
Downloaded that file now it still wont work...

I am stuck in a loop

[Trinity] No more space to pickup a 2-slot item, now running town-run routine.
[Trinity] TownRun complete
[Rift Bot] Enter Rift
[Trinity] No more space to pickup a 2-slot item, now running town-run routine.
[Trinity] Waiting for town run timer (Target Check)
Using town portal
Townportal successfull, we are in town!
[Trinity] No more space to pickup a 2-slot item, now running town-run routine.
 
Thank you very sir.

I first noticed this a few hours ago and started tinkering with the settings before searching and found this thread. My issue is that it will actually leave a legendary on the ground and leave the game in something like a Ghom run. Even with your fixes, it would still have the chance that it is too full to loot and will go to town then leave game (much less of a chance, but it's still there). I know this because I watched it leave a legendary (that I didn't care about) that dropped while running.

It isn't actually running a town-run routine when it says it will.

EDIT: As of writing that post, it tried leaving a Zuni piece behind.

the bot does not make room to loot the legendary/set? should I turn off all looting?
 
At least here with DB .403, Trinity 1.9.1 and QuestTools 2.0 it has been flawless (both on deciding when to stop fighting to clear inventory and when to take a salvage break in town before starting a new run) since I changed the ItemHandling.cs file.

Check that your free bag slots for town run/in town settings make sense for what you're doing (and that the profile you're using isn't forcing a town run with a too high free slot threshold for chain town runs)
 
Had this problem since the start of RoS versions, always counted protected slots twice, figured they would've fixed this already but guess not.
 
The bug is that Trinity is counting items in protected slots twice (once for being a protected slot, a second time for the actual item in it) when checking the amount of free bag slots left.

To fix it (in Trinity 1.9.1 at least), open ...\Plugins\Trinity\Items\ItemHandling.cs and look for that code around line 989 (at the end of the file)

Code:
// Map out all the items already in the backpack
foreach (ACDItem item in ZetaDia.Me.Inventory.Backpack)
{
    if (!item.IsValid)
        continue;

    int inventoryRow = item.InventoryRow;
    int inventoryColumn = item.InventoryColumn;

    // Mark this slot as not-free
    BackpackSlotBlocked[inventoryColumn, inventoryRow] = true;
    freeBagSlots--;

    // Try and reliably find out if this is a two slot item or not
    if (item.IsTwoSquareItem && inventoryRow < 5)
    {
        BackpackSlotBlocked[inventoryColumn, inventoryRow + 1] = true;
        freeBagSlots--;
    }
}

And replace it by this:

Code:
// Map out all the items already in the backpack
foreach (ACDItem item in ZetaDia.Me.Inventory.Backpack)
{
    if (!item.IsValid)
        continue;

    int inventoryRow = item.InventoryRow;
    int inventoryColumn = item.InventoryColumn;

    // Mark this slot as not-free
    if (!BackpackSlotBlocked[inventoryColumn, inventoryRow])
    {
        freeBagSlots--;
        BackpackSlotBlocked[inventoryColumn, inventoryRow] = true;

        // Try and reliably find out if this is a two slot item or not
        if (item.IsTwoSquareItem && inventoryRow < 5 && !BackpackSlotBlocked[inventoryColumn, inventoryRow + 1])
        {
            freeBagSlots--;
            BackpackSlotBlocked[inventoryColumn, inventoryRow + 1] = true;
        }
    }  
}

Tried copy pasting this, having a compile error.
 
I have the same problem too.
However, the more weird thing is my barbarian has this issue when my wizard doesnt.
Any explain for this? :D
 
My patch was supposed to fix problem with endless town run due "No more space to pickup a 2-slot item" state. Can some one confirm fix or not-fix for OP issue?
 
My patch was supposed to fix problem with endless town run due "No more space to pickup a 2-slot item" state. Can some one confirm fix or not-fix for OP issue?
I can confirm it, your fix did the trick ;)
 
I will also test it later and report if its been fixed from a different machine running 3 clients.

I looked at the .cs file's logic and you have what we call "spaghetti" code everywhere with non-configuration based magic numbers "your bag slot number for example".

The error handling is also not as elegant as I'd like it to be. For example, this bug about the bag slot should have been able to override it. Meaning yes, show the error in the log like you are doing now, but give the ability to override or turn off town runs so that all the additional logic you have baked around checking bad slots + the vector size*bad* + check town runs can be cut out with a configuration value. This would have allowed everyone to continue operational and circumvent this error.

Let me know if you need help with things :)
 
Back
Top