NotTsunami-ShowDeathCause icon

ShowDeathCause

Tells how your and your friends miserable lives ended. Now updated for the DLC!

Last updated 4 months ago
Total downloads 175824
Total rating 28 
Categories Mods Client-side Tweaks
Dependency string NotTsunami-ShowDeathCause-3.0.1
Dependants 93 other mods depend on this mod

This mod requires the following mods to function

bbepis-BepInExPack-5.4.19 icon
bbepis-BepInExPack

Unified BepInEx all-in-one modding pack - plugin framework, detour library

Preferred version: 5.4.19

README

ShowDeathCause

This mod lets you know how your and your friends miserable lives ended. This is based on the original ShowDeathCause with several improvements and updated for the latest game version.

Features

The death notice lets everyone know what killed you and how. The end game report screen is improved too! This fork provides the following improvements over the old version:

  • Works with the latest game version as of the first DLC update
  • Handles several more scenarios (friendly fire, critical hits, fall damage, void damage)
  • Prints the name of the dead player along with damage taken
  • Updates the end game report screen to include the enhanced information
  • (NEW) Language support (Currently only English is supported, but pull requests are always welcome! See the guide below for contributing.)
Chat Message (Before) Chat Message (After)
Before After
Game End Report (Before) Game End Report (After)
Before After

* Screenshots are taken on ShowDeathCause 2.0.0

Installation

It is highly recommended to use r2modman to install ShowDeathCause because it will set up everything for you! If you are installing manually, you will need to make a folder in Risk of Rain 2\BepInEx\plugins called ShowDeathCause and drop the contents of the zip into it.

Changelog

Version 3.0.1

  • Use builtin functions when applicable
  • Ensure victim body is valid
  • Only add language tokens if they aren't already added

Version 3.0.0

Version 3.0.0 is a MAJOR release, with a lot of changes under the hood. A very large shoutout goes to DestroyedClone for the support of additional languages along with the newly added death messages, and Bubbet for helping me learn Harmony. I recommend showing your support for these two by checking out their mods!

  • R2API dependency has been removed, making ShowDeathCause vanilla-compatible!
  • Language support has been added
  • New death messages have been added for the DLC update (void fog and void instant kill abilities)
  • Under the hood changes, mostly some future-proofing and hooking correctly

Version 2.0.2

  • Fixed NullReferenceException when the killer's body no longer exists in between the death message and end game screen
    • This happened most commonly when being killed by a Jellyfish

Version 2.0.1

  • Reverted change to remove original death message as this may break other mods that depend on OnPlayerCharacterDeath

Version 2.0.0 - Happy almost 100k downloads!

  • The biggest change in this update is that the end game report screen now includes the same information as the death notice
  • Elite/Umbra prefixes are now shown (Thanks WolfgangIsBestWolf for the suggestion!)
  • Fall damage is now labeled as such (Can occur when max HP <= 1 or with artifact)
  • Friendly fire kills are now attributed to the display name of the player who killed them
  • The original red death message is no longer shown, only the messsage from ShowDeathCause is printed in chat now

Version 1.0.5

  • Switched to local stripped libs instead of relying on game's installation
  • Updated for anniversary update

Version 1.0.4

  • Updated for Risk of Rain 2 version 1.0

Version 1.0.3

  • Catch case where there are no attackers

Version 1.0.2

  • Artifacts update!
  • Removed enemy skill and capped float value to 2 decimal points

Contributing a Translation

Thank you for your interest in contributing a translation! You can contribute a translation by following the steps below:

  1. Locate this code block in ShowDeathCause.cs (I have omitted several of the list.Add() calls as there are a lot of tokens, but the [...] block refers to all of the tokens):
Language.onCurrentLanguageChanged += () =>
{
    var list = new List<KeyValuePair<string, string>>();
    if (Language.currentLanguageName == "en")
    {
            list.Add(new KeyValuePair<string, string>("SDC_KILLER_FALL_DAMAGE", "<color=#964B00>Fall Damage</color>"));
            [...]
            list.Add(new KeyValuePair<string, string>("SDC_PLAYER_DEATH_VOID", "<color=#621e7d>JAILED!</color> <color=#00FF80>{0}</color> killed by <color=#FF8000>{1}</color>."));
    }
    Language.currentLanguage.SetStringsByTokens(list);
}
  1. You will want to add another branch to the if statement that checks against your language's IETF language tag. The code should now look like the following if I were translating for French:
Language.onCurrentLanguageChanged += () =>
{
    var list = new List<KeyValuePair<string, string>>();
    if (Language.currentLanguageName == "en")
    {
            list.Add(new KeyValuePair<string, string>("SDC_KILLER_FALL_DAMAGE", "<color=#964B00>Fall Damage</color>"));
            [...]
            list.Add(new KeyValuePair<string, string>("SDC_PLAYER_DEATH_VOID", "<color=#621e7d>JAILED!</color> <color=#00FF80>{0}</color> killed by <color=#FF8000>{1}</color>."));
    }
    else if (Language.currentLanguageName == "fr")
    {
    
    }
    Language.currentLanguage.SetStringsByTokens(list);
}
  1. Copy all of the list.add(); calls from the en section to your branch, and then translate them as per the suggestion below. The final code should look like:
Language.onCurrentLanguageChanged += () =>
{
    var list = new List<KeyValuePair<string, string>>();
    if (Language.currentLanguageName == "en")
    {
            list.Add(new KeyValuePair<string, string>("SDC_KILLER_FALL_DAMAGE", "<color=#964B00>Fall Damage</color>"));
            [...]
            list.Add(new KeyValuePair<string, string>("SDC_PLAYER_DEATH_VOID", "<color=#621e7d>JAILED!</color> <color=#00FF80>{0}</color> killed by <color=#FF8000>{1}</color>."));
    }
    else if (Language.currentLanguageName == "fr")
    {
		    list.Add(new KeyValuePair<string, string>("SDC_KILLER_FALL_DAMAGE", "<color=#964B00>Fall Damage</color>"));
            [...]
            list.Add(new KeyValuePair<string, string>("SDC_PLAYER_DEATH_VOID", "<color=#621e7d>JAILED!</color> <color=#00FF80>{0}</color> killed by <color=#FF8000>{1}</color>."));
    }
    Language.currentLanguage.SetStringsByTokens(list);
}
  1. Send in a pull request through GitHub!

Anything in brackets ({}) or wrapped in <> does not need to be translated. For example, if you were translating the SDC_PLAYER_DEATH token, which reads <color=#00FF80>{0}</color> killed by <color=#FF8000>{1}</color> ({2} damage taken). as of version 3.0.0, you would only translate "killed by" and "damage taken".

Credits

Original Authors

Other Credits

As noted in the changelog, the 3.0.0 release would not have been possible without the help of the following:

Available versions

Please note that the install buttons only work if you have compatible client software installed, such as the Thunderstore Mod Manager. Otherwise use the zip download links instead.

Upload date Version number Downloads Download link  
2022-3-7 3.0.1 33379 Version 3.0.1 Install
2022-3-7 3.0.0 669 Version 3.0.0 Install
2021-11-2 2.0.2 33186 Version 2.0.2 Install
2021-10-27 2.0.1 2840 Version 2.0.1 Install
2021-4-24 1.0.5 36582 Version 1.0.5 Install
2020-8-18 1.0.4 58406 Version 1.0.4 Install
2020-6-23 1.0.3 4343 Version 1.0.3 Install
2020-4-6 1.0.2 4545 Version 1.0.2 Install
2020-2-9 1.0.1 1874 Version 1.0.1 Install