Download

Action RPG Inventory System

I don’t use JS over slate or UMG’s. UMG does use slate. JS does use UMG. :slight_smile:

UMG(WrapBox, {YourNiceAttribute:YourNiceValue},
your_inventory_items.map(entry =>
UMG(UImage, {Brush:{Texture:Texture.Load(’/Game/Nice/Image’)}}),
UMG(TextBlock, {Text: entry.get_friendly_name()} })
UMG(Button, {OnClicked: _ => { console.log(“YOU CLICKED” } })
)
)

Ah OK yeah i found making the background image as 3 parts is needed for the container UI so it scales right when adding more columns, you can what i mean by mine below.

This is very easily respwan system I’m working on has a few small bugs relating to the order I’m doing them in.

NOTE: if any one is interested in how to clear the hotbar slots when a item has been used, I can post on how this can be added in.

https://www.youtube.com/watch?v=KL36JRVPeBw&feature=youtu.be

By all means, post. :slight_smile:

I’ll second that :slight_smile:

When i get home from work, ill post a quick video up to show you guys how.

I lol’d :D, glad you got it figured out. Don’t hesitate to ask if you run into issues though.

@OverRated_AU - Awesome work on the sleeping bag spawn!
I would love to have a system in place just like that, but I’m also interested clearing the hotbar on item use :slight_smile:

I’m also still in need of some help… I created a Melee Combo system, but I can’t seem to find a proper solution to my final issue…
stopping player movement while swinging the weapon.
EDIT
Made it work! Sometimes you just have to walk away, do something COMPLETELY different and then come back to the problem and it works :slight_smile:

I’ve made a video showing the problem and “solution” But now I have it working exactly as I wanted by removing the IsMovementLocked variable and using IsAttacking instead and referencing the PlayerCharacter.
Everything compiles and works exactly as intended… but if anyone can see a problem with that change, please let me know!

https://www.youtube.com/watch?v=-19YtLfgyo4

That problem is easily fixed but i wouldn’t go deleting the movement logic from the PlayerController as that also used to close the container inventory when you move your character, You can ether cast to the PlayerController and add that logic back in for the movement logic in the character or you can just cast to the character from the movement logic in the PlayerController.

EDIT:

Here we go.

https://youtube.com/watch?v=8uhT4lZdric

Wanted to throw in a useful tip:

  1. If you want to be able to display amounts of an item for the inventory, there are 2 main places to do it. The first is the interact text. Go into the World Actor BP, add in an override for “GetUseActionText”, and make it like the following sample:
    ARPGIS_Tip1.png
    This makes it so a single poison apple displays “[E] Pickup Poison Apple”, but if it is a stack of 5, then it will display “[E] Pickup Poison Apple (5)”. The same can be done with the tooltip. Simply go into the tooltip widget, and in the “Get_Name_Text” function, make it look like the following:
    ARPGIS_Tip2.png

Oh, a tip I forgot would be to change in the InvManCom, is in the following area:
766f0a932c8792e0c121612ffca888856327c934.png
The original call in the BP was “Server Move Inventory Item” for an item that is, according to the comments, being unequipped. It’s something I noticed that differentiated the unequip drag vs right-click. Might be a useful snippet, and easy to fix. Just replace with the “Server Unequip to Inventory”.

If this has already been resolved, ignore me. I manually upgraded from the last patch.

Those are some very useful tips thanks for share :slight_smile: .

Thanks for sharing :smiley:

As for the Move vs UnEquip there was a reason at the time I had it built that way, but I will be changing it in the next update and I will post pictures (or a video if needed) on how to migrate the changes.
This will make things easier for people wanting the exact same execution path regardless of how they are Equipping/UnEquipping to attach your own logic for these actions.

Thank you! Very generous!

I’m also showing the Quality of the item in the tool tip as i have been working on a random Quality loot container which also adjusts there own stats based on there Quality.

Version 1.4 - Submitted March 17th 2016
------- Update Notes -------

This update fixes an issue with the UnEquip logic path when using the right mouse button (Use Item)

Inventory System:

Bug Fix Using Equipment Items will now call the UnEquip/**Equip **functions in all cases. (No more sneaky move item on right click)
Now when you drag drop or right click equipment it will always call either the Equip or Unequip function if that action is being performed.
[SPOILER]
[InventoryManager Component]

[/SPOILER]
Bug Fix The UpdateEquippedStats() function is now only called when an **Equip **or **UnEquip **happens.
Because of how the old way worked we were updating stats whenever items were moved around. Now it only calls the update when needed.
[SPOILER]
[InventoryManager Component]

Any custom logic you want to happen after an Equip or Unequip event should be called after the UpdateEquippedStats() function call in the EquipItem() and UnEquipItem() functions.

Awesome stuff, thank you as always, Pirate, for your continued support!

I’m thinking about buying this inventory but need to know if it can easily be modified to support items taking up multiple slots or character having multiple inventories like in this image.
inv.JPG

Yes and no there would be a huge amount of work to change it into a jigsaw inventory you would have to rebuild all of the UMG widgets, there would be less work to add item weights in.

Multiple inventories wouldn’t be to hard to impermanent.

Oh well. This inventory looks too nice not to get so I think I’ll get it and try to mash it together with the JCInventory to try and get that multiple slot functionality.

Easy is a pretty relative term. I know I can do that easily with the Inventory System but it won’t do it for you out of the box.
It can be easy for some and impossible for others. I think the hard part is coming up with a solid design and most of the work to achieve results like above is UMG/UI changes/logic (Jig Saw Slots).

I can think of a couple different designs to achieve that same result for storing items in tabs/clothing containers.

One way and probably the easiest is that you can setup your inventory so when you equip a backpack type item it gives you X amount of slots. Then you have the UI render a tab for this backpack type item and show how many slots it has. Because each backpack item will have it’s own assigned range of inventory slots you will know what items are in what backpack. Remember you just need to show the player the organization of the items in your UI. You don’t actually need to have items inside items inside complicated arrays. If they drop that backpack on the ground just spawn a item that looks like a backpack and put the items it had in it.
*(I can build a DayZ/Arma style UI using this method for the clothing containers. Weapons/Attachments and Clothing slots would be setup like the equipment slots are already a set of assigned inventory slots starting at 0)
*
Another way is to create a backpack item that actually has a container type inventory. Then you can store an array of these containers which have some properties (Name, Slot Count, etc) and when viewing your inventory on the client loop through these containers and draw them to the UI in the way you want. This will require a bit more logic as you will want to handle a bunch of new container to container interactions.

The Inventory System is a great base to customize into any game style and to build upon for new features. The UI is Drag and Drop themed but that is just the demo UI. The Inventory System itself can be used with any type of UI design with a little understanding of how it reads the UI Item Data from your Inventory Items.

If you are looking for a more complete solution for that design posted above, I think there is another inventory system on the marketplace that does this more or less out of the box already.