/tg/ Station 13 - Modules - TypesVar Details - Proc Details

traitor_objective

A traitor objective. Traitor objectives should not be deleted after they have been created and established, only failed. If a traitor objective needs to be removed from the failed/completed objective list of their handler, then you are doing something wrong and you should reconsider. When an objective is failed/completed, that is final and the only way you can change that is by refactoring the code.

Vars

abstract_typeAbstract type that won't be included as a possible objective
descriptionThe description of the traitor objective
forcedWhether this objective was forced upon by an admin. Won't get autocleared by the traitor subsystem if progression surpasses an amount
global_progression_deviance_requiredDetermines how great the deviance has to be before progression starts to get reduced.
global_progression_influence_intensityDetermines how influential global progression will affect this objective. Set to 0 to disable.
global_progression_limit_coeffDetermines the minimum and maximum progression this objective can be worth as a result of being influenced by global progression Should only be smaller than or equal to 1
handlerThe uplink handler holder to give the progression and telecrystals to.
nameThe name of the traitor objective
objective_stateThe current state of this objective
original_progressionThe percentage that this objective has been increased or decreased by as a result of progression. Used by the UI
progression_cost_coeffThis gets added onto the coeff when calculating the updated progression cost. Used for variability and a slight bit of randomness
progression_cost_coeff_devianceThe deviance coefficient used to determine the randomness of the progression rewards.
progression_maximumThe maximum progression before this objective cannot appear anymore
progression_minimumThe minimum required progression points for this objective
progression_rewardThe progression that is rewarded from completing this traitor objective. Can either be a list of list(min, max) or a direct value
skippedWhether this objective was skipped by going from an inactive state to a failed state.
telecrystal_penaltyTC penalty for failing an objective or cancelling it
telecrystal_rewardThe telecrystals that are rewarded from completing this traitor objective. Can either be a list of list(min,max) or a direct value
time_of_completionThe time at which this objective was completed
time_of_creationThe time at which this objective was first created

Procs

completion_payoutCalled when rewards should be given to the user.
fail_objectiveUsed to fail objectives. Players can clear completed objectives in the UI
finish_objectiveCalled by player input, do not call directly. Validates whether the objective is finished and pays out the handler if it is.
generate_objectiveCalled when the objective should be generated. Should return if the objective has been successfully generated. If false is returned, the objective will be removed as a potential objective for the traitor it is being generated for. This is only temporary, it will run the proc again when objectives are generated for the traitor again.
generate_ui_buttonsUsed for generating the UI buttons for the UI. Use ui_perform_action to respond to clicks.
handle_cleanupUsed to handle cleaning up the objective.
is_duplicateDetermines whether this objective is a duplicate. objective_to_compare is always of the type it is being called on.
replace_in_nameReplaces a word in the name of the proc. Also does it for the description
succeed_objectiveUsed to succeed objectives. Allows the player to cash it out in the UI.
supported_configuration_changesReturns a list of variables that can be changed by config, allows for balance through configuration. It is not recommended to finetweak any values of objectives on your server.
to_debug_stringConverts the type into a useful debug string to be used for logging and debug display.
ui_perform_actionReturn TRUE to trigger a UI update
ungenerate_objectiveUsed to clean up signals and stop listening to states.
update_progression_rewardUpdates the progression reward, scaling it depending on their current progression compared against the global progression
uplink_ui_dataUsed for sending data to the uplink UI

Var Details

abstract_type

Abstract type that won't be included as a possible objective

description

The description of the traitor objective

forced

Whether this objective was forced upon by an admin. Won't get autocleared by the traitor subsystem if progression surpasses an amount

global_progression_deviance_required

Determines how great the deviance has to be before progression starts to get reduced.

global_progression_influence_intensity

Determines how influential global progression will affect this objective. Set to 0 to disable.

global_progression_limit_coeff

Determines the minimum and maximum progression this objective can be worth as a result of being influenced by global progression Should only be smaller than or equal to 1

handler

The uplink handler holder to give the progression and telecrystals to.

name

The name of the traitor objective

objective_state

The current state of this objective

original_progression

The percentage that this objective has been increased or decreased by as a result of progression. Used by the UI

progression_cost_coeff

This gets added onto the coeff when calculating the updated progression cost. Used for variability and a slight bit of randomness

progression_cost_coeff_deviance

The deviance coefficient used to determine the randomness of the progression rewards.

progression_maximum

The maximum progression before this objective cannot appear anymore

progression_minimum

The minimum required progression points for this objective

progression_reward

The progression that is rewarded from completing this traitor objective. Can either be a list of list(min, max) or a direct value

skipped

Whether this objective was skipped by going from an inactive state to a failed state.

telecrystal_penalty

TC penalty for failing an objective or cancelling it

telecrystal_reward

The telecrystals that are rewarded from completing this traitor objective. Can either be a list of list(min,max) or a direct value

time_of_completion

The time at which this objective was completed

time_of_creation

The time at which this objective was first created

Proc Details

completion_payout

Called when rewards should be given to the user.

fail_objective

Used to fail objectives. Players can clear completed objectives in the UI

finish_objective

Called by player input, do not call directly. Validates whether the objective is finished and pays out the handler if it is.

generate_objective

Called when the objective should be generated. Should return if the objective has been successfully generated. If false is returned, the objective will be removed as a potential objective for the traitor it is being generated for. This is only temporary, it will run the proc again when objectives are generated for the traitor again.

generate_ui_buttons

Used for generating the UI buttons for the UI. Use ui_perform_action to respond to clicks.

handle_cleanup

Used to handle cleaning up the objective.

is_duplicate

Determines whether this objective is a duplicate. objective_to_compare is always of the type it is being called on.

replace_in_name

Replaces a word in the name of the proc. Also does it for the description

succeed_objective

Used to succeed objectives. Allows the player to cash it out in the UI.

supported_configuration_changes

Returns a list of variables that can be changed by config, allows for balance through configuration. It is not recommended to finetweak any values of objectives on your server.

to_debug_string

Converts the type into a useful debug string to be used for logging and debug display.

ui_perform_action

Return TRUE to trigger a UI update

ungenerate_objective

Used to clean up signals and stop listening to states.

update_progression_reward

Updates the progression reward, scaling it depending on their current progression compared against the global progression

Used for sending data to the uplink UI