Announcement

Collapse
No announcement yet.

Action RPG Inventory System

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

  • replied
    Thank you very much for your work! Today I bought your program and wanted to put it on my project. I did everything in your video https://youtu.be/lqSvFgz0G40 but I did not succeed. Version 4.14.2, unfortunately I do not speak in English, and I find it hard to read the forum. Tell me what I need to fix. Many thanks !
    Last edited by eXi; 01-06-2017, 01:18 PM. Reason: Removed download lnk

    Leave a comment:


  • replied
    Originally posted by Lord Caine View Post
    I've spent another couple of hours trying to figure this out and I can't seem to get it.

    I want to add multiple containers on my map where I can load each container at game startup with specific items in the item list. I have not been able to do this so far.

    I've played with the demo and like the way the loot skeleton works, but I can not figure out how to load it with out brute force. I'm having to change massive amounts of code to do this and I have to believe there is a better way.

    I tried using the loot_skeleton and the container_pot. I finally figure out they were getting loaded from the container actor on begin play which calls initialize inventory. ONe thing I don't get is how does the container pot get set up with a inventory size of about 12 versus the loot skeleton which only has 8. How does initialize inventory figure out which is which?

    I am not sure what massive amounts of code you are changing to simply load new items into an actor when this is already setup for you and the tutorial above outlines how basic and simple it is.
    This is also only one way to do it and the way I opted to demo with. You don't need to use LootLists and DataTables. The inventory system doesn't care how you load the items and plug them into the Inventory Component. Feel free to change these demo assets any way you want. They are just there to show you how you can interact with actors and the containers fire off logic to open and populate the container windows.


    It sounds like you don't understand the basics of inheritance. I will try and explain a bit about the usable_actors but epic has a lot of tutorials that cover basic blueprinting and this should be relatively straight forward to understand even at a basic level.

    The whole usable actor blueprints are really quite simple and looking at them will show what they do. There is not a whole lot of variables or functions and logic to sift through.

    A Usable_Actor is the Base Class. Then there are the child classes World_Actor, Usable_Door, and Container_Actor.
    World_Actor is just a simple Usable_Actor that allows you to pickup the item so it has logic for it to look like the item it represents as well as trying to add it to your inventory on use.
    Usable_Door is just a simple Usable_Actor that is setup to work like a door.
    Container_Actor is a Usable_Actor with an Inventory Component added into it.

    Now there are child classes of Container_Actor, Container_Pot and Loot_Actor.

    Container_Pot is just a Container_Actor with some properties setup to make it work like a storage container we want it to be. A Pot with the values changed for size and row count.
    Loot_Actor is just a container_Actor with some extra logic to load items into it's inventory from a loot list and with the properties setup to say it's not a storage container and can only be looted.

    Now Loot_Actor has 2 child classes Loot_Hero and Loot_Skeleton. With simple changes to the properties/lootlists.

    So if you want to make a new Loot actor you would just follow the tutorial I provided above that you asked for.
    If you want to make it act like a container you can set it up that way by changing it's properties.

    You won't see the inherited variables in the child classes unless you setup your editor to show inherited variables. You change these values in the class defaults as you can see them in the screenshot in the tutorial post.
    Last edited by Pirate; 01-05-2017, 01:46 PM.

    Leave a comment:


  • replied
    There is an option on the bluepritns default values that specifies the inventory size I think.. also the Dead_Hero and the skeleton one take the items from a data table list

    Leave a comment:


  • replied
    I've spent another couple of hours trying to figure this out and I can't seem to get it.

    I want to add multiple containers on my map where I can load each container at game startup with specific items in the item list. I have not been able to do this so far.

    I've played with the demo and like the way the loot skeleton works, but I can not figure out how to load it with out brute force. I'm having to change massive amounts of code to do this and I have to believe there is a better way.

    I tried using the loot_skeleton and the container_pot. I finally figure out they were getting loaded from the container actor on begin play which calls initialize inventory. ONe thing I don't get is how does the container pot get set up with a inventory size of about 12 versus the loot skeleton which only has 8. How does initialize inventory figure out which is which?

    Leave a comment:


  • replied
    Originally posted by Lord Caine View Post
    Hi,

    I've spent 3.5 hours this morning just trying to figure out how to preload skeletons and urns/container pots with my own inventory items.

    I've given up.

    Can someone please put up a tutorial or steps own what you need to do to load these items up. Telling me to just look at the loot_hero and the loot_skeleton is not helping.

    Thanks,

    Arthur
    Look at the Loot_Hero actor and you can see there is an overridden function from the Loot_Actor called GetLootList().
    Because there is no way to store a DataTable reference yet (it's been voted for on their answer hub as a new feature) you will need to override this GetLootList() function and simply plug in a new DataTable in the 2 nodes GetDataTableRowNames and GetDataTableRow.

    Click image for larger version

Name:	loot_list_tutorial.jpg
Views:	1
Size:	214.3 KB
ID:	1120983

    You will also need to update the Min/Max Loot Items values to fit your needs.
    Also make sure there are greater than or equal to number of items in your new LootList than what you set your max Loot Items value to.

    So the tutorial to create a new Loot_actor reading from your own loot list is as follows.

    1.) Create a new Loot List.
    2.) Create a child actor of Loot_Actor.
    3.) Override the GetLootList() function and copy and paste the logic from Loot_Actor and pick your new loot list.
    4.) Specify your Min and Max Loot Items values (Making sure Max does not exceed the number of items in your loot list or it will give you an infinite loop error)

    The values for Inventory Size and slots per row are only used if it's a storage container. So keep Can Store Items unchecked if you want it to just be a lootable actor and not a container.
    Looking at the Container_Actor and it's child classes (Loot_Actor is a child of Container_Actor) shows just how simple it all really is to create usable and lootable containers.
    Last edited by Pirate; 01-05-2017, 01:06 PM.

    Leave a comment:


  • replied
    Hi,

    I've spent 3.5 hours this morning just trying to figure out how to preload skeletons and urns/container pots with my own inventory items.

    I've given up.

    Can someone please put up a tutorial or steps own what you need to do to load these items up. Telling me to just look at the loot_hero and the loot_skeleton is not helping.

    Thanks,

    Arthur

    Leave a comment:


  • replied
    Originally posted by DiziART View Post
    NEW FIX - Good job, my friend)
    one bug in trace logic. If phisycs - ON. If hit item, and item change location, trace work to last position. Can use this item only stand on old position item.
    I state in the blueprint tutorial that this is the case. Becasue physics isn't synced if the item is in a different position on the server then the client it will create issues when you are trying to pick it up as the use happens server side.

    You can change your game to do the Use check on the client just like the focus check does to draw the outline and use text instead of having the server fire the raycast on the server.
    This way even if the item is in a different position the client will be able to still use it.

    It was a design choice to have the use action done on the server but you are free to change this.

    Leave a comment:


  • replied
    Originally posted by unit23 View Post
    After adding the new interface message, i had to restart the editor, then all Equipment slots were gone, but after re-adding and PIE, inventory system no longer works, getting lot of these errors
    Why did you have to restart the editor? You would have just needed to compile and save a few of the umg widgets after making changes to the slots.

    So you had to re-add the Equipment slots into the Equipment Window in UMG?. That seems crazy that they would just be deleted from your Equipment Widget, I don't know what unreal is doing in your project but something is right messed.
    Try deleting your saved, intermediate and build folders. Crashes can create a lot of bad data in those folders and cause issues.

    The errors themselves are as they say. It's getting a NULL reference. So somewhere something isn't lining up. maybe a reference wire got unhooked during the initialize logic somehow.
    But there were no changes to the InventoryManagerComponent so I don't understand the missing properties errors.



    Can you send me a support email.

    Leave a comment:


  • replied
    Originally posted by Alexarg View Post
    Hi! I got an update yesterday, that was the 1.7.1 ? is there anyway to see what version of an asset from marketspace I am using?
    If you look at the ARPGIS project properties you will see it says a version number. 1.6, 1.7, 1.7.1

    Leave a comment:


  • replied
    Hi! I got an update yesterday, that was the 1.7.1 ? is there anyway to see what version of an asset from marketspace I am using?

    Leave a comment:


  • replied
    Originally posted by Pirate View Post
    Version 1.7.1 ToolTip Hotfix - Submitted Jan 4th 2017
    ------- Update Notes -------

    This hotfix moves the GetDataTableRow node outside of the UMG widgets and replaces them with an Interface Call on the player controller to avoid any potential blueprint compiler stuff ups.
    After adding the new interface message, i had to restart the editor, then all Equipment slots were gone, but after re-adding and PIE, inventory system no longer works, getting lot of these errors

    Error Blueprint Runtime Error: Attempted to access missing property. If this is a packaged/cooked build, are you attempting to use an editor-only property? from function: 'LoadInventory' from node: Clear Children in graph: LoadInventory in object: InventoryManagerComponent with description: Attempted to access missing property. If this is a packaged/cooked build, are you attempting to use an editor-only property?
    Error Blueprint Runtime Error: Accessed None trying to read property Inventory from function: 'LoadInventory' from node: Clear Children in graph: LoadInventory in object: InventoryManagerComponent with description: Accessed None trying to read property Inventory
    Error Blueprint Runtime Error: Accessed None from function: 'LoadInventory' from node: Clear Children in graph: LoadInventory in object: InventoryManagerComponent with description: Accessed None
    Error Blueprint Runtime Error: Attempted to access missing property. If this is a packaged/cooked build, are you attempting to use an editor-only property? from function: 'AddInventorySlot' from node: Branch in graph: AddInventorySlot in object: InventoryManagerComponent with description: Attempted to access missing property. If this is a packaged/cooked build, are you attempting to use an editor-only property?
    Error Blueprint Runtime Error: Attempted to access missing property. If this is a packaged/cooked build, are you attempting to use an editor-only property? from function: 'AddInventorySlot' from node: Set ItemInformation in graph: AddInventorySlot in object: InventoryManagerComponent with description: Attempted to access missing property. If this is a packaged/cooked build, are you attempting to use an editor-only property?
    Error Blueprint Runtime Error: Accessed None trying to read property CallFunc_Array_Get_Item from function: 'AddInventorySlot' from node: Set ItemInformation in graph: AddInventorySlot in object: InventoryManagerComponent with description: Accessed None trying to read property CallFunc_Array_Get_Item
    Error Blueprint Runtime Error: Attempted to assign to None from function: 'AddInventorySlot' from node: Set ItemInformation in graph: AddInventorySlot in object: InventoryManagerComponent with description: Attempted to assign to None

    Error Blueprint Runtime Error: Accessed None trying to read property CallFunc_Array_Get_Item from function: 'CloseEquipmentWindow' from node: Set IsSlotHovered in graph: CloseEquipmentWindow in object: InventoryManagerComponent with description: Accessed None trying to read property CallFunc_Array_Get_Item
    Error Blueprint Runtime Error: Attempted to access missing property. If this is a packaged/cooked build, are you attempting to use an editor-only property? from function: 'CloseEquipmentWindow' from node: Set IsRightMouseButtonDown in graph: CloseEquipmentWindow in object: InventoryManagerComponent with description: Attempted to access missing property. If this is a packaged/cooked build, are you attempting to use an editor-only property?
    Error Blueprint Runtime Error: Accessed None trying to read property CallFunc_Array_Get_Item from function: 'CloseEquipmentWindow' from node: Set IsRightMouseButtonDown in graph: CloseEquipmentWindow in object: InventoryManagerComponent with description: Accessed None trying to read property CallFunc_Array_Get_Item
    Error Blueprint Runtime Error: Attempted to access missing property. If this is a packaged/cooked build, are you attempting to use an editor-only property? from function: 'CloseEquipmentWindow' from node: Set IsSlotHovered in graph: CloseEquipmentWindow in object: InventoryManagerComponent with description: Attempted to access missing property. If this is a packaged/cooked build, are you attempting to use an editor-only property?
    Error Blueprint Runtime Error: Accessed None trying to read property CallFunc_Array_Get_Item from function: 'CloseEquipmentWindow' from node: Set IsSlotHovered in graph: CloseEquipmentWindow in object: InventoryManagerComponent with description: Accessed None trying to read property CallFunc_Array_Get_Item

    Error Blueprint Runtime Error: Accessed None trying to read property Inventory from function: 'OpenInventoryWindow' from node: Set InventoryVisible in graph: OpenInventoryWindow in object: InventoryManagerComponent with description: Accessed None trying to read property Inventory
    Error Blueprint Runtime Error: Attempted to assign to None from function: 'OpenInventoryWindow' from node: Set InventoryVisible in graph: OpenInventoryWindow in object: InventoryManagerComponent with description: Attempted to assign to None

    Leave a comment:


  • replied
    Background image's change very easy. Don't create Get_Brush. I change all buttons, and BG slot - all good working

    Leave a comment:


  • replied
    NEW FIX - Good job, my friend)
    one bug in trace logic. If phisycs - ON. If hit item, and item change location, trace work to last position. Can use this item only stand on old position item.

    Leave a comment:


  • replied
    Version 1.7.1 ToolTip Hotfix - Updated Jan 4th 2017
    ------- Update Notes -------

    This hotfix moves the GetDataTableRow node outside of the UMG widgets and replaces them with an Interface Call on the player controller to avoid any potential blueprint compiler stuff ups.

    I will be also linking these notes in the original 1.7 update patch notes at the end of the steps to create the new tool tip system.


    [InventoryHUDInterface]
    - Added new interface function called UI_Get_ToolTip_Info.
    - Added an Input Param called ItemID of Name type.
    - Added an Output Param called InventoryItem of InventoryItem Struct type.


    [InventoryPlayerController]
    - Added logic for implementation of the new UI_Get_ToolTip_Info interface function.


    [Inventory_Slot]
    - Changed the logic in the GetToolTipWidget() function and replaced GetDataTableRow node to use the new UI_Get_ToolTip_Info interface message call.

    [Container_Slot]
    - Changed the logic in the GetToolTipWidget() function and replaced GetDataTableRow node to use the new UI_Get_ToolTip_Info interface message call.

    [HotBar_Slot]
    - Changed the logic in the GetToolTipWidget() function and replaced GetDataTableRow node to use the new UI_Get_ToolTip_Info interface message call.






    Thank you for the bug reports:
    [MENTION=301883]DiziART[/MENTION] [MENTION=31112]unit23[/MENTION]
    Last edited by Pirate; 01-05-2017, 01:53 PM.

    Leave a comment:


  • replied
    Originally posted by unit23 View Post
    Thanks for pointing out that the current issue with REINST affects all ARPGIS users. I rather wait for the official "fix", before i begin messing around, as someone who has two left hands when it comes to programming.
    Yes it looks like accessing datatables in UMG is buggy. I will have to do a hotfix that uses an interface call to access this data then.

    I will post instructions as soon as the hotfix is ready.

    Leave a comment:

Working...
X