I've created a death saving throw system somewhat like your suggestion that works pretty much like how death works in DND 5th edition. When you "die" you have 50% chance to make a saving throw (may make constitution influence this, like you have a 40% chance to succeed + 1% * your Constitution). If you succeed three times, you get resurrected to 5-10% health, but if you fail three times you're permanently dead. The idea of permanent injuries is interesting. Would be best if they depended on how you died. Like if you die by fire, you gain a penalty to fire resist or something. How my save system currently works is below.

I'm not sure about mercenaries. There may be hireables in the game, so I'll have to wait and see what happens there before I can start thinking about that. I like the idea of mercenaries charging more if you let too many of them die though.

I saw your vitality changes on your mod. Interesting idea, have to see how that plays. I like the idea of levels having a smaller effect on challenge rating, both against high level and lower level enemies.


Death Save System

Code
EVENT DeathSaveInit
VARS
ON
OnDie(__Me,_,_,_)
ACTIONS
IF "c1"
CharacterIsInParty(__Me) // only players attempt death saves
THEN
StartTimer("DeathRecovery",10,0) // attempt to save every 10 seconds
ENDIF

EVENT DeathSavesThrow
VARS
ON
OnTimer("DeathRecovery")
ACTIONS

IF "c1"
IsRandom(.50) // if this is true, then you are saving succesfully
THEN

	IF "c1"
	IsEqual(%DeathSaves,2)  // if you've saved twice already, then you resurrect
	THEN
	CharacterResurrect(__Me,5)
	Add(%DeathSaves,1)
	ELIF "c1"
	IsLessThen(%DeathSaves,2) // otherwise, just add a success to the variable
	THEN
	Add(%DeathSaves,1)
	ENDIF

ELSE
Add(%DeathFails,1) // if the IsRandom above isn't true, than it's a fail, and you bleed
CreateSurfaceAt(__Me,SurfaceBlood,1,1,__Me)
ENDIF

IF "c1&c2"
IsLessThen(%DeathSaves,3) // if you haven't saved or failed three times, start the timer again
IsLessThen(%DeathFails,3)
THEN
StartTimer("DeathRecovery",10,0)
ELIF "c1|c2"
IsGreaterThen(%DeathSaves,2) // If you have died permanently or been rezzed, reset saves and fails to 0
IsGreaterThen(%DeathFails,2) 
THEN
	Set(%DeathSaves,0)
	Set(%DeathFails,0)
ENDIF


Currently this doesn't check for combat, so this will save over the course of a turn if you wait long enough. I think it's a bit tough to check if the character is in combat, since you can't be in combat if you're dead. It may need to iterate on characters nearby to see if they are in combat. When a character leaves combat, they will iterate on nearby characters, and if a dead character is nearby, they will then iterate themselves to check if combat is going on nearby from some other character or something, and then they will iterate on nearby characters again.

To make the saves work in combat, it would have to take into account rounds, which would be slightly clunky since there's no "OnRound" check. Something like, when you die, note the round, and then on each character turn, take note of the round, and if a round has passed, then you make a save.

So yeah, it's kind of complicated how I'm doing it. Maybe you can figure out an easier way? I assume you've seen this thread for all the character scripting commands?

http://larian.com/forums/ubbthreads.php?ubb=showflat&Number=605357#Post604994


Also if you want to create a new race, you can create a new race preset which can even reference a whole new root template, though probably there won't be any races that will have all the armor models and stuff, and you'll have to reuse one of the other races for dialog tags.

Last edited by Baardvark; 13/08/17 03:15 AM.