From 7796f6a7fe1a70bb4364d67912f1af24fca220bb Mon Sep 17 00:00:00 2001 From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Date: Tue, 2 Jun 2026 15:52:11 -0400 Subject: [PATCH] Adds cult scaling for lower population (#31765) * Cult team size * Adds cult scaling for lowpop * Oops * Constants make me physically ill * Linters * Cult budget scales with number of roundstart cult * Adjusts methodology * Revert "Adjusts methodology" This reverts commit 75b7695ba087c37efd8545a07b9b8747a974f9d1. * Change * Linter --- code/game/gamemodes/cult/cult_mode.dm | 17 +++++++++---- code/game/gamemodes/dynamic/antag_rulesets.dm | 24 +++++++++++++++---- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/code/game/gamemodes/cult/cult_mode.dm b/code/game/gamemodes/cult/cult_mode.dm index b1196fa9efd..21f7f7fde59 100644 --- a/code/game/gamemodes/cult/cult_mode.dm +++ b/code/game/gamemodes/cult/cult_mode.dm @@ -8,19 +8,28 @@ config_tag = "cult" restricted_jobs = list("Chaplain", "AI", "Cyborg", "Internal Affairs Agent", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Blueshield", "Nanotrasen Representative", "Magistrate", "Nanotrasen Career Trainer", "Nanotrasen Navy Officer", "Special Operations Officer", "Syndicate Officer", "Trans-Solar Federation General", "Research Director", "Chief Medical Officer", "Chief Engineer", "Quartermaster") protected_jobs = list() - required_players = 30 - required_enemies = 3 + required_players = 15 + required_enemies = 1 recommended_enemies = 4 var/list/pre_cult = list() - var/const/min_cultists_to_start = 3 - var/const/max_cultists_to_start = 4 + var/const/min_cultists_to_start = 1 + var/max_cultists_to_start = 4 /datum/game_mode/cult/announce() to_chat(world, "The current game mode is - Cult!") to_chat(world, "Some crewmembers are attempting to start a cult!
\nCultists - complete your objectives. Convert crewmembers to your cause by using the offer rune. Remember - there is no you, there is only the cult.
\nPersonnel - Do not let the cult succeed in its mission. Brainwashing them with holy water reverts them to whatever CentComm-allowed faith they had.
") +/datum/game_mode/cult/can_start() + . = ..() + var/playerC = 0 + for(var/mob/new_player/player in GLOB.player_list) + if((player.client) && (player.ready)) + playerC++ + + max_cultists_to_start = min(1 + round_down((playerC - 15) / 5), 4) + /datum/game_mode/cult/pre_setup() if(GLOB.configuration.gamemode.prevent_mindshield_antags) restricted_jobs += protected_jobs diff --git a/code/game/gamemodes/dynamic/antag_rulesets.dm b/code/game/gamemodes/dynamic/antag_rulesets.dm index e024dd712eb..bb78f94c726 100644 --- a/code/game/gamemodes/dynamic/antag_rulesets.dm +++ b/code/game/gamemodes/dynamic/antag_rulesets.dm @@ -277,7 +277,7 @@ /datum/ruleset/implied/roundstart_pre_setup() // antag_amount is always 0 when this proc is called, so we need to update banned_jobs manually if(GLOB.configuration.gamemode.prevent_mindshield_antags) - banned_jobs += protected_jobs + banned_jobs += protected_jobs /datum/ruleset/implied/mindflayer name = "Mindflayer" @@ -303,6 +303,10 @@ var/unique_team = TRUE /// How many players on a team. var/team_size = 1 + /// How much does each person on the team cost? + var/individual_cost = 5 + /// Minimum team size + var/minimum_team_size = 2 /// Team datum to create. var/datum/team/team_type @@ -314,8 +318,9 @@ stack_trace("Undefined behavior for dynamic non-unique teams!") /datum/ruleset/team/automatic_deduct(budget) + team_size = team_scale() antag_amount = team_size - . = antag_cost + . = antag_cost + max(((team_size - minimum_team_size) * individual_cost), 0) // The starting antags cost as much as the team. log_dynamic("Automatic deduction: +[antag_amount] [name]\s. Remaining budget: [budget - .].") /datum/ruleset/team/antagonist_possible(budget) @@ -323,11 +328,14 @@ return FALSE return ..() +/datum/ruleset/team/proc/team_scale() + return team_size + /datum/ruleset/team/cult name = "Cultist" ruleset_weight = 3 - // antag_weight doesnt matter, since we've already allocated our budget for 4 cultists only - antag_cost = 30 + // antag_weight doesnt matter, since we've already allocated our budget for cultists + antag_cost = 12.5 // 15 players antagonist_type = /datum/antagonist/cultist banned_mutual_rulesets = list( /datum/ruleset/traitor, @@ -336,9 +344,15 @@ ) banned_jobs = list("Cyborg", "AI", "Chaplain", "Head of Personnel") - team_size = 4 team_type = /datum/team/cult +/datum/ruleset/team/cult/team_scale() + var/players = 0 + for(var/mob/new_player/P in GLOB.player_list) + if(P.client && P.ready) + players++ + return min(1 + round_down((players - 15) / 5), 4) + /datum/ruleset/team/cult/declare_completion() if(SSticker.mode.cult_team.cult_status == NARSIE_HAS_RISEN) SSticker.mode_result = "cult win - cult win"