-
Notifications
You must be signed in to change notification settings - Fork 5
MT2 Keywords
Brandon edited this page Jun 10, 2026
·
2 revisions
Short aside about this games Keyword System. Not all keywords are created equally, and not all keywords are associated with code. Before diving into making a keyword this design tree will help you determine the best way to go about it.
Use this guide to determine exactly what kind of custom element you need to create for your mod based on the keyword's intended behavior.
- YES ➔ It is a status effect. See: Custom Status Effects
-
YES ➔ Is the keyword present on a character?
- YES ➔ Create a custom character trigger. See: Custom Triggers
- NO ➔ Create a custom card trigger. See: Custom Triggers
(Example: via a shop upgrade)
-
YES ➔ Create a CardTrait. See: Custom Card Traits
Implementation Details:
- Look at
PiercingorCardTraitIgnoreArmoras examples. - Override one or more of the following to provide localized text:
GetCardText,GetCardTooltipTitle, orGetCardTooltipText(which defaults to callingGetCardText). - Provide a localization key, then translate it within those functions.
-
GetCardTextandGetCardTooltipTitleshould return bolded text. UseLocalizeTraitKeyor surround the text in HTML bold tags:<b>text</b>. - See
CardTraitPersistentfor reference.
- Look at
-
YES ➔ Create a Custom Card Effect. See: Custom Card Effects
Implementation Details:
- Look at
CardEffectSacrifice(a trait-like effect keyword) as an example. - Override
GetDescriptionAsTrait, which returns the localization for the text that adds itself to the card. (You must specify localizations for this key). - Additionally, implement
ICardEffectStatuslessTooltipand implementGetTooltipBaseKeyto return a base localization key.
- Look at
-
YES ➔ Simply make up a keyword in the card's description.
- Example: See any card with Cultivate.
- Use
AdditionalTooltipson the card effect to explain it. This type of keyword does not require any new code.
-
NO ➔ Create a Custom Card Effect. See: Custom Card Effects
- Implement the custom logic to perform the effect.
- Override the relevant function to have it display a tooltip when a card possesses it (see
Propagatefor reference).