mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
Dynamic+ (#34678)
* listing rulesets real quick * dynamicplus * Ok nevermind let's keep it simple * and that too * hurr * Update dynamic_rulesets_roundstart.dm
This commit is contained in:
@@ -178,7 +178,7 @@ var/datum/subsystem/persistence_misc/SSpersistence_misc
|
||||
var/datum/gamemode/dynamic/dynamic_mode = ticker.mode
|
||||
if (!istype(dynamic_mode))
|
||||
return
|
||||
var/list/data = list(
|
||||
data = list(
|
||||
"one_round_ago" = list(),
|
||||
"two_rounds_ago" = dynamic_mode.previously_executed_rules["one_round_ago"],
|
||||
"three_rounds_ago" = dynamic_mode.previously_executed_rules["two_rounds_ago"]
|
||||
@@ -191,6 +191,29 @@ var/datum/subsystem/persistence_misc/SSpersistence_misc
|
||||
data["one_round_ago"] |= "[some_ruleset.type]"
|
||||
write_file(data)
|
||||
|
||||
/datum/persistence_task/dynamic_ruleset_weights
|
||||
execute = TRUE
|
||||
name = "Dynamic ruleset weights"
|
||||
file_path = "data/persistence/dynamic_ruleset_weights.json"
|
||||
|
||||
/datum/persistence_task/dynamic_ruleset_weights/on_init()
|
||||
data = read_file()
|
||||
|
||||
/datum/persistence_task/dynamic_ruleset_weights/on_shutdown()
|
||||
var/datum/gamemode/dynamic/dynamic_mode = ticker.mode
|
||||
if (!istype(dynamic_mode))
|
||||
return
|
||||
|
||||
data = list()
|
||||
|
||||
for (var/category in dynamic_mode.ruleset_category_weights)
|
||||
data[category] = dynamic_mode.ruleset_category_weights[category]
|
||||
|
||||
for (var/datum/dynamic_ruleset/DR in dynamic_mode.executed_rules)
|
||||
data[DR.weight_category] = 0
|
||||
|
||||
write_file(data)
|
||||
|
||||
// This task has a unit test on code/modules/unit_tests/highscores.dm
|
||||
/datum/persistence_task/highscores
|
||||
execute = TRUE
|
||||
|
||||
@@ -9,7 +9,6 @@ var/dynamic_chosen_mode = LORENTZ
|
||||
var/dynamic_no_stacking = 1 // NO STACKING : only one "round-ender", except if we're above 80 threat
|
||||
var/dynamic_classic_secret = 0 // Only one roundstart ruleset, and only autotraitor + minor rules allowed
|
||||
var/dynamic_high_pop_limit = 45 // Will switch to "high pop override" if the roundstart population is above this
|
||||
var/dynamic_forced_extended = 0 // No rulesets will be drated, ever
|
||||
|
||||
var/stacking_limit = 90
|
||||
|
||||
@@ -68,7 +67,10 @@ var/stacking_limit = 90
|
||||
var/no_stacking = 1
|
||||
var/classic_secret = 0
|
||||
var/high_pop_limit = 45
|
||||
var/forced_extended = 0
|
||||
|
||||
var/list/ruleset_category_weights = list()
|
||||
var/dynamic_weight_increment = 1
|
||||
|
||||
|
||||
/datum/gamemode/dynamic/AdminPanelEntry()
|
||||
var/dat = list()
|
||||
@@ -78,7 +80,6 @@ var/stacking_limit = 90
|
||||
dat += "<br/>"
|
||||
dat += "Parameters: centre = [curve_centre_of_round] ; width = [curve_width_of_round].<br/>"
|
||||
dat += "<i>On average, <b>[peaceful_percentage]</b>% of the rounds are more peaceful.</i><br/>"
|
||||
dat += "Forced extended: <a href='?src=\ref[src];forced_extended=1'><b>[forced_extended ? "On" : "Off"]</b></a><br/>"
|
||||
dat += "No stacking (only one round-ender): <a href='?src=\ref[src];no_stacking=1'><b>[no_stacking ? "On" : "Off"]</b></a><br/>"
|
||||
dat += "Classic secret (only autotraitor): <a href='?src=\ref[src];classic_secret=1'><b>[classic_secret ? "On" : "Off"]</b></a><br/>"
|
||||
dat += "Stacking limit: <a href='?src=\ref[usr.client.holder];stacking_limit=1'>[stacking_limit]</a>"
|
||||
@@ -112,9 +113,6 @@ var/stacking_limit = 90
|
||||
return
|
||||
if(!usr.check_rights(R_ADMIN))
|
||||
return
|
||||
if (href_list["forced_extended"])
|
||||
forced_extended =! forced_extended
|
||||
message_admins("[key_name(usr)] has set 'forced extended' to [forced_extended].")
|
||||
else if (href_list["no_stacking"])
|
||||
no_stacking =! no_stacking
|
||||
message_admins("[key_name(usr)] has set 'no stacking' to [no_stacking].")
|
||||
@@ -174,25 +172,40 @@ var/stacking_limit = 90
|
||||
send2maindiscord("Dynamic mode Roundstart Threat: **[starting_threat][(starting_threat!=threat_level)?" ([threat_level])":""]**, Midround Threat: **[midround_starting_threat][(midround_starting_threat!=midround_threat_level)?" ([midround_threat_level])":""]**, rulesets: [jointext(rules_text, ", ")]")
|
||||
|
||||
/datum/gamemode/dynamic/can_start()
|
||||
read_previous_dynamic_rounds()
|
||||
for (var/rule in subtypesof(/datum/dynamic_ruleset/roundstart) - /datum/dynamic_ruleset/roundstart/delayed/)
|
||||
roundstart_rules += new rule()
|
||||
for (var/rule in subtypesof(/datum/dynamic_ruleset/latejoin))
|
||||
latejoin_rules += new rule()
|
||||
for (var/rule in subtypesof(/datum/dynamic_ruleset/midround))
|
||||
var/datum/dynamic_ruleset/midround/DR = rule
|
||||
if (initial(DR.weight))
|
||||
midround_rules += new rule()
|
||||
for(var/mob/new_player/player in player_list)
|
||||
if(player.mind && player.ready)
|
||||
roundstart_pop_ready++
|
||||
candidates.Add(player)
|
||||
|
||||
message_admins("DYNAMIC MODE: Listing [roundstart_rules.len] round start rulesets, and [roundstart_pop_ready] players ready.")
|
||||
log_admin("DYNAMIC MODE: Listing [roundstart_rules.len] round start rulesets, and [roundstart_pop_ready] players ready.")
|
||||
|
||||
distribution_mode = dynamic_chosen_mode
|
||||
message_admins("Distribution mode is : [dynamic_chosen_mode].")
|
||||
curve_centre_of_round = dynamic_curve_centre
|
||||
curve_width_of_round = dynamic_curve_width
|
||||
message_admins("Curve centre and curve width are : [curve_centre_of_round], [curve_width_of_round]")
|
||||
forced_extended = dynamic_forced_extended
|
||||
if (forced_extended)
|
||||
message_admins("The round will be forced to extended.")
|
||||
if (admin_disable_rulesets)
|
||||
message_admins("Rulesets are currently disabled.")
|
||||
no_stacking = dynamic_no_stacking
|
||||
if (no_stacking)
|
||||
message_admins("Round-ending rulesets won't stack, unless the threat is above stacking_limit ([stacking_limit]).")
|
||||
classic_secret = dynamic_classic_secret
|
||||
if (classic_secret)
|
||||
message_admins("Classic secret mode active: only autotraitors will spawn, and we will only have one roundstart ruleset.")
|
||||
log_admin("Dynamic mode parameters for the round: distrib mode = [distribution_mode], centre = [curve_centre_of_round], width is [curve_width_of_round]. Extended : [forced_extended], no stacking : [no_stacking], classic secret: [classic_secret].")
|
||||
log_admin("Dynamic mode parameters for the round: distrib mode = [distribution_mode], centre = [curve_centre_of_round], width is [curve_width_of_round]. Rulesets Disabled : [admin_disable_rulesets], no stacking : [no_stacking], classic secret: [classic_secret].")
|
||||
|
||||
generate_threat()
|
||||
|
||||
|
||||
var/latejoin_injection_cooldown_middle = 0.5*(LATEJOIN_DELAY_MAX + LATEJOIN_DELAY_MIN)
|
||||
latejoin_injection_cooldown = round(clamp(exp_distribution(latejoin_injection_cooldown_middle), LATEJOIN_DELAY_MIN, LATEJOIN_DELAY_MAX))
|
||||
|
||||
@@ -205,9 +218,6 @@ var/stacking_limit = 90
|
||||
message_admins("Parameters were: centre = [curve_centre_of_round], width = [curve_width_of_round].")
|
||||
log_admin("Parameters were: centre = [curve_centre_of_round], width = [curve_width_of_round].")
|
||||
|
||||
if (roundstart_pop_ready >= high_pop_limit)
|
||||
message_admins("DYNAMIC MODE: Mode: High Population Override is in effect! ([roundstart_pop_ready]/[high_pop_limit]) Threat Level will have more impact on which roles will appear, and player population less.")
|
||||
log_admin("DYNAMIC MODE: High Population Override is in effect! ([roundstart_pop_ready]/[high_pop_limit]) Threat Level will have more impact on which roles will appear, and player population less.")
|
||||
dynamic_stats = new
|
||||
dynamic_stats.starting_threat_level = threat_level
|
||||
|
||||
@@ -217,45 +227,49 @@ var/stacking_limit = 90
|
||||
log_admin("DYNAMIC MODE: 666 threat override.")
|
||||
message_admins("DYNAMIC MODE: 666 threat override.", 1)
|
||||
|
||||
|
||||
return 1
|
||||
|
||||
/datum/gamemode/dynamic/proc/read_previous_rounds_rulesets()
|
||||
/datum/gamemode/dynamic/proc/read_previous_dynamic_rounds()
|
||||
//Recapping the rulesets of the last 3 rounds
|
||||
previously_executed_rules = list(
|
||||
"one_round_ago" = list(),
|
||||
"two_rounds_ago" = list(),
|
||||
"three_rounds_ago" = list()
|
||||
)
|
||||
var/list/data = SSpersistence_misc.read_data(/datum/persistence_task/latest_dynamic_rulesets)
|
||||
if(!length(data))
|
||||
return
|
||||
if(length(data))
|
||||
for (var/entries in data)
|
||||
var/previous_rulesets_text = data[entries]
|
||||
if(!length(previous_rulesets_text))
|
||||
return
|
||||
var/list/previous_rulesets = list()
|
||||
for(var/entry in previous_rulesets_text)
|
||||
var/entry_path = text2path(entry)
|
||||
if(entry_path) // It's possible that a ruleset that existed last round doesn't exist anymore
|
||||
previous_rulesets += entry_path
|
||||
previously_executed_rules[entries] = previous_rulesets
|
||||
|
||||
for (var/entries in data)
|
||||
var/previous_rulesets_text = data[entries]
|
||||
if(!length(previous_rulesets_text))
|
||||
return
|
||||
var/list/previous_rulesets = list()
|
||||
for(var/entry in previous_rulesets_text)
|
||||
var/entry_path = text2path(entry)
|
||||
if(entry_path) // It's possible that a ruleset that existed last round doesn't exist anymore
|
||||
previous_rulesets += entry_path
|
||||
previously_executed_rules[entries] = previous_rulesets
|
||||
//Recapping the weight of the various rulesets according to their categories
|
||||
ruleset_category_weights = list()
|
||||
data = SSpersistence_misc.read_data(/datum/persistence_task/dynamic_ruleset_weights)
|
||||
for (var/rule in subtypesof(/datum/dynamic_ruleset))//first we dress the list of all categories according to the rulesets that currently exist
|
||||
var/datum/dynamic_ruleset/ruletype = rule
|
||||
var/rulecategory = initial(ruletype.weight_category)
|
||||
if (rulecategory)
|
||||
ruleset_category_weights[rulecategory] = 0
|
||||
|
||||
if(length(data))//then we update our categories with the weights as they were after last round
|
||||
for (var/entry in data)
|
||||
ruleset_category_weights[entry] = data[entry]
|
||||
|
||||
for (var/entry in ruleset_category_weights)//finally we increment all entries in the list by 1
|
||||
ruleset_category_weights[entry] = ruleset_category_weights[entry] + dynamic_weight_increment
|
||||
|
||||
/datum/gamemode/dynamic/Setup()
|
||||
read_previous_rounds_rulesets()
|
||||
for (var/rule in subtypesof(/datum/dynamic_ruleset/roundstart) - /datum/dynamic_ruleset/roundstart/delayed/)
|
||||
roundstart_rules += new rule()
|
||||
for (var/rule in subtypesof(/datum/dynamic_ruleset/latejoin))
|
||||
latejoin_rules += new rule()
|
||||
for (var/rule in subtypesof(/datum/dynamic_ruleset/midround))
|
||||
var/datum/dynamic_ruleset/midround/DR = rule
|
||||
if (initial(DR.weight))
|
||||
midround_rules += new rule()
|
||||
for(var/mob/new_player/player in player_list)
|
||||
if(player.mind && player.ready)
|
||||
roundstart_pop_ready++
|
||||
candidates.Add(player)
|
||||
message_admins("DYNAMIC MODE: Listing [roundstart_rules.len] round start rulesets, and [roundstart_pop_ready] players ready.")
|
||||
log_admin("DYNAMIC MODE: Listing [roundstart_rules.len] round start rulesets, and [roundstart_pop_ready] players ready.")
|
||||
if (roundstart_pop_ready >= high_pop_limit)
|
||||
message_admins("DYNAMIC MODE: Mode: High Population Override is in effect! ([roundstart_pop_ready]/[high_pop_limit]) Threat Level will have more impact on which roles will appear, and player population less.")
|
||||
log_admin("DYNAMIC MODE: High Population Override is in effect! ([roundstart_pop_ready]/[high_pop_limit]) Threat Level will have more impact on which roles will appear, and player population less.")
|
||||
if (roundstart_pop_ready <= 0)
|
||||
message_admins("DYNAMIC MODE: Not a single player readied-up. The round will begin without any roles assigned.")
|
||||
log_admin("DYNAMIC MODE: Not a single player readied-up. The round will begin without any roles assigned.")
|
||||
@@ -323,9 +337,7 @@ var/stacking_limit = 90
|
||||
roundstart()
|
||||
|
||||
/datum/gamemode/dynamic/proc/roundstart()
|
||||
if (forced_extended)
|
||||
message_admins("DYNAMIC MODE: Starting a round of forced extended.")
|
||||
log_admin("DYNAMIC MODE: Starting a round of forced extended.")
|
||||
if (admin_disable_rulesets)
|
||||
return 1
|
||||
|
||||
var/indice_pop = min(10,round(roundstart_pop_ready/5)+1)
|
||||
@@ -570,7 +582,7 @@ var/stacking_limit = 90
|
||||
if (midround_injection_cooldown)
|
||||
midround_injection_cooldown--
|
||||
else
|
||||
if (forced_extended)
|
||||
if (admin_disable_rulesets)
|
||||
return
|
||||
//time to inject some threat into the round
|
||||
if(emergency_shuttle.departed)//unless the shuttle is gone
|
||||
@@ -694,7 +706,7 @@ var/stacking_limit = 90
|
||||
return rule_list
|
||||
|
||||
/datum/gamemode/dynamic/latespawn(var/mob/living/newPlayer)
|
||||
if (forced_extended)
|
||||
if (admin_disable_rulesets)
|
||||
return
|
||||
if(emergency_shuttle.departed)//no more rules after the shuttle has left
|
||||
return
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/datum/dynamic_ruleset
|
||||
var/name = ""//For admin logging, and round end scoreboard
|
||||
var/name = ""//For admin logging, and round end scoreboard.
|
||||
var/persistent = 0//if set to 1, the rule won't be discarded after being executed, and /gamemode/dynamic will call process() every MC tick
|
||||
var/repeatable = 0//if set to 1, dynamic mode will be able to draft this ruleset again later on. (doesn't apply for roundstart rules)
|
||||
var/midround = 1//if set to 1, is a midround rule
|
||||
@@ -42,6 +42,8 @@
|
||||
|
||||
var/role_category_override = null // If a role is to be considered another for the purpose of bannig.
|
||||
|
||||
var/weight_category = null //Allows multiple rulesets to share the same dynamic weight (like Wizard and CWC, or a Roundstart Ruleset with its Midround/Latejoin variants)
|
||||
|
||||
/datum/dynamic_ruleset/New()
|
||||
..()
|
||||
if (config.protect_roles_from_antagonist)
|
||||
@@ -103,8 +105,8 @@
|
||||
|
||||
/datum/dynamic_ruleset/proc/ready(var/forced = 0) //Here you can perform any additional checks you want. (such as checking the map, the amount of certain jobs, etc)
|
||||
if (admin_disable_rulesets && !forced)
|
||||
message_admins("Dynamic Mode: [name] was prevented from firing by admins.")
|
||||
log_admin("Dynamic Mode: [name] was prevented from firing by admins.")
|
||||
message_admins("Dynamic Mode: [name] was prevented from firing because rulesets are disabled.")
|
||||
log_admin("Dynamic Mode: [name] was prevented from firing because rulesets are disabled.")
|
||||
return FALSE
|
||||
if (required_candidates > candidates.len) //IMPORTANT: If ready() returns 1, that means execute() should never fail!
|
||||
return FALSE
|
||||
@@ -160,6 +162,9 @@
|
||||
|
||||
result = previous_rounds_odds_reduction(result)
|
||||
|
||||
if (weight_category in mode.ruleset_category_weights)
|
||||
result *= mode.ruleset_category_weights[weight_category]
|
||||
|
||||
if (mode.highlander_rulesets_favoured && (flags & HIGHLANDER_RULESET))
|
||||
result *= ADDITIONAL_RULESET_WEIGHT
|
||||
message_admins("[name] had [result] weight (-[initial(weight) - result]).")
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
|
||||
/*
|
||||
* Syndicate Infiltrator
|
||||
* Ragin' Mages
|
||||
* Space Ninja Attack
|
||||
* Pulse Demon Infiltration
|
||||
* Grue Infestation
|
||||
* Provocateur
|
||||
* Time Agent Anomaly
|
||||
* Changelings
|
||||
*/
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// //
|
||||
// LATEJOIN RULESETS ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -47,12 +59,14 @@
|
||||
restricted_from_jobs = list("AI","Cyborg","Mobile MMI")
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Traitor"
|
||||
cost = 5
|
||||
requirements = list(40,30,20,10,10,10,10,10,10,10)
|
||||
high_population_requirement = 10
|
||||
repeatable = TRUE
|
||||
flags = TRAITOR_RULESET
|
||||
|
||||
|
||||
/datum/dynamic_ruleset/latejoin/infiltrator/execute()
|
||||
var/mob/M = pick(assigned)
|
||||
var/datum/role/traitor/newTraitor = new
|
||||
@@ -77,6 +91,7 @@
|
||||
required_pop = list(15,15,10,10,10,10,10,0,0,0)
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT/2
|
||||
weight_category = "Wizard"
|
||||
cost = 20
|
||||
requirements = list(90,90,70,40,30,20,10,10,10,10)
|
||||
high_population_requirement = 40
|
||||
@@ -111,6 +126,7 @@
|
||||
required_pop = list(15,15,10,10,10,10,10,0,0,0)
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Ninja"
|
||||
cost = 20
|
||||
requirements = list(90,90,60,20,10,10,10,10,10,10)
|
||||
high_population_requirement = 20
|
||||
@@ -146,6 +162,7 @@
|
||||
required_enemies = list(1,1,1,1,1,1,1,1,1,1)
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Pulse"
|
||||
cost = 25
|
||||
requirements = list(70,40,20,20,20,20,15,15,5,5)
|
||||
high_population_requirement = 10
|
||||
@@ -154,6 +171,7 @@
|
||||
repeatable = TRUE
|
||||
var/list/cables_to_spawn_at = list()
|
||||
|
||||
|
||||
/datum/dynamic_ruleset/latejoin/pulse_demon/ready(var/forced = 0)
|
||||
for(var/datum/powernet/PN in powernets)
|
||||
for(var/obj/structure/cable/C in PN.cables)
|
||||
@@ -195,6 +213,7 @@
|
||||
enemy_jobs = list()
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Grue"
|
||||
cost = 20
|
||||
requirements = list(70,60,50,40,30,20,10,10,10,10)
|
||||
high_population_requirement = 10
|
||||
@@ -257,6 +276,7 @@
|
||||
required_pop = list(20,20,15,15,15,15,15,0,0,0)
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Revolution"
|
||||
cost = 20
|
||||
var/required_heads = 3
|
||||
requirements = list(101,101,70,40,30,20,20,20,20,20)
|
||||
@@ -302,6 +322,8 @@
|
||||
cost = 10
|
||||
requirements = list(70, 60, 50, 40, 30, 20, 10, 10, 10, 10)
|
||||
logo = "time-logo"
|
||||
weight_category = "Time"
|
||||
|
||||
|
||||
/datum/dynamic_ruleset/latejoin/time_agent/ready(var/forced=0)
|
||||
var/player_count = mode.living_players.len
|
||||
@@ -340,6 +362,7 @@
|
||||
required_pop = list(15,15,15,10,10,10,10,5,5,0)
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Changeling"
|
||||
cost = 20
|
||||
requirements = list(80,70,60,60,30,20,10,10,10,10)
|
||||
high_population_requirement = 30
|
||||
|
||||
@@ -1,3 +1,26 @@
|
||||
|
||||
/*
|
||||
* Syndicate Sleeper Agent
|
||||
* Malfunctioning AI
|
||||
* Ragin' Mages
|
||||
* Nuclear Assault
|
||||
* Blob Overmind Storm
|
||||
* Revolutionary Squad
|
||||
* Space Ninja Attack
|
||||
* Soul Rambler Migration
|
||||
* Time Agent Anomaly
|
||||
* The Grinch
|
||||
* Loose Catbeast
|
||||
* Vox Heist
|
||||
* Plague Mice Invasion
|
||||
* Spider Infestation
|
||||
* Alien Infestation
|
||||
* Pulse Demon Infiltration
|
||||
* Grue Infestation
|
||||
* Prisoner
|
||||
* Judge
|
||||
*/
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// //
|
||||
// MIDROUND RULESETS ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -176,6 +199,7 @@
|
||||
restricted_from_jobs = list("AI","Mobile MMI")
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Traitor"
|
||||
cost = 10
|
||||
requirements = list(50,40,30,20,10,10,10,10,10,10)
|
||||
repeatable = TRUE
|
||||
@@ -243,6 +267,7 @@
|
||||
required_pop = list(25,25,25,20,20,20,15,15,15,15)
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Malf"
|
||||
cost = 35
|
||||
requirements = list(90,80,70,60,50,40,40,30,30,20)
|
||||
high_population_requirement = 65
|
||||
@@ -291,6 +316,7 @@
|
||||
required_pop = list(20,20,15,15,15,15,15,10,10,0)
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT/2
|
||||
weight_category = "Wizard"
|
||||
cost = 25
|
||||
requirements = list(90,90,70,40,30,20,10,10,10,10)
|
||||
high_population_requirement = 50
|
||||
@@ -330,6 +356,7 @@
|
||||
required_candidates = 5 // Placeholder, see op. cap
|
||||
max_candidates = 5
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Nuke"
|
||||
cost = 35
|
||||
requirements = list(90, 90, 80, 40, 40, 40, 30, 20, 20, 10)
|
||||
high_population_requirement = 60
|
||||
@@ -388,6 +415,7 @@
|
||||
required_enemies = list(4,4,4,4,4,4,4,3,2,1)
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Blob"
|
||||
weekday_rule_boost = list("Tue")
|
||||
cost = 45
|
||||
requirements = list(90,90,80,40,40,40,30,20,20,10)
|
||||
@@ -429,6 +457,7 @@
|
||||
required_pop = list(25,25,25,25,25,20,15,15,10,10)
|
||||
required_candidates = 3
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Revolution"
|
||||
cost = 30
|
||||
requirements = list(90, 90, 90, 90, 40, 40, 30, 20, 10, 10)
|
||||
high_population_requirement = 50
|
||||
@@ -467,6 +496,7 @@
|
||||
required_pop = list(15,15,15,15,15,10,10,10,5,5)
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Ninja"
|
||||
cost = 20
|
||||
requirements = list(90,90,60,20,10,10,10,10,10,10)
|
||||
high_population_requirement = 20
|
||||
@@ -505,6 +535,7 @@
|
||||
required_pop = list(0,0,10,10,15,15,20,20,20,25)
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Rambler"
|
||||
timeslot_rule_boost = list(SLEEPTIME)
|
||||
cost = 5
|
||||
requirements = list(5,5,15,15,25,25,55,55,55,75)
|
||||
@@ -541,6 +572,7 @@
|
||||
role_category = /datum/role/time_agent
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT * 0.4
|
||||
weight_category = "Time"
|
||||
cost = 10
|
||||
requirements = list(70, 60, 50, 40, 30, 20, 10, 10, 10, 10)
|
||||
logo = "time-logo"
|
||||
@@ -579,8 +611,9 @@
|
||||
required_pop = list(0,0,0,0,0,0,0,0,0,0)
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Special"
|
||||
cost = 10
|
||||
requirements = list(40,20,10,10,10,10,10,10,10,10) // So that's not possible to roll it naturally
|
||||
requirements = list(40,20,10,10,10,10,10,10,10,10)
|
||||
high_population_requirement = 10
|
||||
flags = MINOR_RULESET
|
||||
|
||||
@@ -618,6 +651,7 @@
|
||||
role_category = /datum/role/catbeast
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Catbeast"
|
||||
cost = 0
|
||||
requirements = list(0,0,0,0,0,0,0,0,0,0)
|
||||
high_population_requirement = 0
|
||||
@@ -647,6 +681,7 @@
|
||||
required_pop = list(20,20,20,15,15,15,15,15,10,10)
|
||||
required_candidates = 5
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Vox"
|
||||
cost = 25
|
||||
requirements = list(50,50,50,30,30,30,30,20,10,10)
|
||||
high_population_requirement = 35
|
||||
@@ -699,6 +734,7 @@
|
||||
required_candidates = 1
|
||||
max_candidates = 5
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Plague"
|
||||
cost = 25
|
||||
requirements = list(90,70,50,40,30,20,10,10,10,10)
|
||||
high_population_requirement = 40
|
||||
@@ -731,6 +767,7 @@
|
||||
required_candidates = 1
|
||||
max_candidates = 12 // max amount of spiderlings spawned by a spider infestation random event
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Spider"
|
||||
cost = 25
|
||||
requirements = list(90,80,60,40,30,20,10,10,10,10)
|
||||
high_population_requirement = 50
|
||||
@@ -764,7 +801,8 @@
|
||||
required_pop = list(25,20,20,15,15,15,10,10,10,10)
|
||||
required_candidates = 1
|
||||
max_candidates = 3
|
||||
weight = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Alien"
|
||||
cost = 30
|
||||
requirements = list(90,90,70,60,50,40,20,10,10,10)
|
||||
high_population_requirement = 35
|
||||
@@ -812,6 +850,7 @@
|
||||
required_enemies = list(1,1,1,1,1,1,1,1,1,1)
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Pulse"
|
||||
cost = 20
|
||||
requirements = list(70,40,20,20,20,20,15,15,5,5)
|
||||
high_population_requirement = 10
|
||||
@@ -851,6 +890,7 @@
|
||||
enemy_jobs = list()
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Grue"
|
||||
cost = 20
|
||||
requirements = list(70,60,50,40,30,20,10,10,10,10)
|
||||
high_population_requirement = 10
|
||||
@@ -906,7 +946,8 @@
|
||||
required_enemies = list(1,1,1,1,1,1,1,1,1,1)
|
||||
required_pop = list(25,20,20,20,15,15,10,10,0,0)
|
||||
required_candidates = 1
|
||||
weight = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Prisoner"
|
||||
cost = 0
|
||||
requirements = list(70,40,20,20,20,20,15,15,5,5)
|
||||
high_population_requirement = 10
|
||||
@@ -1026,6 +1067,7 @@
|
||||
required_candidates = 1
|
||||
max_candidates = 5
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Special"//Admin only
|
||||
cost = 20
|
||||
requirements = list(10,10,10,10,10,10,10,10,10,10)
|
||||
logo = "gun-logo"
|
||||
|
||||
@@ -1,4 +1,23 @@
|
||||
|
||||
/*
|
||||
* Syndicate Traitors
|
||||
* Syndicate Challengers
|
||||
* Changelings
|
||||
* Vampires
|
||||
* Wizard
|
||||
* Civil War of Casters
|
||||
* Blood Cult
|
||||
* Nuclear Emergency
|
||||
* Malfunctioning AI
|
||||
* Blob Conglomerate
|
||||
* Extended
|
||||
* Revolution
|
||||
* The Grinch
|
||||
* Tag mode
|
||||
* Antag Madness
|
||||
*/
|
||||
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// //
|
||||
// SYNDICATE TRAITORS ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -13,6 +32,7 @@
|
||||
restricted_from_jobs = list("AI","Mobile MMI")
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Traitor"
|
||||
cost = 10
|
||||
var/traitor_threshold = 3
|
||||
var/additional_cost = 5
|
||||
@@ -59,6 +79,7 @@
|
||||
restricted_from_jobs = list("AI","Cyborg","Mobile MMI")
|
||||
required_candidates = 3
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Traitor"
|
||||
cost = 15
|
||||
var/traitor_threshold = 4
|
||||
var/additional_cost = 5
|
||||
@@ -125,6 +146,7 @@
|
||||
required_pop = list(15,15,15,10,10,10,10,5,5,0)
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Changeling"
|
||||
cost = 18
|
||||
requirements = list(80,70,60,60,30,20,10,10,10,10)
|
||||
high_population_requirement = 30
|
||||
@@ -168,6 +190,7 @@
|
||||
required_pop = list(15,15,15,10,10,10,10,5,5,0)
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Vampire"
|
||||
cost = 15
|
||||
requirements = list(80,70,60,60,30,20,10,10,10,10)
|
||||
high_population_requirement = 30
|
||||
@@ -211,6 +234,7 @@
|
||||
required_pop = list(15,15,15,10,10,10,10,5,5,0)
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT/2
|
||||
weight_category = "Wizard"
|
||||
cost = 30
|
||||
requirements = list(90,90,70,40,30,20,10,10,10,10)
|
||||
high_population_requirement = 40
|
||||
@@ -247,6 +271,7 @@
|
||||
required_pop = list(25,25,20,20,20,20,15,15,15,5)
|
||||
required_candidates = 4
|
||||
weight = BASE_RULESET_WEIGHT/2
|
||||
weight_category = "Wizard"
|
||||
cost = 45
|
||||
requirements = list(90,90,70,40,30,20,10,10,10,10)
|
||||
high_population_requirement = 40
|
||||
@@ -300,6 +325,7 @@
|
||||
required_candidates = 4
|
||||
required_enemies = list(2,2,2,2,2,2,2,2,2,2)
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Cult"
|
||||
cost = 30
|
||||
requirements = list(90,80,60,30,20,10,10,10,10,10)
|
||||
high_population_requirement = 40
|
||||
@@ -397,6 +423,7 @@ Assign your candidates in choose_candidates() instead.
|
||||
required_candidates = 5 //This value is useless, see operative_cap
|
||||
required_enemies = list(2,2,2,2,2,2,2,2,2,2)
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Nuke"
|
||||
cost = 30
|
||||
requirements = list(90, 80, 60, 30, 20, 10, 10, 10, 10, 10)
|
||||
high_population_requirement = 40
|
||||
@@ -474,6 +501,7 @@ Assign your candidates in choose_candidates() instead.
|
||||
required_pop = list(25,25,25,20,20,20,15,15,15,15)
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Malf"
|
||||
cost = 40
|
||||
requirements = list(90,80,70,60,50,40,40,30,30,20)
|
||||
high_population_requirement = 60
|
||||
@@ -558,6 +586,7 @@ Assign your candidates in choose_candidates() instead.
|
||||
required_enemies = list(4,4,4,4,4,4,4,3,2,1)
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Blob"
|
||||
weekday_rule_boost = list("Tue")
|
||||
cost = 45
|
||||
requirements = list(90,90,90,80,60,40,30,20,10,10)
|
||||
@@ -599,11 +628,13 @@ Assign your candidates in choose_candidates() instead.
|
||||
enemy_jobs = list()
|
||||
required_pop = list(30,30,30,30,30,30,30,30,30,30)
|
||||
required_candidates = 0
|
||||
weight = 0.5*BASE_RULESET_WEIGHT
|
||||
weight = BASE_RULESET_WEIGHT * 0.5
|
||||
weight_category = "Extended"
|
||||
cost = 0
|
||||
requirements = list(0,0,0,0,0,0,0,0,0,0)
|
||||
high_population_requirement = 101
|
||||
|
||||
|
||||
// 70% chance of allowing extended at 0-30 threat, then (100-threat)% chance.
|
||||
/datum/dynamic_ruleset/roundstart/extended/ready(var/forced=0)
|
||||
var/probability = clamp(mode.threat_level, 30, 100)
|
||||
@@ -615,7 +646,9 @@ Assign your candidates in choose_candidates() instead.
|
||||
/datum/dynamic_ruleset/roundstart/extended/execute()
|
||||
message_admins("Starting a round of extended.")
|
||||
log_admin("Starting a round of extended.")
|
||||
mode.forced_extended = TRUE
|
||||
admin_disable_rulesets = TRUE
|
||||
log_admin("Dynamic rulesets are disabled in Extended.")
|
||||
message_admins("Dynamic rulesets are disabled in Extended.")
|
||||
return TRUE
|
||||
|
||||
//////////////////////////////////////////////
|
||||
@@ -632,6 +665,7 @@ Assign your candidates in choose_candidates() instead.
|
||||
required_pop = list(25,25,25,20,20,20,15,15,15,15)
|
||||
required_candidates = 3
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Revolution"
|
||||
cost = 40
|
||||
requirements = list(101,101,70,40,30,20,10,10,10,10)
|
||||
high_population_requirement = 50
|
||||
@@ -690,6 +724,7 @@ Assign your candidates in choose_candidates() instead.
|
||||
required_pop = list(0,0,0,0,0,0,0,0,0,0)
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Special"//Admin only
|
||||
cost = 10
|
||||
requirements = list(101,101,101,101,101,101,101,101,101,101) // So that's not possible to roll it naturally
|
||||
high_population_requirement = 10
|
||||
@@ -729,6 +764,7 @@ Assign your candidates in choose_candidates() instead.
|
||||
required_pop = list(0,0,0,0,0,0,0,0,0,0)
|
||||
required_candidates = 1
|
||||
weight = BASE_RULESET_WEIGHT
|
||||
weight_category = "Special"//Admin only
|
||||
cost = 10
|
||||
requirements = list(101,101,101,101,101,101,101,101,101,101) // So that's not possible to roll it naturally
|
||||
high_population_requirement = 101
|
||||
@@ -776,6 +812,7 @@ var/antag_madness = ANTAG_MADNESS_OFF
|
||||
protected_from_jobs = list()
|
||||
restricted_from_jobs = list()
|
||||
cost = 0
|
||||
weight_category = "Special"//Admin only
|
||||
requirements = list(101,101,101,101,101,101,101,101,101,101) // Adminbus only
|
||||
high_population_requirement = 101
|
||||
persistent = TRUE//latejoiners will either be heads of staff or traitors (unless traitor is deactivated/antagbanned)
|
||||
|
||||
@@ -746,12 +746,16 @@ var/datum/controller/gameticker/ticker
|
||||
tag_mode.name = "Tag mode"
|
||||
tag_mode.calledBy = "[key_name(user)]"
|
||||
forced_roundstart_ruleset += tag_mode
|
||||
dynamic_forced_extended = TRUE
|
||||
admin_disable_rulesets = TRUE
|
||||
log_admin("Dynamic rulesets are disabled in Tag Mode.")
|
||||
message_admins("Dynamic rulesets are disabled in Tag Mode.")
|
||||
|
||||
/datum/controller/gameticker/proc/cancel_tag_mode(var/mob/user)
|
||||
tag_mode_enabled = FALSE
|
||||
to_chat(world, "<h1>Tag mode has been cancelled.<h1>")
|
||||
dynamic_forced_extended = FALSE
|
||||
admin_disable_rulesets = FALSE
|
||||
log_admin("Dynamic rulesets have been re-enabled.")
|
||||
message_admins("Dynamic rulesets have been re-enabled.")
|
||||
forced_roundstart_ruleset = list()
|
||||
|
||||
/world/proc/has_round_started()
|
||||
|
||||
@@ -737,9 +737,6 @@ var/global/floorIsLava = 0
|
||||
<h3>Common options</h3>
|
||||
<i>All these options can be changed midround.</i> <br/>
|
||||
<br/>
|
||||
<b>Force extended:</b> - Option is <a href='?src=\ref[src];force_extended=1'> <b>[dynamic_forced_extended ? "ON" : "OFF"]</a></b>.
|
||||
<br/>This will force the round to be extended. No rulesets will be drafted. <br/>
|
||||
<br/>
|
||||
<b>No stacking:</b> - Option is <a href='?src=\ref[src];no_stacking=1'> <b>[dynamic_no_stacking ? "ON" : "OFF"]</b></a>.
|
||||
<br/>Unless the threat goes above [stacking_limit], only one "round-ender" ruleset will be drafted. <br/>
|
||||
<br/>
|
||||
|
||||
@@ -1855,18 +1855,6 @@
|
||||
dynamic_curve_width = new_width
|
||||
dynamic_mode_options(usr)
|
||||
|
||||
else if(href_list["force_extended"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(master_mode != "Dynamic Mode")
|
||||
return alert(usr, "The game mode has to be Dynamic Mode!", null, null, null, null)
|
||||
|
||||
dynamic_forced_extended = !dynamic_forced_extended
|
||||
log_admin("[key_name(usr)] set 'forced_extended' to [dynamic_forced_extended].")
|
||||
message_admins("[key_name(usr)] set 'forced_extended' to [dynamic_forced_extended].")
|
||||
dynamic_mode_options(usr)
|
||||
|
||||
else if(href_list["toggle_rulesets"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user