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

dynamic

Vars

admin_disabled_rulesetsList of ruleset typepaths that admins have explicitly disabled
admin_forcing_next_heavySet to TRUE by admin panels if they want to max out the chance of a heavy ruleset spawning
admin_forcing_next_latejoinSet to TRUE by admin panels if they want to max out the chance of a latejoin ruleset spawning
admin_forcing_next_lightSet to TRUE by admin panels if they want to max out the chance of a light ruleset spawning
antag_events_enabledWhether random events that spawn antagonists or modify dynamic are enabled
base_rulesets_to_spawnTracks the number of rulesets to spawn at game start (for admin reference)
current_tierReference to a dynamic tier datum, the tier picked for this round
dynamic_configThe config for dynamic loaded from the toml file
executed_rulesetsList of rulesets that have been executed this round
failed_latejoinsTracks how many time we fail to spawn a latejoin (to up the odds next time)
heavy_ruleset_startCooldown for when we are allowed to spawn heavy rulesets
latejoin_cooldownCooldown between latejoin ruleset executions
latejoin_ruleset_startCooldown for when we are allowed to spawn latejoin rulesets
light_ruleset_startCooldown for when we are allowed to spawn light rulesets
midround_admin_cancelSet to TRUE by hrefs if admins cancel a midround
midround_admin_cancel_periodCooldown between "we're going to spawn a midround" and "we're actually spawning a midround", to give admins a chance to cancel
midround_admin_rerollSet to TRUE by hrefs if admins reroll a midround
midround_cooldownCooldown between midround ruleset executions
queued_rulesetsList of rulesets that have been set up to run, but not yet executed
rulesets_to_spawnTracks how many of each ruleset category is yet to be spawned
unreported_rulesetsRulesets in this list will be excluded from the roundend report

Procs

force_extendedHelper to clear all queued rulesets and stop any other rulesets from naturally spawning
force_run_midroundAttempt to run a midround ruleset of the given type
get_latejoin_chanceGets the chance of a latejoin ruleset being selected
get_latejoin_rulesetsGets a weighted list of latejoin rulesets
get_midround_chanceGets the chance of a midround ruleset being selected
get_midround_rulesetsGets a weighted list of midround rulesets
get_roundstart_rulesetsGets a weighted list of roundstart rulesets
get_ruleset_cooldownGet the cooldown between attempts to spawn a ruleset of the given type
on_latejoinCalled when someone latejoins (This could be a signal in the future)
pick_roundstart_rulesetsPicks as many roundstart rulesets as we are allowed to spawn, returns them
pick_tierPicks what tier we are going to use for this round and sets up all the corresponding variables and ranges
queue_rulesetQueues a ruleset to run on roundstart or next latejoin which fulfills all requirements
select_roundstart_antagonistsSelects which rulesets are to run at roundstart, and sets them up
set_tierSets the tier to the typepath passed in
try_spawn_latejoinInvoked by SSdynamic to try to spawn a latejoin ruleset Respects ranges and thresholds
try_spawn_midroundInvoked by SSdynamic to try to spawn a random midround ruleset Respects ranges and thresholds

Var Details

admin_disabled_rulesets

List of ruleset typepaths that admins have explicitly disabled

admin_forcing_next_heavy

Set to TRUE by admin panels if they want to max out the chance of a heavy ruleset spawning

admin_forcing_next_latejoin

Set to TRUE by admin panels if they want to max out the chance of a latejoin ruleset spawning

admin_forcing_next_light

Set to TRUE by admin panels if they want to max out the chance of a light ruleset spawning

antag_events_enabled

Whether random events that spawn antagonists or modify dynamic are enabled

base_rulesets_to_spawn

Tracks the number of rulesets to spawn at game start (for admin reference)

current_tier

Reference to a dynamic tier datum, the tier picked for this round

dynamic_config

The config for dynamic loaded from the toml file

executed_rulesets

List of rulesets that have been executed this round

failed_latejoins

Tracks how many time we fail to spawn a latejoin (to up the odds next time)

heavy_ruleset_start

Cooldown for when we are allowed to spawn heavy rulesets

latejoin_cooldown

Cooldown between latejoin ruleset executions

latejoin_ruleset_start

Cooldown for when we are allowed to spawn latejoin rulesets

light_ruleset_start

Cooldown for when we are allowed to spawn light rulesets

midround_admin_cancel

Set to TRUE by hrefs if admins cancel a midround

midround_admin_cancel_period

Cooldown between "we're going to spawn a midround" and "we're actually spawning a midround", to give admins a chance to cancel

midround_admin_reroll

Set to TRUE by hrefs if admins reroll a midround

midround_cooldown

Cooldown between midround ruleset executions

queued_rulesets

List of rulesets that have been set up to run, but not yet executed

rulesets_to_spawn

Tracks how many of each ruleset category is yet to be spawned

unreported_rulesets

Rulesets in this list will be excluded from the roundend report

Proc Details

force_extended

Helper to clear all queued rulesets and stop any other rulesets from naturally spawning

force_run_midround

Attempt to run a midround ruleset of the given type

get_latejoin_chance

Gets the chance of a latejoin ruleset being selected

get_latejoin_rulesets

Gets a weighted list of latejoin rulesets

get_midround_chance

Gets the chance of a midround ruleset being selected

get_midround_rulesets

Gets a weighted list of midround rulesets

get_roundstart_rulesets

Gets a weighted list of roundstart rulesets

get_ruleset_cooldown

Get the cooldown between attempts to spawn a ruleset of the given type

on_latejoin

Called when someone latejoins (This could be a signal in the future)

pick_roundstart_rulesets

Picks as many roundstart rulesets as we are allowed to spawn, returns them

pick_tier

Picks what tier we are going to use for this round and sets up all the corresponding variables and ranges

queue_ruleset

Queues a ruleset to run on roundstart or next latejoin which fulfills all requirements

For example, if you queue a latejoin revolutionary, it'll only run when population gets large enough and there are enough heads of staff For all latejoins until then, it will simply do nothing

select_roundstart_antagonists

Selects which rulesets are to run at roundstart, and sets them up

Note: This proc can sleep (due to lazyloading of templates)!

set_tier

Sets the tier to the typepath passed in

try_spawn_latejoin

Invoked by SSdynamic to try to spawn a latejoin ruleset Respects ranges and thresholds

Returns TRUE if a ruleset was spawned, FALSE otherwise

try_spawn_midround

Invoked by SSdynamic to try to spawn a random midround ruleset Respects ranges and thresholds

Prioritizes light midround rulesets first, then heavy midround rulesets

Returns TRUE if a ruleset was spawned, FALSE otherwise