Announcement

Collapse
No announcement yet.

Action RPG Inventory System

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

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


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

    Click image for larger version

Name:	removeitem.png
Views:	1
Size:	90.3 KB
ID:	1109193

    Can someone give me a clue?

    Thanks,

    Arthur

    Leave a comment:


  • replied
    Originally posted by KrunkFu View Post
    Makes sense. I forgot your game is multiplayer. Thanks for the quick reply. I just starting looking through this inventory to figure out how it works. There is a lot to figure out lol.
    Its fairy simple and its logic is very clean so its good to learn off took me about a week to pickup, but i was also learning how blueprint worked as well at the same time, there are a lot of other assets out there that are very badly scripted i recommend this for beginners.

    Leave a comment:


  • replied
    Originally posted by OverRated_AU View Post
    Because i didn't want to waste bandwidth sending data thats isn't used, its a waste and you should always only send what is needed.
    Makes sense. I forgot your game is multiplayer. Thanks for the quick reply. I just starting looking through this inventory to figure out how it works. There is a lot to figure out lol.

    Leave a comment:

Working...
X