Skip to content

Conversation

@LordMidas
Copy link
Member

Note: Any nested tooltips that use this feature must be parsed after FirstWorldInit and after the nested tooltips framework mod.

Usage:
Enclose the desired field in $ $ within the "text" part of the shorthand tooltip. The value of this field is then pulled from the m table of that object. The usage is similar for Item+ and Perk+. For Perk+ the field is from the perkDef and not an m table.

parseString("[$Name$|Skill+stunned_effect]") // result: Stunned
parseString("[$Name$,|Skill+stunned_effect]") // result Stunned,
parseString("[asdf$Name$,|Skill+stunned_effect]") // result: asdfStunned,

// there is a shortcut available for Name because that is the most common.
// for this just put a blank space between $ $. Example:
parseString("[$ $|Skill+stunned_effect]") // result: Stunned

Metamethods
You can call and chain metamethods on the dynamic field value

parseString("[$Name.tolower()$|Skill+stunned_effect]") // result: stunned

Or even something extreme like:

parseString("[$Name.tolower().slice(0, 2).tointeger()$|Skill+stunned_effect]");

@LordMidas LordMidas requested a review from TaroEld November 19, 2025 18:37
@LordMidas LordMidas force-pushed the feat-better-handling-for-nested-tooltips-of-items branch 2 times, most recently from de1b018 to bf511f7 Compare November 20, 2025 07:17
This requires that any nested tooltips that generate such text be parsed after FirstWorldInit and after the nested tooltips framework mod.
@LordMidas LordMidas force-pushed the feat-ability-to-dynamically-generate-nested-text-from-obj branch from afc6855 to cd670aa Compare November 20, 2025 07:18
@LordMidas LordMidas changed the base branch from feat-better-handling-for-nested-tooltips-of-items to development November 20, 2025 07:18
@LordMidas LordMidas merged commit 44a5cce into development Nov 20, 2025
@LordMidas LordMidas deleted the feat-ability-to-dynamically-generate-nested-text-from-obj branch November 20, 2025 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants