diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 57346401411..1dbe057a6ba 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -76,7 +76,9 @@ var/allow_random_events = 0 // enables random events mid-round when set to 1 var/allow_ai = 1 // allow ai job - var/traitor_scaling = 0 //if amount of traitors scales based on amount of players + var/traitor_scaling_coeff = 6 //how much does the amount of players get divided by to determine traitors + var/changeling_scaling_coeff = 10 //how much does the amount of players get divided by to determine changelings + var/protect_roles_from_antagonist = 0// If security and such can be tratior/cult/other var/allow_latejoin_antagonists = 0 // If late-joining players can be traitor/changeling var/continuous_round_rev = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke. @@ -318,15 +320,17 @@ if("gateway_delay") config.gateway_delay = text2num(value) if("continuous_round_rev") - config.continuous_round_rev = 1 + config.continuous_round_rev = 1 if("continuous_round_wiz") - config.continuous_round_wiz = 1 + config.continuous_round_wiz = 1 if("continuous_round_malf") - config.continuous_round_malf = 1 + config.continuous_round_malf = 1 if("ghost_interaction") config.ghost_interaction = 1 - if("traitor_scaling") - config.traitor_scaling = 1 + if("traitor_scaling_coeff") + config.traitor_scaling_coeff = text2num(value) + if("changeling_scaling_coeff") + config.changeling_scaling_coeff = text2num(value) if("probability") var/prob_pos = findtext(value, " ") var/prob_name = null diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index c1955d7e96e..05e8dfafcd0 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -37,7 +37,6 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon" var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds) var/const/changeling_amount = 4 //hard limit on changelings if scaling is turned off - var/const/changeling_scaling_coeff = 10 //how much does the amount of players get divided by to determine changelings /datum/game_mode/changeling/announce() world << "The current game mode is - Changeling!" @@ -52,8 +51,8 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon" var/num_changelings = 1 - if(config.traitor_scaling) - num_changelings = max(1, round((num_players())/(changeling_scaling_coeff))) + if(config.changeling_scaling_coeff) + num_changelings = max(1, round((num_players())/(config.changeling_scaling_coeff))) else num_changelings = max(1, min(num_players(), changeling_amount)) @@ -87,9 +86,9 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon" return /datum/game_mode/changeling/make_antag_chance(var/mob/living/carbon/human/character) //Assigns changeling to latejoiners - if(changelings.len >= round(joined_player_list.len / changeling_scaling_coeff) + 1) //Caps number of latejoin antagonists + if(changelings.len >= round(joined_player_list.len / config.changeling_scaling_coeff) + 1) //Caps number of latejoin antagonists return - if (prob(100/changeling_scaling_coeff)) + if (prob(100/config.changeling_scaling_coeff)) if(character.client.prefs.be_special & BE_CHANGELING) if(!jobban_isbanned(character.client, "changeling") && !jobban_isbanned(character.client, "Syndicate")) if(!(character.job in ticker.mode.restricted_jobs)) diff --git a/code/game/gamemodes/changeling/traitor_chan.dm b/code/game/gamemodes/changeling/traitor_chan.dm index 197ca4e22cd..c20f7f536f0 100644 --- a/code/game/gamemodes/changeling/traitor_chan.dm +++ b/code/game/gamemodes/changeling/traitor_chan.dm @@ -8,7 +8,6 @@ recommended_enemies = 3 var/const/changeling_amount = 1 //hard limit on changelings if scaling is turned off - var/const/changeling_scaling_coeff = 25 //how much does the amount of players get divided by to determine changelings /datum/game_mode/traitor/changeling/announce() world << "The current game mode is - Traitor+Changeling!" @@ -23,8 +22,8 @@ var/num_changelings = 1 - if(config.traitor_scaling) - num_changelings = max(1, round((num_players())/(changeling_scaling_coeff))) + if(config.changeling_scaling_coeff) + num_changelings = max(1, round((num_players())/(config.changeling_scaling_coeff*2))) else num_changelings = max(1, min(num_players(), changeling_amount)) @@ -54,9 +53,9 @@ return /datum/game_mode/traitor/changeling/make_antag_chance(var/mob/living/carbon/human/character) //Assigns changeling to latejoiners - if(changelings.len >= round(joined_player_list.len / changeling_scaling_coeff) + 1) //Caps number of latejoin antagonists + if(changelings.len >= round(joined_player_list.len / (config.changeling_scaling_coeff*2)) + 1) //Caps number of latejoin antagonists return - if (prob(100/changeling_scaling_coeff)) + if (prob(100/(config.changeling_scaling_coeff*2))) if(character.client.prefs.be_special & BE_CHANGELING) if(!jobban_isbanned(character.client, "changeling") && !jobban_isbanned(character.client, "Syndicate")) if(!(character.job in ticker.mode.restricted_jobs)) diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index bddfea5da5b..ac984034f60 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -19,7 +19,6 @@ var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds) var/traitors_possible = 4 //hard limit on traitors if scaling is turned off - var/const/traitor_scaling_coeff = 5.0 //how much does the amount of players get divided by to determine traitors /datum/game_mode/traitor/announce() @@ -40,8 +39,8 @@ var/num_traitors = 1 - if(config.traitor_scaling) - num_traitors = max(1, round((num_players())/(traitor_scaling_coeff))) + if(config.traitor_scaling_coeff) + num_traitors = max(1, round((num_players())/(config.traitor_scaling_coeff))) else num_traitors = max(1, min(num_players(), traitors_possible)) @@ -78,9 +77,9 @@ return 1 /datum/game_mode/traitor/make_antag_chance(var/mob/living/carbon/human/character) //Assigns traitor to latejoiners - if(traitors.len >= round(joined_player_list.len / traitor_scaling_coeff) + 1) //Caps number of latejoin antagonists + if(traitors.len >= round(joined_player_list.len / config.traitor_scaling_coeff) + 1) //Caps number of latejoin antagonists return - if (prob(100/traitor_scaling_coeff)) + if (prob(100/config.traitor_scaling_coeff)) if(character.client.prefs.be_special & BE_TRAITOR) if(!jobban_isbanned(character.client, "traitor") && !jobban_isbanned(character.client, "Syndicate")) if(!(character.job in ticker.mode.restricted_jobs)) @@ -284,4 +283,4 @@ else traitor_mob << "Unfortunately, the Syndicate did not provide you with a code response." traitor_mob << "Use the code words in the order provided, during regular conversation, to identify other agents. Proceed with caution, however, as everyone is a potential foe." - //End code phrase. + //End code phrase. diff --git a/code/global.dm b/code/global.dm index 97064e128b3..0b5af7d9149 100644 --- a/code/global.dm +++ b/code/global.dm @@ -69,7 +69,6 @@ var/secret_force_mode = "secret" // if this is anything but "secret", the secret var/host = null var/ooc_allowed = 1 var/dooc_allowed = 1 -var/traitor_scaling = 1 var/dna_ident = 1 var/abandon_allowed = 1 var/enter_allowed = 1 diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 18d6d47d8c6..551caed07cf 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -548,7 +548,7 @@ var/global/floorIsLava = 0 log_admin("[key_name(usr)] toggled OOC.") message_admins("[key_name_admin(usr)] toggled Dead OOC.", 1) feedback_add_details("admin_verb","TDOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - +/* /datum/admins/proc/toggletraitorscaling() set category = "Server" set desc="Toggle traitor scaling" @@ -557,7 +557,7 @@ var/global/floorIsLava = 0 log_admin("[key_name(usr)] toggled Traitor Scaling to [traitor_scaling].") message_admins("[key_name_admin(usr)] toggled Traitor Scaling [traitor_scaling ? "on" : "off"].", 1) feedback_add_details("admin_verb","TTS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - +*/ /datum/admins/proc/startnow() set category = "Server" set desc="Start the round RIGHT NOW" diff --git a/config/game_options.txt b/config/game_options.txt index a3f373a5f56..8410d901e33 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -97,9 +97,11 @@ PROBABILITY SANDBOX 0 #CONTINUOUS_ROUND_MALF -## Uncomment to scale the number of antagonists to crew population. Doesn't -## affect all gamemodes. -#TRAITOR_SCALING +## Variables calculate how number of antagonists will scale to population. +## Used as (Antagonists = Population / Coeff) +## Set to 0 to disable scaling and use default numbers instead. +TRAITOR_SCALING_COEFF 6 +CHANGELING_SCALING_COEFF 10 ## Uncomment to prohibit jobs that start with loyalty ## implants from being most antagonists. diff --git a/html/changelog.html b/html/changelog.html index 3b665f94721..03796d4a0e9 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -51,7 +51,14 @@ should be listed in the changelog upon commit tho. Thanks. --> - +