Buyer's inventory is always shown

Hi there,

Thank you for your hard work with this patch.
One of my maps heavily relies on old hero&inventory systems and I’m testing it against the PTR patch to find any inconsistencies.

I’m having a problem with Inventory system improvement “6. Show Buyer’s Inventory”. It is stated that neutral shops will show the buyer’s inventory as long as they does not have an inventory itself and the inventory panel is not overridden to show a specific unit’s inventory.
In my map, there is a possibility to loot dead units or chests using the combination of interact ability and inventory system. Situation is as follows (I added <ShowForAllPlayers val="True"/> to better visualize the problem)

  • dead body has an inventory (8 slot bag), overridden option let’s me see it
  • when footman gets close, Interact ability gives me control of the body unit but also body unit’s inventory is replaced with footman’s (buyer)

https://www.dropbox.com/s/onmgin2204k4dyu/buyerinventory.gif?dl=1

Body unit certainly has an inventory itself so it shouldn’t show me the buyer’s inventory. I also tried different alliance settings between the player and body owner but no luck. I don’t know what is the last option (override to show specific unit inventory) as I haven’t found it in the PTR files.

Regards
Matic

override a inventory is the same as override a command card. Just hook up the Inventory plane as a dialog item, and then ‘set unit group’ for the dialog item

Thank you Renee.

With your hint I was able to come up with an workaround. However I feel like I’m fighting one new feature using the second one. I’m basically using “Globally Accessible Inventory Panel” to set the Inventory Panel’s unit everytime the selection changes and it’s very clunky even with a noticeable delay. Also, it causes that I can see the inventory even though I’m too far for the interact ability to trigger, exactly as I would have <ShowForAllPlayers val="True"/> set. Of course, I can work around it further to add special checks for the triggers to detect if I’m close enough or if the Interact ability triggered etc. Nevertheless, I would be very grateful if you could add a simpler option to bring back the old behavior.

If anyone is wondering the script I used looks like this:

Inventory Fix Select
    Events
        Unit Selection -Any Unit is Selected by player Any Player
    Local Variables
    Conditions
    Actions
        Dialog -Hooks up an existing Invnentory Panel in the standard UI called "UIContainer/ConsoleUIContainer/InventoryPanel"
        Dialog -Set (Last created dialog item) unit group to (Unit group((Triggering unit))) for (Player group((Triggering player)))

(Make sure you hook “Inventory Panel” and not just “Panel” as it cost me 2h to figure out :wink: )

Regards
Matic