dynamic mode
Vars | |
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. |
Procs | |
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. |
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
Pop range per requirement. * If the value is five the range is: * 0-4, 5-9, 10-14, 15-19, 20-24, 25-29, 30-34, 35-39, 40-54, 45+ * If it is six the range is: * 0-5, 6-11, 12-17, 18-23, 24-29, 30-35, 36-41, 42-47, 48-53, 54+ * If it is seven the range is: * 0-6, 7-13, 14-20, 21-27, 28-34, 35-41, 42-48, 49-55, 56-62, 63+
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.