Paradise Station 13 - Modules - TypesVar Details - Proc Details

antag_scenario

Vars

abstractWhether scenario shouldn't be used in Antag Mix and which purpose is to be literally abstract. Scenario will crash in /datum/antag_scenario/New() if tried to instantiate
antag_capNumber of player population, based on which the new scenario antag will be scaled. Can be specified using just number, which will be treated as hard cap, or in linear equation form: list("denominator" = 10, "offset" = 1), where 'denominator' is divider for current players population, and 'offset' is guaranteed amount of antag of scenario's type
antag_datumAntag datum, that will be granted to chosen players on execute which will be called on post setup
antag_roleRole used to check if the player is banned from it. Example: ROLE_TRAITOR, ROLE_CHANGELING, etc.
antag_special_roleSpecial role, that will be assigned to chosen players. Example: SPECIAL_ROLE_TRAITOR, SPECIAL_ROLE_CHANGELIN, etc.
assignedList of players that were drafted to be antagonists of this scenario
candidatesList of available candidates for this scenario
candidates_requiredHow many possible candidates are required for this scenario to be executed
config_tagConfiguration tag of scenario, which will be used on scenario configuration loading
costCost of the antag scenario. Antag_mix antag generation is based on this value. Scenarios with 0 cost considered free and only limited by max_antag_fraction of /datum/game_mode/antag_mix
nameName of the scenario. Will be used in round end statistics
protected_rolesJobs that can't be chosen for the scenario if 'GLOB.configuration.gamemode.prevent_mindshield_antags' is TRUE
required_playersAmount of players required to start this scenario
restricted_rolesJobs that can't be chosen for the scenario
restricted_speciesSpecies that can't be chosen for the scenario
scaled_timesAmount of times, this scenario has been picked again
weightWeight of the scenario. Will be taken into consideration by 'antag_mix' gamemode. Higher values make scenario more frequent, lower - less. Defaults to '1'

Procs

acceptablePerforms sanity check for this scenario to be run.
apply_configurationGets configuration params from [GLOB.configuration.antag_mix_gamemode.params_by_scenario], which are grouped by config_tag property of /datum/antag_scenario. If config_tag field is null - default scenario and write them into
executeCalled in post_setup, which means that all players already have jobs. Here antags should receive everything they need. Can fail here, but there is nothing we can do on this stage - all players already have their jobs.
get_antag_capGets antag cap per one scenario.
get_total_antag_capGets antag cap per this scenario, but taking scaled_times into calculation.
pre_executeCalled in pre_setup of /datum/game_mode/antag_mix gamemode. Here antags should be chosen.
readyChecks whether this scenario is ready to be applied.
trim_candidatesFilter candidates scenario specific requirement vise.

Var Details

abstract

Whether scenario shouldn't be used in Antag Mix and which purpose is to be literally abstract. Scenario will crash in /datum/antag_scenario/New() if tried to instantiate

antag_cap

Number of player population, based on which the new scenario antag will be scaled. Can be specified using just number, which will be treated as hard cap, or in linear equation form: list("denominator" = 10, "offset" = 1), where 'denominator' is divider for current players population, and 'offset' is guaranteed amount of antag of scenario's type

antag_datum

Antag datum, that will be granted to chosen players on execute which will be called on post setup

antag_role

Role used to check if the player is banned from it. Example: ROLE_TRAITOR, ROLE_CHANGELING, etc.

antag_special_role

Special role, that will be assigned to chosen players. Example: SPECIAL_ROLE_TRAITOR, SPECIAL_ROLE_CHANGELIN, etc.

assigned

List of players that were drafted to be antagonists of this scenario

candidates

List of available candidates for this scenario

candidates_required

How many possible candidates are required for this scenario to be executed

config_tag

Configuration tag of scenario, which will be used on scenario configuration loading

cost

Cost of the antag scenario. Antag_mix antag generation is based on this value. Scenarios with 0 cost considered free and only limited by max_antag_fraction of /datum/game_mode/antag_mix

name

Name of the scenario. Will be used in round end statistics

protected_roles

Jobs that can't be chosen for the scenario if 'GLOB.configuration.gamemode.prevent_mindshield_antags' is TRUE

required_players

Amount of players required to start this scenario

restricted_roles

Jobs that can't be chosen for the scenario

restricted_species

Species that can't be chosen for the scenario

scaled_times

Amount of times, this scenario has been picked again

weight

Weight of the scenario. Will be taken into consideration by 'antag_mix' gamemode. Higher values make scenario more frequent, lower - less. Defaults to '1'

Proc Details

acceptable

Performs sanity check for this scenario to be run.

Returns: 'TRUE' if scenario is matching current situation (game has enough players, enough antags can be spawned). 'FALSE' returned otherwise.

apply_configuration

Gets configuration params from [GLOB.configuration.antag_mix_gamemode.params_by_scenario], which are grouped by config_tag property of /datum/antag_scenario. If config_tag field is null - default scenario and write them into

execute

Called in post_setup, which means that all players already have jobs. Here antags should receive everything they need. Can fail here, but there is nothing we can do on this stage - all players already have their jobs.

get_antag_cap

Gets antag cap per one scenario.

get_total_antag_cap

Gets antag cap per this scenario, but taking scaled_times into calculation.

pre_execute

Called in pre_setup of /datum/game_mode/antag_mix gamemode. Here antags should be chosen.

Returns: 'TRUE' if successfully executed, for example antags successfully chosen, 'FALSE' otherwise.

ready

Checks whether this scenario is ready to be applied.

Returns: 'TRUE' if all requirements are met for this scenario to be executed, 'FALSE' otherwise

trim_candidates

Filter candidates scenario specific requirement vise.