Yogstation 13 - Modules - TypesVar Details - Proc Details

dynamic mode

Vars

antags_rolledAntags rolled by rules so far, to keep track of and discourage scaling past a certain ratio of crew/antags especially on lowpop.
candidatesList of candidates used on roundstart rulesets.
configurationDynamic configuration, loaded on pre_setup
current_midround_rulesetsThe last drafted midround rulesets (without the current one included). Used for choosing different midround injections.
current_rulesRules that are processed, rule_process is called on the rules in this list.
discountedcratesCRATE DISCOUNT
executed_rulesList of executed rulesets.
forced_injectionWhen TRUE GetInjectionChance returns 100.
forced_latejoin_ruleForced ruleset to be executed for the next latejoin.
high_impact_ruleset_executedIf a high impact ruleset was executed. Only one will run at a time in most circumstances.
higher_injection_chanceThe chance of injection increase when above higher_injection_chance_minimum_threat
higher_injection_chance_minimum_threatIf above this threat, increase the chance of injection
hijacked_random_event_injection_chanceThe amount to inject when a round event is hijacked
initial_round_start_budgetThe initial round start budget for logging purposes, set once at the beginning of the round.
last_midround_injection_attemptThe time when the last midround injection was attempted, whether or not it was successful
latejoin_delay_maxThe maximum time the recurring latejoin ruleset timer is allowed to be.
latejoin_delay_minThe minimum time the recurring latejoin ruleset timer is allowed to be.
latejoin_injection_cooldownWhen world.time is over this number the mode tries to inject a latejoin ruleset.
latejoin_rulesList of latejoin rules used for selecting the rules.
lower_injection_chanceThe chance of injection decrease when above lower_injection_chance_minimum_threat
lower_injection_chance_minimum_threatIf below this threat, decrease the chance of injection
mid_round_budgetSet at the beginning of the round. Spent by midrounds and latejoins.
midround_delay_maxThe maximum time the recurring midround ruleset timer is allowed to be.
midround_delay_minThe minimum time the recurring midround ruleset timer is allowed to be.
midround_injection_cooldownWhen world.time is over this number the mode tries to inject a midround ruleset.
midround_injection_timer_idThe timer ID for the cancellable midround rule injection
midround_rulesList of midround rules used for selecting the rules.
only_ruleset_executedIf a only ruleset has been executed.
peaceful_percentageHow many percent of the rounds are more peaceful.
pop_per_requirement
random_event_hijack_maximumThe maximum amount of time for antag random events to be hijacked.
random_event_hijack_minimumThe minimum amount of time for antag random events to be hijacked.
random_event_hijackedWhether or not a random event has been hijacked this midround cycle
round_start_budgetSet at the beginning of the round. Spent by the mode to "purchase" rules. Everything else goes in the postround budget.
roundstart_pop_readyNumber of players who were ready on roundstart.
roundstart_rulesList of roundstart rules used for selecting the rules.
roundstart_split_curve_centreA number between -5 and +5. Equivalent to threat_curve_centre, but for the budget split. A negative value will weigh towards midround rulesets, and a positive value will weight towards roundstart ones.
roundstart_split_curve_widthA number between 0.5 and 4. Equivalent to threat_curve_width, but for the budget split. Higher value will favour more variance in splits and lower value rounds closer to the average.
shown_threatThe amount of threat shown on the piece of paper. Can differ from the actual threat amount.
snapshotsA list of recorded "snapshots" of the round, stored in the dynamic.json log
threat_curve_centreA number between -5 and +5. A negative value will give a more peaceful round and a positive value will give a round with higher threat.
threat_curve_widthA number between 0.5 and 4. Higher value will favour extreme rounds and lower value rounds closer to the average.
threat_levelThe "threat cap", threat shouldn't normally go above this and is used in ruleset calculations
threat_logRunning information about the threat. Can store text or datum entries.

Procs

admin_cancel_midroundFired when an admin cancels the current midround injection.
admin_different_midroundFired when an admin requests a different midround injection.
check_ageChecks if client age is age or older.
check_blockingChecks if a type in blocking_list is in rule_list.
configure_rulesetApply configurations to rule.
create_threatGenerate threat and increase the threat_level if it goes beyond, capped at 100
dynamic_logLog to messages and to the game
execute_midround_latejoin_ruleMainly here to facilitate delayed rulesets. All midround/latejoin rulesets are executed with a timered callback to this proc.
execute_midround_ruleFired after admins do not cancel a midround injection.
execute_roundstart_ruleMainly here to facilitate delayed rulesets. All roundstart rulesets are executed with a timered callback to this proc.
generate_budgetsGenerates the midround and roundstart budgets
generate_threatGenerates the threat level using lorentz distribution and assigns peaceful_percentage.
get_injection_chanceGets the chance for latejoin injection, the dry_run argument is only used for forced injection.
get_midround_injection_chanceGets the chance for midround injection, the dry_run argument is only used for forced injection. Usually defers to the latejoin injection chance.
lorentz_to_amountTurns the value generated by lorentz distribution to number between 0 and 100. Used for threat level and splitting the budgets.
new_snapshotCreates a new snapshot with the given rulesets chosen, and writes to the JSON output.
pick_latejoin_ruleExecutes a random latejoin ruleset from the list of drafted rules.
pick_midround_ruleExecutes a random midround ruleset from the list of drafted rules.
pick_rulesetFrom a list of rulesets, returns one based on weight and availability. Mutates the list that is passed into it to remove invalid rules.
picking_roundstart_ruleInitializes the round start ruleset provided to it. Returns how much threat to spend.
picking_specific_ruleAn experimental proc to allow admins to call rules on the fly or have rules call other rules.
refund_threatRefund threat, but no more than threat_level.
remove_from_listRemoves type from the list
rigged_roundstartA simple roundstart proc used when dynamic_forced_roundstart_ruleset has rules in it.
spend_midround_budgetExpend midround threat, can't fall under 0.
spend_roundstart_budgetExpend round start threat, can't fall under 0.

Var Details

antags_rolled

Antags rolled by rules so far, to keep track of and discourage scaling past a certain ratio of crew/antags especially on lowpop.

candidates

List of candidates used on roundstart rulesets.

configuration

Dynamic configuration, loaded on pre_setup

current_midround_rulesets

The last drafted midround rulesets (without the current one included). Used for choosing different midround injections.

current_rules

Rules that are processed, rule_process is called on the rules in this list.

discountedcrates

CRATE DISCOUNT

executed_rules

List of executed rulesets.

forced_injection

When TRUE GetInjectionChance returns 100.

forced_latejoin_rule

Forced ruleset to be executed for the next latejoin.

high_impact_ruleset_executed

If a high impact ruleset was executed. Only one will run at a time in most circumstances.

higher_injection_chance

The chance of injection increase when above higher_injection_chance_minimum_threat

higher_injection_chance_minimum_threat

If above this threat, increase the chance of injection

hijacked_random_event_injection_chance

The amount to inject when a round event is hijacked

initial_round_start_budget

The initial round start budget for logging purposes, set once at the beginning of the round.

last_midround_injection_attempt

The time when the last midround injection was attempted, whether or not it was successful

latejoin_delay_max

The maximum time the recurring latejoin ruleset timer is allowed to be.

latejoin_delay_min

The minimum time the recurring latejoin ruleset timer is allowed to be.

latejoin_injection_cooldown

When world.time is over this number the mode tries to inject a latejoin ruleset.

latejoin_rules

List of latejoin rules used for selecting the rules.

lower_injection_chance

The chance of injection decrease when above lower_injection_chance_minimum_threat

lower_injection_chance_minimum_threat

If below this threat, decrease the chance of injection

mid_round_budget

Set at the beginning of the round. Spent by midrounds and latejoins.

midround_delay_max

The maximum time the recurring midround ruleset timer is allowed to be.

midround_delay_min

The minimum time the recurring midround ruleset timer is allowed to be.

midround_injection_cooldown

When world.time is over this number the mode tries to inject a midround ruleset.

midround_injection_timer_id

The timer ID for the cancellable midround rule injection

midround_rules

List of midround rules used for selecting the rules.

only_ruleset_executed

If a only ruleset has been executed.

peaceful_percentage

How many percent of the rounds are more peaceful.

pop_per_requirement

random_event_hijack_maximum

The maximum amount of time for antag random events to be hijacked.

random_event_hijack_minimum

The minimum amount of time for antag random events to be hijacked.

random_event_hijacked

Whether or not a random event has been hijacked this midround cycle

round_start_budget

Set at the beginning of the round. Spent by the mode to "purchase" rules. Everything else goes in the postround budget.

roundstart_pop_ready

Number of players who were ready on roundstart.

roundstart_rules

List of roundstart rules used for selecting the rules.

roundstart_split_curve_centre

A number between -5 and +5. Equivalent to threat_curve_centre, but for the budget split. A negative value will weigh towards midround rulesets, and a positive value will weight towards roundstart ones.

roundstart_split_curve_width

A number between 0.5 and 4. Equivalent to threat_curve_width, but for the budget split. Higher value will favour more variance in splits and lower value rounds closer to the average.

shown_threat

The amount of threat shown on the piece of paper. Can differ from the actual threat amount.

snapshots

A list of recorded "snapshots" of the round, stored in the dynamic.json log

threat_curve_centre

A number between -5 and +5. A negative value will give a more peaceful round and a positive value will give a round with higher threat.

threat_curve_width

A number between 0.5 and 4. Higher value will favour extreme rounds and lower value rounds closer to the average.

threat_level

The "threat cap", threat shouldn't normally go above this and is used in ruleset calculations

threat_log

Running information about the threat. Can store text or datum entries.

Proc Details

admin_cancel_midround

Fired when an admin cancels the current midround injection.

admin_different_midround

Fired when an admin requests a different midround injection.

check_age

Checks if client age is age or older.

check_blocking

Checks if a type in blocking_list is in rule_list.

configure_ruleset

Apply configurations to rule.

create_threat

Generate threat and increase the threat_level if it goes beyond, capped at 100

dynamic_log

Log to messages and to the game

execute_midround_latejoin_rule

Mainly here to facilitate delayed rulesets. All midround/latejoin rulesets are executed with a timered callback to this proc.

execute_midround_rule

Fired after admins do not cancel a midround injection.

execute_roundstart_rule

Mainly here to facilitate delayed rulesets. All roundstart rulesets are executed with a timered callback to this proc.

generate_budgets

Generates the midround and roundstart budgets

generate_threat

Generates the threat level using lorentz distribution and assigns peaceful_percentage.

get_injection_chance

Gets the chance for latejoin injection, the dry_run argument is only used for forced injection.

get_midround_injection_chance

Gets the chance for midround injection, the dry_run argument is only used for forced injection. Usually defers to the latejoin injection chance.

lorentz_to_amount

Turns the value generated by lorentz distribution to number between 0 and 100. Used for threat level and splitting the budgets.

new_snapshot

Creates a new snapshot with the given rulesets chosen, and writes to the JSON output.

pick_latejoin_rule

Executes a random latejoin ruleset from the list of drafted rules.

pick_midround_rule

Executes a random midround ruleset from the list of drafted rules.

pick_ruleset

From a list of rulesets, returns one based on weight and availability. Mutates the list that is passed into it to remove invalid rules.

picking_roundstart_rule

Initializes the round start ruleset provided to it. Returns how much threat to spend.

picking_specific_rule

An experimental proc to allow admins to call rules on the fly or have rules call other rules.

refund_threat

Refund threat, but no more than threat_level.

remove_from_list

Removes type from the list

rigged_roundstart

A simple roundstart proc used when dynamic_forced_roundstart_ruleset has rules in it.

spend_midround_budget

Expend midround threat, can't fall under 0.

spend_roundstart_budget

Expend round start threat, can't fall under 0.