Announcement

Collapse
No announcement yet.

Action RPG Inventory System

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

    Originally posted by MrWilson13 View Post
    Be pretty interested in getting this. But just a question I got.

    I've got myself a sidescroller (3d) version. Is it possible to open the container when in proximity to it instead of having to look at it? So > character near container > hold E to open container. Obviously this would be done with a box collision but i'm wondering if its an easy thing to switch over and do?

    anyway look forward to your answer and thanks!

    You could replace the RayCast in the InventoryPlayerController to use a volume overlap instead or any other method really.
    Interacting with the containers is just as simple as telling the server to call that actors on used function.



    Originally posted by Haoris View Post
    Hi,
    My windows disappear when I drag them. I can move them but once released, they disappear.
    Do you have any other UI elements that might be blocking the UI HIT when you drop the widgets? Make sure that when you drop the widgets that are hitting the InventoryLayout UI as that has the code to handle the "OnDrop".
    UMG UI can be a little confusing at first, but if you take a bit of time to learn and understand how the UI Hit Tests work and Z Order of widgets should help you solve this issue very quickly in your project.


    Originally posted by GameMaster79 View Post
    Hi Pirate,

    I moved the RPG Inventory and Top Down Kit assets into my project. Thank you for the video on that! I did have one error I thought you might have some thoughts on. I'm getting the error messages off the world actor "Item not found in item list" and "Item has no world Mesh". It's being run in the construction script so the error is going all the time when I'm in the folder with the world actor. When I look at the imported items they have ID's, and the ID's are on the ItemList. It seems like it should all be working. Any thoughts on what that might be?

    Thanks!
    Hrmmm that's a little odd. Do the items in game have the correct meshes and when you pick them up the right stats? That error should only print out if it's trying to load something that doesn't exist in the ItemsList and then show a default mesh. please send me an email to support@vanguardinteractive.com
    \\VANGUARD INTERACTIVE

    Marketplace - Action RPG Inventory System | Multiplayer TopDown Kit | Advanced Social System
    Multiplayer TopDown Kit Tutorials - Merging The Action RPG Inventory System | Removing the Fog of War
    Action RPG Inventory Tutorials - Merging Into Your Project | Adding New Items | FPS Controls w/ UI Mode Toggle

    Comment


      Hi all,

      Firstly i'd like to say thanks to Pirate for creating this system and the question im asking below is to ask for help in what we might have done wrong rather than something not working as it should in the inventory system . I should mention now that we have compared function by function, macro by macro, event by event between our current development version of the inventory system and a clean project version of the inventory system and they are both the same. I'm making this point for 2 reasons, first that there isnt anything wrong with this system..its brilliant in fact..secondly to highlight that we haven't touched the core functionality of the system. This bug has us stumped at the moment.

      okay..now the odd problem..

      We created our crafting system with all new functions so as not to alter the core RPG system as it handles everything we needed. We just noticed however that when moving items between inventory and containers something goes pear shaped . i will try and lay it out so it's easy to understand as its an odd one.

      2 clients
      Client 1 -> adds item to container while Client 2 viewing - Everything works as it should, the item gets removed from Client 1 inventory and added to the container and also replicates to Client 2...so all good there
      Client 1 -> adds item to container while Client 2 viewing, then (Client 1) closes the container and re-opens it (Client 2 STILL has the container open) - Both clients still show the item as being in the container... so all good there

      the problem

      Client 1 -> adds item to container while Client 2 viewing (still hasnt closed its view), then (Client 1) closes the container and re-opens it then moves the item out into his inventory - result - item appears in inventory however the Icon for the item is still showing in the container. This cant be a valid item as when hovering over it the tooltip doesnt display either. Through all this the server knows exactly where the item is/should be.

      It appears that the problem is either when closing or opening the container that the reference to the container is lost or that something odd is happening in the playerstate.

      TLDR

      when a container is opened,closed and re-opened it appears to lose sync on the clients to the server. client to server is fine as server knows the correct information all the time its just the replication / updating of each of the clients as the clients go out of sync.

      The video will explain it far far better than i can here.

      https://youtu.be/ZT-FEkt6FZA

      Any help in pointing us in the right direction would be great.

      Cheers

      Comment


        Originally posted by Rotahn View Post
        Hi all,

        Firstly i'd like to say thanks to Pirate for creating this system and the question im asking below is to ask for help in what we might have done wrong rather than something not working as it should in the inventory system . I should mention now that we have compared function by function, macro by macro, event by event between our current development version of the inventory system and a clean project version of the inventory system and they are both the same. I'm making this point for 2 reasons, first that there isnt anything wrong with this system..its brilliant in fact..secondly to highlight that we haven't touched the core functionality of the system. This bug has us stumped at the moment.

        TLDR

        when a container is opened,closed and re-opened it appears to lose sync on the clients to the server. client to server is fine as server knows the correct information all the time its just the replication / updating of each of the clients as the clients go out of sync.

        The video will explain it far far better than i can here.

        https://youtu.be/ZT-FEkt6FZA

        Any help in pointing us in the right direction would be great.

        Cheers
        Just to be safe I double checked this on the ARPGIS in 4.12 to make sure it wasn't a bug with 4.12 and everything worked as expected.



        After reading what you wrote and watching the video you are correct in that the server is updated properly and is moving the item into the right place and it's seems to be just the clients container window getting out of sync after reopening the container. Not sure what you have changed in your own project but I can point you to the places where this logic happens and with a few print strings and breakpoint debugging it should hopefully be a simple fix.

        If you look in the InventoryManagerComponent on the Event Graph there is a Green Comment Box called Client: Container UI Events
        Each of these events calls a similar named function to run as the client. Sometimes these functions are ran in other functions that are already running on the client and by pass these initial event calls.
        (Note: there is also a type and the Red Comment Box is also labeled as the Client: Container Events and should read Server: Container Events. I will fix this typo in the next version)

        Client: Container UI Events
        Client_OpenContainer is triggered by the server when the client has "used" a container and when the server has validated the action it triggers this event on the client which called the LoadContainerSlots() function.
        This function removes all the slots on the "hidden" container UI window and then recreates the slots based on the number of loot items or if it's a container the container size. After it recreates the Container Slots it loads the ItemUI data that was sent from the server in the LocalItemInformation struct array and loops through each Item calling the SetContainerSlotItem() function to set the item to the Container Slot.

        I would create a print string during the loop and output the array index and item number and see if this changes between when it works the first time and when the player opens the container again. Make sure the server isn't sending different ItemInformation Struct Array data the 2nd time. (If you put a print string in the SetContainerSlotItem(); and Clear ContainerSlotItem(); you will get debug feedback when you move the item around as well)
        I have no idea why that would happen but there are a lot of struct bugs with unreal and sometimes deleting the struct variables and adding them back in helps fix things so try that if this is the issue .


        Client_CloseContainer
        This simply hides the Container Window and clears and ToolTips if you were hovering at the time. I don't see it being the cause.

        Client_SetContainerSlotItem
        This event is what is triggered when the server wants to tell a client what slot the UIInventoryItem (Icon/client data for tooltip) should be placed in.


        Client_ClearContainerSlotItem
        This event is what is triggered when the server wants to tell a client what slot the UIInventoryItem (Icon/client data for tooltip) should be placed in.


        Let me know if the server is or isn't sending the exact same data to the client when he opens it the 2nd time and has issues.
        This will let us know if it's a Server issue or if something with the UI is causing the bug when reopening the container window.

        It may also be better to send me an email at support@vanguardinteractive.com as it's easier for me to help you work through issues in your own project this way as often I am out and about and I can get alerts and reply on my phone faster
        Last edited by Pirate; 07-16-2016, 12:06 AM.
        \\VANGUARD INTERACTIVE

        Marketplace - Action RPG Inventory System | Multiplayer TopDown Kit | Advanced Social System
        Multiplayer TopDown Kit Tutorials - Merging The Action RPG Inventory System | Removing the Fog of War
        Action RPG Inventory Tutorials - Merging Into Your Project | Adding New Items | FPS Controls w/ UI Mode Toggle

        Comment


          wow.. it's great buddy

          Comment


            Originally posted by damnboy10 View Post
            wow.. it's great buddy

            Thank you , and don't forget to rate it on the marketplace page with how many stars you think it deserves.
            \\VANGUARD INTERACTIVE

            Marketplace - Action RPG Inventory System | Multiplayer TopDown Kit | Advanced Social System
            Multiplayer TopDown Kit Tutorials - Merging The Action RPG Inventory System | Removing the Fog of War
            Action RPG Inventory Tutorials - Merging Into Your Project | Adding New Items | FPS Controls w/ UI Mode Toggle

            Comment


              I can't press B key to open the backpack . There is nothing happend.

              Comment


                Thanks for the tips pirate.. we'll have a look

                Comment


                  Originally posted by Rotahn View Post
                  Thanks for the tips pirate.. we'll have a look
                  Are there any errors in the log when this happens?

                  Comment


                    Originally posted by q025896 View Post
                    I can't press B key to open the backpack . There is nothing happend.
                    What resolution is your game at? are you working on a small laptop?
                    \\VANGUARD INTERACTIVE

                    Marketplace - Action RPG Inventory System | Multiplayer TopDown Kit | Advanced Social System
                    Multiplayer TopDown Kit Tutorials - Merging The Action RPG Inventory System | Removing the Fog of War
                    Action RPG Inventory Tutorials - Merging Into Your Project | Adding New Items | FPS Controls w/ UI Mode Toggle

                    Comment


                      Using the SpawnActorFromClass node, I can spawn an item in the game world, but I cannot interact (E - pickup) with it.

                      I perused the example of DropItem and have set the class to WorldActor and the ID to the Item ID. For testing purposes I used various included items such as the Food_Hambone.

                      What step am I missing here?

                      Is it necessary to make a call to the server? I am not taking the item from inventory but rather creating a new item in the world.

                      WIP Thread

                      Comment


                        Hi Pirate,

                        I've made some great progress on my side with all the support you guys have provided previously ! One thing I'm encountering at the moment, is when I set player characters to be usable, and add the usable actor interface, for some reason I'm not able to see any of their items when the container window to their inventory opens. The window appears, but there's however no items in it.
                        Doing a print string on 'Get Inventory Item Count' from my PlayerInventoryComponent in the interface ' GetContainerProperties' also happens to return 0, even though players have items both equipped and in their inventory.
                        Click image for larger version

Name:	inventory.jpg
Views:	1
Size:	136.2 KB
ID:	1112516
                        Last edited by exphrasis; 07-24-2016, 09:42 PM.

                        Comment


                          Originally posted by Rhynedahll View Post
                          Using the SpawnActorFromClass node, I can spawn an item in the game world, but I cannot interact (E - pickup) with it.

                          I perused the example of DropItem and have set the class to WorldActor and the ID to the Item ID. For testing purposes I used various included items such as the Food_Hambone.

                          What step am I missing here?

                          Is it necessary to make a call to the server? I am not taking the item from inventory but rather creating a new item in the world.
                          Maybe a cast is failing on the use of the WorldActor. I would suggest putting in some print strings and breakpoints to make sure things are firing correctly in your project. Only other thing I can think of is maybe the raycast isn't working, but it should be if it's showing the Interact text but that happens client side. When you press E the Server does the same raycast and then calls the use fuction of the bp interactable interface.


                          Originally posted by exphrasis View Post
                          Hi Pirate,

                          I've made some great progress on my side with all the support you guys have provided previously ! One thing I'm encountering at the moment, is when I set player characters to be usable, and add the usable actor interface, for some reason I'm not able to see any of their items when the container window to their inventory opens. The window appears, but there's however no items in it.
                          Doing a print string on 'Get Inventory Item Count' from my PlayerInventoryComponent in the interface ' GetContainerProperties' also happens to return 0, even though players have items both equipped and in their inventory.
                          [ATTACH=CONFIG]103364[/ATTACH]
                          hrmm, that looks odd. My first thoughts are that it's calling it client side so it's not properly showing the items as they exist on the servers inventory of the character.
                          I would double check your code against the NPC examples in the ARPG Inventory System as they achieve the same behavior as you are trying to add.

                          send me an email to support@vanguardinteractive.com if you are still having issues.
                          \\VANGUARD INTERACTIVE

                          Marketplace - Action RPG Inventory System | Multiplayer TopDown Kit | Advanced Social System
                          Multiplayer TopDown Kit Tutorials - Merging The Action RPG Inventory System | Removing the Fog of War
                          Action RPG Inventory Tutorials - Merging Into Your Project | Adding New Items | FPS Controls w/ UI Mode Toggle

                          Comment


                            Originally posted by Pirate View Post
                            Only other thing I can think of is maybe the raycast isn't working...
                            That was it. I failed to make a call to the parent Event Tick function with an Event Tick that I had added for another feature in my player controller child class. Back on track now.

                            WIP Thread

                            Comment


                              Originally posted by Rhynedahll View Post
                              That was it. I failed to make a call to the parent Event Tick function with an Event Tick that I had added for another feature in my player controller child class. Back on track now.
                              Great to hear
                              \\VANGUARD INTERACTIVE

                              Marketplace - Action RPG Inventory System | Multiplayer TopDown Kit | Advanced Social System
                              Multiplayer TopDown Kit Tutorials - Merging The Action RPG Inventory System | Removing the Fog of War
                              Action RPG Inventory Tutorials - Merging Into Your Project | Adding New Items | FPS Controls w/ UI Mode Toggle

                              Comment


                                Upgraded to 4.12.5 but Still having trouble with adding new variables to InventoryItems and Tooltipitems structs...

                                if I add a new variable such as "price" to the struct and then compile and run... it works great... but if I try to package the game... then I get these errors.

                                Code:
                                MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: [2016.08.01-14.20.07:777][  0]LogProperty:Error: UStructProperty::Serialize Loading: Property 'StructProperty /Game/InventorySystem/Blueprints/Components/InventoryComponent.InventoryComponent_C:LoadInventoryItems.InventoryItems.InventoryItem
                                MainFrameActions: Packaging (Windows (32-bit)): s'. Unknown structure.
                                MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: [2016.08.01-14.20.07:779][  0]LogProperty:Error: UStructProperty::Serialize Loading: Property 'StructProperty /Game/InventorySystem/Blueprints/Components/InventoryComponent.InventoryComponent_C:IncreaseInventorySize.Temp_struct_Variable'. Un
                                MainFrameActions: Packaging (Windows (32-bit)): known structure.
                                MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: [2016.08.01-14.20.07:779][  0]LogProperty:Error: UStructProperty::Serialize Loading: Property 'StructProperty /Game/InventorySystem/Blueprints/Components/InventoryComponent.InventoryComponent_C:GetInventoryItemCount.CallFunc_Array_Get_Item'.
                                MainFrameActions: Packaging (Windows (32-bit)):  Unknown structure.
                                MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: [2016.08.01-14.20.07:780][  0]LogProperty:Error: UStructProperty::Serialize Loading: Property 'StructProperty /Game/InventorySystem/Blueprints/Components/InventoryComponent.InventoryComponent_C:GetEmptyInventorySpace.CallFunc_Array_Get_Item'
                                MainFrameActions: Packaging (Windows (32-bit)): . Unknown structure.
                                MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: [2016.08.01-14.20.07:781][  0]LogProperty:Error: UStructProperty::Serialize Loading: Property 'StructProperty /Game/InventorySystem/Blueprints/Components/InventoryComponent.InventoryComponent_C:ClearInventoryItem.Temp_struct_Variable'. Unkno
                                MainFrameActions: Packaging (Windows (32-bit)): wn structure.
                                MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: [2016.08.01-14.20.07:781][  0]LogProperty:Error: UStructProperty::Serialize Loading: Property 'StructProperty /Game/InventorySystem/Blueprints/Components/InventoryComponent.InventoryComponent_C:SetInventoryItem.InventoryItem'. Unknown struct
                                MainFrameActions: Packaging (Windows (32-bit)): ure.
                                MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: [2016.08.01-14.20.07:782][  0]LogProperty:Error: UStructProperty::Serialize Loading: Property 'StructProperty /Game/InventorySystem/Blueprints/Components/InventoryComponent.InventoryComponent_C:GetInventoryItem.InventoryItem'. Unknown struct
                                MainFrameActions: Packaging (Windows (32-bit)): ure.
                                MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: [2016.08.01-14.20.07:783][  0]LogProperty:Error: UStructProperty::Serialize Loading: Property 'StructProperty /Game/InventorySystem/Blueprints/Components/InventoryComponent.InventoryComponent_C:GetInventoryItem.CallFunc_Array_Get_Item'. Unkn
                                MainFrameActions: Packaging (Windows (32-bit)): own structure.
                                MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: [2016.08.01-14.20.07:784][  0]LogProperty:Error: UStructProperty::Serialize Loading: Property 'StructProperty /Game/InventorySystem/Blueprints/Components/InventoryComponent.InventoryComponent_C:InitInventory.Temp_struct_Variable'. Unknown st
                                MainFrameActions: Packaging (Windows (32-bit)): ructure.

                                I fixed it previously by setting Inventory variable to a bool(or anything else) and then switching it back to inventoryitems struct and relinking all the nodes

                                but obviously that is a lot of work to do each time I want to add a new var...expecially since I have to do it all over again for the "tooltipinfo" struct also

                                Someone mentioned simply "recompiling all the functions" that use those structs... but that doesn't seem to be working for me (unless I am doing it wrong)

                                I am doing a search for "InventoryItems" struct variable and then re-compiling each Blueprint that has that variable in it (even though it already has a Green checkmark as if it's already compliled - so not sure if that's actually re-compiling the function)
                                Last edited by wrfstudios; 08-01-2016, 10:41 AM.

                                Comment

                                Working...
                                X