Announcement

Collapse
No announcement yet.

Action RPG Inventory System

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

    For anyone else that might encounter the issue I described above:

    Unfortunately, I have learned that the line trace hits all sorts of invisible objects by design. In my case, NavMeshModifierVolumes, trigger volumes, collision spheres added to NPCs, and a host of other things that I am using in their default state.

    For any usable items dropped inside these areas, the trace hits the volumes first and does not reach the Usable Item. Also, if I happen to have the camera panned out and swung around so that it clips any of these invisible objects, the trace is also blocked from the usable object.

    The LineTraceForObjects Actors to Ignore array accepts only actors, rather than classes, so I will either have to make a reference to every volume or drop back twenty and punt.

    WIP Thread

    Comment


      Originally posted by Pirate View Post
      I can't teach you how to program or fix your own project for you. I can only offer advice on where you went wrong. I suggest following some of epics tutorials on basic blueprinting as this issue you are experiencing is very basic.



      I replied with exactly what was causing the error in your migration and where to look in your project to fix it.

      I didn't feel the need to also reply to an email that provided less information than the forum post that I already provided a solution for. Which it looks like you didn't even read.

      Please reread my original reply it explains exactly why when you hit the keys to open/close inventory widgets it's not working. You are not passing in a reference to the UMG Widget it is looking for.

      In the ARPGIS Demo the InventoryLayout UMG widget is exposed as a variable in the HUDLayout called Inventory. This is the reference being passed to the InventoryManagerComponent.
      The IMC needs to know where the widget is to run some of the commands on the other widgets held within it (Equipment, Inventory, etc).

      If you have migrated into your project and are not loading the InventoryLayout widget you will need to resolve that so that you have an valid reference you can pass in.


      Thank you so much for your help today. Also with everything you provided me. Sorry for the trouble of being new to unreal and buying your product without learning fully indepth.

      Comment


        Originally posted by Rhynedahll View Post
        For anyone else that might encounter the issue I described above:

        Unfortunately, I have learned that the line trace hits all sorts of invisible objects by design. In my case, NavMeshModifierVolumes, trigger volumes, collision spheres added to NPCs, and a host of other things that I am using in their default state.

        For any usable items dropped inside these areas, the trace hits the volumes first and does not reach the Usable Item. Also, if I happen to have the camera panned out and swung around so that it clips any of these invisible objects, the trace is also blocked from the usable object.

        The LineTraceForObjects Actors to Ignore array accepts only actors, rather than classes, so I will either have to make a reference to every volume or drop back twenty and punt.
        No just add a LineTraceByChannel after the Object trace, 1st create a new Collision Channel "UsableActor" and set it to true in the Useable Actor BP in both meshes collision fields, if you only do the Channel trace it will work though any think which is why you still need to do the 1st trace check.

        But really the LineTraceForObjects should only be hitting the object types selected.

        Comment


          Originally posted by OverRated_AU View Post
          No just add a LineTraceByChannel after the Object trace, 1st create a new Collision Channel "UsableActor" and set it to true in the Useable Actor BP in both meshes collision fields, if you only do the Channel trace it will work though any think which is why you still need to do the 1st trace check.

          But really the LineTraceForObjects should only be hitting the object types selected.
          As configured out of the box, ARPGIS has WorldStatic, WorldDynamic, And Pawn for the Object types. The WorldStatic enum covers containers placed in the world and the WorldStatic covers dropped (spawned) items. I didn't investigate further to find out what the Pawn type covers. I haven't worked on the line trace previously, so I don't think that I have altered it, but I may have.

          These categories include basically everything that I have on the map.

          Right now I am getting all actors of class of the several invisible objects that currently cause me problems and building the ignore array at begin play. I have several custom object types already and can make another for usable actors, but I have a feeling that I might need multiple custom obj types to cover all the bases.

          I'll work on it. If I only need one, then that would indeed be the most elegant solution. Thanks for the suggestion!
          Last edited by Rhynedahll; 10-02-2016, 04:51 PM.

          WIP Thread

          Comment


            I've not read through the whole thread so I apologise if it has been already asked. I am implementing a crafting system with this inventory system. How do you get the amount of items in a stack? No matter what I do it just returns 1.. I can do it of the items aren't stacked but I don't want that if a user has 50+ pieces of wood lol
            Last edited by Scottc91; 10-03-2016, 06:25 AM.
            War Penguin Studios - Twitter

            Comment


              Originally posted by Rhynedahll View Post
              As configured out of the box, ARPGIS has WorldStatic, WorldDynamic, And Pawn for the Object types. The WorldStatic enum covers containers placed in the world and the WorldStatic covers dropped (spawned) items. I didn't investigate further to find out what the Pawn type covers. I haven't worked on the line trace previously, so I don't think that I have altered it, but I may have.

              These categories include basically everything that I have on the map.

              Right now I am getting all actors of class of the several invisible objects that currently cause me problems and building the ignore array at begin play. I have several custom object types already and can make another for usable actors, but I have a feeling that I might need multiple custom obj types to cover all the bases.

              I'll work on it. If I only need one, then that would indeed be the most elegant solution. Thanks for the suggestion!
              Custom trace channels are not the same as custom object types, the trace will only hit objects with the custom trace channel ticked, but after thinking about your problem more and the way the inventory trace works its actually setup wrong, It really should only be a channel trace using Visibility so volumes and collision boxes are ignored.

              Please update your trace node like mine below.

              Click image for larger version

Name:	Linetraceupdate.jpg
Views:	1
Size:	560.2 KB
ID:	1116154



              Originally posted by Scottc91 View Post
              I've not read through the whole thread so I apologise if it has been already asked. I am implementing a crafting system with this inventory system. How do you get the amount of items in a stack? No matter what I do it just returns 1.. I can do it of the items aren't stacked but I don't want that if a user has 50+ pieces of wood lol
              Loop the Inventory to check for the items you need, on each loop pull off the found inventory item and break the structure and get the amount, then add the amounts together using a int, adding a crafting system is fairly easy with this inventory system.


              Originally posted by antsonthetree View Post
              Stack Splitting: One thing I'd like to see is a slider or text box dialog that allows you to input the size of the stack you are splitting.
              You can add this in your self like following.

              Last edited by OverRated_AU; 10-03-2016, 11:29 AM.

              Comment


                Originally posted by OverRated_AU View Post
                Custom trace channels are not the same as custom object types, the trace will only hit objects with the custom trace channel ticked, but after thinking about your problem more and the way the inventory trace works its actually setup wrong, It really should only be a channel trace using Visibility so volumes and collision boxes are ignored.

                Please update your trace node like mine below.

                [ATTACH=CONFIG]112344[/ATTACH]





                Loop the Inventory to check for the items you need, on each loop pull off the found inventory item and break the structure and get the amount, then add the amounts together using a int, adding a crafting system is fairly easy with this inventory system.




                You can add this in your self like following.

                In regards to the item count. I have a for loop and tested two different types.
                First, for each loop through to find "wood" each one I break the result and add the amount to "item count" it returns 1.
                Second a for each with break. This finds the item in the inventory, I break the item to get the amount of said item and again it returns 1. Each time the stack could have 5+ wood
                Last edited by Scottc91; 10-03-2016, 11:38 AM.
                War Penguin Studios - Twitter

                Comment


                  Originally posted by Scottc91 View Post
                  In regards to the item count. I have a for loop and tested two different types.
                  First, for each loop through to find "wood" each one I break the result and add the amount to "item count" it returns 1.
                  Second a for each with break. This finds the item in the inventory, I break the item to get the amount of said item and again it returns 1. Each time the stack could have 5+ wood
                  Are you doing the loop on the server? please post a image it will be easier for me to help you.

                  Comment


                    Originally posted by OverRated_AU View Post
                    Are you doing the loop on the server? please post a image it will be easier for me to help you.
                    I'm working nights I will try to get you one later. I actually think I might be doing the check on the client xD I will have a look though, thanks
                    War Penguin Studios - Twitter

                    Comment


                      Originally posted by OverRated_AU View Post
                      Are you doing the loop on the server? please post a image it will be easier for me to help you.
                      I've don't the checks on the server and got it working, thanks
                      War Penguin Studios - Twitter

                      Comment


                        https://answers.unrealengine.com/que...xture-bug.html

                        Can you take a look at this question I have asked... I am replicating the inventory blueprints to do a crafting blueprint (I previously hard coded each crafting slot, but decided if I used a data list "Craft List" for re-usability in future projects, and makes it easier if I want to add/remove items on the crafting list. I just can't get the icons to refresh in the crafting window, but when I check in the array, the items have been updated to their data list counterpart...
                        War Penguin Studios - Twitter

                        Comment


                          Originally posted by Scottc91 View Post
                          https://answers.unrealengine.com/que...xture-bug.html

                          Can you take a look at this question I have asked... I am replicating the inventory blueprints to do a crafting blueprint (I previously hard coded each crafting slot, but decided if I used a data list "Craft List" for re-usability in future projects, and makes it easier if I want to add/remove items on the crafting list. I just can't get the icons to refresh in the crafting window, but when I check in the array, the items have been updated to their data list counterpart...
                          Hello,

                          Are you setting the inventory slots in details in UMG? also that approach isn't necessary are you trying to use the inventory slots to build a craft list or some think ?

                          Comment


                            Originally posted by OverRated_AU View Post
                            Hello,

                            Are you setting the inventory slots in details in UMG? also that approach isn't necessary are you trying to use the inventory slots to build a craft list or some think ?
                            I am trying to use the same methods that the inventory systems uses to populate an inventory system and then update Item info, which in turn updates the inventory slot. So I made craft slot, craft slot info etc. I am updating the craft item info in the inventory manager component (like it does to update the inventory). But instead of waiting for items to be added to the inventory when they are picked up. I am using the Craft list data list to populate the crafting window on initialisation as it won't change (but it allows me to added/remove items from the data list easier instead of each slot being hard coded)

                            I have an idea to try and make it work which I will try later.
                            Last edited by Scottc91; 10-06-2016, 12:52 PM.
                            War Penguin Studios - Twitter

                            Comment


                              Originally posted by Scottc91 View Post
                              I am trying to use the same methods that the inventory systems uses to populate an inventory system and then update Item info, which in turn updates the inventory slot. So I made craft slot, craft slot info etc. I am updating the craft item info in the inventory manager component (like it does to update the inventory). But instead of waiting for items to be added to the inventory when they are picked up. I am using the Craft list data list to populate the crafting window on initialisation as it won't change (but it allows me to added/remove items from the data list easier instead of each slot being hard coded)

                              I have an idea to try and make it work which I will try later.
                              Why not use the inventory system logic and slots you would only need to add a few boolean checks for the slots a simple Iscrafting slot boolean would do. but why not just create a list rather than using the inventory slots?

                              Comment


                                Originally posted by OverRated_AU View Post
                                Why not use the inventory system logic and slots you would only need to add a few boolean checks for the slots a simple Iscrafting slot boolean would do. but why not just create a list rather than using the inventory slots?
                                I got it sorted, I was way over complicating it! Now I can update the craft data list and it will automatically update the crafting window with the icons and put them into their correct group in the crafting window
                                Also, When it is pressed, it gets the item data from the list, checks the required materials, removes then and adds the crafted item makes life much easier now I have it all automated haha

                                Click image for larger version

Name:	10.jpg
Views:	1
Size:	415.9 KB
ID:	1116346
                                Last edited by Scottc91; 10-07-2016, 08:53 AM.
                                War Penguin Studios - Twitter

                                Comment

                                Working...
                                X