diff --git a/Content.Server/StationEvents/Components/RampingStationEventSchedulerComponent.cs b/Content.Server/StationEvents/Components/RampingStationEventSchedulerComponent.cs
index 53bc8b62a43..282ee5b612a 100644
--- a/Content.Server/StationEvents/Components/RampingStationEventSchedulerComponent.cs
+++ b/Content.Server/StationEvents/Components/RampingStationEventSchedulerComponent.cs
@@ -3,6 +3,30 @@
[RegisterComponent, Access(typeof(RampingStationEventSchedulerSystem))]
public sealed partial class RampingStationEventSchedulerComponent : Component
{
+ ///
+ /// The maximum number by which the event rate will be multiplied when shift time reaches the end time.
+ ///
+ [DataField]
+ public float ChaosModifier = 3f;
+
+ ///
+ /// The minimum number by which the event rate will be multiplied when the shift has just begun.
+ ///
+ [DataField]
+ public float StartingChaosRatio = 0.1f;
+
+ ///
+ /// The number by which all event delays will be multiplied. Unlike chaos, remains constant throughout the shift.
+ ///
+ [DataField]
+ public float EventDelayModifier = 1f;
+
+ ///
+ /// The number by which average expected shift length is multiplied. Higher values lead to slower chaos growth.
+ ///
+ public float ShiftLengthModifier = 1f;
+
+ // Everything below is overridden in the RampingStationEventSchedulerSystem based on CVars
[DataField("endTime"), ViewVariables(VVAccess.ReadWrite)]
public float EndTime;
diff --git a/Content.Server/StationEvents/RampingStationEventSchedulerSystem.cs b/Content.Server/StationEvents/RampingStationEventSchedulerSystem.cs
index 53a98e8b762..aa0c9b214b4 100644
--- a/Content.Server/StationEvents/RampingStationEventSchedulerSystem.cs
+++ b/Content.Server/StationEvents/RampingStationEventSchedulerSystem.cs
@@ -29,15 +29,15 @@ protected override void Started(EntityUid uid, RampingStationEventSchedulerCompo
{
base.Started(uid, component, gameRule, args);
- var avgChaos = _cfg.GetCVar(CCVars.EventsRampingAverageChaos);
- var avgTime = _cfg.GetCVar(CCVars.EventsRampingAverageEndTime);
+ var avgChaos = _cfg.GetCVar(CCVars.EventsRampingAverageChaos) * component.ChaosModifier;
+ var avgTime = _cfg.GetCVar(CCVars.EventsRampingAverageEndTime) * component.ShiftLengthModifier;
// Worlds shittiest probability distribution
// Got a complaint? Send them to
- component.MaxChaos = _random.NextFloat(avgChaos - avgChaos / 4, avgChaos + avgChaos / 4);
+ component.MaxChaos = avgChaos * _random.NextFloat(0.75f, 1.25f);
// This is in minutes, so *60 for seconds (for the chaos calc)
- component.EndTime = _random.NextFloat(avgTime - avgTime / 4, avgTime + avgTime / 4) * 60f;
- component.StartingChaos = component.MaxChaos / 10;
+ component.EndTime = avgTime * _random.NextFloat(0.75f, 1.25f) * 60f;
+ component.StartingChaos = component.MaxChaos * component.StartingChaosRatio;
PickNextEventTime(uid, component);
}
@@ -68,9 +68,10 @@ public override void Update(float frameTime)
private void PickNextEventTime(EntityUid uid, RampingStationEventSchedulerComponent component)
{
- var mod = GetChaosModifier(uid, component);
+ component.TimeUntilNextEvent = _random.NextFloat(
+ _cfg.GetCVar(CCVars.GameEventsRampingMinimumTime),
+ _cfg.GetCVar(CCVars.GameEventsRampingMaximumTime));
- component.TimeUntilNextEvent = _random.NextFloat(_cfg.GetCVar(CCVars.GameEventsRampingMinimumTime) / mod,
- _cfg.GetCVar(CCVars.GameEventsRampingMaximumTime)) / mod;
+ component.TimeUntilNextEvent *= component.EventDelayModifier / GetChaosModifier(uid, component);
}
}
diff --git a/Resources/Locale/en-US/game-ticking/game-presets/preset-survival.ftl b/Resources/Locale/en-US/game-ticking/game-presets/preset-survival.ftl
index 231733eabfb..0b8fa83ae8b 100644
--- a/Resources/Locale/en-US/game-ticking/game-presets/preset-survival.ftl
+++ b/Resources/Locale/en-US/game-ticking/game-presets/preset-survival.ftl
@@ -1,2 +1,5 @@
survival-title = Survival
survival-description = No internal threats, but how long can the station survive increasingly chaotic and frequent events?
+
+hellshift-title = Hellshift
+hellshift-description = The station rolled a "one" in a luck check. Can the crew make it to the end?
diff --git a/Resources/Prototypes/GameRules/roundstart.yml b/Resources/Prototypes/GameRules/roundstart.yml
index 9ed1889154d..8e518ab2f18 100644
--- a/Resources/Prototypes/GameRules/roundstart.yml
+++ b/Resources/Prototypes/GameRules/roundstart.yml
@@ -132,6 +132,16 @@
components:
- type: RampingStationEventScheduler
+- type: entity
+ id: HellshiftStationEventScheduler
+ parent: BaseGameRule
+ noSpawn: true
+ components:
+ - type: RampingStationEventScheduler
+ chaosModifier: 4 # By default, one event each 30-10 seconds after two hours. Changing CVars will cause this to deviate.
+ startingChaosRatio: 0.025 # Starts as slow as survival, but quickly ramps up
+ shiftLengthModifier: 2.5
+
# variation passes
- type: entity
id: BasicRoundstartVariation
diff --git a/Resources/Prototypes/game_presets.yml b/Resources/Prototypes/game_presets.yml
index e99b51f82cd..7d7169bf10a 100644
--- a/Resources/Prototypes/game_presets.yml
+++ b/Resources/Prototypes/game_presets.yml
@@ -9,6 +9,17 @@
- RampingStationEventScheduler
- BasicRoundstartVariation
+- type: gamePreset
+ id: SurvivalHellshift
+ alias:
+ - hellshift
+ showInVote: true
+ name: hellshift-title
+ description: hellshift-description
+ rules:
+ - HellshiftStationEventScheduler
+ - BasicRoundstartVariation
+
- type: gamePreset
id: AllAtOnce
name: all-at-once-title
@@ -90,7 +101,7 @@
- traitor
name: traitor-title
description: traitor-description
- showInVote: false
+ showInVote: true
rules:
- Traitor
- SubGamemodesRule