Action RPG Inventory System

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 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.

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.

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

How long will it be on sale?

Until tuesday/wednesday

Can this be used in multiple creatures as if they were controlled by the player? For instance you click on one creature, that is the player and you can do things with its inventory, you can only do if it was the player. Then you choose another creature and its inventory has the same feature set as the previous creature you controlled. Or is it designed to be used with just one creature as the player? Hope my question makes sense.

If you keep the inventory component on the player controller they can all share the inventory.
If you move it to the Character then each character can have itā€™s own Inventory.

In the demo the player has the Inventory on the controller and itā€™s quite trivial to move it to the character. The NPCā€™s have it on the character.
So depending on the type of game you want it is fairly easy to move it to the places you want.

When changing the controls to more of an FPS style, as instructed in your video tutorial, I noticed that the cursor has unwanted behavior. Whenever UI Mode is true, the cursor will appear in a random place (wherever it was last, but just hidden). This can get annoying for the player. Could anyone give me advice on how to make the cursor locked to one area? Instead of just appearing wherever it was last? That way, when youā€™re running around and open something up, you can have a good idea of where your cursor is going to show up, for example, the center of the screen.



	APlayerController* PlayerController = Cast<APlayerController>(GetController());

	if (PlayerController)
	{
		const ULocalPlayer* LocalPlayer = PlayerController->GetLocalPlayer();
		if (LocalPlayer && LocalPlayer->ViewportClient)
		{
			FViewport* Viewport = LocalPlayer->ViewportClient->Viewport; 
			if (Viewport)
			{
				FVector2D ViewportSize;
				LocalPlayer->ViewportClient->GetViewportSize(ViewportSize);
				const int32 X = static_cast<int32>(ViewportSize.X * 0.5f);
				const int32 Y = static_cast<int32>(ViewportSize.Y * 0.5f);

				Viewport->SetMouse(X, Y);
			}
		}

	}

Hi @Pirate

I bought it. I am impressed with this inventory system.

Thanks

how would you go about getting how many, of a certain item, you have in your inventory, from a new blueprint.