Skip to content

KeywordDataBuilder

Michael edited this page Mar 15, 2024 · 1 revision

KeywordDataBuilder

KeywordDataBuilder(WildfrostMod mod)

  • The builder for creating KeywordData

Methods

Create

Create(string name)

  • Used to create an empty KeywordData
  • name is the internal name for your keyword used by the game.

WithTitle

WithTitle(string title, SystemLanguage lang = SystemLanguage.English)

  • Used to create the displayed name of your keyword in the selected localization language.
  • The title is displayed in the keyword pop-up or on text descriptions if WithShowName(true) is used.
  • title is the name that will be displayed by the game for your keyword.
  • lang is the localization language for the title and is set to English by default.

WithTitleColour

WithTitleColour(Color? theColour = null)

  • Used to change the title text color of your keyword's pop-up.
  • Not calling this method provides the default color (yellow)
  • theColour is the color of the title.

WithDescription

WithDescription(string title, SystemLanguage lang = SystemLanguage.English)

  • Used to create a description for your keyword.
  • The description is displayed in the keyword pop-up underneath the title.
  • If a "|" is used anywhere in the first argument, the substring before "|" is the body and the substring after is the note (slightly smaller text and in a possibly different color).
  • title is the displayed description of your keyword.
  • lang is the localization language for the title and is set to English by default.

WithBodyColour

WithBodyColour(Color? theColour = null)

  • Used to change the body text color of your keyword's pop-up.
  • Not calling this method provides the default color (white)
  • theColour is the color of the body text.

WithNoteColour

WithNoteColour(Color? theColour = null)

  • Used to change the body text color of your keyword's pop-up.
  • Not calling this method provides the default color (gray)
  • theColour is the color of the note text.

WithIconName

WithIconName(string iconName)

  • Used to give an associated icon to the keyword.
  • The icon itself must be registered in CardManager.cardIcons as a gameObject (with a sprite, text element etc.). This will be the icon used during battle
  • The icon used in card descriptions (must use WithShowIcon(true)) is done through a spritesheet.
  • iconName is the name used to find the associated icons.

WithIconTint

WithIconTint(Color hexColor)

  • Used to tint the icons that are used for your keyword.
  • Not calling this method provides no tint on the icon.
  • hexColor is the color tint of the icon.

WithPanelSprite

WithPanelSprite(string image)

  • Used to give a custom panel sprite for your keyword's pop-up.
  • To reference the directory Mods/ModName/panel.png, use WithPanelSprite("panel.png").
  • Not calling this method will provide the default panel (black rectangle with rounded edges).
  • image is the relative path to the image file.

WithPanelSprite

WithPanelColour(Color theColour)

  • Used to tint the panel color of your keyword's pop-up.
  • As the default panel is black, this method does nothing if a custom panel sprite is not defined.
  • theColour is the color of the tint.

WithShow

WithShow(bool show = true)

  • Used to decide whether or not your keyword's pop-up whenever "<keyword=yourKeyword>" is written on a card, status effect, etc.
  • Not calling this method defaults to showing the pop-up.

WithShowName

WithShowName(bool show)

  • Used to show the name wherever "<keyword=yourKeyword>" is written.
  • The keyword's name is not shown by default.

WithShowIcon

WithShowIcon(bool show = true)

  • Used to the associated icon whenever "<keyword=yourKeyword>" is written.
  • Not calling this method defaults to showing the icon, whether one exists or not.

WithCanStack

WithCanStack(bool show)

  • Used to indicate whether the keyword is stackable.
  • If set to true, wherever "<keyword=yourKeyword>" is written, the stack amount is also shown.
  • Keywords are not stackable by default.

Clone this wiki locally