It happens and when it does do not be discouraged. There are many campaigns that will set campaigns on stun and keep players alive regardless of the cost to story. In situations like this I feel some of the risk and fun is lost from the game world. I don’t plan killer encounters, but I do design at least 1 or 2 every level that should test your meddle. Sometimes players make some very bad decisions. Sometimes they walk away with a tale to tell and other times that is when their story ends.
I will intervene if I feel that I have made an encounter a little unbalanced or if the whole party is at risk to death.
When a player dies the world and story continue. Creating a replacement character is easy and a great way to try new things. Good luck getting your gear back from the survivors. The DM will help you select gear for new characters depending on their level and power level of the remaining party members.
To determine your new character’s level round down their current XP level to the current level’s quarters. Your current XP level should include the XP you would have earned if you had survived the encounter that killed your character. And then drop it down two more quarters to arrive at your next character’s starting XP. When you are subtracting the quarters and you need to drop down to the next level. Simply figure out the quarters for the next lower level and continue the progression downward.
Example: Coldtooth the Rogue dies at 950 XP. He is still first level so that means the level’s XP quarters are 0 XP, 250 XP, 500 XP, and 750 XP. Rounding down 950 XP to the next quarter comes up with 750 XP. Then subtracting two quarters means he drops from 750XP to 250XP. So Son of Coldtooth would arrive on the scene at 1st level with 250XP under his belt.
Example: Fooly the Ranger
dies feigns death at 10,005XP. He is barely at 7th level so that means he will round down to 0 XP for level 7 and then you figure out the next two quarters for 6th level since we know he is going to end up at the 50% quarter of 6th level in his next life. So in Fooly arrives on the scene at 6th level with 8750XP under his belt.