Space Station 13 - Modules - TypesVar Details - Proc Details

spell

Vars

base_cooldownrecharge time in deciseconds
cooldown_handlerhandles a given spells cooldowns. tracks the time until its off cooldown,
create_attack_logsdoes this spell generate attack logs?
create_custom_logsIf this spell creates custom logs using the write_custom_logs() proc. Will ignore create_attack_logs
custom_handlerWhich spell_handler is used in addition to the normal spells behaviour, can be null. Set this in create_new_handler if needed
holy_area_cancastWhether or not the spell functions in a holy place
selection_activated_messageThe message displayed when a click based spell gets activated
selection_deactivated_messageThe message displayed when a click based spell gets deactivated
smoke_typeDetermines if the spell has smoke, and if so what effect the smoke has. See spell defines.
spell_handlersList with the handler datums per spell type. Key = src.type, value = the handler datum created by create_new_handler()
targetingWhich targeting system is used. Set this in create_new_targeting
targeting_datumsList with the targeting datums per spell type. Key = src.type, value = the targeting datum created by create_new_targeting()

Procs

castThe proc where the actual spell gets cast.
choose_targetsWill try to choose targets using the targeting variable and perform the spell if it can Do not override this! Override create_new_targeting instead
create_new_cooldownCreates and returns the spells cooldown handler, defaults to the standard recharge handler. Override this if you wish to use a different method of cooldown
create_new_handlerCreates and returns the handler datum for this spell type. Override this if you want a custom spell handler. Should return a value of type /datum/spell_handler or NONE
create_new_targetingCreates and returns the targeting datum for this spell type. Override this! Should return a value of type /datum/spell_targeting
on_mind_transferThis proc is ran when a mind is transfered to a new mob. Tells it if the action should be transfered on return true, and tells it not to remove it on false
on_purchase_upgradeLets the spell have a special effect applied to it when upgraded. By default, does nothing.
performHandles all the code for performing a spell once the targets are known
should_remove_click_interceptCalled in try_perform before removing the click interceptor. useful to override if you have a spell that requires more than 1 click
spend_spell_costWill spend the cost of using this spell once. Will update the action button's icon if there is any
try_performWill try and perform the spell using the given targets and user. Will spend one charge of the spell
valid_targetAllows for spell specific target validation. Will be used by the spell_targeting datums
write_custom_logsWill write additional logs if create_custom_logs is TRUE and the caster has a ckey. Override this

Var Details

base_cooldown

recharge time in deciseconds

cooldown_handler

handles a given spells cooldowns. tracks the time until its off cooldown,

create_attack_logs

does this spell generate attack logs?

create_custom_logs

If this spell creates custom logs using the write_custom_logs() proc. Will ignore create_attack_logs

custom_handler

Which spell_handler is used in addition to the normal spells behaviour, can be null. Set this in create_new_handler if needed

holy_area_cancast

Whether or not the spell functions in a holy place

selection_activated_message

The message displayed when a click based spell gets activated

selection_deactivated_message

The message displayed when a click based spell gets deactivated

smoke_type

Determines if the spell has smoke, and if so what effect the smoke has. See spell defines.

spell_handlers

List with the handler datums per spell type. Key = src.type, value = the handler datum created by create_new_handler()

targeting

Which targeting system is used. Set this in create_new_targeting

targeting_datums

List with the targeting datums per spell type. Key = src.type, value = the targeting datum created by create_new_targeting()

Proc Details

cast

The proc where the actual spell gets cast.

Arguments:

choose_targets

Will try to choose targets using the targeting variable and perform the spell if it can Do not override this! Override create_new_targeting instead

Arguments:

create_new_cooldown

Creates and returns the spells cooldown handler, defaults to the standard recharge handler. Override this if you wish to use a different method of cooldown

create_new_handler

Creates and returns the handler datum for this spell type. Override this if you want a custom spell handler. Should return a value of type /datum/spell_handler or NONE

create_new_targeting

Creates and returns the targeting datum for this spell type. Override this! Should return a value of type /datum/spell_targeting

on_mind_transfer

This proc is ran when a mind is transfered to a new mob. Tells it if the action should be transfered on return true, and tells it not to remove it on false

on_purchase_upgrade

Lets the spell have a special effect applied to it when upgraded. By default, does nothing.

perform

Handles all the code for performing a spell once the targets are known

Arguments:

should_remove_click_intercept

Called in try_perform before removing the click interceptor. useful to override if you have a spell that requires more than 1 click

spend_spell_cost

Will spend the cost of using this spell once. Will update the action button's icon if there is any

Arguments:

try_perform

Will try and perform the spell using the given targets and user. Will spend one charge of the spell

Arguments:

valid_target

Allows for spell specific target validation. Will be used by the spell_targeting datums

Arguments:

write_custom_logs

Will write additional logs if create_custom_logs is TRUE and the caster has a ckey. Override this

Arguments: