Download

Action RPG Inventory System

Thanks.

i found a video showing how to change it at post 92
it’s not perfect since several things has changed but i think i can make it work for now

Is there no discord channel for easier communication?

So to start, ive followed the migrating video (It was missing the part of setting up the tooltip info tho :P, luckily i noticed tooltip stats were missing and just looked at the base project and copied that single thing over). I had some issues at first because once i got everything copied over and moved into my own folder, i force deleted the extra files that were not needed (The mann stuff, the Inventory Controller) and it lead to breaking my tooltips. Also couldnt figure out how to get my dead AI to be lootable even after copying much of the NPC example stuff over into my AI parent. Eventually i decided to go back to a revision before i deleted the inventory folder from my project and the issues had started. Once i was back to that i had a bunch of issues with my project cause it didnt like that i deleted the entire thing and redownloaded it but i got it working again haha.

Now here’s where im at, im going to begin the work again soon here and see what happens when i mess with the extra files that arent supposed to be needed anymore.
One question i do have is does anybody know how to make it so i have both the E to interact AND the mouse hover over acts the same where it highlights + right click will loot as well. Obviously for right click i can add that to make it act just like E so you can use either one, but how would i go about making it so mousing over a lootable item would highlight it? I’m going to try to dig into it when i get to work here in a bit but just asking in case i get a reply before i get to work. Thanks in advance!

ok im really confused. I duplicated the ‘Loot_Skeleton’ and did an over-ride for his function ‘GetLootList’. I changed the loot list to be a custom one i have with nothing but the food that already exist with this system. What im having a hard time understanding is the min loot / max loot / inventory size.
I thought okay min loot = the minimum amount of loot that can drop. Max = max amount that can drop. Inventory size = ??? no idea. So i then changed the max quantity in the loot table to be 50 for 2 of the foods but it never drops past an amount of 5.

My values are:
Min Loot Items: 1
Max Loot Items: 10
Inventory Size: 100

i tried different values but either run into infinite loop errors or it works but nothing much changes. I wish there was an actual documentation on this :frowning:

EDIT: Oh i see the master items list has a max stack size value :open_mouth:
I’m assuming inventory size is used for stashing limit for player stashing.

Ya if you look at the pot example i think that is where their inventory size comes into play.

I think this is it. but there is pretty much zero creator support anymore. someone should make a discord for this for users. I ended up creating my own system from scratch, so haven’t played with this in awhile.

Thats not good :frowning: To hear there isnt much creator support, thats incredibly unfortunate. The whole silver lining of why i purchased this was because it would have support unlike the abysmal month to 2 long wait to get replies from the creator of mmokit -_-
Well, atleast there is everyone here that can give guidance, hopefully haha.

Ok so on a side note, does anybody know why if you move the spawned object (Loot_Skeleton) or in my case a copied version (Loot_Chest) after it has spawned (physics), it breaks the ability to loot it?
Additionally, i changed the mesh into a gold bar thats fairly small and even when i have it highlight it will not open its loot -.- Why is this so broken. Its supposed to easy lol.
I’ve been at this for 4 hours and its just not working consistently. I dont understand why its not working 100% with a different mesh set. The white outline works perfect but looting does not.

EDIT: After working on this (testing back and forth) for too many hours, ive figured out its my invisible dead NPC’s that are causing it. So with mmokit the respawn system is set so when you kill an NPC it changes it into invisible but its still techniquely in that same spot, but invisible and doesnt dissapear until it hits its respawn timer. This was blocking parts of the item im trying to loot which is why half the time it would work and half the time it wouldnt. I changed my respawn timer to be half a second after its death and now i can loot no problems. Now i guess i have to figure out how to change it so when its set to invisible it also sets some other collision property into ignore maybe.
Still not sure whats up with the physics tho. If i set a mesh to have physics and i push it around somewhere else, it loses its loot-ability but still highlights white.
EDIT2: Took me an extra couple hours but i was able to figure out the collision/object responses. I set my ‘Loot_Bag’ to block everything minus Pawn. I then changed the collision trace it does over in the player controller in the function ‘Get Usable Actor’ from Visibility to ‘Camera’ and now i have it roughly working how i want. I really want physics in so if its a flying npc it would drop its loot chest/bag down onto the ground but for whatever reason this breaks the loot completely :frowning: Any thoughts??

EDIT3: Okay so since i had finally managed to get some stable settings i had retried the dropping loot from up high and noticed that as long as the rotation and location doesnt go too far off, it’ll stay loot-able. I was able to set my ‘Loot_Chest’ collisions to Ignore on the WorldDynamic (So it doesnt collide with other chests) and Pawn (So player doesnt collide with it, including AI). I then re-enabled Simulate Physics where i set the massInKg to 250 and the Lock position X and Y enabled. Z was left off and all the lock rotations left off, this way the boxes can atleast tilt/fall away from static object in the world like a tree or clothes lines in my village (rather than the chest landing on top of the clothes line and looking totally unrealistic). I then set it so when the loot chest is spawned it does a +500 to Z so it spawns higher up in the air from the AI’s location so i could test if i could still loot everything once it landed. I could indeed with a good 98% success rate where the other 2% is just where i would have to try different spots on the chest before it would open up the loot.

I still cant set the loot so its not locked to its position tho, that’ll break the loot 100% every time when it gets moved around too much in any direction.

Thank you very much for this. Today i decided to tackle figuring out adding in new equipment slots. it was fairly easy but i couldnt figure out where it was using the new ‘inventory_slotX’ info and on play my inventory was broken. Your post lead me right to it and i would have never looked there.

It is unfortunate that if you happen to press ESC while dragging the inventory window or others, the windows disappears, lost forever until you restart.

This can be resolved if you change the grid based slots to the other type (default without grid). This can be changed in the inventory widget if I recall correctly, and or the corresponding InventoryManager function to create the inventory. If you change the grid slot type inside the Inventory, the InventoryManager will produce an error, pointing you to the function which requires the edit.

I’m modifying the datatables to be more manageable separate armor weapon, etc into its own DT so as i add items it doesn’t fill up one inventoryitem DT but seperate ones for each category. I noticed the equipment component is a child of the inventory component, everything is stored managed in it. The first couple of slots is reserved for equipment and the rest is used by the inventory. I’m trying to find the code that displays the items on the equipment widget vs the inventory widget, basically does the manager reads the fist 14 slots fills the equipment then the rest are set in the other widget?

@harrism76 So i have no idea if this is helpful to you or not, but its all just 1 big inventory. The equipment and the inventory are the same, its just moving items over to slot 1 through 14 which is equipment, then 15 and onwards is in the inventory widget. It basically copies the item you equipped, adds it into the new inventory slot (which would be the equipment slot location 1 through 14), then deletes the item from its original spot in inventory.
You can see in the ‘Inventory Manager Component’ on the left side use the arrow to collapse the ‘Manager/Private/Equipment’ and double click on the ‘EquipItem’ function to view the code. Over to the far right in the white comment box you’ll see the swap item and remove item. This is what im referring to.

Now if you navigate to the same area but for the function ‘UpdateEquippedStats’ you’ll see a box in the code called ‘Get number of entries in EquipmentSlots’. Right click this and get all references. From there you can look at the functions that are using this and hopefully it will give you a better idea of whats going on and how its using the inventory separately from the equipment but linked together at the same time.
I havent tried seperating all my items into categories like you are attempting simply because i figured its more work than necessary since i can just title ‘Equip_ITEMNAME’, or ‘Potion_Luck’, etc so that when im viewing my items i can just scroll to a category and have the ease of access of having all items in 1 data table. It is annoying how i cant move the items around but atleast i can right click an item and make new row below the 1 selected.

So i managed to get this saving and loading for the MMOKIT so thats awesome. Only took me 3 hours to figure it out, then a few more to fix a small issue lol. I was dreading it thinking it was going to take me much much longer so i was putting it off for the longest time.