Skip to content
GrandSong edited this page Nov 1, 2016 · 2 revisions

An extra line of tooltip.

You can set its value any string.

If you want support multiple language, there are more things you need to learn.

obj.Tooltip = "mymod_hello"

The game program will search "mymod_hello" in "data\language\base-language.txt" and "fullgame.txt". If it exists, the display of the tooltip will be its translation.

When the game is saved, in the save file, the object will have Tootlip property accordingly.

prisoner.Tooltip = {"mymod_latest_boilingpoint", prisoner.BoilingPoint, "X"}

You can use a table (array) to pass parameters.

The translation of "mymod_latest_boilingpoint" can be "Lastest BoilingPoint: *X".

For example, when prisoner.BoilingPoint is 97, the display of tooltip will be "Lastest BoilingPoint: 97".

However, in the save file, only "mymod_latest_boilingpoint" will be saved. If you load the game, the tooltip will be "Lastest BoilingPoint: *X", with no actural parameter.

So, you will have to do some work to initialize with .Update() when loading the game.

-- Contributor: GrandSong

^ Open "Pages" to Search



Guides:

  • [Lua Basics](Lua Basics Guide)
  • [Save-Load Cycle](Save-Load Cycle Guide)

[Globals](Object Globals):

  • [Game](Game (Global))
  • [me](me (Global))
  • [Object](Object (Global))
  • [this](this (Global))

[Events](Object Events):

Psuedo-Types:

  • [Rotation table](Rotation table)
  • [Id table](Id table)
  • [Location table](Location table)
  • [Velocity table](Velocity table)

[Methods](Object Methods):

[Properties](Object Properties):

Clone this wiki locally