Merge pull request #588 from Jay-Sparrow/Dynamic2

Dynamic fixes
This commit is contained in:
Dahlular
2020-10-13 00:18:04 -06:00
committed by GitHub
9 changed files with 189 additions and 124 deletions
+12 -7
View File
@@ -1,3 +1,6 @@
#define DYNAMIC_DEFAULT_CHAOS 1.5 //The default chaos value for low pop low vote rounds
#define DYNAMIC_VOTE_NORMALIZATION 5 //If there are fewer than this many votes, the average will be skewed towards the default
SUBSYSTEM_DEF(vote)
name = "Vote"
wait = 10
@@ -146,13 +149,15 @@ SUBSYSTEM_DEF(vote)
if("5")
v += winners[option] //Add the number votes to the pool
numbers += (winners[option]*5) //Add the value of the vote to numbers
if (v == 0)
. = 2.5 //Default no vote value. Will change to define later
else
var/total = 0
for (var/i in numbers)
total += i
. = (total / v)
while (v < DYNAMIC_VOTE_NORMALIZATION) //For low low pop, low vote rounds.
numbers += DYNAMIC_DEFAULT_CHAOS //stops the one person voting from setting the chaos to five and flooding the station with anomalies
v += 1
var/total = 0
for (var/i in numbers)
total += i
. = (total / v)
if(total == 0)//If statements down the road break if total is allowed to be 0 and it defaults to normal extended.
. = 0.1
text += "\n<b>Chaos level [obfuscated ? "???" : .]</b>"
if(mode != "custom" && mode != "dynamic")
+26 -26
View File
@@ -40,7 +40,7 @@ GLOBAL_VAR_INIT(dynamic_high_pop_limit, 55)
GLOBAL_VAR_INIT(dynamic_forced_extended, FALSE)
// How high threat is required for HIGHLANDER_RULESETs stacking.
// This is independent of dynamic_no_stacking.
GLOBAL_VAR_INIT(dynamic_stacking_limit, 90)
GLOBAL_VAR_INIT(dynamic_stacking_limit, 101)
// List of forced roundstart rulesets.
GLOBAL_LIST_EMPTY(dynamic_forced_roundstart_ruleset)
// Forced threat level, setting this to zero or higher forces the roundstart threat to the value.
@@ -130,7 +130,7 @@ GLOBAL_VAR_INIT(dynamic_chaos_level, 1.5)
dat += "Threat to Spend: <b>[threat]</b> <a href='?src=\ref[src];[HrefToken()];adjustthreat=1'>\[Adjust\]</A> <a href='?src=\ref[src];[HrefToken()];threatlog=1'>\[View Log\]</a><br/>"
dat += "<br/>"
dat += "Parameters: centre = [GLOB.dynamic_curve_centre] ; width = [GLOB.dynamic_curve_width].<br/>"
dat += "<i>On average, <b>[peaceful_percentage]</b>% of the rounds are more peaceful.</i><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];[HrefToken()];forced_extended=1'><b>[GLOB.dynamic_forced_extended ? "On" : "Off"]</b></a><br/>"
dat += "Classic secret (only autotraitor): <a href='?src=\ref[src];[HrefToken()];classic_secret=1'><b>[GLOB.dynamic_classic_secret ? "On" : "Off"]</b></a><br/>"
dat += "No stacking (only one round-ender): <a href='?src=\ref[src];[HrefToken()];no_stacking=1'><b>[GLOB.dynamic_no_stacking ? "On" : "Off"]</b></a><br/>"
@@ -214,31 +214,29 @@ GLOBAL_VAR_INIT(dynamic_chaos_level, 1.5)
update_playercounts()
if(!current_players[CURRENT_LIVING_ANTAGS].len)
. += "<b>Peaceful Waypoint</b></center><BR>"
. += "Your station orbits deep within controlled, core-sector systems and serves as a waypoint for routine traffic through Nanotrasen's trade empire. Due to the combination of high security, interstellar traffic, and low strategic value, it makes any direct threat of violence unlikely. Your primary enemies will be incompetence and bored crewmen: try to organize team-building events to keep staffers interested and productive."
. += "Your station orbits deep within controlled, core-sector systems and serves as a waypoint for routine traffic through friendly Kinaris space. Due to the combination of high security, interstellar traffic, and low strategic value, it makes any direct threat of violence unlikely. Your primary enemies will be incompetence and bored crewmen: try to organize team-building events to keep staffers interested and productive."
else
. += "<b>Core Territory</b></center><BR>"
. += "Your station orbits within reliably mundane, secure space. Although Nanotrasen has a firm grip on security in your region, the valuable resources and strategic position aboard your station make it a potential target for infiltrations. Monitor crew for non-loyal behavior, but expect a relatively tame shift free of large-scale destruction. We expect great things from your station."
. += "Your station orbits within reliably mundane, secure space. Although Kinaris has a firm grip on security in your region, the valuable resources and strategic position aboard your station make it a potential target for infiltrations. Monitor crew for non-loyal behavior, but expect a relatively tame shift free of large-scale destruction. We expect great things from your station."
if(20 to 39)
. += "<b>Anomalous Exogeology</b></center><BR>"
. += "Although your station lies within what is generally considered Nanotrasen-controlled space, the course of its orbit has caused it to cross unusually close to exogeological features with anomalous readings. Although these features offer opportunities for our research department, it is known that these little understood readings are often correlated with increased activity from competing interstellar organizations and individuals, among them the Wizard Federation and Cult of the Geometer of Blood - all known competitors for Anomaly Type B sites. Exercise elevated caution."
. += "Although your station lies within what is generally considered Kinaris-controlled space, the course of its orbit has caused it to cross unusually close to exogeological features with anomalous readings. Although these features offer opportunities for our research department, it is known that these little understood readings are often correlated with increased activity from competing interstellar organizations and individuals, among them the Wizard Federation and Cult of the Geometer of Blood - all known competitors for Anomaly Type B sites. Exercise elevated caution."
if(40 to 49)
. += "<b>Contested System</b></center><BR>"
. += "Your station's orbit passes along the edge of Nanotrasen's sphere of influence. While subversive elements remain the most likely threat against your station, hostile organizations are bolder here, where our grip is weaker. Exercise increased caution against elite Syndicate strike forces, or Executives forbid, some kind of ill-conceived unionizing attempt."
if(GLOB.security_level < SEC_LEVEL_BLUE)
set_security_level(SEC_LEVEL_BLUE)
if(50 to 59)
. += "Your station's orbit passes along the edge of Kinaris allied influence. While subversive elements remain the most likely threat against your station, Nanotrasen and hostile organizations are bolder here, where our grip is weaker. Exercise increased caution against potential Syndicate agents, and be on the lookout for any potentially anomalous activity."
if(50 to 64)
. += "<b>Uncharted Space</b></center><BR>"
. += "Congratulations and thank you for participating in the NT 'Frontier' space program! Your station is actively orbiting a high value system far from the nearest support stations. Little is known about your region of space, and the opportunity to encounter the unknown invites greater glory. You are encouraged to elevate security as necessary to protect Nanotrasen assets."
. += "Congratulations and thank you for participating in the Kinaris 'Frontier' space program! Your station is actively orbiting a high value system far from the nearest support stations. Little is known about your region of space, and the opportunity to encounter the unknown invites greater glory. You are encouraged to elevate security as necessary to protect your lives and station assets."
if(GLOB.security_level < SEC_LEVEL_BLUE)
set_security_level(SEC_LEVEL_BLUE)
if(60 to 79)
if(65 to 89)
. += "<b>Black Orbit</b></center><BR>"
. += "As part of a mandatory security protocol, we are required to inform you that as a result of your orbital pattern directly behind an astrological body (oriented from our nearest observatory), your station will be under decreased monitoring and support. It is anticipated that your extreme location and decreased surveillance could pose security risks. Avoid unnecessary risks and attempt to keep your station in one piece."
. += "As part of a mandatory security protocol, we are required to inform you that as a result of your orbital pattern directly behind an astrological body (oriented from our nearest observatory), your station will be under decreased monitoring and support. It is anticipated that your extreme location and decreased surveillance could pose security risks. Avoid unnecessary risks and attempt to keep yourselves in one piece."
if(GLOB.security_level < SEC_LEVEL_BLUE)
set_security_level(SEC_LEVEL_BLUE)
if(80 to 100)
if(90 to 100)
. += "<b>Impending Doom</b></center><BR>"
. += "Your station is somehow in the middle of hostile territory, in clear view of any enemy of the corporation. Your likelihood to survive is low, and station destruction is expected and almost inevitable. Secure any sensitive material and neutralize any enemy you will come across. It is important that you at least try to maintain the station.<BR>"
. += "Your station is somehow in the middle of hostile territory, in clear view of any enemy of the corporation. Your likelihood to survive is low, and station destruction is expected and almost inevitable. Secure any sensitive material and protect yourselves from any enemy you will come across. It is important that you at least try to maintain the station.<BR>"
. += "Good luck."
if(GLOB.security_level < SEC_LEVEL_AMBER)
set_security_level(SEC_LEVEL_AMBER)
@@ -427,18 +425,20 @@ GLOBAL_VAR_INIT(dynamic_chaos_level, 1.5)
extra_rulesets_amount++
if (threat_level >= third_rule_req[indice_pop])
extra_rulesets_amount++
if (drafted_rules.len > 0 && picking_roundstart_rule(drafted_rules))
if (extra_rulesets_amount > 0) // We've got enough population and threat for a second rulestart rule
for (var/datum/dynamic_ruleset/roundstart/rule in drafted_rules)
if (rule.cost > threat)
drafted_rules -= rule
if (drafted_rules.len > 0 && picking_roundstart_rule(drafted_rules))
if (extra_rulesets_amount > 1) // We've got enough population and threat for a third rulestart rule
for (var/datum/dynamic_ruleset/roundstart/rule in drafted_rules)
if (rule.cost > threat)
drafted_rules -= rule
picking_roundstart_rule(drafted_rules)
if(prob(GLOB.dynamic_chaos_level*20)) //Make round start traitors a percent chance instead of a constant. Chance is equal to Chaos * 20, from 0% to 100%
if (drafted_rules.len > 0 && picking_roundstart_rule(drafted_rules))
if (extra_rulesets_amount > 0) // We've got enough population and threat for a second rulestart rule
for (var/datum/dynamic_ruleset/roundstart/rule in drafted_rules)
if (rule.cost > threat)
drafted_rules -= rule
if(prob(GLOB.dynamic_chaos_level*20)) //Make round start traitors a percent chance instead of a constant.
if (drafted_rules.len > 0 && picking_roundstart_rule(drafted_rules))
if (extra_rulesets_amount > 1) // We've got enough population and threat for a third rulestart rule
for (var/datum/dynamic_ruleset/roundstart/rule in drafted_rules)
if (rule.cost > threat)
drafted_rules -= rule
if(prob(GLOB.dynamic_chaos_level*20)) //Make round start traitors a percent chance instead of a constant.
picking_roundstart_rule(drafted_rules)
else
return FALSE
return TRUE
@@ -1,6 +1,7 @@
/datum/dynamic_ruleset/event
ruletype = "Event"
var/typepath // typepath of the event
var/controller //round event controller for the event - Required for certain events dependendant on variables within their controllers
var/triggering
var/earliest_start = 20 MINUTES
var/occurances_current = 0 //Don't touch this. Skyrat Change.
@@ -13,10 +14,6 @@
var/list/list_observers = list()
/datum/dynamic_ruleset/event/acceptable(population=0, threat=0)
if(GLOB.wizardstart.len == 0)
log_admin("Cannot accept Wizard ruleset. Couldn't find any wizard spawn points.")
message_admins("Cannot accept Wizard ruleset. Couldn't find any wizard spawn points.")
return FALSE
return ..()
/datum/dynamic_ruleset/event/ready(forced = 0)
@@ -35,9 +32,13 @@
return ..()
/datum/dynamic_ruleset/event/execute()
var/datum/round_event/E = new typepath()
E.current_players = get_active_player_count(alive_check = 1, afk_check = 1, human_check = 1)
//E.control = src
var/datum/round_event/E
if(controller)
var/datum/round_event_control/C = locate(controller) in SSevents.control
E = C.runEvent()
else
E = new typepath()
E.current_players = get_active_player_count(alive_check = 1, afk_check = 1, human_check = 1)
SSblackbox.record_feedback("tally", "event_ran", 1, "[E]")
occurances_current++
@@ -102,9 +103,9 @@
typepath = /datum/round_event/pirates
antag_flag = ROLE_TRAITOR
enemy_roles = list("AI","Security Officer","Head of Security","Captain")
required_enemies = list(2,2,1,1,0,0,0,0,0,0)
required_enemies = list(2,2,2,2,1,1,1,1,0,0)
weight = 3
cost = 10
cost = 0
earliest_start = 50 MINUTES
blocking_rules = list(/datum/dynamic_ruleset/roundstart/nuclear,/datum/dynamic_ruleset/midround/from_ghosts/nuclear)
requirements = list(101,30,25,20,20,20,15,10,10,10)
@@ -208,7 +209,7 @@
required_enemies = list(2,2,1,1,0,0,0,0,0,0)
weight = 3
cost = 5
requirements = list(30,30,25,20,15,15,10,10,10,10)
requirements = list(101,20,15,10,10,10,10,10,10,10)
high_population_requirement = 15
//property_weights = list("chaos" = 1, "valid" = 1)
earliest_start = 30 MINUTES //Skyrat change.
@@ -228,30 +229,32 @@
enemy_roles = list("Chemist","Medical Doctor","Chief Medical Officer")
required_enemies = list(1,1,1,1,1,1,0,0,0,0)
cost = 2
weight = 2
weight = 1
repeatable_weight_decrease = 1
requirements = list(101,10,5,5,5,5,5,5,5,5) // yes, can happen on fake-extended
requirements = list(101,101,10,10,5,5,5,5,5,5) // yes, can happen on fake-extended
high_population_requirement = 5
repeatable = TRUE
//property_weights = list("chaos" = 1, "extended" = 2)
occurances_max = 2
chaos_min = 1.5
chaos_min = 1.2
/datum/dynamic_ruleset/event/ventclog/ready()
if(mode.threat_level > 30 && mode.threat >= 5 && prob(20))
name = "Clogged Vents: Threatening"
cost = 8
required_enemies = list(3,3,3,2,2,2,1,1,1,1)
required_enemies = list(3,3,3,2,2,2,1,1,0,0)
typepath = /datum/round_event/vent_clog/threatening
chaos_min = 1.5
else if(mode.threat_level > 15 && mode.threat > 15 && prob(30))
name = "Clogged Vents: Catastrophic"
cost = 15
required_enemies = list(2,2,1,1,1,1,0,0,0,0)
required_enemies = list(4,4,4,3,3,3,2,1,1,1)
typepath = /datum/round_event/vent_clog/catastrophic
chaos_min = 1.8
else
cost = 0
name = "Clogged Vents: Normal"
required_enemies = list(1,1,1,0,0,0,0,0,0,0)
required_enemies = list(2,2,2,1,1,1,1,0,0,0)
typepath = /datum/round_event/vent_clog
return ..()
@@ -289,7 +292,7 @@
//config_tag = "meteor_wave"
typepath = /datum/round_event/meteor_wave
enemy_roles = list("Chief Engineer","Station Engineer","Atmospheric Technician","Captain","Cyborg")
required_enemies = list(2,2,2,2,2,2,2,2,2,2)
required_enemies = list(2,2,2,2,2,1,1,1,0,0)
cost = 0
weight = 2
earliest_start = 45 MINUTES
@@ -305,16 +308,20 @@
name = "Meteor Wave: Threatening"
cost = 10
typepath = /datum/round_event/meteor_wave/threatening
chaos_min = 1.8
else if(world.time-SSticker.round_start_time > 45 MINUTES && mode.threat_level > 50 && mode.threat >= 40 && prob(30))
name = "Meteor Wave: Catastrophic"
cost = 0
typepath = /datum/round_event/meteor_wave/catastrophic
required_enemies = list(3,3,3,3,3,3,3,3,3,3)
requirements = list(101,101,40,30,30,30,30,30,30,30)
chaos_min = 2.0
else
name = "Meteor Wave: Normal"
cost = 5
typepath = /datum/round_event/meteor_wave
chaos_min = 1.2
required_enemies = list(2,2,2,2,1,1,1,1,0,0)
return ..()
//////////////////////////////////////////////
@@ -333,12 +340,12 @@
earliest_start = 20 MINUTES
repeatable_weight_decrease = 2
cost = 3
requirements = list(5,5,5,5,5,5,5,5,5,5)
requirements = list(101,101,5,5,5,5,5,5,5,5)
high_population_requirement = 5
repeatable = TRUE
//property_weights = list("extended" = 1)
occurances_max = 2
chaos_min = 1.5
chaos_min = 1.0
/datum/dynamic_ruleset/event/anomaly_flux
name = "Anomaly: Hyper-Energetic Flux"
@@ -349,13 +356,13 @@
weight = 3
earliest_start = 20 MINUTES
repeatable_weight_decrease = 2
cost = 5
requirements = list(5,5,5,5,5,5,5,5,5,5)
cost = 3
requirements = list(101,5,5,5,5,5,5,5,5,5)
high_population_requirement = 10
repeatable = TRUE
//property_weights = list("extended" = 1)
occurances_max = 2
chaos_min = 1.5
chaos_min = 1.0
/datum/dynamic_ruleset/event/anomaly_gravitational
name = "Anomaly: Gravitational"
@@ -380,8 +387,8 @@
repeatable_weight_decrease = 1
cost = 0
enemy_roles = list("Chief Engineer","Station Engineer","Atmospheric Technician","Research Director","Scientist","Captain","Cyborg")
required_enemies = list(1,1,1,1,1,1,1,1,1,1)
requirements = list(10,10,10,10,10,10,10,10,10,10)
required_enemies = list(2,2,2,2,2,1,1,1,1,1)
requirements = list(101,101,10,10,10,10,10,10,10,10)
high_population_requirement = 10
repeatable = TRUE
//property_weights = list("extended" = 1)
@@ -395,15 +402,15 @@
weight = 2
earliest_start = 30 MINUTES
repeatable_weight_decrease = 1
cost = 5
cost = 0
enemy_roles = list("Chief Engineer","Station Engineer","Atmospheric Technician","Research Director","Scientist","Captain","Cyborg")
required_enemies = list(1,1,1,1,1,1,1,1,1,1)
requirements = list(10,10,10,10,10,10,10,10,10,10)
required_enemies = list(3,3,3,2,2,2,2,2,2,2)
requirements = list(101,101,10,10,10,10,10,10,10,10)
high_population_requirement = 10
repeatable = TRUE
//property_weights = list("extended" = 1)
occurances_max = 1
chaos_min = 2.0
chaos_min = 1.5
//////////////////////////////////////////////
// //
@@ -437,15 +444,15 @@
weight = 1
earliest_start = 30 MINUTES
repeatable_weight_decrease = 1
cost = 10
cost = -10
enemy_roles = list("Chief Engineer","Station Engineer","Atmospheric Technician","Research Director","Scientist","Captain","Cyborg")
required_enemies = list(2,1,1,1,1,1,0,0,0,0)
requirements = list(101,20,20,15,15,10,10,10,10,10)
requirements = list(101,25,20,15,15,15,10,10,10,10)
high_population_requirement = 10
repeatable = TRUE
//property_weights = list("extended" = -1, "chaos" = 1)
occurances_max = 1
chaos_min = 2.0
chaos_min = 1.5
/datum/dynamic_ruleset/event/carp_migration
name = "Carp Migration"
@@ -485,8 +492,8 @@
weight = 2
repeatable_weight_decrease = 3
enemy_roles = list("Chief Engineer","Station Engineer")
required_enemies = list(1,1,1,1,1,1,1,1,1,1)
requirements = list(101,101,5,5,5,10,10,10,10,10)
required_enemies = list(2,2,2,2,1,1,1,1,1,1)
requirements = list(101,101,5,5,5,5,5,5,5,5)
high_population_requirement = 5
repeatable = TRUE
//property_weights = list("extended" = 1, "chaos" = 1)
@@ -518,7 +525,7 @@
weight = 2
repeatable_weight_decrease = 1
enemy_roles = list("Chief Engineer","Station Engineer")
required_enemies = list(2,2,2,2,2,2,2,2,2,2)
required_enemies = list(2,2,1,1,1,1,1,1,1,1)
requirements = list(15,10,9,8,7,6,5,4,3,2)
high_population_requirement = 10
repeatable = TRUE
@@ -551,6 +558,7 @@
high_population_requirement = 5
repeatable = TRUE
occurances_max = 2
chaos_min = 1.0
/datum/dynamic_ruleset/event/radiation_storm
name = "Radiation Storm"
@@ -570,11 +578,11 @@
name = "Portal Storm"
//config_tag = "portal_storm"
typepath = /datum/round_event/portal_storm/syndicate_shocktroop
cost = 10
cost = 0
weight = 1
enemy_roles = list("Head of Security","Security Officer","AI","Captain","Shaft Miner")
required_enemies = list(2,2,2,2,2,2,2,2,2,2)
requirements = list(101,101,40,30,30,30,30,30,30,30)
requirements = list(101,101,40,35,30,30,30,30,25,20)
high_population_requirement = 30
earliest_start = 40 MINUTES
//property_weights = list("teamwork" = 1,"chaos" = 1, "extended" = -1)
@@ -601,7 +609,7 @@
name = "Swarmers"
//config_tag = "swarmer"
typepath = /datum/round_event/spawn_swarmer
cost = 10
cost = 0
weight = 1
earliest_start = 40 MINUTES
enemy_roles = list("AI","Security Officer","Head of Security","Captain","Station Engineer","Atmos Technician","Chief Engineer")
@@ -620,7 +628,7 @@
required_enemies = list(2,1,1,1,1,1,1,0,0,0)
required_candidates = 1
weight = 4
cost = 5
cost = -5
requirements = list(30,30,20,20,15,10,10,10,10,5) // yes, it can even happen in "extended"!
//property_weights = list("story_potential" = 1, "extended" = 1, "valid" = -2)
high_population_requirement = 5
@@ -636,7 +644,7 @@
required_candidates = 1
weight = 4
cost = 5
requirements = list(101,40,35,30,20,15,15,15,10,5)
requirements = list(101,30,27,24,21,18,15,15,10,10)
high_population_requirement = 15
//property_weights = list("story_potential" = -2, "extended" = -1)
occurances_max = 1 //Skyrat change.
@@ -644,17 +652,26 @@
/datum/dynamic_ruleset/event/immovable_rod
name = "Immovable Rod"
controller = /datum/round_event_control/immovable_rod
typepath = /datum/round_event/immovable_rod
enemy_roles = list("Research Director","Chief Engineer","Station Engineer","Captain","Chaplain","AI")
required_enemies = list(2,2,2,2,2,2,1,1,1,1)
requirements = list(101,101,20,18,16,14,12,10,8,8)
requirements = list(101,101,18,16,14,12,10,8,6,6)
high_population_requirement = 15
cost = 0
occurances_max = 2
weight = 4
earliest_start = 30 MINUTES
weight = 3
repeatable_weight_decrease = 2
chaos_min = 1.5
var/atom/special_target
/*
/datum/dynamic_ruleset/event/immovable_rod/execute() //I do not know why this is necessary
var/datum/round_event_control/E = locate(/datum/round_event_control/immovable_rod) in SSevents.control
var/datum/round_event/event = E.runEvent() //But it is.
event.announceWhen = -1 //So it isn't double announced.
return ..()
*/
//////////////////////////////////////////////
// //
@@ -696,30 +713,46 @@
requirements = list(0,0,0,0,0,0,0,0,0,0)
high_population_requirement = 0
weight = 100
repeatable_weight_decrease = 1 //Slightly drop the weight each time it is called to keep the pool from getting too diluted as the round goes on.
repeatable = TRUE
occurances_max = 20
//occurances_max = 20 //Our rounds can go for a WHILE
/datum/dynamic_ruleset/event/disease_outbreak
name = "Disease Outbreak"
enemy_roles = list("Virologist","Chief Medical Officer","Captain","Chemist")
required_enemies = list(2,1,1,1,0,0,0,0,0,0)
controller = /datum/round_event_control/disease_outbreak
typepath = /datum/round_event/disease_outbreak
requirements = list(5,5,5,5,5,5,5,5,5,5)
required_enemies = list(2,1,1,1,1,1,1,1,0,0)
requirements = list(10,8,5,5,5,5,5,5,5,5)
high_population_requirement = 5
weight = 5
weight = 2
cost = 0
repeatable = TRUE
occurances_max = 1
occurances_max = 2
/datum/dynamic_ruleset/event/falsealarm
/datum/dynamic_ruleset/event/disease_outbreak/execute() //I do not know why this is necessary
var/datum/round_event_control/E = locate(/datum/round_event_control/disease_outbreak) in SSevents.control
var/datum/round_event/event = E.runEvent() //But it is.
event.announceWhen = -1 //So it isn't double announced.
return ..()
/datum/dynamic_ruleset/event/falsealarm //I THINK IT WORKS
name = "False Alarm"
controller = /datum/round_event_control/falsealarm
typepath = /datum/round_event/falsealarm
requirements = list(0,0,0,0,0,0,0,0,0,0)
high_population_requirement = 0
weight = 20
weight = 5
repeatable = TRUE
occurances_max = 5
///datum/dynamic_ruleset/event/falsealarm/execute() //I do not know why this is necessary
//var/datum/round_event_control/E = locate(/datum/round_event_control/falsealarm) in SSevents.control
//var/datum/round_event/event = E.runEvent()
//event.announceWhen = -1 //So it isn't double announced.
//E.runEvent()
//return ..()
/datum/dynamic_ruleset/event/grid_check
name = "Grid Check"
typepath = /datum/round_event/grid_check
@@ -744,7 +777,7 @@
name = "Mice Migration"
typepath = /datum/round_event/mice_migration
enemy_roles = list("Chief Engineer","Station Engineer","Captain","Cook","Atmospheric Technician")
required_enemies = list(1,1,1,1,1,0,0,0,0,0)
required_enemies = list(1,1,1,1,1,1,0,0,0,0)
requirements = list(5,5,5,5,0,0,0,0,0,0)
high_population_requirement = 0
weight = 10
@@ -757,10 +790,10 @@
typepath = /datum/round_event/grey_tide
enemy_roles = list("Chief Engineer","Station Engineer","Captain","Atmospheric Technician","AI","Cyborg")
required_enemies = list(3,2,2,2,2,2,1,1,1,1)
requirements = list(101,10,10,10,5,5,5,5,5,5)
requirements = list(101,101,5,5,5,5,5,5,5,5)
high_population_requirement = 0
repeatable = TRUE
weight = 5
weight = 4
repeatable_weight_decrease = 3
occurances_max = 2
@@ -791,8 +824,8 @@
requirements = list(101,101,10,9,8,7,5,5,5,0)
cost = 2
high_population_requirement = 0
weight = 6
repeatable_weight_decrease = 5
weight = 4
repeatable_weight_decrease = 2
earliest_start = 20 MINUTES
repeatable = TRUE
occurances_max = 3
@@ -804,7 +837,7 @@
required_enemies = list(2,2,1,1,1,1,1,1,1,1)
requirements = list(5,5,5,5,5,5,5,5,0,0)
high_population_requirement = 5
weight = 10
weight = 8
repeatable = TRUE
repeatable_weight_decrease = 5
occurances_max = 3
@@ -198,13 +198,14 @@
restricted_roles = list("AI", "Cyborg", "Positronic Brain")
protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
required_candidates = 1
weight = 7
weight = 4
cost = 10
requirements = list(101,101,40,30,30,30,25,20,20,15)
requirements = list(101,101,30,25,20,20,15,15,15,10)
repeatable = TRUE
high_population_requirement = 10
flags = TRAITOR_RULESET
chaos_min = 3.0
chaos_max = 4.9
/datum/dynamic_ruleset/midround/autotraitor/thief
name = "Syndicate Sleeper Agent"
@@ -213,9 +214,9 @@
restricted_roles = list("AI", "Cyborg", "Positronic Brain")
protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
required_candidates = 1
weight = 7
weight = 4
cost = 5
requirements = list(30,30,30,25,20,15,10,10,5,5)
requirements = list(101,30,25,20,15,10,10,5,5,5)
repeatable = TRUE
high_population_requirement = 10
flags = TRAITOR_RULESET
@@ -272,8 +273,8 @@
required_enemies = list(4,4,4,4,4,4,2,2,2,0)
required_candidates = 1
weight = 3
cost = 35
requirements = list(101,101,60,55,50,45,40,35,25,20)
cost = 20
requirements = list(101,101,55,50,45,40,35,30,25,20)
high_population_requirement = 35
required_type = /mob/living/silicon/ai
var/ion_announce = 33
@@ -321,14 +322,15 @@
antag_datum = /datum/antagonist/wizard
antag_flag = ROLE_WIZARD
enemy_roles = list("Security Officer","Detective","Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(2,2,1,1,1,1,1,1,0,0)
required_candidates = 1
weight = 1
cost = 20
requirements = list(101,101,80,70,60,50,40,30,30,30)
requirements = list(101,101,60,55,50,40,30,30,20,20)
high_population_requirement = 50
repeatable = FALSE //WE DON'T NEED MORE THAN ONE WIZARD
chaos_min = 3.5
chaos_min = 4
admin_required = TRUE
/datum/dynamic_ruleset/midround/from_ghosts/wizard/ready(forced = FALSE)
if (required_candidates > (dead_players.len + list_observers.len))
@@ -354,13 +356,13 @@
antag_flag = ROLE_OPERATIVE
antag_datum = /datum/antagonist/nukeop
enemy_roles = list("AI", "Cyborg", "Security Officer", "Warden","Detective","Head of Security", "Captain")
required_enemies = list(3,3,3,3,3,2,1,1,0,0)
required_enemies = list(3,3,3,3,3,2,2,1,1,0)
required_candidates = 5
weight = 5
cost = 35
requirements = list(101,101,101,90,80,70,60,50,50,50)
requirements = list(101,101,100,70,60,50,40,40,40,40)
high_population_requirement = 10
var/operative_cap = list(2,2,3,3,4,5,5,5,5,5)
var/operative_cap = list(2,2,2,2,3,3,4,4,5,5)
var/datum/team/nuclear/nuke_team
flags = HIGHLANDER_RULESET
chaos_min = 4.0
@@ -402,7 +404,7 @@
required_candidates = 1
weight = 4
cost = 20
requirements = list(101,101,70,60,60,60,50,40,30,20)
requirements = list(101,101,60,50,45,40,40,40,30,20)
high_population_requirement = 50
repeatable = TRUE
chaos_min = 3.5
@@ -425,8 +427,8 @@
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_candidates = 1
weight = 3
cost = 10
requirements = list(101,101,100,80,70,60,50,40,30,20)
cost = 15
requirements = list(101,101,100,70,60,50,40,40,30,20)
high_population_requirement = 50
repeatable = TRUE
var/list/vents = list()
@@ -522,13 +524,14 @@
required_candidates = 2
weight = 4
cost = 10
requirements = list(101,101,70,50,40,30,30,30,30,30)
requirements = list(101,101,50,45,40,30,20,20,10,10)
blocking_rules = list(/datum/dynamic_ruleset/roundstart/nuclear,/datum/dynamic_ruleset/midround/from_ghosts/nuclear)
high_population_requirement = 15
var/datum/team/abductor_team/team
//property_weights = list("extended" = -2, "valid" = 1, "trust" = -1, "chaos" = 2)
repeatable_weight_decrease = 4
repeatable = TRUE
chaos_min = 2.0
/datum/dynamic_ruleset/midround/from_ghosts/abductors/ready(forced = FALSE)
team = new /datum/team/abductor_team
@@ -568,6 +571,7 @@
//property_weights = list("story_potential" = 1, "extended" = -2, "valid" = 2)
var/list/spawn_locs = list()
var/spawn_loc
chaos_min = 3.0
/datum/dynamic_ruleset/midround/from_ghosts/ninja/ready(forced = FALSE)
if(!spawn_loc)
@@ -11,15 +11,16 @@
antag_flag = ROLE_TRAITOR
antag_datum = /datum/antagonist/traitor/
minimum_required_age = 0
protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Cyborg")
protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Cyborg", "Quartermaster")
restricted_roles = list("Cyborg")
required_candidates = 1
weight = 5
cost = 10
requirements = list(101,50,45,40,35,30,25,20,20,20)
requirements = list(101,40,30,25,20,20,15,15,15,15)
high_population_requirement = 10
var/autotraitor_cooldown = 450 // 15 minutes (ticks once per 2 sec)
chaos_min = 2.5
chaos_max = 4.9
/datum/dynamic_ruleset/roundstart/traitor/thief //The steal only version
name = "Thief Traitors"
@@ -32,7 +33,7 @@
//required_candidates = 1
//weight = 5
cost = 0
requirements = list(40,30,30,25,20,15,15,10,10,5)
requirements = list(101,25,25,20,20,15,15,10,10,5)
high_population_requirement = 10
//var/autotraitor_cooldown = 450 // 15 minutes (ticks once per 2 sec)
chaos_min = 2.0
@@ -181,11 +182,11 @@
antag_flag = ROLE_CHANGELING
antag_datum = /datum/antagonist/changeling
restricted_roles = list("AI", "Cyborg")
protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director")
protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
required_candidates = 1
weight = 3
cost = 30
requirements = list(101,101,80,60,40,40,30,30,20,10)
cost = 10
requirements = list(101,101,50,40,40,30,30,30,20,20)
high_population_requirement = 10
var/team_mode_probability = 30
chaos_min = 3.0
@@ -235,10 +236,11 @@
required_candidates = 1
weight = 1
cost = 30
requirements = list(101,101,101,80,60,50,40,30,30,20)
requirements = list(101,101,60,50,40,40,30,30,30,20)
high_population_requirement = 10
var/list/roundstart_wizards = list()
chaos_min = 3.5
chaos_min = 4
admin_required = TRUE
/datum/dynamic_ruleset/roundstart/wizard/acceptable(population=0, threat=0)
if(GLOB.wizardstart.len == 0)
@@ -278,9 +280,9 @@
antag_datum = /datum/antagonist/cult
minimum_required_age = 14
restricted_roles = list("AI", "Cyborg")
protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director")
protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
required_candidates = 2
weight = 3
weight = 1
cost = 30
requirements = list(101,101,101,95,70,60,60,60,50,50)
high_population_requirement = 10
@@ -343,12 +345,12 @@
restricted_roles = list("Head of Security", "Captain") // Just to be sure that a nukie getting picked won't ever imply a Captain or HoS not getting drafted
required_candidates = 5
weight = 3
cost = 40
requirements = list(101,101,100,90,85,70,50,30,30,20)
cost = 20
requirements = list(101,100,90,80,70,60,50,40,30,20)
high_population_requirement = 10
pop_per_requirement = 5
flags = HIGHLANDER_RULESET
var/operative_cap = list(2,2,2,3,3,3,4,4,5,5)
var/operative_cap = list(2,2,2,2,2,3,3,3,4,5)
var/datum/team/nuclear/nuke_team
chaos_min = 4.0
@@ -431,7 +433,7 @@
antag_flag_override = ROLE_REV
antag_datum = /datum/antagonist/rev/head
minimum_required_age = 14
restricted_roles = list("AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director")
restricted_roles = list("AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
required_candidates = 3
weight = 2
cost = 35
@@ -543,11 +545,11 @@
name = "Clockcult"
antag_flag = ROLE_SERVANT_OF_RATVAR
antag_datum = /datum/antagonist/clockcult
restricted_roles = list("AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director")
restricted_roles = list("AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
required_candidates = 4
weight = 3
weight = 4
cost = 0
requirements = list(101,101,101,95,90,80,60,50,40,30)
requirements = list(101,101,100,90,80,70,60,50,40,30)
high_population_requirement = 101
flags = HIGHLANDER_RULESET
var/ark_time
@@ -679,7 +681,7 @@
required_candidates = 1
weight = 3
cost = 0
requirements = list(101,101,101,101,101,101,101,101,101,101)
requirements = list(101,101,101,101,101,101,101,101,101,101) //Disabled due to being an RP heavy antag
high_population_requirement = 101
var/devil_limit = 4 // Hard limit on devils if scaling is turned off
admin_required = TRUE
+3
View File
@@ -879,6 +879,9 @@
<br/>Only one roundstart ruleset will be drafted. Only traitors and minor roles will latespawn. <br/>
<br/>
<br/>
<b>Chaos level:</b> Current value : <a href='?src=[REF(src)];[HrefToken()];f_dynamic_chaos_level=1'><b>[GLOB.dynamic_chaos_level]</b></a>.
<br/>The Chaos value for the round. Only set between 0 and 5!<br/>
<br/>
<b>Forced threat level:</b> Current value : <a href='?src=[REF(src)];[HrefToken()];f_dynamic_forced_threat=1'><b>[GLOB.dynamic_forced_threat_level]</b></a>.
<br/>The value threat is set to if it is higher than -1.<br/>
<br/>
+19
View File
@@ -1645,6 +1645,25 @@
log_admin("[key_name(usr)] set 'forced_threat_level' to [GLOB.dynamic_forced_threat_level].")
message_admins("[key_name(usr)] set 'forced_threat_level' to [GLOB.dynamic_forced_threat_level].")
dynamic_mode_options(usr)
else if(href_list["f_dynamic_chaos_level"])
if(!check_rights(R_ADMIN))
return
if(SSticker && SSticker.mode)
return alert(usr, "The game has already started.", null, null, null, null)
if(GLOB.master_mode != "dynamic")
return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
var/new_value = input(usr, "Enter the chaos level for dynamic mode.", "Chaos level") as num
if (new_value > 5 || new_value < 0)
return alert(usr, "The value must be between 0 and 5.", null, null, null, null)
GLOB.dynamic_chaos_level = new_value
log_admin("[key_name(usr)] set 'dynamic_chaos_level' to [GLOB.dynamic_chaos_level].")
message_admins("[key_name(usr)] set 'dynamic_chaos_level' to [GLOB.dynamic_chaos_level].")
dynamic_mode_options(usr)
//End Dynamic mode
else if(href_list["c_mode2"])
-1
View File
@@ -55,7 +55,6 @@
continue
if(!E.canSpawnEvent(players_amt, gamemode))
continue
var/datum/round_event/event = E.typepath
if(!initial(event.fakeable))
continue
@@ -453,7 +453,7 @@
if(SEC_LEVEL_DELTA)
level = "delta"
var/dat = "<div class='notice'>Round Duration: [DisplayTimeText(world.time - SSticker.round_start_time)]<br>Alert Level: [capitalize(level)]</div>"
var/dat = "<div class='notice'>Round Duration: [DisplayTimeText(world.time - SSticker.round_start_time)]<br>Alert Level: [capitalize(level)]<br>Chaos Level: [GLOB.dynamic_chaos_level]</div>"
if(SSshuttle.emergency)
switch(SSshuttle.emergency.mode)