Announcement

Collapse
No announcement yet.

Action RPG Inventory System

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

    Originally posted by FinalSparkUG View Post
    I have a few questions.

    1. How do I get information how much amount of an item is in the inventory.
    2. How do I get information which item is on which equip slot equipt.
    3 How do I remove items from inventory that are inside inventory current with amount.
    4 How do I add items to the inventory that is an default item?

    Hope you can answer me those questions because I really need these functions.

    Cheers,
    Bander
    All the functions are through using events shown on the InventoryManagerComponent Event Graph. The only function called externally not through an event is "TryToAddItemToInventory".

    You most likely need to know what slot you want to read than you can simply get information from that slot. On the client the client UI is updated with the item info so you can read that data already from the client without having to request it again from the server. Again if you know what slot you want to look up you can read the item data from the client in the InventoryLayout Widgets InventorySlots array. IF you are editing items you will want to use the events in the InventoryManagerController that make changes and they update the clients UI.

    Default items are setup in the Blueprints/Demo/ Classes Enum and Classes Starting Items DataTable. This determines the item loadout for the demo example.
    \\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


      A question:

      When you start with an empty inventory and pick up a single item so that that item is shown in the first slot in the inventory, the index of that item in the Inventory array is 14?

      I had assumed that it would be 0, but in my case, for whatever reason, it's 14.

      Is this correct and if not, might you have an idea what could be the cause of this error?

      WIP Thread

      Comment


        Originally posted by Rhynedahll View Post
        A question:

        When you start with an empty inventory and pick up a single item so that that item is shown in the first slot in the inventory, the index of that item in the Inventory array is 14?

        I had assumed that it would be 0, but in my case, for whatever reason, it's 14.

        Is this correct and if not, might you have an idea what could be the cause of this error?
        Your equipment slots are also apart of your inventory which is why you backpack slots start at 14 rather than 0.

        Comment


          Hi Pirate

          Thanks for updating the RPG Inventory, much appreciated!
          lunybunny.com
          lunybunny.com

          Comment


            Originally posted by OverRated_AU View Post
            Your equipment slots are also apart of your inventory which is why you backpack slots start at 14 rather than 0.
            Oh? Hmmmm.....

            WIP Thread

            Comment


              This is by design and if you look at games like world of warcraft and guild wars it has the same approach. You can get the number of equipmentslots from the enum so you aren't using a magic number like 14. this way also if you end up modifying your equipment slot amount the logic will automatically work with the new count.

              This is what also makes dayz type looting easy to do if you want as you can see on the demo NPC's loot window equipped items as well.
              Last edited by Pirate; 06-20-2016, 08:26 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


                I add all the system files into my project with manual. And play in editor they warning me 'Accessed none trying to read property callfunc_array_get_item from function: AddInventorySlot from node set ItemInformation'. There are 57 runtime errors all from the Set ItemInformation. How do I fix that?
                Help me out, please!

                Comment


                  Originally posted by MrBigWill View Post
                  I add all the system files into my project with manual. And play in editor they warning me 'Accessed none trying to read property callfunc_array_get_item from function: AddInventorySlot from node set ItemInformation'. There are 57 runtime errors all from the Set ItemInformation. How do I fix that?
                  Help me out, please!
                  I received your email I will try and figure out what you might have missed in the merge to cause this error this weekend. As I am out of town for a few more days on business. Perhaps trying to merge over again might be a good idea as it's possible something was missed.
                  Last edited by Pirate; 06-22-2016, 06:59 PM.
                  \\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


                    Oh thanks!
                    Am trying to figure out the error too. Here is exactly what I found.
                    Location:InventoryManagerComponent>function>User Interface>Private>Inventory>AddInventorySlots.
                    If I don't use the "Item Information" node, The error will be disappeared.
                    I check a few times for "Inventory Layout(widget)\Inventory Slots(widget)". They are the same as your's.

                    Comment


                      has anyone implemented this into generic shooter project?

                      Comment


                        Originally posted by Control View Post
                        has anyone implemented this into generic shooter project?
                        im trying to

                        Comment


                          Originally posted by Control View Post
                          has anyone implemented this into generic shooter project?
                          No and i wouldn't recommend any one even using that as its a right mess.

                          Comment


                            I've worked at this for a week or so but have not been able to come up with an answer.

                            The value reported by the length node, the tooltip of which says "Get the number of items in an array.", always shows zero for the Inventory Item Array in the editor.

                            The inventory is working properly in game.

                            I know that I can get a hack number by adding the number of Equipment slots to the number of backpack slots and use that as an iterator, but how can I programmatically derive the number of slots in the Inventory Item Array?

                            WIP Thread

                            Comment


                              Originally posted by Rhynedahll View Post
                              I've worked at this for a week or so but have not been able to come up with an answer.

                              The value reported by the length node, the tooltip of which says "Get the number of items in an array.", always shows zero for the Inventory Item Array in the editor.

                              The inventory is working properly in game.

                              I know that I can get a hack number by adding the number of Equipment slots to the number of backpack slots and use that as an iterator, but how can I programmatically derive the number of slots in the Inventory Item Array?
                              To get the number of the first inventory starting slot (after the allocated equipment slots) simply use get number of entries in EquipmentSlots and that will return the number you want to start your first backpack slot with.

                              Click image for larger version

Name:	GetEquipSlotCount.jpg
Views:	2
Size:	130.7 KB
ID:	1109086
                              If you have not modified the Equipment Slots this node will return 14 because the Equip slots are 0-13.
                              \\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
                                To get the number of the first inventory starting slot (after the allocated equipment slots) simply use get number of entries in EquipmentSlots and that will return the number you want to start your first backpack slot with.

                                [ATTACH=CONFIG]99415[/ATTACH]
                                If you have not modified the Equipment Slots this node will return 14 because the Equip slots are 0-13.
                                This is helpful, but it only goes back to the "add the number of equipment slots to the number of backpack slots" plan, which appears to be my most straightforward option at this point.

                                I need to iterate through the entire Inventory Item array so that I can send the item ids (and perhaps some other things such as item quality, condition, and so forth) through a socket to a server which will in turn relay the inventory to MySQL and back again when necessary.

                                I had presumed that there would be a simple way to determine the number of items in the array without knowing anything about the array itself. I take it that this is not possible?

                                WIP Thread

                                Comment

                                Working...
                                X