status_effect 
Status effects are used to apply temporary or permanent effects to mobs. This file contains their code, plus code for applying and removing them.
Vars | |
| alert_type | The typepath to the alert thrown by the status effect when created. Status effect "name"s and "description"s are shown to the owner here. |
|---|---|
| duration | This is how long the status effect lasts in deciseconds. You can put STATUS_EFFECT_PERMANENT (or INFINITY) here for infinite duration. |
| heal_flag_necessary | If remove_on_fullheal is TRUE, what flag do we need to be removed? |
| id | The ID of the effect. ID is used in adding and removing effects to check for duplicates, among other things. |
| linked_alert | The alert itself, created in [proc/on_creation] (if alert_type is specified). |
| on_remove_on_mob_delete | If TRUE, we call [proc/on_remove] when owner is deleted. Otherwise, we call [proc/be_replaced]. |
| owner | The mob affected by the status effect. |
| particle_effect | A particle effect, for things like embers - Should be set on update_particles() |
| processing_speed | Used to define if the status effect should be using SSfastprocess or SSprocessing |
| remove_on_fullheal | Do we self-terminate when a fullheal is called? |
| show_duration | If TRUE, and we have an alert, we will show a duration on the alert |
| status_type | How many of the effect can be on one mob, and/or what happens when you try to add a duplicate. |
| tick_interval | This is how long between [proc/tick] calls in deciseconds. This has to be a multiple of the [var/wait] of the subsystem this status effect is running on, which is based on [var/processing_speed]. Putting STATUS_EFFECT_NO_TICK here will stop [proc/tick] calls, and if [var/duration] is STATUS_EFFECT_PERMANENT, it stops processing entirely. Putting STATUS_EFFECT_AUTO_TICK here will make every subsystem tick call [proc/tick], making the tick interval depend entirely on [var/processing_speed] |
| time_until_next_tick | The time until the next [proc/tick] call, gets set to [var/tick_interval] after every [proc/tick] call and decrements on every [proc/process] call. |
Procs | |
| be_replaced | Called instead of on_remove when a status effect of status_type STATUS_EFFECT_REPLACE is replaced by itself, or when a status effect with on_remove_on_mob_delete set to FALSE has its mob deleted |
| before_remove | Called before being fully removed (before on_remove) Returning FALSE will cancel removal |
| get_examine_text | Gets and formats examine text associated with our status effect. Return 'null' to have no examine text appear (default behavior). |
| nextmove_adjust | Adds nextmove adjustment additiviely to the owner while applied |
| nextmove_modifier | Adds nextmove modifier multiplicatively to the owner while applied |
| on_apply | Called whenever the effect is applied in on_created Returning FALSE will cause it to delete itself during creation instead. |
| on_creation | Called from New() with any supplied status effect arguments. Not guaranteed to exist by the end. Returning FALSE from on_apply will stop on_creation and self-delete the effect. |
| on_remove | Called whenever the buff expires or is removed (qdeleted) Note that at the point this is called, it is out of the owner's status_effects list, but owner is not yet null |
| refresh | Called when a status effect of status_type STATUS_EFFECT_REFRESH has its duration refreshed in apply_status_effect - is passed New() args |
| remove_duration | Removes [seconds] of duration from the status effect. Returns whether or not the status effect was qdeleted due to running out of duration. |
| remove_effect_on_heal | Signal proc for COMSIG_LIVING_POST_FULLY_HEAL to remove us on fullheal |
| tick | Called every tick from process(). This is only called of tick_interval is not -1. |
| update_particles | Updates the particles for the status effects Should be handled by subtypes! |
| update_shown_duration | Updates the status effect alert's maptext (if possible) |
Var Details
alert_type 
The typepath to the alert thrown by the status effect when created. Status effect "name"s and "description"s are shown to the owner here.
duration 
This is how long the status effect lasts in deciseconds. You can put STATUS_EFFECT_PERMANENT (or INFINITY) here for infinite duration.
heal_flag_necessary 
If remove_on_fullheal is TRUE, what flag do we need to be removed?
id 
The ID of the effect. ID is used in adding and removing effects to check for duplicates, among other things.
linked_alert 
The alert itself, created in [proc/on_creation] (if alert_type is specified).
on_remove_on_mob_delete 
If TRUE, we call [proc/on_remove] when owner is deleted. Otherwise, we call [proc/be_replaced].
owner 
The mob affected by the status effect.
particle_effect 
A particle effect, for things like embers - Should be set on update_particles()
processing_speed 
Used to define if the status effect should be using SSfastprocess or SSprocessing
remove_on_fullheal 
Do we self-terminate when a fullheal is called?
show_duration 
If TRUE, and we have an alert, we will show a duration on the alert
status_type 
How many of the effect can be on one mob, and/or what happens when you try to add a duplicate.
tick_interval 
This is how long between [proc/tick] calls in deciseconds. This has to be a multiple of the [var/wait] of the subsystem this status effect is running on, which is based on [var/processing_speed]. Putting STATUS_EFFECT_NO_TICK here will stop [proc/tick] calls, and if [var/duration] is STATUS_EFFECT_PERMANENT, it stops processing entirely. Putting STATUS_EFFECT_AUTO_TICK here will make every subsystem tick call [proc/tick], making the tick interval depend entirely on [var/processing_speed]
time_until_next_tick 
The time until the next [proc/tick] call, gets set to [var/tick_interval] after every [proc/tick] call and decrements on every [proc/process] call.
Proc Details
be_replaced
Called instead of on_remove when a status effect of status_type STATUS_EFFECT_REPLACE is replaced by itself, or when a status effect with on_remove_on_mob_delete set to FALSE has its mob deleted
before_remove
Called before being fully removed (before on_remove) Returning FALSE will cancel removal
get_examine_text
Gets and formats examine text associated with our status effect. Return 'null' to have no examine text appear (default behavior).
nextmove_adjust
Adds nextmove adjustment additiviely to the owner while applied
nextmove_modifier
Adds nextmove modifier multiplicatively to the owner while applied
on_apply
Called whenever the effect is applied in on_created Returning FALSE will cause it to delete itself during creation instead.
on_creation
Called from New() with any supplied status effect arguments. Not guaranteed to exist by the end. Returning FALSE from on_apply will stop on_creation and self-delete the effect.
on_remove
Called whenever the buff expires or is removed (qdeleted) Note that at the point this is called, it is out of the owner's status_effects list, but owner is not yet null
refresh
Called when a status effect of status_type STATUS_EFFECT_REFRESH has its duration refreshed in apply_status_effect - is passed New() args
remove_duration
Removes [seconds] of duration from the status effect. Returns whether or not the status effect was qdeleted due to running out of duration.
remove_effect_on_heal
Signal proc for COMSIG_LIVING_POST_FULLY_HEAL to remove us on fullheal
tick
Called every tick from process(). This is only called of tick_interval is not -1.
Note that every tick =/= every processing cycle.
- seconds_between_ticks = This is how many SECONDS that elapse between ticks. This is a constant value based upon the initial tick interval set on the status effect. It is similar to seconds_per_tick, from processing itself, but adjusted to the status effect's tick interval.
update_particles
Updates the particles for the status effects Should be handled by subtypes!
update_shown_duration
Updates the status effect alert's maptext (if possible)