Announcement

Collapse
No announcement yet.

Action RPG Inventory System

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

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


  • replied
    Originally posted by Pirate View Post
    The update didn't break anything with the Action RPG Inventory System I have tested it in the original project and my own that are using it in 4.12.4.

    If the Inventory Slots don't show up in your backpack it's because in your PlayerController init logic didn't finish the client init code for the InventorySystem.
    I would suggest taking a look at your init code and putting print strings on cast failed to see if your code is fully executing or if something is causing it to abort prematurely.
    I've tracked the problem down to the CreateInventorySlots function in the IMC. The first for loop is not firing. I'm going to compare the function in my project (which is not updated to the latest version of ARPGIS) with one from a fresh project and see if I can find a broken link or other irregularity. A cursory examination of the function in my project did not reveal one.

    Edit: SlotsPerRow is my culprit

    Edit again: Even though I did not know the variable existed until I found it, I either set InventorySlotsPerRow to zero somehow or it just took it in its head to change

    Anyway, back on track and thanks for your help.
    Last edited by Rhynedahll; 06-28-2016, 09:06 PM.

    Leave a comment:


  • replied
    Originally posted by Rhynedahll View Post
    Thanks!

    I've hit another speed bump though. I upgraded to 4.12.4 and my inventory slots disappeared from the Inventory widget. As I haven't made any changes to the widgets in a very long time, I'm thinking that either the update broke something or the widget gremlin has returned.

    Any suggestions?
    The update didn't break anything with the Action RPG Inventory System I have tested it in the original project and my own that are using it in 4.12.4.

    If the Inventory Slots don't show up in your backpack it's because in your PlayerController init logic didn't finish the client init code for the InventorySystem.
    I would suggest taking a look at your init code and putting print strings on cast failed to see if your code is fully executing or if something is causing it to abort prematurely.

    Leave a comment:


  • replied
    Originally posted by Pirate View Post
    In the HUD Class Event Graph.
    Thanks!

    I've hit another speed bump though. I upgraded to 4.12.4 and my inventory slots disappeared from the Inventory widget. As I haven't made any changes to the widgets in a very long time, I'm thinking that either the update broke something or the widget gremlin has returned.

    Any suggestions?

    Leave a comment:


  • replied
    Originally posted by Lord Caine View Post
    HI,

    I am trying to do a simple delete of an item from my inventory... only it isn't so simple. I can add an item no problem with trytoadditemtoinventory.
    I made a new function from this one and tried setting the localitemamount to -1 but that didn't work.

    So then I tried this:

    [ATTACH=CONFIG]99676[/ATTACH]

    Can someone give me a clue?

    Thanks,

    Arthur

    It will be best to probably create a Find and Remove Amount from Stack function that returns true if it was successful. Then inside that new function it would be very similar logic as the Find and Add Amount to Stacks code but will return true if there was stacks and the amount removed.


    Originally posted by Rhynedahll View Post
    Hopefully, someone will be able to save me some time.

    Where is the code that draws the crosshair located?
    In the HUD Class Event Graph.

    Leave a comment:


  • replied
    Hopefully, someone will be able to save me some time.

    Where is the code that draws the crosshair located?

    Leave a comment:


  • replied
    OK I found the issue.

    I had my maxstacksize set to 10 and the number of items in my inventory set to 10. Findaddamouttostacks won't add a negative 1 to the amount if those two numbers equal each other. I bumped up my maxstacksize to 100 and the problem went away.

    Leave a comment:

Working...
X