Keep Inventory on Death

Hello,

I am trying to figure out how to make a mod for a dedicated server (Linux if it matters). Specifically one that allows players to keep their inventory when they die. I couldn’t find an option in the game configs so I’m guessing it’s not possible without a mod. I suspect it would have to do something like remove the inventory from your most recent dead body and put it back into your newly spawned body. But I have no idea how it works so that could be way off.

I’m a programmer but clearly I’m missing something somewhere. I’ve read some guides, watched tutorials and read docs and just don’t see any way to do what I’m trying to do. Everyone seems to be just copying existing assets and clicking things in the interface to change their values or whatever. I’m guessing what I want to do has to be coded somehow but I’m not sure how to go about doing that. Should it even be possible to make it keep inv on death? Can someone please point me in the right direction?

Thanks!

Hi,

The Inventory is a component of the pawn, it should be called something like ‘Primal Inventory’. I think what you are looking for is to move this component over to the PlayerController or PlayerStatus blueprint So that when the pawn dies, the inventory will be saved (like lvl & skills).

Hello,

Thank you for your response! I really appreciate it. I will give it a shot and see if I can figure that out.

I found a PlayerControllerBlueprint and PlayerCharacterStatusComponent_BP but I can only edit Components on PlayerControllerBlueprint. There aren’t any levels and skills in there though I don’t think.

I can copy in the PlayerPawn files and edit their components and see a PrimalInventory1 and PlayerCharacterStatus there. Since I can’t edit the PlayerCharacterStatusComponent_BP components maybe I’m supposed to make a graph there and put it in there? Do I even have to do anything with the graph? Sorry, I’m just a bit confused how it all works still.

Thank you!

If anyone has any further information that would be great. I have spent enough time messing with it for now and can’t seem to get it to work.

I got the mod uploaded to Steam as hidden but it doesn’t seem to do anything at all. I even tried implementing this into it unsuccessfully so I must be doing something wrong since it doesn’t even work. Guide: How to add a Particle System (like a green beam) to the Player Corpse - ARK: Survival Evolved - Unreal Engine Forums

I’ve wasted enough time and I’m going to just have to give up for now. Thanks for the great game!

Hello,

I tried this again and managed to get the tutorial working that I was trying to before that shows a beam on the corpse. However I still can’t figure out how to make the inventory move to the players new body on death rather than stay in their old corpse.

I’ve tried doing as suggested but that doesn’t work though I may have done it wrong.

So far I’ve tried finding some way to do it in the graph similar to how that tutorial I linked in my last post has but I can’t get it right. I’ve also tried copying in the PlayerControllerBlueprint and switching the GameMode to use that and then copying the PrimalInventory1 component from the PlayerPawnTest_Male into that but that doesn’t work. So maybe I’m not doing that properly or maybe there’s something more I’m supposed to do that I’m not but I’m not sure what that might be. Just playing around with various things I don’t see any way to get the inventory from the old body into the new one. Maybe it’s just not available to use yet? I don’t know.

Can someone pretty please provide more detailed instructions, if it’s even possible? Thanks!

Hello,

I don’t know of any instructions for this sort of process yet. As far as mods go, you are blazing a new trail! I’ve been trying to think about how to do this, and I have an idea that might work for you. I think you may be trying to do it at too high a level. What I mean by that is rather then deal with it at the top with the player controller and pawn inventory components, it might work to come from the bottom up, focusing on moving the items that are inside the inventory. Read the death inventory into an array, and dump the array into the new player inventory. I’m not sure how to actually do that, but I’m hoping it might help. I also thought of a potential work-around for the issue if this idea doesn’t work out. Perhaps instead of moving the inventory or it’s contents, just teleport the dead body to the location of the respawned player. Then hey can safely loot their own corpse (lol)

Hello,

Thank you for the reply!

Those sound like great ideas if they would work but I have no idea how to accomplish them. Will screw around with all these graph things and see if I can figure it out then.

Thank you!

Well, I have just spent a lot of time messing with the graph stuff and I’m still not able to figure out how to get the inventory contents. I think that the inventory blueprints maybe don’t include the actual inventory contents of the player. But there isn’t any function or anything that I can see which allows me to actually retrieve the inventory contents of the player. I think perhaps there isn’t actually any way implemented yet, but if there is a quick tutorial would be greatly appreciated! Hopefully the dev kit is being updated with such functionality, that would be great!

Amazing Idea I hope you pull it off

Well, after several hours of redownloading the dev kit from steam and applying the updates and so forth I now have my dev kit at 206.2. Woohoo!

So I recreated the mod from scratch and still can’t get it to keep inventory on death. Anyone have any ideas now with this new dev kit? Any shred of idea I can try? Thanks!

ThunderAcoustic, the devkit should be downloaded from epic game launcher now not steam.

I’ll get back to this idea as soon as my dev kit is updated :slight_smile:

Hmm, so you’re saying my dev kit is likely broken in some way then? Why is it even on Steam then? It should be removed. Steam is a much, much faster download than Unreal Launcher which is why I used it.

It will work, but honestly you’ll get better support using the version available on the epic launcher.

I just just switched to the Unreal Launcher version in a bit of an unusual way which I will explain in case it’s of some use to you.

I had previously installed from the Unreal Launcher so now when I open it the big red button says Repair because the files are no longer there since I deleted them to make room to download from Steam. Actually I’m pretty sure Steam required twice the space it said it did because it copies from a downloading folder to the common folder when it’s done downloading.

So anyway, now all I did was move the ARKDevKit folder from the Steam install to where the Unreal Launcher previously installed it. Then I clicked repair and low and behold it downloaded 2.2GB and to my delight it only took a few minutes because it didn’t go much, much slower than Steam.

Previously I had gotten about 8-9 MB/s on Unreal Launcher and I get over 17 MB/s on Steam so previously it took about twice as long to download over Unreal Launcher. But just now I saw Unreal Launcher downloads get up to 13 or 14 MB/s so maybe it uses torrent or maybe just less people were downloading right now, I don’t know.

Another interesting comparison between the two, afterwards Steam then spent a bunch of time copying the files, it didn’t even move them which would have been much faster, it copied them from the downloading folder to the common folder. Unreal Launcher may even do the same thing too, not sure, plus it spent a bunch of time Verifying the files it repaired which took maybe 10 minutes and then downloaded another few hundred megs, then verified them again which took another 10 minutes or so! I guess it saved a bunch of bandwidth though which is good.

So now I am using the Unreal Launcher version again and will remake this mod from scratch for the 4th or 5th time and see if it does anything differently, though I kind of doubt it at this point. I’m looking forward to hearing what you find out, if anything, :slight_smile:

Thank you!

I was unable to figure it out. Going to give up on this game for awhile. Maybe I’ll check back and see if anything is better after release.

I have a idea that might be a lot easier to make : when a player drags a dead/uncticious body or when you whistle to dinosaur to follow it does so what you could do is add that whistle element to a dead body and up the range to like 500’000 so when you spawn back in the dead body with your items ether moves towards you you could also add a feature where it moves at super fast speeds so you could wait at your base while your dead body is coming to you when it arrives (if it does) you have got your items

It not exactly a Keep Inventory mod but it still would be awesome o have the above idea as a mod
:wink:

Use at your own will I won’t be making this so I’ll leave it to you

Thanks for the idea. That’s much like a previously suggested idea to teleport the corpse to the new spawn position but I haven’t actually accomplished that yet. Seems like it should at least be possible and maybe it’s the only option for now though until someone is able to figure out a better way.

I hope this is of some help…could you make a mod/addon so you can teleport to your death site HOPE THIS HELPED