Announcement

Collapse
No announcement yet.

Action RPG Inventory System

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Hey guys,

    i am almost ready with customizing Pirate's Inventory System to my needs. I really appreciate his great support and this system saves me at least several months of time for learning and making such a reliable system on my own.
    However, i still have some minor issues i couldn't solve.

    1. How can you prevent dragging the inventory/equipment windows off screen?

    2. I have some backpacks in my game. If i pick one up i increase the inventory slots and on drop i decrease it again and it all works fine. But, if i move the inventory window the slots are not getting updated. The number of the slots is correct. But the displayed slots are not getting updated.

    I hope you understand what i mean.

    Maybe i should make a video...

    I made a video:

    Attached Files
    Last edited by ZenRigpa; 08-03-2016, 05:15 PM.

    Comment


      Originally posted by ZenRigpa View Post
      Hey guys,

      i am almost ready with customizing Pirate's Inventory System to my needs. I really appreciate his great support and this system saves me at least several months of time for learning and making such a reliable system on my own.
      However, i still have some minor issues i couldn't solve.

      1. How can you prevent dragging the inventory/equipment windows off screen?

      2. I have some backpacks in my game. If i pick one up i increase the inventory slots and on drop i decrease it again and it all works fine. But, if i move the inventory window the slots are not getting updated. The number of the slots is correct. But the displayed slots are not getting updated.

      I hope you understand what i mean.

      Maybe i should make a video...

      I made a video:

      Thats actually a engine bug that got introduced in 4.11 the bug report can be found here , the only option for now is to disable the drag on the container window or do what i did when i remade my inventory was to create a UI which didn't need to be dragged.


      This is what i have done with my inventory system this isn't draggable, its based on the ARPG Inventory's logic and as a learning experience i recreated the whole inventory on a clean project on 4.12 to understand every element of the system and also to keep it as clean as possible and focused on a survival game inventory system, still in the process of working on the crafting UI.
      Last edited by OverRated_AU; 08-22-2016, 10:17 PM.

      Comment


        [MENTION=190677]OverRated_AU[/MENTION]: Wow, thats really nice work you did there with your Iventory! And thank you for straighten things up with the Drag Issue^^ So i just have to disable the Drag Function and adjust my inventory design.

        Comment


          Originally posted by ZenRigpa View Post
          [MENTION=190677]OverRated_AU[/MENTION]: Wow, thats really nice work you did there with your Iventory! And thank you for straighten things up with the Drag Issue^^ So i just have to disable the Drag Function and adjust my inventory design.
          Thanks, Yeah just bypass the widget drag for the container until the bugs fixed my guess it wont be fixed any time soon as its not a high priority issue.

          To stop the dragging windows off screen you need to override OnDragCancelled inside the widget and add the following nodes.

          Click image for larger version

Name:	Untitled-1.jpg
Views:	1
Size:	112.2 KB
ID:	1112995
          Last edited by OverRated_AU; 08-04-2016, 12:49 PM.

          Comment


            My game is based on the controller switching out characters. I have been playing with your inventory system trying to have the UI display the inventory based on who is currently possessed. My initial attempt was to add a few muppets around with cam components. Then I would just keep the InventoryManager component on the player controller.

            However this is not working well. I can bounce between the characters and the inventory and equipment updates correctly in the UI, but the gold and inventory size do not. I see this is because gold and inventory size are stored in the InventoryManager component. Is that the intended location for this? It seems more appropriate that they should be tied a specific inventory. If this is intended, should I be adding an InventoryManager to each possessable character instead of the single one in my PC? Just want to understand thought process and open to suggestions.

            Thanks
            Jake

            Comment


              Working on a save system for all clients...(each client saves locally using a MySaveGame type variable)

              Everything seems to save/load correctly for each client (level, gold, skills, etc.) ... except the inventory (it seems to only load the Server's Inventory)

              All I am doing is creating a "SaveInv" variable of type "InventoryItem" in my SaveGame blueprint

              and then setting SaveInv = PlayerInventoryComponent>Inventory

              But it seems to only be loading the Server/Host Inventory

              Click image for larger version

Name:	blueprint_screenshot.jpg
Views:	1
Size:	453.3 KB
ID:	1113077


              EDIT: I think its saving correctly but for some reason when I load... its loading the Server's Inventory (instead of client's)


              Is this a good way to load a previously saved inventory? (please see below)

              Click image for larger version

Name:	blueprintLOAD2.jpg
Views:	1
Size:	495.8 KB
ID:	1113079

              Click image for larger version

Name:	blueprintLOAD.jpg
Views:	1
Size:	459.0 KB
ID:	1113078



              Thanks
              Last edited by wrfstudios; 08-05-2016, 06:30 PM.

              Comment


                Could I request a tutorial on re-skinning (I think this is what its referred to) the skeletal meshes to another skeleton structure like Mixamo?

                There is a huge lack of tutorials on the subject, closet thing I could find was this tutorial, but it's a tad bit outdated and I can't follow along with it :\

                Comment


                  I think I've found a bug in InventoryManagerComponent::LoadInventory. The description states: "Client: Creates The Players Inventory UI (Or Rebuilds If Already Loaded)". However I've noticed that if you make a call to this function (say bind it to a key to call it) then the character's inventory panel will never work again. It will blank out all items in inventory (equipped items are fine) and you will never be able to drag anyting else into the inventory. It just disapears.

                  This is odd because looking at the code it looks perfectly fine. Clear grid panel children and then add new ones. I'm wondering if there is something else going on.

                  As stated above in #801 I need to switch possession from different chars and see their inventories. I was hoping that calling the LoadInventory each time I switch would update the UI with correct number of inventory slots, but it seems to kill the functionality. If I am doing this wrong please advise. I'm experienced with BP but just getting used to the inventory system.

                  Jake

                  Comment


                    Hi guys! Any idea, what did I do wrong while merging Inventory to my project? Issue here. If I pick up item from container with RMB, item disappears. If I drag-n-drop item to armor slot - it disappears from slot after one second, but not from character mesh. I used my own PlayerController (not InventoryPlayerController) and changed the only one thing - GetUsableActor function take HitResult from GetHitResultUnderCursorByChannel, because my project is top-down RPG.

                    Comment


                      Originally posted by DP Studio View Post
                      Could I request a tutorial on re-skinning (I think this is what its referred to) the skeletal meshes to another skeleton structure like Mixamo?

                      There is a huge lack of tutorials on the subject, closet thing I could find was this tutorial, but it's a tad bit outdated and I can't follow along with it :\
                      I can't really give you a tutorial but i can tell you how i made it. Go to UE4 and export the Skeletal Mesh you want to reskin. Go to your 3D Software (i use Blender). Import the Skeletal Mesh. Now you should have the Mesh and the Skeleton or at least part of the Skeleton in your 3D Program. Select your Mesh and look for Vertex Groups, you should see at least one bone there. Now you have to look for the weights the Mesh has on these Bones. Import your own Skeleton (Mixamo) and be sure the Bone Names are matching the UE4 Skeleton. And then assign the Mesh to your imported Skeleton and copy the weights.

                      I know for a Beginner this could be a bit confusing. Heres one Blender Tutorial where i learned the Basics of Weight Paints and Skinning: https://www.youtube.com/watch?v=EI0bujHVMPM


                      Originally posted by antsonthetree View Post
                      I think I've found a bug in InventoryManagerComponent::LoadInventory. The description states: "Client: Creates The Players Inventory UI (Or Rebuilds If Already Loaded)". However I've noticed that if you make a call to this function (say bind it to a key to call it) then the character's inventory panel will never work again. It will blank out all items in inventory (equipped items are fine) and you will never be able to drag anyting else into the inventory. It just disapears.

                      This is odd because looking at the code it looks perfectly fine. Clear grid panel children and then add new ones. I'm wondering if there is something else going on.

                      As stated above in #801 I need to switch possession from different chars and see their inventories. I was hoping that calling the LoadInventory each time I switch would update the UI with correct number of inventory slots, but it seems to kill the functionality. If I am doing this wrong please advise. I'm experienced with BP but just getting used to the inventory system.

                      Jake
                      Can't help with the Bug, but i think if you have different Chars/Classes you have to get each one a different Inventory Component, like WarriorInventoryComponent, MageInventoryComponent and so on. But maybe you got this already^^

                      Comment


                        Hey guys, i am sitting since days trying to figure out a clever and clean way to implement a solid Ammo System into the Inventory System. I have lots of different Weapons and Ammo Types and i dont want to modify each Function like TryToAddItemToInventory, AddItem, MoveItem, DropItem etc...

                        So if anyone of you has a working System please Help. Seems my Brain is blocked right now

                        Comment


                          Originally posted by ZenRigpa View Post
                          I can't really give you a tutorial but i can tell you how i made it. Go to UE4 and export the Skeletal Mesh you want to reskin. Go to your 3D Software (i use Blender). Import the Skeletal Mesh. Now you should have the Mesh and the Skeleton or at least part of the Skeleton in your 3D Program. Select your Mesh and look for Vertex Groups, you should see at least one bone there. Now you have to look for the weights the Mesh has on these Bones. Import your own Skeleton (Mixamo) and be sure the Bone Names are matching the UE4 Skeleton. And then assign the Mesh to your imported Skeleton and copy the weights.

                          I know for a Beginner this could be a bit confusing. Heres one Blender Tutorial where i learned the Basics of Weight Paints and Skinning: https://www.youtube.com/watch?v=EI0bujHVMPM
                          yes, very confusing, over the last few day's when I have free time I have been researching this topic since my knowledge == null, I have been watching these tutorials which will hopefully shed some light on the topic

                          Comment


                            Originally posted by ZenRigpa View Post
                            Hey guys, i am sitting since days trying to figure out a clever and clean way to implement a solid Ammo System into the Inventory System. I have lots of different Weapons and Ammo Types and i dont want to modify each Function like TryToAddItemToInventory, AddItem, MoveItem, DropItem etc...

                            So if anyone of you has a working System please Help. Seems my Brain is blocked right now
                            Can you explain more? ammo should just be treated like a stacked item when being added to the inventory.
                            [MENTION=238293]DP Studio[/MENTION] model rigging isn't really related to the inventory system, this knowledge is basic information you learn when working in 3Ds Max or any other 3D modeling program, it would be easier to just rerig your mixamo model to the UE4 skeleton.
                            Last edited by OverRated_AU; 08-09-2016, 10:02 PM.

                            Comment


                              Prototyping babysteps using the inventory



                              Although this was recorded in the PIE, we also have this working (weird unrelated animation bug and incomplete features notwithstanding) on a compiled dedicated server running on our network. Each character inventory is loaded and saved using sockets through a java server that connects to a MySQL server. The java server runs on one machine and the db on another. Loading and saving on the gigabit network is seamless. At a future point, we're going to test this over our slow ISP. Our inventory packets are small, so hopefully the lag will remain manageable.

                              As a side note: If anyone has seen this anim bug before, please let us know how you fixed it

                              WIP Thread

                              Comment


                                Originally posted by OverRated_AU View Post
                                Can you explain more? ammo should just be treated like a stacked item when being added to the inventory.
                                [MENTION=238293]DP Studio[/MENTION] model rigging isn't really related to the inventory system, this knowledge is basic information you learn when working in 3Ds Max or any other 3D modeling program, it would be easier to just rerig your mixamo model to the UE4 skeleton.
                                Sure, my Ammo is all Stackable. But except for the Shotgun Shells or Grenades all Ammo is in Magazines. For example 30 Rounds in one Magazine. Right now i added 2 more Variables to the Inventory Item. AmmoCount as INT what gives the actual Amount of Rounds in the MAG and AmmoType as ENUM. But like i said, now i have to modify all the functions that are handle Use, Drop, Move, Add Items and read out that values and give it to my Equipped Weapon to update the current Ammo.
                                I was just wondering if there is maybe a easier way to do it with the inventory System.

                                Comment

                                Working...
                                X