Download

Action RPG Inventory System

In the Action RPG Inventory System demo player controller this is already setup to address those issues. I am not sure what is different in your project without being able to see it myself.
You said everything works fine when you play in editor with dedicated server checked, so I’m not sure why you would need to make any code changes in your project to get things to work with your projects dedicated server.

You shouldn’t need to set the PlayerInventory to replicate because of how Unreal works. The client and the server will both run the initialization code.
But since you have your own setup for initializing your player controller you need to make sure the server version is setting the PlayerInventory when it inits the InventoryManagerComponent.

If you look at the Demo init function you can see what gets called by the server/client and what gets called by the client only in this screenshot.

But none of this explains why it works normally, but not with your projects dedicated server.

Is this migrated into your own project? Muppet and Tandy are setup with the Interface to make them lootable and have the EquipmentInventoryComponent like a player has. Maybe during your migration the interface was unhooked?
It’s very similar setting up a character to be looted as any other actor like the loot containers. They just need an InventoryComponent and the Usable Actor Interface and Inventory Interface and the implementation of the interface functions.

Yes that is migrated into my own project :slight_smile: Oh you’re right I was just forgetting to actually add the ‘inside’ of the functions, they were there but just had the base and return node for some. That’s super helpful for the lootable players.

However I’m still having an issue with those NPCS…If I switch back to both inventoryplayer and the controller instead of mine, the NPCS work, but not with my character. My character can still open pots/ skeletons and pick up items though.

In your Demo controller, you initialize via BeginPlay, which is called by both Server and Client.

I guess I can call the Initialize twice when the Client joins the server, once by Server and once by Client.

Yes, this worked. Just for a future reference for anyone who does implement the Gameplay Framework (using GameMode to control client spawning) and wants to make sure everything spawns correctly when loaded instead of using the BeginPlay with delay, the initialization needs to be called by both the server and the owning client right after Character possess in the OnPostLogin.

I am glad you got it worked out :smiley:

You need to update the OnActorUsed() functions inside Muppet and NPC (Since the Tandy example is a child of NPC) and change the Cast node Cast To Inventory Player Controller to cast to your own player controller.
That’s why it works normally but not with your player controller.

Do you mean the Controller possess?

I
Yup again that worked. And thanks to your explanations, I have a much better understanding of the system as a whole now :slight_smile: Is there anything I need to do to have my starting loadout be in the actual equipement sheet also ? Right now if I try to loot someone else, I can loot them all good, and I do have my starting items as well on me, but I can’t see them in the equipment slots if that makes sense. Like my helmet is visible on me, but I cannot see any of those items equipped when on the character equipement sheet ( when I press C basically there’s nothing there) .

I need some help with the Action RPG Inventory System. I have about 99% successful integration of your plugin into our game project, but I’m stuck on one bug that I cannot seem to track down. When an item is looted from Muppet (or other), the associated mesh item is removed from Muppet’s body, added to the player’s inventory, but the item image/slot is not removed from the container window. The icon will not go away but when all items are looted, the window closes like it’s supposed to and cannot be opened again. Could you please assist?

I would like to request some help with the Action RPG Inventory System. I have about 99% successful integration of your plugin into our game project, but I’m stuck on one bug that I cannot seem to track down. When an item is looted from Muppet (or other), the associated mesh item is removed from Muppet’s body, added to the player’s inventory, but the item image/slot is not removed from the container window. The icon will not go away but when all items are looted, the window closes like it’s supposed to and cannot be opened again. Could you please assist me with this issue?

Yeah, the target Controller possesses the passed in Pawn in the custom GameMode event called during the OnPostLogin event which is also in the GameMode.

possessinit.PNG

The first Custom Character Init is an event, (which is being called on the server since we are in my custom GameMode) in my custom Character blueprint that sets up certain variables and will eventually call the initialize event in my custom Player Controller that will set up the Inventory. The second is a RPC to the owning client which will eventually call the same init function on my Character blueprint. So first server, then client calling the same intialize.

What version are you using? and if it’s an older version have you applied all the updates? The Inventory UI refreshes to reflect your startup items already in the project. Perhaps something got unhooked when you migrated? Or you are initializing the Client Inventory UI before loading your Startup Items on the Server.

In your Initialization the Server Inits the Inventory/Loads the startup items into the Players Inventory(Remember all items are owned by the Server on the Server version of the InventoryComponent, the Client just gets it’s UI updated to show what they have) then after that you would call on the Client *InventoryManagerComponent->*Client Load Inventory as this is where the UI gets initialized/built for the Client. If there are items in the Server Inventory when you initialize the Client UI it will call the Event Server Refresh Inventory Slots after it’s finished creating the Client UI. This event will make sure that all items on the Server will sync to the Client UI.

reload_inventory_UI.png

If you need to refresh the whole UI on the Client yourself you can always call the Event Server Refresh Inventory Slots as a simple way to sync the Client UI with the Server Inventory Items.
But since your issues is with startup items simply initializing the Client UI after loading the startup items will do it for you.

Thanks a lot for the answer ! I indeed didn’t update the system since I merged it, guess now’s the time to go through those updates :slight_smile:

Just a heads up, I have asked Epic to put the Action RPG Inventory on sale with 20% off for a week starting tomorrow April 20th 2016.
So it should be updated on the store tomorrow at some point as they haven’t contacted me saying otherwise.

I wanted to mention that I was having a similar issue to a post mentioned here. I have enemies have equipped items be randomized, but after they die and go into ragdoll, they cannot be looted, even though the blueprint specifies for it. Here is the weird thing: If by default I set the “IsUable” boolean to true, when my AI runs around, they can be looted. It seems only when the default is set to false that it does not work.

Gage, Make sure you set the variable to ’ is usable ’ to true when they ragdoll and not before.
Also, since there’s a difference in physics generation between client and server, the enemy you might be trying to loot might be at a different spot than he is on the server if that makes sense :slight_smile:

If this is only happening on Muppet I would suggest going into the Muppet Blueprint and make sure each of the Interface Functions are all setup. Sometimes they can get unhooked when migrating. For the behavior you are seeing I would check the Interface Function GetContainerInventory first to make sure it is returning a reference of Muppets InventoryComponent.

If you are still having issues drop me a message at support@vanguardinteractive.com

Exactly if you are having troubles looting ragdolled corpses it’s because the servers position of the corpse and the clients can and most often will be different. This is the same issue you will run into with physics items. If you drop most items they will land in the same spot but things like apples may roll or when you kick them around they will get out of sync. That’s why in most multiplayer games physics is used for visual and not gameplay things. Like when a wall explodes it doesn’t matter if all the chunks land in the same place. You can sync physics over network in unreal but it’s not recommend and will be extremely bandwidth intensive.

If you are making a physics heavy game you can always change it to do the USE Actor check client side, then just tell the server what you want to use. If you do this though I would suggest trying to add in some anti hacking logic/checks to make it a little more secure though.

I’m happy this is on sale! Such a great asset for anyone building any game that has an inventory.

I was building an inventory system in C++ and bought this as an extra reference. Was happy to see this was component based system, so props for doing it in a good way.

What really drew me in was the way the items are equippable and displayed over the network. I’m interested in a weight painting tutorial for Maya, binding the item meshes to the skeleton. The weapons tutorials was a great reference, just need to similarly make sure I do weighting properly.

I saw it mentioned early in the thread but didn’t see it on Pirate’s YouTube channel. Maybe there is a guide someone can point me to?

edit: especially a guide on exporting parts off of infinity blades chars