Announcement

Collapse
No announcement yet.

Action RPG Inventory System

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

    Originally posted by Rhynedahll View Post
    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?
    Oh, make sure you are doing this on the server you should be able to iterate through the array with no issue. If you are doing it on the client the array will be empty as the items exist on the server.
    \\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
      Oh, make sure you are doing this on the server you should be able to iterate through the array with no issue. If you are doing it on the client the array will be empty as the items exist on the server.
      Thanks. This works.

      WIP Thread

      Comment


        I added my own character skeletal mesh/rig and now all the equipment no longer applies to the character the right way. I'm not really sure how to go about fixing this since I've always used sockets to attach things and this system doesnt do that. The rig I'm using is a slightly modified version of the ue4 rig.

        Click image for larger version

Name:	EquipmentBroke.jpg
Views:	1
Size:	50.6 KB
ID:	1109107

        I think this is a problem caused by the joint orientation.
        Last edited by KrunkFu; 06-27-2016, 05:02 PM.

        Comment


          Originally posted by KrunkFu View Post
          I added my own character skeletal mesh/rig and now all the equipment no longer applies to the character the right way. I'm not really sure how to go about fixing this since I've always used sockets to attach things and this system doesnt do that. The rig I'm using is a slightly modified version of the ue4 rig.

          [ATTACH=CONFIG]99445[/ATTACH]

          I think this is a problem caused by the joint orientation.
          if your using a modified version of the unreal skeleton you will have export and re-rig all the equipment items to your skeleton your using, for the weapon just add a socket using the name mainhand.

          Comment


            I got it working for the most part. The helmets still dont fit but thats a proportion issue. The orientation of the bones was the issue.

            Click image for larger version

Name:	progress2.jpg
Views:	1
Size:	89.9 KB
ID:	1109184

            Comment


              [MENTION=190677]OverRated_AU[/MENTION] I noticed you created a struct called WorldItemData which has a lot of the same data as InventoryItemData. Is there a reason you didn't just add the extra data to the InventoryItemData struct?

              Comment


                Originally posted by KrunkFu View Post
                [MENTION=190677]OverRated_AU[/MENTION] I noticed you created a struct called WorldItemData which has a lot of the same data as InventoryItemData. Is there a reason you didn't just add the extra data to the InventoryItemData struct?
                Because i didn't want to waste bandwidth sending data thats isn't used, its a waste and you should always only send what is needed.

                Comment


                  Originally posted by OverRated_AU View Post
                  Because i didn't want to waste bandwidth sending data thats isn't used, its a waste and you should always only send what is needed.
                  Makes sense. I forgot your game is multiplayer. Thanks for the quick reply. I just starting looking through this inventory to figure out how it works. There is a lot to figure out lol.

                  Comment


                    Originally posted by KrunkFu View Post
                    Makes sense. I forgot your game is multiplayer. Thanks for the quick reply. I just starting looking through this inventory to figure out how it works. There is a lot to figure out lol.
                    Its fairy simple and its logic is very clean so its good to learn off took me about a week to pickup, but i was also learning how blueprint worked as well at the same time, there are a lot of other assets out there that are very badly scripted i recommend this for beginners.

                    Comment


                      HI,

                      I am trying to do a simple delete of an item from my inventory... only it isn't so simple. I can add an item no problem with trytoadditemtoinventory.
                      I made a new function from this one and tried setting the localitemamount to -1 but that didn't work.

                      So then I tried this:

                      Click image for larger version

Name:	removeitem.png
Views:	1
Size:	90.3 KB
ID:	1109193

                      Can someone give me a clue?

                      Thanks,

                      Arthur

                      Comment


                        OK I found the issue.

                        I had my maxstacksize set to 10 and the number of items in my inventory set to 10. Findaddamouttostacks won't add a negative 1 to the amount if those two numbers equal each other. I bumped up my maxstacksize to 100 and the problem went away.

                        Comment


                          Hopefully, someone will be able to save me some time.

                          Where is the code that draws the crosshair located?

                          WIP Thread

                          Comment


                            Originally posted by Lord Caine View Post
                            HI,

                            I am trying to do a simple delete of an item from my inventory... only it isn't so simple. I can add an item no problem with trytoadditemtoinventory.
                            I made a new function from this one and tried setting the localitemamount to -1 but that didn't work.

                            So then I tried this:

                            [ATTACH=CONFIG]99676[/ATTACH]

                            Can someone give me a clue?

                            Thanks,

                            Arthur

                            It will be best to probably create a Find and Remove Amount from Stack function that returns true if it was successful. Then inside that new function it would be very similar logic as the Find and Add Amount to Stacks code but will return true if there was stacks and the amount removed.


                            Originally posted by Rhynedahll View Post
                            Hopefully, someone will be able to save me some time.

                            Where is the code that draws the crosshair located?
                            In the HUD Class Event Graph.
                            \\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
                              In the HUD Class Event Graph.
                              Thanks!

                              I've hit another speed bump though. I upgraded to 4.12.4 and my inventory slots disappeared from the Inventory widget. As I haven't made any changes to the widgets in a very long time, I'm thinking that either the update broke something or the widget gremlin has returned.

                              Any suggestions?

                              WIP Thread

                              Comment


                                Originally posted by Rhynedahll View Post
                                Thanks!

                                I've hit another speed bump though. I upgraded to 4.12.4 and my inventory slots disappeared from the Inventory widget. As I haven't made any changes to the widgets in a very long time, I'm thinking that either the update broke something or the widget gremlin has returned.

                                Any suggestions?
                                The update didn't break anything with the Action RPG Inventory System I have tested it in the original project and my own that are using it in 4.12.4.

                                If the Inventory Slots don't show up in your backpack it's because in your PlayerController init logic didn't finish the client init code for the InventorySystem.
                                I would suggest taking a look at your init code and putting print strings on cast failed to see if your code is fully executing or if something is causing it to abort prematurely.
                                \\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

                                Working...
                                X