Help creating a custom larger inventory system

MintJulep

New Member
Reaction score
4
Basically, I'm trying to extend the hero inventory in my map from the default six slots to at least ten. I thought a system where I have each hero start out with a "Backpack" item would work, where clicking the backpack would swap out all the hero's current items with the backpack's items (leaving the backpack item still though). Clicking on the backpack item again would swap the backpack items with the original items, essentially giving the hero two inventories of five items each.

Easy enough, with just having a set of variables keeping track of the items in each inventory and a trigger recording everything picked up. But just now I ran into the serious problem that equipment in one inventory is totally negated as soon as you switch to the other inventory (for example, you'd have a sword with +10atk in one inventory, but switching to inventory 2 would make you lose the +10atk until you switched back, because the sword technically isn't in the hero's "real" inventory anymore).

I don't see any easy way out of this, so I'm hoping someone can help me here. Or, at least direct me to a tutorial for an already-made inventory extension system someone created...
 

Chao

Setting sail for fail in the sea of lame.
Reaction score
63
Unfortunately, that's correct. Your only way to potentially resolve that situation would be to only allow Permanents in one bag and Consumables in another; unfortunately, yes, once your hero switched to his other bag, he'd be depleted in the stats and buffs department, and that might affect his ability to perform in combat...
Another little option I kinda thought of while I was thinking about your question was to, if you have a spot free on the hero's skills section, create an ability that manually changed from bag A to bag B - that way you could have more items?
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
This has come up before... The only way is to add an aura that gives those bonuses...
 

MintJulep

New Member
Reaction score
4
Unfortunately, that's correct. Your only way to potentially resolve that situation would be to only allow Permanents in one bag and Consumables in another;

I was just thinking about doing this, actually. What'd you have in mind when you made this post? Like, maybe a dummy unit keeping a seperate inventory of consumables, and then clicking on the backpack would select the dummy unit, and then writing a trigger where using an item for the dummy unit would give and use the item for the hero? My idea would look graphically awkward, though (since it'd be really obvious when the dummy unit is selected).

Edit: Also a problem would be dropping items from the dummy unit...Hmm.
 

Chao

Setting sail for fail in the sea of lame.
Reaction score
63
ACTUALLY... maybe what you could do is quarantine a section of the map and whenever your hero picks up consumables, it goes to a "pouch" - the pouch can be a sheep or whatever, but when you consume something on the sheep, the consumable affects the hero, instead! This would be crazy triggering, if you wanted distinctly unique consumables, but you might be able to find a system whereby
"Vampiric potion is consumed"

"Create 1 Rune of Vampiric Potion at position of Hero --- Order hero to pick up Rune of Vampiric Potion"

That might solve your problems!
 

MintJulep

New Member
Reaction score
4
:) That's funny, what you posted just now, Chao, matches the post above yours almost exactly.

However, people will want to drop or sell their consumables sometimes, and if the dummy unit is carrying all of them in some far off corner of the map, it'll be very difficult to do either...
 

MintJulep

New Member
Reaction score
4
Well, I wrote up the script for having dummy units use the items, and it seems to be working. But there's still a major problem in having the dummy units drop and sell the items they're carrying - in order for them to give the illusion the hero is actually the one dropping and selling the items, they need to constantly be at the hero's location so that the dropping and selling items has a limited range (if instead the dummy unit was placed in the corner, it wouldn't be able to sell items to a shop the hero is standing next to, on the other side of the map).

The problem is, for the dummy unit to use and carry items, it can't hvae the ability Locust. So a trigger that constantly moves the unit right over the hero's head, will make things ultra-annoying for players as they accidentally select the dummy unit all the time. The only way out of this is to have a trigger that moves the dummy unit temporarily over the hero only when it's selling or dropping items, and afterwards quickly moves the unit back to the corner of the map, but I have no idea how to write -that- trigger.

Any help or ideas?
 

MintJulep

New Member
Reaction score
4
That's already the case (which solves the problem for +atk abilities and so on), but it doesn't help the dummy unit sell and drop items...

The main problem I'm having right now is actually the detection of people trying to sell or drop an item - there doesn't seem to be a clear event that's like, "Unit is ordered to drop an item". Otherwise, it'd be easy to replicate the effects.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top