Announcement

Collapse
No announcement yet.

Action RPG Inventory System

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

  • replied
    Originally posted by LLews View Post
    Thanks For the reply Pirate I had done both of thoose, [ATACH=CONFIG]100547[/ATTACH]
    This is how things are looking in a blank project as you can see theres a fern in the added slot if the class item spawing is enabled seems to be the first item in the list from the class.
    Along with this as youll see in the next image while the mouse is hovered over the added slot it belives its over the head slot [ATTAC=CONFIG]100548[/ATTACH] sorry for the text was done with the Snip tool.
    Make sure your equipment slots in the equipment umg widget are numbered correctly, and that they match the same slots are your equipment slots Enum and your make inventory array, all 3 need to follow the same order.

    Leave a comment:


  • replied
    Thanks For the reply Pirate I had done both of thoose, Click image for larger version

Name:	CurrentIssue.PNG
Views:	1
Size:	757.5 KB
ID:	1111448
    This is how things are looking in a blank project as you can see theres a fern in the added slot if the class item spawing is enabled seems to be the first item in the list from the class.
    Along with this as youll see in the next image while the mouse is hovered over the added slot it belives its over the head slot Click image for larger version

Name:	Tooltip.PNG
Views:	1
Size:	692.0 KB
ID:	1111449 sorry for the text was done with the Snip tool.

    Leave a comment:


  • replied
    Originally posted by LLews View Post
    Hi im back with the same issue though i have adavanced a little bit in what i have done with creating extra slots, so as i posted in the last post i have created the slot in the equipment UMG, along with adding a entry into both equipmentslots and equipmentSlotType Enum, Along with making the OnRep function in the EquipmentCharacter and ading an extra skelatal mesh componet i have then found after a few hours of going through all the funuctions i have found i needed to add it to The UpdateEquippedMeshes Funuction and Get Equipment slot by type Function then in the Inventory layout i have added the inventoryslot 14 in this case to the array, now im not getting any errors from the blueprints so all this bit seems to work fine but if i am using the demo classes in will places the first inventory item in that slot so eg the Apple if the warrior was chosen then if interacted with it will dequip/equip Items for the head slot and nothing will change in that slot (14), so my basic conclusion is i havent definded that slot 14 should be slot 14 But after a few days of going over all the Blueprints i cant seem to find where that is either im blind which is the most probable or i have come to the wrong conclusion as to what is wrong. Thanks for any help i could also get a few images/ videos if that would help explain the situation better than what i have here

    Make sure you add your new slot into the Enum EquipmentSlots so that the inventory backpack count will start at 15 when Get number of entries in EquipmentSlots is used in the Logic to figure out how many of the slots are equipment before starting the inventory.

    Click image for larger version

Name:	GetEquipSlotCount.jpg
Views:	2
Size:	130.7 KB
ID:	1111444



    Also in the UI InventoryLayout you need to add the new Equipment UI Slot into the array and that will fix it from being off when it's translating from Inventory Slot # to UI Inventory Slot #.
    All the Equipment slots that are in your Equipment window must be added here and the remaining backpack slots are created on init based on inventory size and added to this array automatically.

    Click image for larger version

Name:	InventorySlots.png
Views:	1
Size:	126.6 KB
ID:	1111445

    Pretty sure the 2nd part is your issue. Let me know how it goes.
    Last edited by Pirate; 07-03-2016, 04:02 PM.

    Leave a comment:


  • replied
    Hi im back with the same issue though i have adavanced a little bit in what i have done with creating extra slots, so as i posted in the last post i have created the slot in the equipment UMG, along with adding a entry into both equipmentslots and equipmentSlotType Enum, Along with making the OnRep function in the EquipmentCharacter and ading an extra skelatal mesh componet i have then found after a few hours of going through all the funuctions i have found i needed to add it to The UpdateEquippedMeshes Funuction and Get Equipment slot by type Function then in the Inventory layout i have added the inventoryslot 14 in this case to the array, now im not getting any errors from the blueprints so all this bit seems to work fine but if i am using the demo classes in will places the first inventory item in that slot so eg the Apple if the warrior was chosen then if interacted with it will dequip/equip Items for the head slot and nothing will change in that slot (14), so my basic conclusion is i havent definded that slot 14 should be slot 14 But after a few days of going over all the Blueprints i cant seem to find where that is either im blind which is the most probable or i have come to the wrong conclusion as to what is wrong. Thanks for any help i could also get a few images/ videos if that would help explain the situation better than what i have here

    Leave a comment:


  • replied
    Originally posted by OverRated_AU View Post
    Go to your projects folder and ActionRPGInventorySystem\Config\DefaultGame.ini and check the ProjectVersion, search for make inventory item and much sure all the wires are connected.
    You AU... If I haven't said it before I'll say it now... YOU DA MAN!!!!

    I missed a few locations where I forget to connect up the new struct items! Thanks! This one had me pulling my hair out and there ain't much left to pull out!


    BTW I'm running 1.5.

    Leave a comment:


  • replied
    Originally posted by Lord Caine View Post
    Hi AU

    Where do I find the version number for Action RPG?

    I copied ItemIntelligence to a new macro called ItemScale and wired that output to a float called ScaleValue. Both macros take inventory item as an input. I know the value is set back in my itemlist but when I use ScaleValue nothing comes back.

    Thanks,

    Arthur

    Go to your projects folder and ActionRPGInventorySystem\Config\DefaultGame.ini and check the ProjectVersion, search for make inventory item and much sure all the wires are connected.

    Leave a comment:


  • replied
    Hi AU

    Where do I find the version number for Action RPG?

    I copied ItemIntelligence to a new macro called ItemScale and wired that output to a float called ScaleValue. Both macros take inventory item as an input. I know the value is set back in my itemlist but when I use ScaleValue nothing comes back.

    Thanks,

    Arthur

    Leave a comment:


  • replied
    Originally posted by Rhynedahll View Post
    I am replacing the entire inventory array at load, maintaining slot position. TryToAddItemToInventroy places a single item in the next available space, which would not be suitable for my future purposes.

    The Server_RefreshInventorySlots event called from inside the IMC calls the private function RefreshInventorySlots whose comment says "Clear Client Inventory UI and Refresh Client UI From Server Inventory" which is exactly what I want to do.

    However, the Client_ClearInventroySlotItems function fails because the IMC UserInterface variable InventoryUI returns None.(Client_ClearInventorySlotItems ->ClearInventorySlotItems)

    Somehow, the InventoryUI variable in the IMC is not getting set or is getting reset and I don't understand why. As far as I can trace the execution flow, it should be fine.

    My current thought is that I have not called the refresh inventory slots function in the correct way to make it propagate down to the client. If I understand correctly, the server has no UI and therefore I suspect that the InventoryUI variable on the server would be None by default.
    Then your going to have to create a new function so the clients UMG gets the item info also, as replacing the array doesn't pass the data to the UMG inventory slots and there is no function to sync this info, what i did was add the inventory slot to the inventory item this mite help you add your items back to there original positions, i also had a similar problem when creating a campfire as it added the item to the inventory array of the container, i ended up making a function to update the info once the container was opened.
    Last edited by OverRated_AU; 07-01-2016, 08:12 AM.

    Leave a comment:


  • replied
    Originally posted by OverRated_AU View Post
    How are you adding the items to the inventory? to me it sounds like your not using the right function, if your not casting to the players IMC then thats why the UMG variant isn't being updated, you should be using the tryaddtoinventory function when adding items.
    I am replacing the entire inventory array at load, maintaining slot position. TryToAddItemToInventroy places a single item in the next available space, which would not be suitable for my future purposes.

    The Server_RefreshInventorySlots event called from inside the IMC calls the private function RefreshInventorySlots whose comment says "Clear Client Inventory UI and Refresh Client UI From Server Inventory" which is exactly what I want to do.

    However, the Client_ClearInventroySlotItems function fails because the IMC UserInterface variable InventoryUI returns None.(Client_ClearInventorySlotItems ->ClearInventorySlotItems)

    Somehow, the InventoryUI variable in the IMC is not getting set or is getting reset and I don't understand why. As far as I can trace the execution flow, it should be fine.

    My current thought is that I have not called the refresh inventory slots function in the correct way to make it propagate down to the client. If I understand correctly, the server has no UI and therefore I suspect that the InventoryUI variable on the server would be None by default.

    Leave a comment:


  • replied
    Originally posted by Rhynedahll View Post
    So, I've gotten the inventory connected through a socket server to my db and I can send and receive the inventory from the db.

    My current problem is that I have not been able to figure out how to display the loaded inventory in the UI.

    Though I originally had the socket and packet functions and variables in my playercontroller, I moved all of them to the IMC, but this produced no different result. My original intent was to leave the IMC as pristine as possible and add my own code in other places. I also tried to create a child class of the IMC and place my additions there, but that would not work as the IMC would need to call functions in the child class. (Edit: just realized that I can override the IMC functions in the childclass so that I can make my additions and everything should play nice. Once I get everthing working properly, I may back up and switch everything over.)

    I have tried: RefreshInventorySlots, Server_RefreshInventorySlots, Client_LoadInventory (both in my PlayerController and in the IMC)

    None of these worked because the InventoryUI variable returns None. The Inventory UI functions properly otherwise (at least in single player -- I have introduced a multiplayer bug somewhere that I haven't sought out yet.)

    I do not call the load from db function until after the InitializePlayer function in the InventoryPlayerController is called, which should init the InventoryUI variable through the InitializeInventoryManagerUI function (which only sets the InventoryUI variable.)

    I can pick up another item and swap it to another slot and cause the loaded items to appear when they are swapped to the new slot.

    Does anyone have any suggestions?
    How are you adding the items to the inventory? to me it sounds like your not using the right function, if your not casting to the players IMC then thats why the UMG variant isn't being updated, you should be using the tryaddtoinventory function when adding items.

    Leave a comment:


  • replied
    So, I've gotten the inventory connected through a socket server to my db and I can send and receive the inventory from the db.

    My current problem is that I have not been able to figure out how to display the loaded inventory in the UI.

    Though I originally had the socket and packet functions and variables in my playercontroller, I moved all of them to the IMC, but this produced no different result. My original intent was to leave the IMC as pristine as possible and add my own code in other places. I also tried to create a child class of the IMC and place my additions there, but that would not work as the IMC would need to call functions in the child class. (Edit: just realized that I can override the IMC functions in the childclass so that I can make my additions and everything should play nice. Once I get everthing working properly, I may back up and switch everything over.)

    I have tried: RefreshInventorySlots, Server_RefreshInventorySlots, Client_LoadInventory (both in my PlayerController and in the IMC)

    None of these worked because the InventoryUI variable returns None. The Inventory UI functions properly otherwise (at least in single player -- I have introduced a multiplayer bug somewhere that I haven't sought out yet.)

    I do not call the load from db function until after the InitializePlayer function in the InventoryPlayerController is called, which should init the InventoryUI variable through the InitializeInventoryManagerUI function (which only sets the InventoryUI variable.)

    I can pick up another item and swap it to another slot and cause the loaded items to appear when they are swapped to the new slot.

    Does anyone have any suggestions?
    Last edited by Rhynedahll; 06-30-2016, 07:49 PM.

    Leave a comment:


  • replied
    Originally posted by Lord Caine View Post
    Hi there,

    I've been using item intelligence as a placeholder for the scale parameter on objects in the function randomizedroplocation. I figured I'd finally add a scale parameter as a float to the inventory item structure. I've done that and set the value. I copied the itemintelligence macro to itemscale. I can not get the scale back from this macro for some reason. If I use itemintelligence it works fine. the macros are just a break so I don't get this but when I run debug nothing is coming back.

    Anyone have any ideas?

    Thanks,

    Arthur
    Hey Dude,

    What version of the inventory are you using if its older than 1.5 then you mite have to connect up the wires that make the inventory item structure, which marco can't you get the float from?

    Leave a comment:


  • replied
    Hi,

    One last question for today. I can I drop an item so it always ends up in front of my character. Right now it always drops outside of the field of view of the character.

    Thanks,

    ARthur

    Leave a comment:


  • replied
    Hello Again,

    I wanted to drop my objects a little further out from my FPS character and come to find out you can drop them off the map or inside the map doing that. Any tips on how to prevent that from happening?

    Thanks,

    ARthur

    Leave a comment:


  • replied
    Hi there,

    I've been using item intelligence as a placeholder for the scale parameter on objects in the function randomizedroplocation. I figured I'd finally add a scale parameter as a float to the inventory item structure. I've done that and set the value. I copied the itemintelligence macro to itemscale. I can not get the scale back from this macro for some reason. If I use itemintelligence it works fine. the macros are just a break so I don't get this but when I run debug nothing is coming back.

    Anyone have any ideas?

    Thanks,

    Arthur

    Leave a comment:

Working...
X