Announcement

Collapse
No announcement yet.

Action RPG Inventory System

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

  • replied
    Originally posted by hydrax View Post
    I solved it. But its not perfect.
    Can i just add an item via ID ?
    Click image for larger version Name:	UE4_Inventory_AddNewElement.png Views:	2 Size:	121.8 KB ID:	1561146
    Just wanted to say Thanks for this! I have the inventory working fine, but do you think I could work out how to add a bloody item via blueprints - all good, works so thanks again

    Leave a comment:


  • replied
    hi i in need of help..so i've integrated arpgis and als v4 (https://github.com/dyanikoglu/ALSV4_CPP) into my project..i wanna do when i equip a specific weapon,it will play that weapon aniamtion overlay state..what i've tried so far is in inventoryitem struct,i added a new element called "OverlayState" of type alsoverlaystate...what this do is when i define the item properties,i can set the weapon to use its overlay state for example,if i equip a bow,it will play that bow overlay state..after that in equipmentinventorycomponent,inventorymanagercomponent in the equipitem,unequipitem,updateequippedmeshes and updatemainhandweapon,i break the struct of inventory item and i set the overlay state( picture below)..i thought this should play the weapon overlay state,for bow it will play the aiming overlay..but it didnt and i get this error..anyone know any solution i can do?ping me

    my discord:KhaiSaki#1061
    Attached Files

    Leave a comment:


  • replied
    Originally posted by Scyclone View Post
    As an unrelated note, I've been working with adding in new stats and such to my items. And I have had 'some' success thus far.

    I added in Damage (Objects) to items that are designed for harvesting (Axe/Pickaxe/etc), as well as Constitution. I updated the itemlist, updated all relevant structures that I can think of and from a mechanical standpoint. It does apply the statistics to the item because it is populating into my equipment screen. For the screenshot example, I have put in 2 constitution for the bladed shoulder piece.

    I have narrowed down the issue in that it doesn't seem to populate "ItemToolTipInfo" with the data on my item's constitution bonus. I did a test on the visibility (and basically set it always visible) and it returned a blank line [further showing me that the 'BreakToolTipInfo' for Constitution is returning me no value]. Is there some extra step I missed somewhere or something I can do to correct this issue?


    Okay so I found out where else you needed to hook up your new entries. You need to open the Inventory_Slot, Container_Slot, and Hotbar_Slot and open the Get_ToolTip_Widget function. You should see there where you need to hook things up. Hope that helps.

    Leave a comment:


  • replied
    Originally posted by Scyclone View Post
    As an unrelated note, I've been working with adding in new stats and such to my items. And I have had 'some' success thus far.

    I added in Damage (Objects) to items that are designed for harvesting (Axe/Pickaxe/etc), as well as Constitution. I updated the itemlist, updated all relevant structures that I can think of and from a mechanical standpoint. It does apply the statistics to the item because it is populating into my equipment screen. For the screenshot example, I have put in 2 constitution for the bladed shoulder piece.

    I have narrowed down the issue in that it doesn't seem to populate "ItemToolTipInfo" with the data on my item's constitution bonus. I did a test on the visibility (and basically set it always visible) and it returned a blank line [further showing me that the 'BreakToolTipInfo' for Constitution is returning me no value]. Is there some extra step I missed somewhere or something I can do to correct this issue?


    Shoot... I came here for the exact same issue. I added a Hunger value, but it keeps returning 0. If I find a solution, I will post here and send you a message.

    Leave a comment:


  • replied
    As an unrelated note, I've been working with adding in new stats and such to my items. And I have had 'some' success thus far.

    I added in Damage (Objects) to items that are designed for harvesting (Axe/Pickaxe/etc), as well as Constitution. I updated the itemlist, updated all relevant structures that I can think of and from a mechanical standpoint. It does apply the statistics to the item because it is populating into my equipment screen. For the screenshot example, I have put in 2 constitution for the bladed shoulder piece.

    I have narrowed down the issue in that it doesn't seem to populate "ItemToolTipInfo" with the data on my item's constitution bonus. I did a test on the visibility (and basically set it always visible) and it returned a blank line [further showing me that the 'BreakToolTipInfo' for Constitution is returning me no value]. Is there some extra step I missed somewhere or something I can do to correct this issue?



    Attached Files

    Leave a comment:


  • replied
    Originally posted by Mahluus7 View Post
    Scyclone not 100% sure what your problem could be as there are no screenshots, but i'm guessing your item is not rotated and positioned correctly with it's 'world origin' at 0,0,0 (it's transforms all at zero in other words).
    1. A quick UE4 hack that may work for you is to drag the item into a level, any level will do.
    2. Set the location to 0, 0, 0 in the Transform section.
    3. Make sure the item is rotated correctly, vertical for melee and horizontal for guns.
    4. Where ever the pivot point is will be where your character ends up holding the item, so adjust as you see fit.
    5. Right click on the item and select Merge Actor
    6. Under Mesh Settings make sure the box 'Pivot Point at Zero' is ticked.

    Your new static mesh will now have the pivot point set to zero and you should be good to go. This will only work if your items pivot point is at 0, 0, 0 on the level in step 1 when you place it.

    Hope that helps.
    Heya Mahluus7 , you make a fair point - a picture is worth a thousand words

    Essentially, the axe is attaching to the socket - it just looks wierd in terms of rotations and such. I mean that could lead to a very painful circumcision I'd imagine :P.

    Would the information above apply to that?
    Attached Files
    Last edited by Scyclone; 10-07-2020, 06:57 PM.

    Leave a comment:


  • replied
    Scyclone not 100% sure what your problem could be as there are no screenshots, but i'm guessing your item is not rotated and positioned correctly with it's 'world origin' at 0,0,0 (it's transforms all at zero in other words).
    1. A quick UE4 hack that may work for you is to drag the item into a level, any level will do.
    2. Set the location to 0, 0, 0 in the Transform section.
    3. Make sure the item is rotated correctly, vertical for melee and horizontal for guns.
    4. Where ever the pivot point is will be where your character ends up holding the item, so adjust as you see fit.
    5. Right click on the item and select Merge Actor
    6. Under Mesh Settings make sure the box 'Pivot Point at Zero' is ticked.

    Your new static mesh will now have the pivot point set to zero and you should be good to go. This will only work if your items pivot point is at 0, 0, 0 on the level in step 1 when you place it.

    Hope that helps.

    Leave a comment:


  • replied
    Hello Everyone, I finally got around to working on setting up this system into my game and fortunately got it all working with a bit of troubleshooting. I added in a new item which pops in properly, connects to the socket and has a proper icon for it. My only issue now is that my item is rotated about 70 degrees in the wrong angle (and needs to be moved about 10 on the z scale so the hand grabs the handle at the proper location). I had tried adjusting the skeletal mesh and that particular item BP itself but neither seem to reflect the changes when equipped within the game.

    Is there any way I can make this rotation without needing a third party modelling tool by any chance? (I have no idea where even to start with things like that)

    Any help would be greatly appreciated.

    Thanks,
    Scyclone

    Leave a comment:


  • replied
    Hotbar and Hotbar Slot example Blueprints, and the InventoryLayout, in case you adjust the amount there.

    The hotbars are basically copies of the Skillbar and Skillbar Slot. Let me know if you have any questions, or want to see a specific blueprint.
    Attached Files

    Leave a comment:


  • replied
    Originally posted by MauganKhaine View Post
    Turned out it was the equipment panel which I extended to 20 slots that caused the problem.
    The way this inventory work is, the equipment slots are counted first, thus when you increase the size you have to adjust also the equipment slots, for example inside the HUD Inventory Layout / EventGraph. Will post my hotbar later.
    Last edited by unit23; 09-23-2020, 04:22 PM.

    Leave a comment:


  • replied
    Originally posted by unit23 View Post
    mattxordev1 MauganKhaine Do you want me to post my hotbar? It is basically a copy of the skillbar I think.
    If you don't mind. All I want is that you can drag items like potions and food and such into the hotbar and use the numbers keys to use the corresponding slot. As for now, I can't drag Items from and to the inventory nor equipment panel but can drag from the container into the inventory and equipment panel. I know it was possible before I fixed that issue with the inventory slots being all white so you couldn't see the icons. After I fixed that according to this forum, dragging and right clicking in the equipment panel to unequip stopped working. And I fixed my issue that the inventory stopped being displayed. Turned out it was the equipment panel which I extended to 20 slots that caused the problem.

    Leave a comment:


  • replied
    Originally posted by mattxordev1 View Post
    I am ok. It was actually nice learning how to duplicate the player inventory. Now slots can be added or removed and items are stored in separate inventory arrays per type of storage(Hotbar, storage bank , player inventory ect..). It opens the door for other types of storage.
    Okay, so I use a single inventory, except for the stash which operates partially on own functions. Providing an entire extra inventory for the hotbar feels not very efficient.

    Leave a comment:


  • replied
    I am ok. It was actually nice learning how to duplicate the player inventory. Now slots can be added or removed and items are stored in separate inventory arrays per type of storage(Hotbar, storage bank , player inventory ect..). It opens the door for other types of storage.

    Leave a comment:


  • replied
    mattxordev1 MauganKhaine Do you want me to post my hotbar? It is basically a copy of the skillbar I think.

    Leave a comment:


  • replied
    I got the hot bar working by duplicating the inventory. I duplicated all functions and custom events(renamed them with hotbar instead of inventory), duplicated all local variables and created new variables if needed for every duplicated function.(renamed them with hotbar instead of inventory). Replaced all the functions with the correct new hotbar functions that were duplicated from the inventory functions. After everything is said and done, I can now set the size of my hot bar, add and delete hotbar slots. You will need to write your own blueprint code from here to drag items from one inventory to the hotbar inventory, how you want items to work when you drag out of hotbar inventory and how items are used in your hotbar inventory. In my case, I want to write the blueprints to work how the inventory system originally worked as far as hotbar goes. I am now able to deploy to Android and avoid the hotbar crash in 4.25.3

    Leave a comment:

Working...
X