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.
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.
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.
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!
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