dynamic 
Vars | |
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 |
Procs | |
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 |
select_roundstart_antagonists | Selects which rulesets are to run at roundstart, and sets them up |
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 |
try_spawn_midround | Invoked 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
- midround_type - The type of midround ruleset to force
- forced_max_cap - Rather than using the ruleset's max antag cap, use this value As an example, this allows you to only spawn 1 traitor rather than the ruleset's default of 3 Can't be set to 0 (why are you forcing a ruleset that spawns 0 antags?)
- alert_admins_on_fail - If TRUE, alert admins if the ruleset fails to prepare/execute
- mob/admin - The admin who is forcing the ruleset, used for configuring the ruleset if possible
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
- latejoin_type - The type of latejoin ruleset to force
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