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

dynamic mode

Vars

candidatesList of candidates used on roundstart rulesets.
configurationDynamic configuration, loaded on pre_setup
current_rulesRules that are processed, rule_process is called on the rules in this list.
executed_rulesList of executed rulesets.
extra_rulesets_amountThe amount of additional rulesets waiting to be picked.
forced_injectionWhen TRUE GetInjectionChance returns 100.
forced_latejoin_ruleForced ruleset to be executed for the next latejoin.
highlander_executedIf a highlander executed.
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.
midround_injection_cooldownWhen world.time is over this number the mode tries to inject a midround ruleset.
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
roundstart_pop_readyNumber of players who were ready on roundstart.
roundstart_rulesList of roundstart rules used for selecting the rules.
second_rule_probThe probability for a second ruleset with index being every ten threat.
second_rule_reqThe requirement used for checking if a second rule should be selected. Index based on pop_per_requirement.
third_rule_probThe probability for a third ruleset with index being every ten threat.
third_rule_reqThe requirement used for checking if a third rule should be selected. Index based on pop_per_requirement.
threatSet at the beginning of the round. Spent by the mode to "purchase" rules.
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

check_ageChecks if client age is age or older.
check_blockingChecks if a type in blocking_list is in rule_list.
create_threatGenerate threat and increase the threat_level if it goes beyond, capped at 100
execute_midround_latejoin_ruleMainly here to facilitate delayed rulesets. All midround/latejoin rulesets are executed with a timered callback to this proc.
execute_roundstart_ruleMainly here to facilitate delayed rulesets. All roundstart rulesets are executed with a timered callback to this proc.
generate_threatGenerates the threat level using lorentz distribution and assigns peaceful_percentage.
get_injection_chanceGets the chance for latejoin and midround injection, the dry_run argument is only used for forced injection.
lorentz_to_threatTurns the value generated by lorentz distribution to threat value between 0 and 100.
picking_midround_latejoin_rulePicks a random midround OR latejoin rule from the list given as an argument and executes it. Also this could be named better.
picking_roundstart_rulePicks a random roundstart rule from the list given as an argument and executes it.
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_threatExpend threat, can't fall under 0.

Var Details

candidates

List of candidates used on roundstart rulesets.

configuration

Dynamic configuration, loaded on pre_setup

current_rules

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

executed_rules

List of executed rulesets.

extra_rulesets_amount

The amount of additional rulesets waiting to be picked.

forced_injection

When TRUE GetInjectionChance returns 100.

forced_latejoin_rule

Forced ruleset to be executed for the next latejoin.

highlander_executed

If a highlander executed.

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.

midround_injection_cooldown

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

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

roundstart_pop_ready

Number of players who were ready on roundstart.

roundstart_rules

List of roundstart rules used for selecting the rules.

second_rule_prob

The probability for a second ruleset with index being every ten threat.

second_rule_req

The requirement used for checking if a second rule should be selected. Index based on pop_per_requirement.

third_rule_prob

The probability for a third ruleset with index being every ten threat.

third_rule_req

The requirement used for checking if a third rule should be selected. Index based on pop_per_requirement.

threat

Set at the beginning of the round. Spent by the mode to "purchase" rules.

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

check_age

Checks if client age is age or older.

check_blocking

Checks if a type in blocking_list is in rule_list.

create_threat

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

execute_midround_latejoin_rule

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

execute_roundstart_rule

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

generate_threat

Generates the threat level using lorentz distribution and assigns peaceful_percentage.

get_injection_chance

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

lorentz_to_threat

Turns the value generated by lorentz distribution to threat value between 0 and 100.

picking_midround_latejoin_rule

Picks a random midround OR latejoin rule from the list given as an argument and executes it. Also this could be named better.

picking_roundstart_rule

Picks a random roundstart rule from the list given as an argument and executes it.

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_threat

Expend threat, can't fall under 0.