• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Increase the size of the inventory.

Level 4
Joined
Oct 9, 2024
Messages
59
I'm working on an RPG map and have encountered a major issue: the limited number of inventory slots for heroes. The default 6 slots are too few in a game where items are frequently dropped. Is it possible to increase the inventory capacity to 12 slots, or perhaps create an item like a 'bag' that can store other items? Any help to expand the inventory options would be greatly appreciated!
 
Level 20
Joined
Mar 16, 2008
Messages
811
Would love someone to prove me wrong but - there's no good way to do this besides making a web of triggers that move items around to give the illusion of larger inventory. Even then, the hero will only get benefit/use of 6 items actually in the inventory. Some Hive users have made systems/bundles to do this with custom UI but idk anything about those.

One of my maps uses a bag/bank system that can swap items into/out of a bank when a "deposit in bank" ability is used. You could copy that one if you want but one of the bundles might be a cleaner option.
 
Level 42
Joined
Feb 27, 2007
Messages
5,298
there's no good way to do this besides making a web of triggers that move items around to give the illusion of larger inventory
By storing all of the item abilities in some sort of database rather than using the items to directly supply their abilities/stats to the unit holding them, it is possible to have the effects of any N items 'active' at once. Most equipment or inventory systems use this method. Here are two quick searches in the resources subforum to see what shows up.
 
I'm working on an RPG map and have encountered a major issue: the limited number of inventory slots for heroes. The default 6 slots are too few in a game where items are frequently dropped. Is it possible to increase the inventory capacity to 12 slots, or perhaps create an item like a 'bag' that can store other items? Any help to expand the inventory options would be greatly appreciated!
If you want the bad easy way,

Multiple inventory abilities stack as long as they're from an item or different abilities on the hero or unit. You'll need to save every item into an array to each units data then after 6 you'll need an alternate way to view 7+ slots. Also a specific remove item action too to take them out of the 7+ slots otherwise may have lingering ability bug.
 
Level 42
Joined
Feb 27, 2007
Messages
5,298
Well if the map is protected nobody can know for sure. You could ask the authors of that map. Or you could describe it in detail to see if anything that already exists is close. But without information about what goes on in Gaia's Retaliation there's not much anyone here can tell you.
 
Level 4
Joined
Oct 9, 2024
Messages
59
Your idea sounds good, Elprede. A unit without textures—could it interfere with the game in any way? Would it block paths for other units? Could it take damage? Additionally, how could I make it consistently follow the main hero
 

Remixer

Map Reviewer
Level 33
Joined
Feb 19, 2011
Messages
2,067
A unit without textures—could it interfere with the game in any way?
Potentially with some coding, but you can always account for it.

Would it block paths for other units?
No, since you can give the Ghost ability to it, making other units ignore its collision.

Could it take damage?
If you want to. But it doesn't have to.

Additionally, how could I make it consistently follow the main hero
Most typical solution is probably to constantly (periodically) move the inventory unit to the location of the corresponding hero - or alternatively move it when it is interacted with.
 
Most typical solution is probably to constantly (periodically) move the inventory unit to the location of the corresponding hero - or alternatively move it when it is interacted with.
Assuming it can still move, couldn't you just have it "right-click" ("smart" order) the real hero at the start of the game? Then whenever the hero is revived after it dies, move it back to the hero's position and have it "right-click" it again. Although that way you'd also have to account for teleportation abilities/items.
 

Remixer

Map Reviewer
Level 33
Joined
Feb 19, 2011
Messages
2,067
Assuming it can still move
You can always move units through triggers.


couldn't you just have it "right-click" ("smart" order) the real hero at the start of the game
You could, but like you said you need to keep track of events that might interrupt that chain of movement, or when the inventory unit is given another command (like drop an item).
 
Top