Why would I want to use this over Roblox’s supplied backpack or other alternatives that already exist?
Roblox’s supplied backpack doesn’t give you the developer much control and other open source alternatives don’t give you that much customization without having to dig into their code or simply just lack basic features. BackpackManager on the other hand is feature rich with an exposed API, easy to tinker settings and you can easily even edit the templete slot the module uses. ( When editing any templete, be sure not to rename, move or delete any instance that already exist because it could break the module!)
BackpackManager’s main features include:
Supports all platforms (PC, Mobile, Console and VR)
Automatically calculates how many tools can fit at once (The smaller the screen the less tools you’ll be able to have at once) which can be configured in the settings
Remap slot keybinds
Configurable spacing of tools
Supports using ViewportFrames for displaying tools
Locking certain tools to prevent them from being equipped
Signaling of certain events (tool added, tool removed, inventory opened, inventory closed, hovering, etc)
Cycle through tools using your scroll wheel (If configured in the settings)
Hello! Everything is working fine for the most part, but I noticed that if you move an item out of the hotbar and into the backpack, and then give yourself that item again, the stack numbers appear in the hotbar slot the item was previously in, instead of its new slot in the backpack;
Hey, it looks like I made a small mistake adding the line ToolFrame = BackpackManager:GetFrameFromTool(Tool) to line 97 in the script named “BackpackScript” should fix this.
Hi, I really like this system, but I ran into an issue when changing the keybind to open the inventory from backquote to E. There’s a bug where I can only open the inventory once using E, and then it stops working. I’m not sure why.
I changed the backquote to E in the “Settings.INVENTORY_OPENANDCLOSE_KEYCODES” and “HINT_BUTTON_ICONS” tables.
Hey, thanks for bringing up this issue this should be fixed in the latest release. I also saw that you were experiencing an attempt to index nil error relating to the tool dragging logic so I fixed that too.
Still not working for me. Pressing E isn’t doing anything after changing it.
(Edit: Nevermind, I fixed it somehow, I think because I used the GUI from the test place)
is there a way to only have hotbar slots like 1 - 6 , 6 being the max tools you can ever have, and there is no way to open the backpack, AND if you pick up a 7 th tool, or try to , it will not go into the overflow backpack and you cannot pick it up until there is a free slot available 1 - 6 . meaning you cannot pick up 7 or more… (I know you can disable the ` key, so the backpack does not open, but that does not disable overflow of tools going into the backpack. )
if 2 is possible, and you only have slot 1 - 6, and currently say slot 1 is active / enabled, if you pick up a 7 th tool, because slot 1 is active, it will first drop slot 1 tool, and allow you to pick up the 7 th tool, which goes into slot 1.
to drop a tool, is there dragging a tool out of a slot area, into the workspace out side of the hot bar (Not the backpack) so you can drop tools by dragging them.
This script holds all of the configuration settings of BackpackManager. The setting called MaxHotbarToolSlots controls the maximum amount of tools allowed to be displayed at once in the hotbar. By default, this value is set to 10 changing it to 6 would make 6 the maximum amount of tools you can ever have in the hotbar. But the maximum amount of tools is also determined by the client’s screen resolution in respect to the MaxHotbarToolSlots value. Meaning, you can have the maximum hotbar slots set to 10 but BackpackManager may only allow 5 if the clients screen resolution is too small. If you want to disable this behavior you would set AutoCalculateMaxToolSlots to false.
If you want to disable opening the inventory then you would do the following in a new script:
local BackpackManager = require(BackpackManager)
BackpackManager:DisableInventory()
You also cannot disable tools from going in your inventory, if there is no space left in the hotbar for an extra tool then they will go in your inventory no matter what. Your best solution to what you’re trying to achieve is to just check how many tools a player has before-hand before letting a player pick up a tool.
Yes, this is possible but you would have to script it yourself using BackpackManager’s API. BackpackManager provides functions for the developer such as BackpackManager:GetToolFromNumber() to allow you to implement custom behavior.
Yes, this is also possible using BackpackManagers API. You would use BackpackManager.DragEnded to signal to your script when a drag has ended then implement your own custom behavior.
How would I go about hiding the hotbar along with the inventory? I didnt seem to find a disablehotbar in the api or maybe it went over my head. Im planning to use it to along with SetCoreGuiEnabled to hide them both in certain cases like a loading screen where i dont want the gui to be visible