Skip to content

CharacterVar

Chessnut edited this page Dec 25, 2014 · 1 revision

This structure is used to create a new character variable.

Structure

  • index - An optional number that determines the positioning on the character creation menu.
  • isNotModifiable - A boolean to determine if the setter method is to be created.
  • onSet - An optional function that is called when the setter method is called. The character, value and varargs are provided.
  • noNetworking - A boolean to determine whether or not the changes to this variable are sent to the client.
  • isLocalVar - A boolean to determine if the variable is only networked to the character's owner. If false then the variable is networked to everyone.
  • onGet - An optional function that replaces the getter function. The character, default value and varargs are provided.
  • field - An optional string that is the corresponding database field.
  • default - The default value for this variable.
  • onValidate - An optional callback that is ran shared when the value for the variable needs to be checked to see if it is allowed. The value, CharacterCreateInfo data and player creating the character are passed.
  • onPostSetup - An optional callback ran over the character creation menu is set up. The panel, faction, and CharacterCreateInfo payload is passed.
  • onDisplay - An optional function that is called when the variable should add something to the character creation menu. The panel and the y-value for the GUI objects you want to add is passed.
  • onAdjust - An optional function called before the character is inserted into the database to change the value for this variable. The client, CharacterCreateInfo data, variable value and newData CharacterCreateInfo is passed.
  • noDisplay - A boolean to determine whether or not the variable shows up on the character creation menu.
  • shouldDisplay - An optional callback that is used to determine if the variable should display on the character creation menu. The character creation panel is passed.
Clone this wiki locally