Add experience loss to a death event

Hey all,

Since hard mode is pretty brutal due to bugs and Internet instability… I wanted to make a less harsh version of hard mode.

I was thinking of either changing hard mode to result in 5% total experience loss… or making 5% total experience loss a part of the normal game in a total conversion.

Anyone else thinking of doing this, or know how to do this?

Good idea.

Forced the players to ensure their dinos come out alive from every battle.

Nowadays, most of the unofficial servers have fast tame that every dino tamed are taken for granted.

This would be a tough one. You would definitely have to over-ride .ini values so that they are not able to change back to “non-hardcore”, then you would have to edit the value/create in Blueprinting the path to only take away 25% of a players XP on death.

u just force the event with authority so it cannot be overridden in theory even in godmode ect u will die lol

Ancient bump… hoping the new 214 devkit with more variable exposure will now allow XP loss to be done through visual scripting on player pawn dispossess event.

Ancient re-bump after… wow… almost a year.

Still can’t implement this… no, Switch has Authority still doesn’t work either.

P.S. get/set experience via PlayerCharacterStatus component works fine on a Jump event… but set doesn’t work on a Dispossess event.

Uh… this has been possible for quite some time(it’s a little more involved as this struct is stored in two or three places - all contained within the PlayerState - and requires a forced net update):


Setting the experience via the status component really is not recommended as I doubt that data carries over to a new pawn, whereas the PlayerState does - it’s what retains all information about a player until they create a new survivor.

There’s nothing wrong with Switch Has Authority, by the way, if used by the client(and when not in singleplayer) then it’s going to be false because the client does not have authority - only the server does.

-WM

Holy wow was I a long way off getting that working … my script was running in the event graph in PlayerPawnTest and was relatively simple… i figured the only thing I needed to do was to force replication back to the server.

Is there some place all this is documented - I never could find anything clearly written? I’m guessing you analysed a zillion SotF scripts and pieced it all together!

Anyway… I’ll give your approach a crack… can I ask what blueprint you are running this out of? Probably not PlayerPawnTest heh.

P.S. I don’t suppose I could incent you to email me the blueprint uasset(s) for this? I’m rebooting an old TC mod, and this is the last major thing that I need to get working and what has historically kept me from releasing it and other mods as it’s just absorbed too much of my time. I’d give you credit in the mod! PM me if your interested.

3c2c4b373666acee53d50eb25c6367016f441be5.jpeg

DevKit Tested.

-WM

Thanks so much, Woeful… saved me probably days of fruitless effort… once I get this up and running and into the mod I’ll certainly be giving you massive props.

Just in case you’re interested, I moved the CustomGameData to my mod root and used it directly by mapping it via PrimalGameData_BP. I see the new options in CustomGameData (nice update to the UI!) but interestingly the message is always that you’ve lost 0 experience regardless of player XP or whether it’s 5% or whatever. Anyway it was a quick 10 minute fiddle before I had to go out and I’ll take a proper look later… but so far I gotta say I’m impressed by your knowledge of the Ark blueprint event handling, callouts and how you reconstructed the array to update the value!

Ok integrating the script…

In the “On Init Game Option” function, I removed the Override XPLoss Multi branch condition. Otherwise if you don’t check the checkbox, this branch will be false and it exits without setting the XPLoss Multi value… even if you want to use the default 0.05 value. I think more intuitive to remove it?

I traced the zero value issue as being linked as a level 1 character. I had to level up once to make it work.

The only bit of bad news is… that setting the PrimalPersistentCharacterStatsStruct resets character level back to 1 every time. It’s not a cosmetic UI issue, as subsequent deaths will keep bring you back to level 1 (engram points don’t reset though).

So I’m thinking… is the level data stored in “My Data”… getting nuked by an invalid struct in the form of the PrimalPersistantCharacterStatsStruct?

P.S. Strangely it’s quite enjoyable breaking down these kinds of challenges :slight_smile:

Ok I’ve looked around through all the structs and options… and my conclusion is that “player level” is a non-surfaced variable within PersistentCharacterStatsStruct.

In your test, are you also seeing the character level being reset to 1? I’m seeing this in PIE as well as a cook loaded onto a dedi server.

Btw while I was testing, I removed the “Set members in PrimalPlayerDataStruct” that was applied with "My Data"during the process of elimination… and there was no noticeable difference.

Thoughts appreciated.

I’ve attached your original version, and my modified one for reference.

My tweaked version
91ad5cf1272100b5c75a5cbe6470da665190a0a3.jpeg

Your original version

Hi all!

I was thinking in working in a similar mod. Specificaly, i thought about sth similar to hardcore mode, where 75% of the player’s xp was lost on death.

Could you manage to run your mod in ark? Is it already published? Thks in advanced!