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.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top