Darkest Dungeon®

Darkest Dungeon®

Not enough ratings
Custom Tooltips- Basics
By sasiji
Basics for one of the most if not THE MOST used workaround in entire modding community of Darkest Dungeon.
3
   
Award
Favorite
Favorited
Unfavorite
Creating Custom Tooltips
Custom TT in skill need instant effect with special buff called "upgrade_discount" or "quirk_tag_evolution_duration".
Those buffs do not affect gameplay, their string id is directly related to stat_sub_type and do not create errors or blackscreens.
You only need create: Buff, Effect (usually with instant) and xml string with your text.
(for trinkets you just need buff and string)

Important info:
  • to make % symbol you must write %%
  • leaving solo % cause instant crash
  • Character Limit for Upgrade Discount and Quirk tag Evo is 127 so better is making 2+ strings than trying fit it to one
  • %+d will create + before your number on string if buff value itself is postitive

Example: "Fully Custom Text"
Required Parts
{
"id": "custom_tooltip_upg_disc_example_in_buff_ids",
"stat_type": "upgrade_discount",
"stat_sub_type": "custom_tooltip_upg_disc_example_in_xml",
"amount": 0,
"remove_if_not_active": false,
"rule_type": "always",
"is_false_rule": false,
"rule_data": {
"float": 0,
"string": ""
}
}
effect: .name "tutorial_example" .target "performer" .chance 100% .buff_ids "custom_tooltip_upg_disc_example_in_buff_ids" .on_hit true .on_miss false .skill_instant true
<entry id="buff_stat_tooltip_upgrade_discount_custom_tooltip_upg_disc_example_in_xml"><![CDATA[55%% Custom Text with {colour_start|bleed}Colours{colour_end}]]></entry>

Result

For sake of example everything has differenty ids but i highly recommend using the same text for "id" and "stat_sub_type". It allow for direct checking if string is correct from effect->string without need of effect-> buff -> string

Example: "Custom Text With Amounts"
Required Parts
{
"id": "custom_tooltip_upg_disc_example_the_same",
"stat_type": "upgrade_discount",
"stat_sub_type": "custom_tooltip_upg_disc_example_the_same",
"amount": -0.80,
"remove_if_not_active": false,
"rule_type": "always",
"is_false_rule": false,
"rule_data": {
"float": 0,
"string": ""
}
}
effect: .name "tutorial_example_2" .target "performer" .chance 100% .buff_ids "custom_tooltip_upg_disc_example_the_same" .on_hit true .on_miss false .skill_instant true
<entry id="buff_stat_tooltip_upgrade_discount_custom_tooltip_upg_disc_example_the_same"><![CDATA[Something custom {colour_start|skill_unselectable}(%d%% base){colour_end}]]></entry>

Result
Basic Differences for %d
"upgrade_discount" and "quirk_tag_evolution_duration"
For both: Buffs are amounts bigger than 0 and Debuffs are amounts smaller than 0

Upgrade Discount
  • positive buff amounts show negative amounts
  • if buff amount is 1 then %d is -100
Quirk Tag Evo
  • positive buff amounts show positive amounts
  • if buff amount is 1 then %d is 1
Examples
{
"id": "custom_tooltip_upg_disc_example_debuff",
"stat_type": "upgrade_discount",
"stat_sub_type": "custom_tooltip_upg_disc_example_debuff",
"amount": 1,
"remove_if_not_active": false,
"rule_type": "always",
"is_false_rule": false,
"rule_data": {
"float": 0,
"string": ""
}
},
{
"id": "custom_tooltip_upg_disc_example_buff",
"stat_type": "upgrade_discount",
"stat_sub_type": "custom_tooltip_upg_disc_example_buff",
"amount": -1,
"remove_if_not_active": false,
"rule_type": "always",
"is_false_rule": false,
"rule_data": {
"float": 0,
"string": ""
}
},
{
"id": "custom_tooltip_quirktag_example_debuff",
"stat_type": "quirk_tag_evolution_duration",
"stat_sub_type": "custom_tooltip_quirktag_example_debuff",
"amount": -1,
"remove_if_not_active": false,
"rule_type": "always",
"is_false_rule": false,
"rule_data": {
"float": 0,
"string": ""
}
},
{
"id": "custom_tooltip_quirktag_example_buff",
"stat_type": "quirk_tag_evolution_duration",
"stat_sub_type": "custom_tooltip_quirktag_example_buff",
"amount": 1,
"remove_if_not_active": false,
"rule_type": "always",
"is_false_rule": false,
"rule_data": {
"float": 0,
"string": ""
}
}
<entry id="buff_stat_tooltip_upgrade_discount_custom_tooltip_upg_disc_example_debuff"><![CDATA[Tooltip Show as negative value %+d%%]]></entry>
<entry id="buff_stat_tooltip_upgrade_discount_custom_tooltip_upg_disc_example_buff"><![CDATA[has positive value %+d%%]]></entry>
<entry id="buff_stat_tooltip_quirk_tag_evolution_duration_custom_tooltip_quirktag_example_debuff"><![CDATA[this one has negative %d]]></entry>
<entry id="buff_stat_tooltip_quirk_tag_evolution_duration_custom_tooltip_quirktag_example_buff"><![CDATA[this is positive %d]]></entry>

Results
65
Stacking tooltips
Two tooltips with the same stat_sub_type will merge with eachother if they are placed as normal buffs.

{
"id": "custom_tooltip_upg_disc_example_stack_1",
"stat_type": "upgrade_discount",
"stat_sub_type": "custom_tooltip_upg_disc_example_stack",
"amount": -0.25,
"remove_if_not_active": false,
"rule_type": "always",
"is_false_rule": false,
"rule_data": {
"float": 0,
"string": ""
}
},
{
"id": "custom_tooltip_upg_disc_example_stack_2",
"stat_type": "upgrade_discount",
"stat_sub_type": "custom_tooltip_upg_disc_example_stack",
"amount": -0.30,
"remove_if_not_active": false,
"rule_type": "always",
"is_false_rule": false,
"rule_data": {
"float": 0,
"string": ""
}
},
{
"id": "custom_tooltip_quirktag_stack_1",
"stat_type": "quirk_tag_evolution_duration",
"stat_sub_type": "custom_tooltip_quirktag_stack",
"amount": 15,
"remove_if_not_active": false,
"rule_type": "always",
"is_false_rule": false,
"rule_data": {
"float": 0,
"string": ""
}
},
{
"id": "custom_tooltip_quirktag_stack_2",
"stat_type": "quirk_tag_evolution_duration",
"stat_sub_type": "custom_tooltip_quirktag_stack",
"amount": 45,
"remove_if_not_active": false,
"rule_type": "always",
"is_false_rule": false,
"rule_data": {
"float": 0,
"string": ""
}
}
<entry id="buff_stat_tooltip_upgrade_discount_custom_tooltip_upg_disc_example_stack"><![CDATA[Stacked Debuffs %d%%]]></entry>
<entry id="buff_stat_tooltip_quirk_tag_evolution_duration_custom_tooltip_quirktag_stack"><![CDATA[Stacked buffs %+d]]></entry>

Results
John
John
John
Last comments
Thank you for reading doc!
good luck and have good time!

These are not only ways to make custom tooltips, but in vast majority of cases it will be enough. It is guide to teach basics.
9 Comments
Snoop Duck 2 Jan, 2023 @ 4:12pm 
Never mind, figured it out, it was as simple as putting "has_description": false in the script for the original buff
Snoop Duck 26 Dec, 2022 @ 7:48pm 
@sasiji Alright, it was because of me using skill instant true, thanks a lot. The status are under the character still shows an error message though, I assume that's because I need to make another string for that. How would I code that, if that's the case?
sasiji  [author] 26 Dec, 2022 @ 5:53am 
Duke of nuke, custom tooltip below "buff Self:" cannot be used with skill instant true.

2nd possibility is that you use .condensed_tooltip_effects_per_line 1 in skill
this will make all buff target selection tooltips into normal effect target selection.
All Buff Self buffs will be below gray Self: tooltip
Snoop Duck 26 Dec, 2022 @ 1:44am 
For some reason the tooltip text I'm using for custom buffs is showing up in the wrong sections. One appears above all the other text and the other in the right place, but with no Buff Self tag above them. What am I missing? Both are using upgrade_discount.
Kosgore 8 Nov, 2022 @ 10:47pm 
Great guide! I'm just now getting in to modding this game and your stuff has been super helpful.
sasiji  [author] 7 Nov, 2022 @ 5:40am 
Yes they count to character limit. No matter of lenght of colour id it will count as roughly 9-11 characters, depend of tooltip
Leon The Hero 6 Nov, 2022 @ 4:31pm 
do you happen to know if the {colour_start|bleed} / {colour_end} tags count towards the 127 character limit? I'm thinking they do
sasiji  [author] 14 Feb, 2022 @ 2:52pm 
Im happy you liked it <3
It would be hard to list all workarounds. Maybe some day ;_;
Midna 14 Feb, 2022 @ 6:41am 
Thank you! This was very informative; Darkest Dungeon modding is frequently rather opaque, and the official guide is years out of date.
I'd be very interested in seeing a list/explanation of other common workarounds—or at least the other methods of creating custom tooltips.