From 158b49d21ca1de5388012d37cbcdac506814ebf2 Mon Sep 17 00:00:00 2001 From: V Date: Thu, 5 Sep 2024 22:55:01 -0700 Subject: [PATCH 1/2] SvS event fixes, enable SvS in secret rotation....scary --- .../Objectives/Systems/KeepAliveCondition.cs | 2 +- .../Systems/KillPersonConditionSystem.cs | 2 +- Resources/Prototypes/GameRules/events.yml | 10 ++++ Resources/Prototypes/GameRules/roundstart.yml | 29 +++++++++-- Resources/Prototypes/game_presets.yml | 49 +++++++++++++------ Resources/Prototypes/secret_weights.yml | 7 +-- 6 files changed, 74 insertions(+), 25 deletions(-) diff --git a/Content.Server/Objectives/Systems/KeepAliveCondition.cs b/Content.Server/Objectives/Systems/KeepAliveCondition.cs index 350788614ab3d0..3c585e19ff1c28 100644 --- a/Content.Server/Objectives/Systems/KeepAliveCondition.cs +++ b/Content.Server/Objectives/Systems/KeepAliveCondition.cs @@ -58,7 +58,7 @@ private void OnAssigned(EntityUid uid, RandomTraitorAliveComponent comp, ref Obj return; } - //Fallback to assign people who COULD be assigned as traitor + //Fallback to assign people who COULD be assigned as traitor - might need to just do this from the start on ForceAll rounds, limiting it to existing traitors could be skewing the numbers towards just a few people. var allHumans = _mind.GetAliveHumansExcept(args.MindId); var allValidTraitorCandidates = new List(); if (_traitorRule.CurrentAntagPool != null) diff --git a/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs b/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs index 0cfbe8b0e2434f..8c8d867fb5d734 100644 --- a/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs +++ b/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs @@ -139,7 +139,7 @@ private void OnTraitorAssigned(EntityUid uid, PickRandomTraitorComponent comp, r return; } - //Fallback to assign people who COULD be assigned as traitor + //Fallback to assign people who COULD be assigned as traitor - might need to just do this from the start on ForceAll rounds, limiting it to existing traitors could be skewing the numbers towards just a few people. var allValidTraitorCandidates = new List(); if (_traitorRule.CurrentAntagPool != null) { diff --git a/Resources/Prototypes/GameRules/events.yml b/Resources/Prototypes/GameRules/events.yml index 408271109fcd31..e56a0666810828 100644 --- a/Resources/Prototypes/GameRules/events.yml +++ b/Resources/Prototypes/GameRules/events.yml @@ -38,6 +38,16 @@ - id: SleeperAgents - id: ZombieOutbreak +- type: entityTable + id: SleeperlessAntagEventsTable + table: !type:AllSelector # we need to pass a list of rules, since rules have further restrictions to consider via StationEventComp + children: + - id: ClosetSkeleton + - id: DragonSpawn + - id: KingRatMigration + - id: NinjaSpawn + - id: RevenantSpawn + - id: ZombieOutbreak - type: entity id: BaseStationEvent diff --git a/Resources/Prototypes/GameRules/roundstart.yml b/Resources/Prototypes/GameRules/roundstart.yml index 876bd361bd8c1c..86c7b84a0eb73a 100644 --- a/Resources/Prototypes/GameRules/roundstart.yml +++ b/Resources/Prototypes/GameRules/roundstart.yml @@ -206,10 +206,10 @@ - type: entity parent: BaseTraitorRuleNoRandomObjectives - id: SpyVsSpy5TC + id: SpyVsSpy3TC components: - type: TraitorRule - startingBalance: 5 + startingBalance: 3 - type: GameRule minPlayers: 15 delay: @@ -223,6 +223,7 @@ - type: AntagSelection definitions: - prefRoles: [ Traitor ] + fallbackRoles: [ TraitorSleeper ] max: 100 playerRatio: 1 blacklist: @@ -243,8 +244,8 @@ - type: GameRule minPlayers: 15 delay: - min: 240 - max: 420 + min: 2 + max: 4 - type: AntagObjectives objectives: - KillRandomTraitorSvSObjective @@ -253,6 +254,7 @@ - type: AntagSelection definitions: - prefRoles: [ Traitor ] + fallbackRoles: [ TraitorSleeper ] max: 100 playerRatio: 1 blacklist: @@ -345,6 +347,17 @@ - !type:NestedSelector tableId: CargoGiftsTable +- type: entityTable + id: SleeperlessGameRulesTable + table: !type:AllSelector # we need to pass a list of rules, since rules have further restrictions to consider via StationEventComp + children: + - !type:NestedSelector + tableId: BasicCalmEventsTable + - !type:NestedSelector + tableId: SleeperlessAntagEventsTable + - !type:NestedSelector + tableId: CargoGiftsTable + - type: entityTable id: SpaceTrafficControlTable table: !type:AllSelector # we need to pass a list of rules, since rules have further restrictions to consider via StationEventComp @@ -364,6 +377,14 @@ scheduledGameRules: !type:NestedSelector tableId: BasicGameRulesTable +- type: entity + id: SleeperlessStationEventScheduler + parent: BaseGameRule + components: + - type: BasicStationEventScheduler + scheduledGameRules: !type:NestedSelector + tableId: SleeperlessGameRulesTable + - type: entity id: RampingStationEventScheduler parent: BaseGameRule diff --git a/Resources/Prototypes/game_presets.yml b/Resources/Prototypes/game_presets.yml index 898a21fc99af32..2b038c678e4cc1 100644 --- a/Resources/Prototypes/game_presets.yml +++ b/Resources/Prototypes/game_presets.yml @@ -159,41 +159,58 @@ - BasicRoundstartVariation - type: gamePreset - id: SecretSpyVsSpy #For Admin Use: Runs SpyVsSpy but shows "Secret" in lobby. + id: SpyVsSpy alias: - - secretsvs - name: secret-title - description: secret-description - showInVote: false #Admin Use + - svs + - theship + name: spy-vs-spy-title + description: spy-vs-spy-description + showInVote: false rules: - SpyVsSpy - - BasicStationEventScheduler + - SleeperlessStationEventScheduler - MeteorSwarmScheduler + - SpaceTrafficControlEventScheduler - BasicRoundstartVariation - type: gamePreset - id: SpyVsSpy5TC + id: SpyVsSpy3TC name: spy-vs-spy-title description: spy-vs-spy-description showInVote: false rules: - - SpyVsSpy5TC - - BasicStationEventScheduler + - SpyVsSpy3TC + - SleeperlessStationEventScheduler - MeteorSwarmScheduler + - SpaceTrafficControlEventScheduler - BasicRoundstartVariation - type: gamePreset - id: SpyVsSpy + id: SecretSpyVsSpy #For Admin Use: Runs SpyVsSpy but shows "Secret" in lobby. alias: - - svs - - theship - name: spy-vs-spy-title - description: spy-vs-spy-description - showInVote: false + - secretsvs + name: secret-title + description: secret-description + showInVote: false #Admin Use rules: - SpyVsSpy - - BasicStationEventScheduler + - SleeperlessStationEventScheduler - MeteorSwarmScheduler + - SpaceTrafficControlEventScheduler + - BasicRoundstartVariation + +- type: gamePreset + id: SecretSpyVsSpy3TC #For Admin Use: Runs SpyVsSpy3TC but shows "Secret" in lobby. + alias: + - secretsvs + name: secret-title + description: secret-description + showInVote: false #Admin Use + rules: + - SpyVsSpy3TC + - SleeperlessStationEventScheduler + - MeteorSwarmScheduler + - SpaceTrafficControlEventScheduler - BasicRoundstartVariation - type: gamePreset diff --git a/Resources/Prototypes/secret_weights.yml b/Resources/Prototypes/secret_weights.yml index 6815a91147d774..6eea03fdf1ace3 100644 --- a/Resources/Prototypes/secret_weights.yml +++ b/Resources/Prototypes/secret_weights.yml @@ -1,9 +1,10 @@ - type: weightedRandom id: Secret weights: - Nukeops: 0.20 - Traitor: 0.60 - Changeling: 0.20 + Nukeops: 0.10 + Traitor: 0.50 + SpyVsSpy: 0.10 + Changeling: 0.10 Zombie: 0.04 Zombieteors: 0.01 Survival: 0.09 From e5370d230be3a2de1af0bca916d4c8a46519603e Mon Sep 17 00:00:00 2001 From: V Date: Thu, 5 Sep 2024 23:11:13 -0700 Subject: [PATCH 2/2] revert weight changes --- Resources/Prototypes/secret_weights.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Resources/Prototypes/secret_weights.yml b/Resources/Prototypes/secret_weights.yml index 6eea03fdf1ace3..83b6dad7253a9b 100644 --- a/Resources/Prototypes/secret_weights.yml +++ b/Resources/Prototypes/secret_weights.yml @@ -1,10 +1,10 @@ - type: weightedRandom id: Secret weights: - Nukeops: 0.10 - Traitor: 0.50 - SpyVsSpy: 0.10 - Changeling: 0.10 + Nukeops: 0.20 + Traitor: 0.60 + SpyVsSpy: 0.20 + Changeling: 0.20 Zombie: 0.04 Zombieteors: 0.01 Survival: 0.09