Announcement

Collapse
No announcement yet.

Action RPG Inventory System

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

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

    Leave a comment:


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

    Leave a comment:


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

    Leave a comment:


  • replied
    Hi Pirate

    Thanks for updating the RPG Inventory, much appreciated!

    Leave a comment:


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

    Leave a comment:


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

    Leave a comment:


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

    Leave a comment:


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

    Leave a comment:


  • replied
    Originally posted by PixelPerfectPolygons View Post
    Is 4.12 updated?
    I have been assured by Epic the most recent update I submitted will be updated tomorrow and this is when they will update it to download for 4.12. The current version will upgrade from 4.11 to 4.12 without issues.

    Leave a comment:


  • replied
    Is 4.12 updated?

    Leave a comment:


  • replied
    Fantastic job, Pirate. I picked up this and your social system, and I'm getting to grips with using them. I've been adding new item types to expand out for what I need. One of these is an editable book (which I've been having multiple issues with, but have almost finished work on.)
    I've got one remaining issue...
    I can't seem to serialise the data back to the item in the inventory.

    *removing the wall of picture as part of the edit*

    *EDIT*
    Heh. Well, to answer myself it's a limitation of my knowledge. For anyone else running into this same issue... "SetInventoryItem" is the solution.
    Attached Files
    Last edited by Dahak; 06-11-2016, 10:54 PM.

    Leave a comment:


  • replied
    Hey everyone,

    I'm sorry for the lack of responses the past week.

    Just a quick update, the current version of the Action RPG Inventory System is already compatible with 4.12.
    (I would personally hold off updating, because as of 4.12.1 many people are still experiencing crashes compiling blueprints and other little bugs introduced in 4.12)

    I have also submitted the next update that removes all the Make InventoryItem nodes so that when you make changes to your InventoryItem structs you won't have to jump through a few places and hook up your new variables between the Break/Make InventoryItem nodes.

    The update should be released by Epic whenever they feel like it.

    Version 1.6 - Submitted June 8th 2016
    ------- Update Notes -------

    This update replaces all the Make InventoryItem nodes in the project with Set Member in struct nodes.

     
    Spoiler


    With this update I will be removing support from 4.10 as 4.11 is a better base version and will keep supporting 4.11+ until a new version comes along that is a very drastic change.
    Last edited by Pirate; 08-22-2016, 03:22 PM.

    Leave a comment:


  • replied
    Originally posted by exphrasis View Post
    Thanks a lot for taking the time to explain all this. I'm still struggling to figure out where to set my modified durability. Tried in a couple different ways but still no success.

    For now I have everything working on the UI side, and loot to world item still keeps its durability.
    If I understood well, what you're suggesting to do is to (ignoring events from the controller for now), first set durability in equipmentinventorycomponent>SetInventoryItem.

    Then, change that variable and set it (to add or remove values to it dynamically), in inventorymanagercomponent>updateequippedstats (I imagine ?).

    I also don't understand why you added Inventory Slot, since items alreay have ' equipment slot ' by default in the item list ?

    Thank you again for taking the time to share all this with us and I appreciate you going out of your way to help.
    Ill try to explain how my logic works a bit more to try to help, I set the items durability inside the items actor then pass it back to the inventory now this probably isn't the best way, to save on bandwidth you mite only want to update it in the inventory when you open it, As you can actually see the Durability on my items i need to update it to display the current Durability, but as i removed the default hotbar i made my own which is a extension of the characters inventory, I also removed the main-hand slot and inside the equipment inventory component i do a on-rep of the selected item rather than than a on-rep of the main-hand skeletal mesh.

    I added a Inventory Slot variable to the item so i can return the slot number to locate the item in the characters inventory, inside the item actor when its spawned it the i can cast the update the item directly using the Inventory Slot variable, the equipment slots are only used to restrict items to a slot but you could make a simple function to return the inventory item slot using them seeing each type is limited to a inventory slot, but for my type of inventory this wont work as the equipped item can be in a number of slots.

    Its no problem i don't mind helping people willing to learn .
    Last edited by OverRated_AU; 06-08-2016, 04:53 AM.

    Leave a comment:


  • replied
    Originally posted by OverRated_AU View Post
    The only reason the item would be spawning under the ground to start with, would be because the Random drop location is probably isn't getting the right actors location, and why are breaking the transform inside the function? you can just adjust the location within the Randomize Drop Location Function using the "Drop At Our Feet location"


    [MENTION=60211]exphrasis[/MENTION]

    When you get more in-depth you can do some think like this create a new structure to hold your data your passing to the world item then update the item to store the passed data.

    Now if you place items in the world your data will be set to whats in the items blueprint is rather than the item table for the following variables, you can add a check if you wish to use that data still or you can also add random stats for placed items to, what i did was create the random stats function in my blueprints library, the item list in my game will have the highest grade items so when you do weapon spawning you can spawn the best version of that item, when the world generated items will be random.


    [ATTACH=CONFIG]96550[/ATTACH]
    Thanks a lot for taking the time to explain all this. I'm still struggling to figure out where to set my modified durability. Tried in a couple different ways but still no success.

    For now I have everything working on the UI side, and loot to world item still keeps its durability.
    If I understood well, what you're suggesting to do is to (ignoring events from the controller for now), first set durability in equipmentinventorycomponent>SetInventoryItem.

    Then, change that variable and set it (to add or remove values to it dynamically), in inventorymanagercomponent>updateequippedstats (I imagine ?).

    I also don't understand why you added Inventory Slot, since items alreay have ' equipment slot ' by default in the item list ?

    Thank you again for taking the time to share all this with us and I appreciate you going out of your way to help.

    Leave a comment:


  • replied
    Originally posted by lunyBunny View Post
    Hi [MENTION=39476]Pirate[/MENTION]. I figured out the problem. The objects always were spawning under the terrain and below the ground. Then I added 45 more unreal units up in the Z axis connected in 'randomizedroplocation' node inside 'DropIten' function in 'InvetoryManagerComponent'. I do not know if it's the best way to achieve this, but it worked.
    The only reason the item would be spawning under the ground to start with, would be because the Random drop location is probably isn't getting the right actors location, and why are breaking the transform inside the function? you can just adjust the location within the Randomize Drop Location Function using the "Drop At Our Feet location"


    [MENTION=60211]exphrasis[/MENTION]

    When you get more in-depth you can do some think like this create a new structure to hold your data your passing to the world item then update the item to store the passed data.

    Now if you place items in the world your data will be set to whats in the items blueprint is rather than the item table for the following variables, you can add a check if you wish to use that data still or you can also add random stats for placed items to, what i did was create the random stats function in my blueprints library, the item list in my game will have the highest grade items so when you do weapon spawning you can spawn the best version of that item, when the world generated items will be random.


    Click image for larger version

Name:	Untitled-1.jpg
Views:	1
Size:	227.1 KB
ID:	1107833
    Last edited by OverRated_AU; 06-07-2016, 08:57 AM.

    Leave a comment:

Working...
X