Announcement

Collapse
No announcement yet.

Action RPG Inventory System

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

  • replied
    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.

    Leave a comment:


  • replied
    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 ?

    Leave a comment:


  • replied
    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...

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    Originally posted by Pirate View Post
    This is caused by something you have done in your project.
    Thanks. I'll look into what the line trace is doing.

    This is a bug ...
    Thanks. I remember that post now, but as usual neglected to attend to it immediately. Fixed now.

    Leave a comment:


  • replied
    Originally posted by Rhynedahll View Post
    I have a couple of glitches that I am sure are the result of not applying an update somwhere.

    The first, longstanding one: items do not always highlight to be used. Sometimes I have to run off, highlight another item, and come back.
    This is caused by something you have done in your project.

    Originally posted by Rhynedahll View Post

    The second, occurring lately: closing a container sometimes disables the mouse and I have to esc to a menu (not a ARPGIS menu) to get it back

    I've done a few searches on the thread, but apparently did not come up with the proper search terms. Could anyone point me in the right direction?
    This is a bug with Unreal starting in 4.11 and I hope is fixed in 4.14. When the UMG Widget is hidden (after looting everything) it is no longer resetting the IsHovered UI states which is causing issues with the IsMouseOverUI Logic.
    This is an Engine UMG Bug and not a bug with ARPGIS but I have provided a work around for now until Epic fixes it by basically disabling the IsMouseOverUI logic in the InventoryPlayerController.

    https://forums.unrealengine.com/show...l=1#post589383

    Leave a comment:

Working...
X