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.
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) |
---|---|
Game End Report (Before) | Game End Report (After) |
---|---|
* Screenshots are taken on ShowDeathCause 2.0.0
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.
- Use builtin functions when applicable
- Ensure victim body is valid
- Only add language tokens if they aren't already added
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
- 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
- Reverted change to remove original death message as this may break other mods that depend on
OnPlayerCharacterDeath
- 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
- Switched to local stripped libs instead of relying on game's installation
- Updated for anniversary update
- Updated for Risk of Rain 2 version 1.0
- Catch case where there are no attackers
- Artifacts update!
- Removed enemy skill and capped float value to 2 decimal points
Thank you for your interest in contributing a translation! You can contribute a translation by following the steps below:
- Locate this code block in
ShowDeathCause.cs
(I have omitted several of thelist.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);
}
- 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);
}
- Copy all of the
list.add();
calls from theen
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);
}
- 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".
As noted in the changelog, the 3.0.0 release would not have been possible without the help of the following:
- DestroyedClone (#4)
- Bubbet
- Everyone in the Risk of Rain 2 Modding Discord that has helped and supported me!
- Skull icon by Icons8