Class engine.Birther
Allows you to create characters using a GUI
Functions
engine.Birther.loadDefinition (file)
Defines birth descriptors from specified lua file
engine.Birther.newBirthDescriptor (t)
Defines one birth descriptor ???
engine.Birther.getBirthDescriptor (type, name)
Get one birth descriptor
Tables
engine.Birther.birth_descriptor_def
Where descriptors are stored
engine.Birther.birth_auto
If a descriptor is automatic it gets stored here
engine.Birther.step_names
Names for the steps
Methods
engine.Birther:init (title, actor, order[, at_end], quickbirth[, w=600][, h=400])
Instantiates a birther for the given actor
engine.Birther:on_register ()
Automatically called after using engine.Game.registerDialog for this class
engine.Birther:quickBirth ()
Quickly birth the actor using predefined settings.
engine.Birther:selectType (type)
Populates the dialog with all of the choices for the specified type
engine.Birther:makeKey (letter)
Used internally to transform indices into letters for column selection
engine.Birther:updateList ()
Called after selectType to actually put the generated descriptor values into the list
engine.Birther:prev ()
Returns to the previous birth descriptor specified in order
engine.Birther:next ()
Stores the value of the current selected birth descriptor, then proceeds to the next birth descriptor specified in order
engine.Birther:randomSelect ()
Randomly selects an option for the current birth descriptor, then goes to the next one in the order automatically
engine.Birther:select (item)
Used by the list that stores birth descriptors, selects the correct item
engine.Birther:apply ()
Tries to apply all birth options to the actor.
Functions
- engine.Birther.loadDefinition (file) STATIC
-
Defines birth descriptors from specified lua file
Parameters:
- file string the lua file containing the descriptor
- engine.Birther.newBirthDescriptor (t) STATIC
-
Defines one birth descriptor
???
Parameters:
- t table the birth descriptor
- engine.Birther.getBirthDescriptor (type, name) STATIC
-
Get one birth descriptor
Parameters:
Tables
- engine.Birther.birth_descriptor_def STATIC
- Where descriptors are stored
- engine.Birther.birth_auto STATIC
- If a descriptor is automatic it gets stored here
- engine.Birther.step_names STATIC
- Names for the steps
Methods
- engine.Birther:init (title, actor, order[, at_end], quickbirth[, w=600][, h=400])
-
Instantiates a birther for the given actor
Parameters:
- title string dialog title
- actor Actor the actor we're birthing
- order table the order to display birth descriptors in, referenced by names
- at_end func function to call when finished birthing (optional)
- quickbirth optional boolean do we quickBirth??
- w int width of dialog (default 600)
- h int height of dialog (default 400)
- engine.Birther:on_register ()
- Automatically called after using engine.Game.registerDialog for this class
- engine.Birther:quickBirth ()
- Quickly birth the actor using predefined settings.
- engine.Birther:selectType (type)
-
Populates the dialog with all of the choices for the specified type
Parameters:
- type string birth descriptor type
- engine.Birther:makeKey (letter)
-
Used internally to transform indices into letters for column selection
Parameters:
- letter int
- engine.Birther:updateList ()
- Called after selectType to actually put the generated descriptor values into the list
- engine.Birther:prev ()
- Returns to the previous birth descriptor specified in order
- engine.Birther:next ()
- Stores the value of the current selected birth descriptor, then proceeds to the next birth descriptor specified in order
- engine.Birther:randomSelect ()
- Randomly selects an option for the current birth descriptor, then goes to the next one in the order automatically
- engine.Birther:select (item)
-
Used by the list that stores birth descriptors, selects the correct item
Parameters:
- item
- engine.Birther:apply ()
- Tries to apply all birth options to the actor. Should only be called once, at the end of creation