using System.Collections.Generic;
static int[] Settings = new int[] { 2,1,1 };
static MarkovChain<char> NameChain;
static List<string> CharacterList;
static MarkovChain<string> FlavorTextChain;
static MarkovChain<string> DescriptionTextChain;
public static void Main()
Console.WriteLine("> Dead by Daylight Perk Generator");
Console.Write("Input seed: ");
int.TryParse(Console.ReadLine(), out seed);
List<Perk> perkList = (List<Perk>)JsonConvert.DeserializeObject(PerkTable, typeof(List<Perk>));
Console.Write("Change settings? (y/n): ");
bool changeSettings = Console.ReadLine().Equals("y", StringComparison.OrdinalIgnoreCase);
Console.Write("Enter new settings: ");
string[] inputs = Console.ReadLine().Split(new char[] {','}, 3);
for (int i=0; i<inputs.Length; i++)
int.TryParse(inputs[i], out n);
Settings[i] = Math.Max(n,0);
NameChain = new MarkovChain<char>(Settings[0]);
CharacterList = new List<string>();
FlavorTextChain = new MarkovChain<string>(Settings[1]);
DescriptionTextChain = new MarkovChain<string>(Settings[2]);
foreach(Perk perk in perkList)
NameChain.Add(perk.Name);
CharacterList.Add(perk.Character);
if (perk.FlavorText != null) FlavorTextChain.Add(perk.FlavorText.Split(new char[] {' '}));
DescriptionTextChain.Add(perk.Text.Split(new char[] {' '}));
Console.WriteLine("Press ENTER to generate a new perk.");
Perk newPerk = GeneratePerk();
Console.WriteLine(newPerk.ToString());
static Perk GeneratePerk()
Perk newPerk = new Perk();
name = new string(NameChain.Chain(Rand).ToArray());
} while(name.Length == 0);
newPerk.Character = CharacterList[Rand.Next(CharacterList.Count)];
newPerk.FlavorText = string.Join(" ", FlavorTextChain.Chain(Rand));
newPerk.Text = string.Join(" ", DescriptionTextChain.Chain(Rand)).Replace("$THIS", name);
[JsonProperty] public string Name { get; set; }
[JsonProperty] public string Character { get; set; }
[JsonProperty] public string FlavorText { get; set; }
[JsonProperty] public string Text { get; set; }
public override string ToString()
Name, Character, FlavorText, Text
""name"": ""A Nurse's Calling"",
""character"": ""Nurse"",
""flavorText"": ""'Still attached to the fragments of her past life, she is drawn to those in need of help.'"",
""text"": ""Unlocks potential in one's Aura reading ability. The Auras of Survivors who are healing or being healed are revealed to you when they are within 28 metres of range.""
""character"": ""Trapper"",
""flavorText"": ""'At some point, the excitement of hooking one of us becomes more important than the desire to kill us.'"",
""text"": ""You get excited in anticipation of hooking your prey. Increases your speed while transporting bodies by 18%. While transporting a body, your Terror Radius is increased by 12 metres.""
""character"": ""Clown"",
""text"": ""Your vault speed is 15% faster. Performing a vault action calls upon The Entity to block that vault location for 16 seconds. Only 1 vault location may be blocked in this way at any given time. The vault location is blocked only for Survivors.""
""name"": ""Barbecue & Chilli"",
""character"": ""Cannibal"",
""flavorText"": ""'I just can't take no pleasure in killing. There's just some things you gotta do. Don't mean you have to like it.' — Drayton Sawyer"",
""text"": ""A deep bond with The Entity unlocks potential in one's Aura reading ability. After hooking a Survivor, all other Survivors' Auras are revealed to you for 4 seconds when they are further than 40 metres from the Hook, Each time a Survivor is hooked for the first time, gain a 25% stackable Bonus to all Bloodpoint gains. The Bonus Bloodpoints are only awarded post-trial.""
""name"": ""Beast Of Prey"",
""character"": ""Huntress"",
""flavorText"": ""'Where did she go?'"",
""text"": ""Your lust for a kill is so intense that your connection with the Entity is momentarily lost, making you totally unpredictable. The Red Stain disappears after gaining Bloodlust Tier I and stays hidden until you lose Bloodlust, Gain 25 seconds more Bloodpoints for actions in the Hunter Category.""
""name"": ""Bitter Murmur"",
""text"": ""Unlocks potential in one's Aura reading ability. Each time a Generator is fully repaired, Survivors within 16 metres of the completed Generator will be revealed for 5 seconds. When the last Generator is fully repaired, all the Survivors' Auras are revealed for 10 seconds.""
""name"": ""Bloodhound"",
""character"": ""Wraith"",
""flavorText"": ""'Pebbles shimmering in the moonlight; my life drips down in a trail so easy to follow.'"",
""text"": ""Like a hunting scent hound, you smell traces of blood at a great distance. Fresh Blood Stains are considerably more discernible than normal and can be tracked for 4 seconds longer than normal.""
""name"": ""Blood Warden"",
""character"": ""Nightmare"",
""flavorText"": ""'This is my world. And you can't ever leave.' — Freddy Krueger"",
""text"": ""Once per match, once at least one Exit Gate is opened, hooking a Survivor summons The Entity to block the exits for all Survivors for 60 seconds. While $THIS is active, Auras of Survivors located within the Exit Gates are revealed to you.""
""name"": ""Brutal Strength"",
""character"": ""Trapper"",
""flavorText"": ""'It's more than muscles. A dark power motivates the beast.'"",
""text"": ""Your great strength allows you to shred through your prey's defences. Destroy dropped Pallets and damage Generators 20% faster.""
""name"": ""Coulrophobia"",
""character"": ""Clown"",
""text"": ""Your presence alone instils great fear. Survivors within your Terror Radius have a 50% penalty to the Healing progression speed.""
""name"": ""Deerstalker"",
""text"": ""Unlocks potential in one's Aura reading ability. Reveals dying Survivors' Auras when standing within 36 metres.""
""name"": ""Distressing"",
""flavorText"": ""'Bask in their fear.'"",
""text"": ""Your horrifying emanation strikes at a supernaturally long distance. Your Terror Radius is increased by 26%. Gain 100% more Bloodpoints for actions in the Deviousness Category. The Bonus Bloodpoints are only awarded during the trial.""
""name"": ""Dying Light"",
""character"": ""Shape"",
""flavorText"": ""'This isn't a man...' — Dr. Sam Loomis"",
""text"": ""You become obsessed with one Survivor. Your Obsession's altruistic action speed is increased by 50%. Once the Obsession is killed or sacrificed, every other Survivor gets a penalty of 25% to repair, healing and sabotage speed. Only one Obsession per trial.""
""character"": ""Hillbilly"",
""flavorText"": ""'He stops at nothing.'"",
""text"": ""You are resilient to pain. Your rate of recovery from stuns is increased by 75%.""
""character"": ""Nightmare"",
""flavorText"": ""'Now why don't you just fucking die?' — Freddy Krueger"",
""text"": ""The increased pressure of losing your preys fills you with anger and gives you unsuspected motivation. Each time the Survivors complete repairs on a Generator, $THIS grows in power and grants speed bonus to pick up, drop, Pallet break, Generator break and vaults. 2 Tokens: Receive 10% action speed bonus. 3 Tokens: Receive 12% action speed bonus. 4 Tokens: Receive 14% action speed bonus.""
""name"": ""Franklin's Demise"",
""character"": ""Cannibal"",
""flavorText"": ""'Sally, I hear something. Stop! Stop!' — Franklin Hardesty"",
""text"": ""Your vicious attacks make the Survivors drop their Item on impact. The lost Item is damaged in the fall, losing 10% of its base amount of Charges.""
""text"": ""Unlocks the stealth ability. By standing still for 2 seconds, you reduce your Terror Radius to 0 metres and thus become stealthy until you move or act again.""
""name"": ""Iron Grasp"",
""text"": ""Your powerful hold onto the Survivors causes escapes to be nearly impossible. Effects of Survivors' wiggling are reduced by 75%. Time to wiggle free from your grasp is increased by 12%.""
""name"": ""Hangman's Trick"",
""flavorText"": ""'No excuses, no equivocations... No crying.' — Amanda Young"",
""text"": ""Your ingenious modifications to Hooks prevent tampering and permanent damage. Hooks destroyed by sabotage or sacrifices repair automatically after 10 seconds. Gain a notification when someone starts sabotaging the Hooks. The automatic repair timer of sabotaged Bear Traps is reduced by 60 seconds.""
""name"": ""Hex: Devour Hope"",
""flavorText"": ""'If you do nothing, you have their blood on your hands. If you save them, her hunger grows.'"",
""text"": ""A Hex rooting its power on hope. The false hope of Survivors ignites your hunger. When a Survivor is rescued from a hook at least 24 metres away, Devour Hope receives a Token. 2 Tokens: Gain a 5% speed burst for 10 seconds after hooking a Survivor. Speed burst triggers 10 seconds after hooking a Survivor. 3 Tokens: Attacks put Survivors into the dying state automatically. 5 Tokens: Grants the ability to kill Survivors by your own hand. The Hex effects persist as long as the related Hex Totem is standing.""
""name"": ""Hex: Haunted Ground"",
""character"": ""Spirit"",
""flavorText"": ""'Her home became profane.'"",
""text"": ""Two trapped Hex Totems will spawn in the Trial. When one of the two trapped Hex Totems is cleansed by a Survivor, all Survivors suffer from the Exposed Status Effect for 60 seconds. The remaining trapped Hex Totem immediately becomes a Dull Totem.""
""name"": ""Hex: Huntress Lullaby"",
""character"": ""Huntress"",
""flavorText"": ""'That song, it drives me crazy!'"",
""text"": ""A Hex rooting its power in despair. Your hunt is an irresistible song of dread which muddles your prey’s attention. Survivors receive a 6% regression penalty when missing any Skill Check, Each time a Survivor is hooked, Huntress Lullaby grows in power: 1 to 4 Tokens: Time between the Skill Check warning sound and the Skill Check becomes shorter. 5 Tokens: No Skill Check warning. The Hex effects persist as long as the related Hex Totem is standing.""
""name"": ""Hex: No One Escapes Death"",
""flavorText"": ""'And the beast became faster and more powerful as if the Entity's shadowy whips were lashing at its back.'"",
""text"": ""A Hex rooting its power on hope. You are animated by the power of your Hex Totem when the Survivors are on the verge of escaping. Once the Exit Gates are powered, if there is a Dull Totem remaining on the Map, this Hex is applied to it. While this Hex is active, Survivors suffer from the Exposed Status Effect and your Movement Speed is increased by 4%. The Hex effects persist as long as the related Hex Totem is standing.""
""flavorText"": ""'A curse is upon you. It will cause your ruin.'"",
""text"": ""A Hex that affects the Survivors' skills at repairing Generators, 4 Survivors are affected by Ruin, which causes Good Skill Checks to result in 5% regression on the Generator and Great Skill Checks grant 0% in progression. The Hex effects persist as long as the related Hex Totem is standing.""
""name"": ""Hex: The Third Seal"",
""flavorText"": ""'She touched your skin, you bear the witch's mark!'"",
""text"": ""A Hex that hinders one's Aura reading ability. Hitting a Survivor while the Hex Totem is active reduces the effectiveness of their Aura reading ability by 100%. This effect applies to the last 4 Survivors hit. The Hex effects persist as long as the related Hex Totem is standing.""
""name"": ""Hex: Thrill Of The Hunt"",
""text"": ""A Hex rooting its power on hope. The false hope of Survivors fills you with excitement and strengthens your totems. For each Dull Totem and Hex Totem remaining on the Map gain a Token. Gain 10% more Bloodpoints for actions in the Hunter Category for each Token. Survivors' cleansing speed is reduced by 6% for each Token. Gain a notification when someone starts working on a Hex Totem. The Hex effects persist as long as the related Hex Totem is standing.""
""character"": ""Cannibal"",
""flavorText"": ""'Oh, that gun's no good. The old way... with a sledge! You see, that way's better. They die better that way.' — Nubbins Sawyer"",
""text"": ""The trauma caused by your brutal attacks makes crying for help painfully difficult. Dying Survivors' Auras are not revealed to other Survivors when they are standing outside of 16 metres of range.""
""character"": ""Hillbilly"",
""flavorText"": ""'These monsters... they adapt! They emerge with strange new abilities.' — Vigo, Vigo's Journal"",
""text"": ""Unlike other beasts of the fog, you have adapted to light. Resistance to blindness is increased by 60%. Recovery from blindness is increased by 50%.""
""name"": ""Make Your Choice"",
""flavorText"": ""'You'd be surprised what tools can save a life.' — Amanda Young"",
""text"": ""When a Survivor rescues another from a Hook at least 32 metres away from you, $THIS triggers and applies the Exposed Status Effect on the rescuer for 60 seconds. $THIS has a cool-down of 60 seconds.""
""name"": ""Monitor & Abuse"",
""character"": ""Doctor"",
""flavorText"": ""'It's time for your treatment!.' — Herman Carter, The Doctor"",
""text"": ""Meticulous in your approach, terrifying in your application. While in a chase, your Terror Radius is increased by 8 metres. Otherwise your Terror Radius is decreased by 8 metres and your field of view is considerably increased. Field of view gains do not stack.""
""name"": ""Monstrous Shrine"",
""flavorText"": ""'Then you will know that there is no escape. When hanging in the depths, you face the dark one.'"",
""text"": ""Your fervent care of the hooks found in the Basement has aroused the Entity's interest. The Basement Hooks are granted the following bonuses: 9% faster Entity progression. 15% increased difficulty on escape attempts. 9% increased penalty to escape fails.""
""name"": ""Overcharge"",
""character"": ""Doctor"",
""flavorText"": ""'It is a trap. But a trap one must step in...'"",
""text"": ""You are fuelled by your hate for progress. Overcharge a Generator by performing the Break Generator action. The next Survivor interacting with that Generator is faced with a tremendously difficult Skill Check, Failing the Skill Check results in an additional 5% Generator regression. Succeeding the Skill Check grants no progress but prevents the Generator explosion.""
""name"": ""Overwhelming Presence"",
""character"": ""Doctor"",
""flavorText"": ""'Shit!! I dropped the gauze!'"",
""text"": ""Your presence alone instils great fear. Survivors within your Terror Radius suffer from inefficiency. Affected Survivors' Item consumption rates are increased by 100%.""
""name"": ""Play With Your Food"",
""character"": ""Shape"",
""flavorText"": ""'You've fooled them, haven't you Michael? But not me.' — Dr. Sam Loomis"",
""text"": ""You become obsessed with one Survivor. Every time you chase your Obsession and let them escape, you receive a Token up to a maximum of 3 Tokens. Each Token increases your Movement Speed by 5%. Each offensive action spends one Token. Only one Obsession per trial.""
""name"": ""Pop Goes The Weasel"",
""character"": ""Clown"",
""text"": ""A deep bond with The Entity unlocks great strength. After hooking a Survivor, the next Generator you break is instantly regressed by 25% of its total progression. Normal Generator regression applies after the damage is done. $THIS is active for 30 seconds after the Survivor is hooked.""
""character"": ""Wraith"",
""flavorText"": ""'Never stop moving and hope you're always two steps ahead of the beast.' — Unknown, Notebook"",
""text"": ""Your acute tracking ability allows you to hone in on disturbances left by running Survivors. Scratch Marks left by Survivors will spawn considerably closer together.""
""character"": ""Spirit"",
""text"": ""You become obsessed with one Survivor. Each time a Generator is completed, the Obsession sees your Aura for 3 seconds. Each time a Generator is completed, all Survivors' locations are revealed to you for 3 seconds. Once all Generators are completed, the Obsession has the Exposed Status Effect and the Killer can kill the Obsession. Only one Obsession per trial.""
""name"": ""Remember Me"",
""character"": ""Nightmare"",
""flavorText"": ""'You don't remember? You must. You're my number one, and you'll never wake up again.' — Freddy Krueger"",
""text"": ""You become obsessed with one Survivor. Each time you hit your Obsession, you increase the opening time of the Exit Gates by 5 seconds up to a maximum of 30 additional seconds. The Obsession is not affected by $THIS. Only one Obsession per trial.""
""name"": ""Save The Best For Last"",
""character"": ""Shape"",
""flavorText"": ""'Death has come to your little town, Sheriff.' — Dr. Sam Loomis"",
""text"": ""You become obsessed with one Survivor. Earn a Token for each successful hit that is not dealt to the Obsession. Each Token grants a stackable 5% decreased cool-down on successful attacks. You can earn up to 8 Tokens. Attacking your Obsession will make you lose 2 Tokens. You can no longer gain Tokens if your Obsession is sacrificed or killed. Only one Obsession per trial.""
""name"": ""Shadowborn"",
""character"": ""Wraith"",
""flavorText"": ""'Shining in the darkest dark, his eyes pierce the night and sting your soul.'"",
""text"": ""You have a keen vision in the darkness of the night. Your field of view is tremendously wider than normal.""
""name"": ""Sloppy Butcher"",
""flavorText"": ""'It's in its sadistic nature. There is no swift kill as it delights in the obscene spectacle of our agonizing suffering.'"",
""text"": ""You know where to hit to make them bleed. Wounds inflicted by successful attacks considerably increase the Survivor's Bleeding frequency and cause the Mangled Status Effect. Bleeding and Mangled effects caused by $THIS return to normal once the Survivor is fully healed.""
""name"": ""Spies From The Shadows"",
""flavorText"": ""'In the shadows they torment, scarring our minds with each scream.'"",
""text"": ""The Crows found in the world can communicate directly with you. 75% of the time, cawing Crows give you a visual clue when you are within a 36 metres.""
""name"": ""Spirit Fury"",
""character"": ""Spirit"",
""flavorText"": ""'Fury is her blood.'"",
""text"": ""Each Pallet you break magnifies the wrath of The Entity, After breaking 2 Pallets, the next time you are stunned by a Pallet, The Entity will instantly break it. You still suffer from the stun effect penalty.""
""character"": ""Nurse"",
""flavorText"": ""'If you don't stop and catch your breath... she will.'"",
""text"": ""Breathing of Survivors in pain is 50% louder. Regular Survivor breathing is now also 25% louder.""
""name"": ""Surveillance"",
""flavorText"": ""'Are you gonna behave?' — Amanda Young"",
""text"": ""Unlocks potential in one's Aura reading ability. The last 3 regressing Generators' Auras are indicated in white to you for 16 seconds.""
""name"": ""Territorial Imperative"",
""character"": ""Huntress"",
""flavorText"": ""'We're not safe anywhere...'"",
""text"": ""Unlocks potential in one's Aura reading ability. Survivors' Auras are revealed to you for 3 seconds when they enter the Basement and you are more than 32 metres away from the Basement entrance. $THIS can only be triggered once every 30 seconds.""
""character"": ""Hillbilly"",
""text"": ""When a Generator is repaired at 85%, you receive a noise notification and your Terror Radius is reduced to 0 metres for 12 seconds.""
""name"": ""Thanatophobia"",
""character"": ""Nurse"",
""flavorText"": ""'She plays with us and revels in our pain.'"",
""text"": ""All Survivors receive penalties to repair, healing and sabotage speeds for each injured, dying or hooked Survivor. 1 injured, dying or hooked survivor decrease repair, healing and sabotage speed by 6%. 2 injured, dying or hooked survivor decrease repair, healing and sabotage speed by 9%. 3 injured, dying or hooked survivor decrease repair, healing and sabotage speed by 12%. 4 injured, dying or hooked survivor decrease repair, healing and sabotage speed by 15%.""
""name"": ""Unnerving Presence"",
""character"": ""Trapper"",
""flavorText"": ""'Its presence befalls us.'"",
""text"": ""Your presence alone instils great fear. Survivors within your Terror Radius have a 10% greater chance of triggering Skill Checks when repairing, healing or sabotaging. Triggered Skill Checks' success zones are reduced by 60%.""
""name"": ""Unrelenting"",
""text"": ""You recuperate faster from any attack made with your main weapon. The cooldown of missed attacks is reduced by 30%.""
""flavorText"": ""'It's unclear as to the motivations of the fog, but it is undeniable that it often takes the beast's side.' — Unknown, Notebook"",
""text"": ""You have a rudimentary understanding of the Entity's voice. Sporadically hear the Entity's Whisper when standing within a 32 metres of a Survivor.""
""name"": ""Hex: Fate or Fortune"",
""character"": ""Psychic"",
""text"": ""A Hex rooting its power on false hope. The entity calls upon you to seek revenge on anyone who stands in your way. Your movement speed is increased by 7%. Fate or Fortune applies different effects on survivors at random with every hit applied to them for a maximum of 4 survivors, one survivor will get a positive effect. Fate or Fortune can apply: 4% Haste and 9% action speed increase. The Hindered Status. Can no longer hear the heartbeat or see thr killers red stain. Suffers from the Exhausted Status Effect and breathes louder. The Hex Effects persists as long as the related Hex totem is standing.""