Shiptest 13 - Modules - TypesVar Details - Proc Details

dynamic_ruleset

Vars

antag_capPopulation scaling. Used by team antags and scaling for solo antags.
antag_datumThe antagonist datum that is assigned to the mobs mind on ruleset execution.
antag_flagPreferences flag such as ROLE_WIZARD that need to be turned on for players to be antag
antag_flag_overrideIf a role is to be considered another for the purpose of banning.
assignedList of players that were selected for this rule
base_probBase probability used in scaling. The higher it is, the more likely to scale. Kept as a var to allow for config editing._SendSignal(sigtype, list/arguments)
blocking_rulesIf a ruleset type which is in this list has been executed, then the ruleset will not be executed.
candidatesList of players that are being drafted for this rule
costThreat cost for this rule, this is decreased from the mode's threat when the rule is executed.
delayDelay for when execute will get called from the time of post_setup (roundstart) or process (midround/latejoin). Make sure your ruleset works with execute being called during the game when using this, and that the clean_up proc reverts it properly in case of faliure.
enemy_rolesIf set, there needs to be a certain amount of players doing those roles (among the players who won't be drafted) for the rule to be drafted IMPORTANT: DOES NOT WORK ON ROUNDSTART RULESETS.
exclusive_rolesIf set, rule will only accept candidates from those roles, IMPORTANT: DOES NOT WORK ON ROUNDSTART RULESETS.
flagsA flag that determines how the ruleset is handled HIGHLANDER_RULESET are rulesets can end the round. TRAITOR_RULESET and MINOR_RULESET can't end the round and have no difference right now.
high_population_requirementAn alternative, static requirement used instead when pop is over mode's high_pop_limit.
indice_popCalculated during acceptable(), used in scaling and team sizes.
maximum_playersThe maximum amount of players required for the rule to be considered. Anything below zero or exactly zero is ignored.
minimum_playersThe minimum amount of players required for the rule to be considered.
minimum_required_ageThe required minimum account age for this ruleset.
modeReference to the mode, use this instead of SSticker.mode.
nameFor admin logging and round end screen.
persistentIf set to TRUE, the rule won't be discarded after being executed, and dynamic will call rule_process() every time it ticks.
pop_per_requirementPop range per requirement. If zero defaults to mode's pop_per_requirement.
protected_rolesIf set, and config flag protect_roles_from_antagonist is false, then the rule will not pick players from these roles.
repeatableIf set to TRUE, dynamic mode will be able to draft this ruleset again later on. (doesn't apply for roundstart rules)
repeatable_weight_decreaseIf set higher than 0 decreases weight by itself causing the ruleset to appear less often the more it is repeated.
required_candidatesThe rule needs this many candidates (post-trimming) to be executed
required_enemiesIf enemy_roles was set, this is the amount of enemy job workers needed per threat_level range (0-10,10-20,etc) IMPORTANT: DOES NOT WORK ON ROUNDSTART RULESETS.
requirementsRequirements are the threat level requirements per pop range. With the default values, The rule will never get drafted below 10 threat level (aka: "peaceful extended"), and it requires a higher threat level at lower pops.
restricted_rolesIf set, rule will deny candidates from those roles always.
ruletypeFor admin logging and round end screen, do not change this unless making a new rule type.
scaled_timesHow many times a rule has scaled up upon getting picked.
scaling_costCost per level the rule scales up.
total_costUsed for the roundend report
weight1 -> 9, probability for this rule to be picked against other rules

Procs

acceptableBy default, a rule is acceptable if it satisfies the threat level/population requirements. If your rule has extra checks, such as counting security officers, do that in ready() instead
clean_upRuns from gamemode process() if ruleset fails to start, like delayed rulesets not getting valid candidates. This one only handles refunding the threat, override in ruleset to clean up the rest.
executeCalled on post_setup on roundstart and when the rule executes on midround and latejoin. Give your candidates or assignees equipment and antag datum here.
get_weightGets weight of the ruleset Note that this decreases weight if repeatable is TRUE and repeatable_weight_decrease is higher than 0 Note: If you don't want repeatable rulesets to decrease their weight use the weight variable directly
pre_executeCalled on game mode pre_setup for roundstart rulesets. Do everything you need to do before job is assigned here. IMPORTANT: ASSIGN special_role HERE
readyHere you can perform any additional checks you want. (such as checking the map etc) Remember that on roundstart no one knows what their job is at this point. IMPORTANT: If ready() returns TRUE, that means pre_execute() or execute() should never fail!
round_resultSet mode result and news report here. Only called if ruleset is flagged as HIGHLANDER_RULESET
rule_processThis is called if persistent variable is true everytime SSTicker ticks.
scale_upCalled when a suitable rule is picked during roundstart(). Will some times attempt to scale a rule up when there is threat remaining. Returns the amount of scaled steps.
trim_candidatesHere you can remove candidates that do not meet your requirements. This means if their job is not correct or they have disconnected you can remove them from candidates here. Usually this does not need to be changed unless you need some specific requirements from your candidates.

Var Details

antag_cap

Population scaling. Used by team antags and scaling for solo antags.

antag_datum

The antagonist datum that is assigned to the mobs mind on ruleset execution.

antag_flag

Preferences flag such as ROLE_WIZARD that need to be turned on for players to be antag

antag_flag_override

If a role is to be considered another for the purpose of banning.

assigned

List of players that were selected for this rule

base_prob

Base probability used in scaling. The higher it is, the more likely to scale. Kept as a var to allow for config editing._SendSignal(sigtype, list/arguments)

blocking_rules

If a ruleset type which is in this list has been executed, then the ruleset will not be executed.

candidates

List of players that are being drafted for this rule

cost

Threat cost for this rule, this is decreased from the mode's threat when the rule is executed.

delay

Delay for when execute will get called from the time of post_setup (roundstart) or process (midround/latejoin). Make sure your ruleset works with execute being called during the game when using this, and that the clean_up proc reverts it properly in case of faliure.

enemy_roles

If set, there needs to be a certain amount of players doing those roles (among the players who won't be drafted) for the rule to be drafted IMPORTANT: DOES NOT WORK ON ROUNDSTART RULESETS.

exclusive_roles

If set, rule will only accept candidates from those roles, IMPORTANT: DOES NOT WORK ON ROUNDSTART RULESETS.

flags

A flag that determines how the ruleset is handled HIGHLANDER_RULESET are rulesets can end the round. TRAITOR_RULESET and MINOR_RULESET can't end the round and have no difference right now.

high_population_requirement

An alternative, static requirement used instead when pop is over mode's high_pop_limit.

indice_pop

Calculated during acceptable(), used in scaling and team sizes.

maximum_players

The maximum amount of players required for the rule to be considered. Anything below zero or exactly zero is ignored.

minimum_players

The minimum amount of players required for the rule to be considered.

minimum_required_age

The required minimum account age for this ruleset.

mode

Reference to the mode, use this instead of SSticker.mode.

name

For admin logging and round end screen.

persistent

If set to TRUE, the rule won't be discarded after being executed, and dynamic will call rule_process() every time it ticks.

pop_per_requirement

Pop range per requirement. If zero defaults to mode's pop_per_requirement.

protected_roles

If set, and config flag protect_roles_from_antagonist is false, then the rule will not pick players from these roles.

repeatable

If set to TRUE, dynamic mode will be able to draft this ruleset again later on. (doesn't apply for roundstart rules)

repeatable_weight_decrease

If set higher than 0 decreases weight by itself causing the ruleset to appear less often the more it is repeated.

required_candidates

The rule needs this many candidates (post-trimming) to be executed

required_enemies

If enemy_roles was set, this is the amount of enemy job workers needed per threat_level range (0-10,10-20,etc) IMPORTANT: DOES NOT WORK ON ROUNDSTART RULESETS.

requirements

Requirements are the threat level requirements per pop range. With the default values, The rule will never get drafted below 10 threat level (aka: "peaceful extended"), and it requires a higher threat level at lower pops.

restricted_roles

If set, rule will deny candidates from those roles always.

ruletype

For admin logging and round end screen, do not change this unless making a new rule type.

scaled_times

How many times a rule has scaled up upon getting picked.

scaling_cost

Cost per level the rule scales up.

total_cost

Used for the roundend report

weight

1 -> 9, probability for this rule to be picked against other rules

Proc Details

acceptable

By default, a rule is acceptable if it satisfies the threat level/population requirements. If your rule has extra checks, such as counting security officers, do that in ready() instead

clean_up

Runs from gamemode process() if ruleset fails to start, like delayed rulesets not getting valid candidates. This one only handles refunding the threat, override in ruleset to clean up the rest.

execute

Called on post_setup on roundstart and when the rule executes on midround and latejoin. Give your candidates or assignees equipment and antag datum here.

get_weight

Gets weight of the ruleset Note that this decreases weight if repeatable is TRUE and repeatable_weight_decrease is higher than 0 Note: If you don't want repeatable rulesets to decrease their weight use the weight variable directly

pre_execute

Called on game mode pre_setup for roundstart rulesets. Do everything you need to do before job is assigned here. IMPORTANT: ASSIGN special_role HERE

ready

Here you can perform any additional checks you want. (such as checking the map etc) Remember that on roundstart no one knows what their job is at this point. IMPORTANT: If ready() returns TRUE, that means pre_execute() or execute() should never fail!

round_result

Set mode result and news report here. Only called if ruleset is flagged as HIGHLANDER_RULESET

rule_process

This is called if persistent variable is true everytime SSTicker ticks.

scale_up

Called when a suitable rule is picked during roundstart(). Will some times attempt to scale a rule up when there is threat remaining. Returns the amount of scaled steps.

trim_candidates

Here you can remove candidates that do not meet your requirements. This means if their job is not correct or they have disconnected you can remove them from candidates here. Usually this does not need to be changed unless you need some specific requirements from your candidates.