Class engine.generator.interface.ActorTalents

Handles actors stats

Methods

engine.generator.interface.ActorTalents:loadDefinition (file, env)

Defines actor talents Static!

engine.generator.interface.ActorTalents:newTalentType (t)

Defines one talent type(group) Static!

engine.generator.interface.ActorTalents:newTalent (t)

Defines one talent Static!

engine.generator.interface.ActorTalents:init (t)

Initialises stats with default values if needed

engine.generator.interface.ActorTalents:resolveLevelTalents ()

Resolve leveling talents

engine.generator.interface.ActorTalents:useTalentMessage (ab)

Replace some markers in a string with info on the talent

engine.generator.interface.ActorTalents:preUseTalent (talent, silent, fake)

Called before a talent is used
Redefine as needed

engine.generator.interface.ActorTalents:postUseTalent (talent, ret, silent)

Called before a talent is used
Redefine as needed

engine.generator.interface.ActorTalents:onTalentLuaError (ab, err)

Called if a talent errors out

engine.generator.interface.ActorTalents:forceUseTalent (t, def)

Force a talent to activate without using energy or such
"def" can have a field "ignore_energy" to not consume energy; other parameters can be passed and handled by an overload of this method.

engine.generator.interface.ActorTalents:isTalentActive (t_id)

Is the sustained talent activated ?

engine.generator.interface.ActorTalents:numberKnownTalent (type, exclude_id, limit_type)

Returns how many talents of this type the actor knows

engine.generator.interface.ActorTalents:learnTalent (t_id, force, nb)

Actor learns a talent

engine.generator.interface.ActorTalents:unlearnTalentFull (t_id)

Actor forgets a talent completely

engine.generator.interface.ActorTalents:unlearnTalent (t_id, nb)

Actor forgets a talent

engine.generator.interface.ActorTalents:updateTalentPassives (tid)

Force passives update

engine.generator.interface.ActorTalents:canLearnTalent (t, offset, ignore_special)

Checks the talent if learnable

engine.generator.interface.ActorTalents:getTalentReqDesc (t_id, levmod)

Formats the requirements as a (multiline) string

engine.generator.interface.ActorTalents:getTalentFullDescription (t)

Return the full description of a talent You may overload it to add more data (like power usage, ...)

engine.generator.interface.ActorTalents:knowTalentType (name)

Do we know this talent type

engine.generator.interface.ActorTalents:knowTalent (id)

Do we know this talent

engine.generator.interface.ActorTalents:getTalentLevelRaw (id)

Talent level, 0 if not known

engine.generator.interface.ActorTalents:getTalentLevel (id)

Talent level, 0 if not known Includes mastery

engine.generator.interface.ActorTalents:getTalentTypeLevelRaw (tt)

Talent type level, sum of all raw levels of talents inside

engine.generator.interface.ActorTalents:getTalentTypeMastery (tt)

Return talent type mastery

engine.generator.interface.ActorTalents:getTalentMastery (t)

Return talent type mastery for this talent

engine.generator.interface.ActorTalents:setTalentTypeMastery (tt, v)

Sets talent type mastery

engine.generator.interface.ActorTalents:updateTalentTypeMastery (tt)

Recompute things that need recomputing

engine.generator.interface.ActorTalents:getTalentFromId (id)

Return talent definition from id

engine.generator.interface.ActorTalents:getTalentTypeFrom (id)

Return talent definition from id

engine.generator.interface.ActorTalents:learnTalentType (tt, v)

Actor learns a talent type

engine.generator.interface.ActorTalents:unlearnTalentType (tt)

Actor forgets a talent type

engine.generator.interface.ActorTalents:getTalentCooldown (t)

Gets a talent cooldown

engine.generator.interface.ActorTalents:startTalentCooldown (t, v)

Starts a talent cooldown

engine.generator.interface.ActorTalents:alterTalentCoolingdown (t, v)

Alter the remanining cooldown of a talent

engine.generator.interface.ActorTalents:isTalentCoolingDown (t)

Is talent in cooldown?

engine.generator.interface.ActorTalents:getTalentRange (t)

Returns the range of a talent

engine.generator.interface.ActorTalents:getTalentRadius (t)

Returns the radius of a talent

engine.generator.interface.ActorTalents:getTalentTarget (t)

Returns the target type of a talent

engine.generator.interface.ActorTalents:getTalentProjectileSpeed (t)

Returns the projectile speed of a talent

engine.generator.interface.ActorTalents:getTalentDisplayName (t)

Returns display name

engine.generator.interface.ActorTalents:cooldownTalents ()

Cooldown all talents by one This should be called in your actors "act()" method

engine.generator.interface.ActorTalents:setTalentAuto (tid, v)

Setup the talent as autocast

engine.generator.interface.ActorTalents:isTalentAuto (tid)

Setup the talent as autocast

engine.generator.interface.ActorTalents:automaticTalents ()

Try to auto use listed talents This should be called in your actors "act()" method

engine.generator.interface.ActorTalents:setTalentConfirmable (tid, v)

Set the talent confirmation

engine.generator.interface.ActorTalents:isTalentConfirmable (tid)

Does the talent require confirmation to use?

engine.generator.interface.ActorTalents:useTalents (add_cols)

Show usage dialog

engine.generator.interface.ActorTalents:talentTemporaryValue (p, k, v)

Helper function to add temporary values and not have to remove them manualy

engine.generator.interface.ActorTalents:talentParticles (p, ...)

Helper function to add temporary particles and not have to remove them manualy

engine.generator.interface.ActorTalents:triggerTalent (tid, name, ...)

Trigger a talent method

engine.generator.interface.ActorTalents:callTalent (tid, name, ...)

Trigger a talent method

engine.generator.interface.ActorTalents:talentCallbackOn (on, ...)

Trigger all talents matching

engine.generator.interface.ActorTalents:talentDialogReturn (...)

Set the result for a talent dialog

engine.generator.interface.ActorTalents:talentDialogGet ()

Get the dialog

engine.generator.interface.ActorTalents:talentDialog (d)

Show a dialog and wait for it to end in a talent



Methods

engine.generator.interface.ActorTalents:loadDefinition (file, env)
Defines actor talents Static!

Parameters:

  • file
  • env
engine.generator.interface.ActorTalents:newTalentType (t)
Defines one talent type(group) Static!

Parameters:

  • t
engine.generator.interface.ActorTalents:newTalent (t)
Defines one talent Static!

Parameters:

  • t
engine.generator.interface.ActorTalents:init (t)
Initialises stats with default values if needed

Parameters:

  • t
engine.generator.interface.ActorTalents:resolveLevelTalents ()
Resolve leveling talents
engine.generator.interface.ActorTalents:useTalentMessage (ab)
Replace some markers in a string with info on the talent

Parameters:

  • ab
engine.generator.interface.ActorTalents:preUseTalent (talent, silent, fake)
Called before a talent is used
Redefine as needed

Parameters:

  • talent table the talent (not the id, the table)
  • silent boolean no messages will be outputted
  • fake boolean no actions are taken, only checks

Returns:

    true to continue

Or

    false to stop
engine.generator.interface.ActorTalents:postUseTalent (talent, ret, silent)
Called before a talent is used
Redefine as needed

Parameters:

  • talent table the talent (not the id, the table)
  • ret the return of the talent action
  • silent boolean no messages will be outputted

Returns:

    true to continue

Or

    false to stop
engine.generator.interface.ActorTalents:onTalentLuaError (ab, err)
Called if a talent errors out

Parameters:

  • ab the talent
  • err the error
engine.generator.interface.ActorTalents:forceUseTalent (t, def)
Force a talent to activate without using energy or such
"def" can have a field "ignoreenergy" to not consume energy; other parameters can be passed and handled by an overload of this method.
Object activation interface calls this method with an "ignore
ressources" parameter

Parameters:

  • t
  • def
engine.generator.interface.ActorTalents:isTalentActive (t_id)
Is the sustained talent activated ?

Parameters:

  • t_id
engine.generator.interface.ActorTalents:numberKnownTalent (type, exclude_id, limit_type)
Returns how many talents of this type the actor knows

Parameters:

  • type the talent type to count
  • exclude_id if not nil the count will ignore this talent id
  • limit_type if not nil the count will ignore talents with talent category level equal or higher that this
engine.generator.interface.ActorTalents:learnTalent (t_id, force, nb)
Actor learns a talent

Parameters:

  • t_id the id of the talent to learn
  • force if true do not check canLearnTalent
  • nb the amount to increase the raw talent level by, default 1

Returns:

  1. nil if failed
  2. an error message

Or

    true if the talent was learned
engine.generator.interface.ActorTalents:unlearnTalentFull (t_id)
Actor forgets a talent completely

Parameters:

  • t_id the id of the talent to learn

Returns:

  1. nil if failed
  2. an error message

Or

    true if the talent was unlearned
engine.generator.interface.ActorTalents:unlearnTalent (t_id, nb)
Actor forgets a talent

Parameters:

  • t_id the id of the talent to learn
  • nb

Returns:

    true if the talent was unlearnt, nil and an error message otherwise
engine.generator.interface.ActorTalents:updateTalentPassives (tid)
Force passives update

Parameters:

  • tid
engine.generator.interface.ActorTalents:canLearnTalent (t, offset, ignore_special)
Checks the talent if learnable

Parameters:

  • t the talent to check
  • offset the level offset to check, defaults to 1
  • ignore_special ignore requirement of special
engine.generator.interface.ActorTalents:getTalentReqDesc (t_id, levmod)
Formats the requirements as a (multiline) string

Parameters:

  • t_id the id of the talent to desc
  • levmod a number (1 should be the smartest) to add to current talent level to display requirements, defaults to 0
engine.generator.interface.ActorTalents:getTalentFullDescription (t)
Return the full description of a talent You may overload it to add more data (like power usage, ...)

Parameters:

  • t
engine.generator.interface.ActorTalents:knowTalentType (name)
Do we know this talent type

Parameters:

  • name
engine.generator.interface.ActorTalents:knowTalent (id)
Do we know this talent

Parameters:

  • id
engine.generator.interface.ActorTalents:getTalentLevelRaw (id)
Talent level, 0 if not known

Parameters:

  • id
engine.generator.interface.ActorTalents:getTalentLevel (id)
Talent level, 0 if not known Includes mastery

Parameters:

  • id
engine.generator.interface.ActorTalents:getTalentTypeLevelRaw (tt)
Talent type level, sum of all raw levels of talents inside

Parameters:

  • tt
engine.generator.interface.ActorTalents:getTalentTypeMastery (tt)
Return talent type mastery

Parameters:

  • tt
engine.generator.interface.ActorTalents:getTalentMastery (t)
Return talent type mastery for this talent

Parameters:

  • t
engine.generator.interface.ActorTalents:setTalentTypeMastery (tt, v)
Sets talent type mastery

Parameters:

  • tt
  • v "v - 1" because a mastery is expressed as x + 1, not x, so that 0 is the default value (thus getting 1)
engine.generator.interface.ActorTalents:updateTalentTypeMastery (tt)
Recompute things that need recomputing

Parameters:

  • tt
engine.generator.interface.ActorTalents:getTalentFromId (id)
Return talent definition from id

Parameters:

  • id
engine.generator.interface.ActorTalents:getTalentTypeFrom (id)
Return talent definition from id

Parameters:

  • id
engine.generator.interface.ActorTalents:learnTalentType (tt, v)
Actor learns a talent type

Parameters:

  • tt the id of the talent to learn
  • v value

Returns:

  1. nil if failed
  2. an error message

Or

    true if the talent was learned
engine.generator.interface.ActorTalents:unlearnTalentType (tt)
Actor forgets a talent type

Parameters:

  • tt the id of the talent to unlearn

Returns:

  1. nil if failed
  2. an error message

Or

    true if the talent was unlearned
engine.generator.interface.ActorTalents:getTalentCooldown (t)
Gets a talent cooldown

Parameters:

  • t the talent to get cooldown
engine.generator.interface.ActorTalents:startTalentCooldown (t, v)
Starts a talent cooldown

Parameters:

  • t the talent to cooldown
  • v override the normal cooldown that that, nil to get the normal effect
engine.generator.interface.ActorTalents:alterTalentCoolingdown (t, v)
Alter the remanining cooldown of a talent

Parameters:

  • t the talent affect cooldown
  • v the value to add/remove to the cooldown
engine.generator.interface.ActorTalents:isTalentCoolingDown (t)
Is talent in cooldown?

Parameters:

  • t
engine.generator.interface.ActorTalents:getTalentRange (t)
Returns the range of a talent

Parameters:

  • t
engine.generator.interface.ActorTalents:getTalentRadius (t)
Returns the radius of a talent

Parameters:

  • t
engine.generator.interface.ActorTalents:getTalentTarget (t)
Returns the target type of a talent

Parameters:

  • t
engine.generator.interface.ActorTalents:getTalentProjectileSpeed (t)
Returns the projectile speed of a talent

Parameters:

  • t
engine.generator.interface.ActorTalents:getTalentDisplayName (t)
Returns display name

Parameters:

  • t
engine.generator.interface.ActorTalents:cooldownTalents ()
Cooldown all talents by one This should be called in your actors "act()" method
engine.generator.interface.ActorTalents:setTalentAuto (tid, v)
Setup the talent as autocast

Parameters:

  • tid
  • v
engine.generator.interface.ActorTalents:isTalentAuto (tid)
Setup the talent as autocast

Parameters:

  • tid
engine.generator.interface.ActorTalents:automaticTalents ()
Try to auto use listed talents This should be called in your actors "act()" method
engine.generator.interface.ActorTalents:setTalentConfirmable (tid, v)
Set the talent confirmation

Parameters:

  • tid
  • v
engine.generator.interface.ActorTalents:isTalentConfirmable (tid)
Does the talent require confirmation to use?

Parameters:

  • tid
engine.generator.interface.ActorTalents:useTalents (add_cols)
Show usage dialog

Parameters:

  • add_cols
engine.generator.interface.ActorTalents:talentTemporaryValue (p, k, v)
Helper function to add temporary values and not have to remove them manualy

Parameters:

  • p
  • k
  • v
engine.generator.interface.ActorTalents:talentParticles (p, ...)
Helper function to add temporary particles and not have to remove them manualy

Parameters:

  • p
  • ...
engine.generator.interface.ActorTalents:triggerTalent (tid, name, ...)
Trigger a talent method

Parameters:

  • tid
  • name
  • ...
engine.generator.interface.ActorTalents:callTalent (tid, name, ...)
Trigger a talent method

Parameters:

  • tid
  • name
  • ...
engine.generator.interface.ActorTalents:talentCallbackOn (on, ...)
Trigger all talents matching

Parameters:

  • on
  • ...
engine.generator.interface.ActorTalents:talentDialogReturn (...)
Set the result for a talent dialog

Parameters:

  • ...
engine.generator.interface.ActorTalents:talentDialogGet ()
Get the dialog
engine.generator.interface.ActorTalents:talentDialog (d)
Show a dialog and wait for it to end in a talent

Parameters:

  • d
generated by LDoc 1.4.3