Action RPG Inventory System

If you look at the ARPGIS project properties you will see it says a version number. 1.6, 1.7, 1.7.1

Why did you have to restart the editor? You would have just needed to compile and save a few of the umg widgets after making changes to the slots.

So you had to re-add the Equipment slots into the Equipment Window in UMG?. That seems crazy that they would just be deleted from your Equipment Widget, I don’t know what unreal is doing in your project but something is right messed.
Try deleting your saved, intermediate and build folders. Crashes can create a lot of bad data in those folders and cause issues.

The errors themselves are as they say. It’s getting a NULL reference. So somewhere something isn’t lining up. maybe a reference wire got unhooked during the initialize logic somehow.
But there were no changes to the InventoryManagerComponent so I don’t understand the missing properties errors.

Can you send me a support email.

I state in the blueprint tutorial that this is the case. Becasue physics isn’t synced if the item is in a different position on the server then the client it will create issues when you are trying to pick it up as the use happens server side.

You can change your game to do the Use check on the client just like the focus check does to draw the outline and use text instead of having the server fire the raycast on the server.
This way even if the item is in a different position the client will be able to still use it.

It was a design choice to have the use action done on the server but you are free to change this.

Hi,

I’ve spent 3.5 hours this morning just trying to figure out how to preload skeletons and urns/container pots with my own inventory items.

I’ve given up.

Can someone please put up a tutorial or steps own what you need to do to load these items up. Telling me to just look at the loot_hero and the loot_skeleton is not helping.

Thanks,

Arthur

Look at the Loot_Hero actor and you can see there is an overridden function from the Loot_Actor called GetLootList().
Because there is no way to store a DataTable reference yet (it’s been voted for on their answer hub as a new feature) you will need to override this GetLootList() function and simply plug in a new DataTable in the 2 nodes GetDataTableRowNames and GetDataTableRow.

You will also need to update the Min/Max Loot Items values to fit your needs.
Also make sure there are greater than or equal to number of items in your new LootList than what you set your max Loot Items value to.

So the tutorial to create a new Loot_actor reading from your own loot list is as follows.

1.) Create a new Loot List.
2.) Create a child actor of Loot_Actor.
3.) Override the GetLootList() function and copy and paste the logic from Loot_Actor and pick your new loot list.
4.) Specify your Min and Max Loot Items values (Making sure Max does not exceed the number of items in your loot list or it will give you an infinite loop error)

The values for Inventory Size and slots per row are only used if it’s a storage container. So keep Can Store Items unchecked if you want it to just be a lootable actor and not a container.
Looking at the Container_Actor and it’s child classes (Loot_Actor is a child of Container_Actor) shows just how simple it all really is to create usable and lootable containers.

I’ve spent another couple of hours trying to figure this out and I can’t seem to get it.

I want to add multiple containers on my map where I can load each container at game startup with specific items in the item list. I have not been able to do this so far.

I’ve played with the demo and like the way the loot skeleton works, but I can not figure out how to load it with out brute force. I’m having to change massive amounts of code to do this and I have to believe there is a better way.

I tried using the loot_skeleton and the container_pot. I finally figure out they were getting loaded from the container actor on begin play which calls initialize inventory. ONe thing I don’t get is how does the container pot get set up with a inventory size of about 12 versus the loot skeleton which only has 8. How does initialize inventory figure out which is which?

There is an option on the bluepritns default values that specifies the inventory size I think… also the Dead_Hero and the skeleton one take the items from a data table list

I am not sure what massive amounts of code you are changing to simply load new items into an actor when this is already setup for you and the tutorial above outlines how basic and simple it is.
This is also only one way to do it and the way I opted to demo with. You don’t need to use LootLists and DataTables. The inventory system doesn’t care how you load the items and plug them into the Inventory Component. Feel free to change these demo assets any way you want. They are just there to show you how you can interact with actors and the containers fire off logic to open and populate the container windows.

It sounds like you don’t understand the basics of inheritance. I will try and explain a bit about the usable_actors but epic has a lot of tutorials that cover basic blueprinting and this should be relatively straight forward to understand even at a basic level.

The whole usable actor blueprints are really quite simple and looking at them will show what they do. There is not a whole lot of variables or functions and logic to sift through.

A Usable_Actor is the Base Class. Then there are the child classes World_Actor, Usable_Door, and Container_Actor.
World_Actor is just a simple Usable_Actor that allows you to pickup the item so it has logic for it to look like the item it represents as well as trying to add it to your inventory on use.
Usable_Door is just a simple Usable_Actor that is setup to work like a door.
Container_Actor is a Usable_Actor with an Inventory Component added into it.

Now there are child classes of Container_Actor, Container_Pot and Loot_Actor.

Container_Pot is just a Container_Actor with some properties setup to make it work like a storage container we want it to be. A Pot with the values changed for size and row count.
Loot_Actor is just a container_Actor with some extra logic to load items into it’s inventory from a loot list and with the properties setup to say it’s not a storage container and can only be looted.

Now Loot_Actor has 2 child classes Loot_Hero and Loot_Skeleton. With simple changes to the properties/lootlists.

So if you want to make a new Loot actor you would just follow the tutorial I provided above that you asked for.
If you want to make it act like a container you can set it up that way by changing it’s properties.

You won’t see the inherited variables in the child classes unless you setup your editor to show inherited variables. You change these values in the class defaults as you can see them in the screenshot in the tutorial post.

Thank you very much for your work! Today I bought your program and wanted to put it on my project. I did everything in your video Tutorial - Action RPG Inventory System - Merging Into Your Project - YouTube but I did not succeed. Version 4.14.2, unfortunately I do not speak in English, and I find it hard to read the forum. Tell me what I need to fix. Many thanks !

Because after applying the hotfix steps it wasn’t working.

After evaluating the issue i noticed that besides the missing Equipment slots, the InventoryLayout content was no longer displayed inside the HudReference. Strange huh? :slight_smile: So i removed the InventoryLayout, r-added the InventoryLayout. After test a related controller reference made it self visible as broken, after fixing that reference, everything is back to normal :slight_smile:

Broken HudRef to InventoryLayout on initial initialize. Notice this was again not visible as broken, until removal/readding of the InventoryLayout to the HudReference
dd6a67f58320be1f7c0252b1e817a05da11bcdb3.jpeg

Success!
f54f71b2eb7d8b9c50b859769a0023af67395ea5.jpeg

I thought I replied to this yesterday. I didn’t see your reply to my post until after I post the second post so I’ve not been able to try your steps yet.

I’m sure they will work since you always give food answers.

I strongly recommend you put that little tutorial somewhere where it is easy to find (at the front of this thread?) since it will help newbies like me. I did look for one for about a half yesterday in this thread.

Arthur

Please send us a support email and do not link a download for the asset that others can also download. Send the link in email.

Yes OK . I have sent you email

IS there a way to make when droping some kind of items from inventory to be in bag or crate to be created and set timer for 2min destroy ?

I just purchased, i can’t find any tutorial on adding / removing items via blueprint.

I have a shop system set up yet I can’t figure out how to add / remove items directly using blueprint?

Thanks

Hello. There is probably a simple answer, but I still want to consult here. How can I add a new variable into InventoryStruct? When I add a new variable into InventoryStruct, it gives many errors. I want to add new values to the items, but I have to find a safe way to do this. What is the road to follow?

If you change the structure, you have to recompile all the blueprints that use it. That will sort out any editor errors, usually.

If your errors are cook errors, then you have to fix each one and recook. If all else fails (as it often does for me) there is the nuclear option: delete saved, intermediate, binaries, re-generate VS files, recompile in VS.

Errors from structure changes is an engine quirk (bug, imo).

Anyone can some one help

If you want the dropped item to self destroy after 2 min, you can set the actor lifespan to 120 seconds

Good afternoon ! Two days ago, I sent a letter in the mail support with the project file, which does not work your prilozhenie.Kak skaoro me to wait for an answer? Thank you