• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Increase the size of the inventory.

Status
Not open for further replies.
Level 5
Joined
Oct 9, 2024
Messages
77
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!
 
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.
 
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.
 
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
 
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.
 
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).
 
Status
Not open for further replies.
Back
Top