The stats stage of character creation (fl_character_creation_stats): a list of the stats with a counter each, the points that are left to spend, a button that spreads the points at random, and a panel that describes the selected stat, the level picked for it, the bonus the chosen faction adds and what the stat changes in play at that level. A stat can be raised up to its creation limit (Stats:get_creation_max), below the highest level it can reach in play. The picked levels are handed over as the attributes field of the creation data, which the server checks again.

Summary

Methods

Returns the bonus that the faction chosen earlier in character creation adds to a stat.
Init()client
Sets up the available attribute points.
Stores the chosen attribute values in the character data.
Builds the list of stat attributes with point counters, the attribute details panel and the randomize button, restoring previously entered values.
Checks that all attribute points have been spent and none were overspent.
Draws the remaining attribute points in the bottom right corner.

Methods

Returns the bonus that the faction chosen earlier in character creation adds to a stat.

Parameters

  • attribute_id String ID of the stat

Returns

  • Number bonus levels, 0 if the faction gives none

Sets up the available attribute points.

Stores the chosen attribute values in the character data. The points that are left are not stored: they follow from the values when the stage is opened again.

Parameters

  • parent Panel character creation menu

Builds the list of stat attributes with point counters, the attribute details panel and the randomize button, restoring previously entered values. The points that are left are worked out from the restored levels, so that they always match what the server is going to check.

Parameters

  • parent Panel character creation menu

Checks that all attribute points have been spent and none were overspent.

Returns

  • Boolean false and String error text if the points are invalid, nil otherwise

Draws the remaining attribute points in the bottom right corner.

Parameters

  • w Number width of the panel
  • h Number height of the panel

Defined in