mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-27 18:47:52 +03:00
# Description This PR brings back a feature that was present in the Psionic Refactor Version 1, which ultimately never made it into the game. I have substantially reworked the underlying math behind Glimmer, such that it operates on a Logistic Curve described by this equation:  Instead of 0 being the "Normal" amount of glimmer, the "Normal" amount is the "seemingly arbitrary" number 502.941. This number is measured first by taking the derivative of the Glimmer Equation, and then solving for the derivative equal to 1. Above this constant, glimmer grows exponentially more difficult to increase. Below this constant, glimmer grows exponentially easier to increase. It will thus constantly attempt to trend towards the "Glimmer Equilibrium". Probers, Drainers, Anomalies, and Glimmer Mites all cause glimmer to "Fluctuate", either up or down the graph. This gives a glimmer that swings constantly to both high and low values, with more violent swings being caused by having more probers/anomalies etc. A great deal of math functions have been implemented that allow for various uses for glimmer measurements, and psionic powers can even have their effects modified by said measurements. The most significant part of this rework is what's facing Epistemics. It's essentially no longer possible for Probers to cause a round-ending chain of events known as "Glimmerloose". You can ALWAYS recover from high glimmer, no matter how high it gets. As a counterpart to this, Probers have had the math behind their research point generation reworked. Research output follows an inverse log base 4 curve. Which can be found here: https://www.desmos.com/calculator/q183tseun8 I wouldn't drop this massive update on people without a way for them to understand what's going on. So this PR also features the return(and expansion of), the much-demanded Psionics Guidebook. <details><summary><h1>Media</h1></summary> <p> Psionics Guidebook   </p> </details> # Changelog 🆑 VMSolidus, Gollee - add: Glimmer has been substantially reworked. Please read the new Psionics Guidebook for more information. In short: "500 is the new normal glimmer. Stop panicking if Sophia says the glimmer is 500. Call code white if it gets to 750 and stays above that level." - add: The much-requested Psionics Guidebook has returned, now with all new up-to-date information. - remove: Removed "GLIMMERLOOSE". It's no longer possible for glimmer to start a chain of events that ends the round if epistemics isn't destroyed. You can ALWAYS recover from high glimmer now. - tweak: All glimmer events have had their thresholds tweaked to reflect the fact that 500 is the new "Normal" amount of glimmer. --------- Signed-off-by: VMSolidus <evilexecutive@gmail.com> (cherry picked from commit 638071c48fe3ac7c727a1294de3b6d5d8136e79f)
47 lines
1.5 KiB
C#
47 lines
1.5 KiB
C#
namespace Content.Server.Psionics.Glimmer;
|
|
|
|
[RegisterComponent]
|
|
/// <summary>
|
|
/// Adds to glimmer at regular intervals. We'll use it for glimmer drains too when we get there.
|
|
/// </summary>
|
|
public sealed partial class GlimmerSourceComponent : Component
|
|
{
|
|
[DataField]
|
|
public float Accumulator = 0f;
|
|
|
|
[DataField]
|
|
public bool Active = true;
|
|
|
|
/// <summary>
|
|
/// Since glimmer is an int, we'll do it like this.
|
|
/// </summary>
|
|
[DataField]
|
|
public float SecondsPerGlimmer = 10f;
|
|
|
|
/// <summary>
|
|
/// True if it produces glimmer, false if it subtracts it.
|
|
/// </summary>
|
|
[DataField]
|
|
public bool AddToGlimmer = true;
|
|
|
|
/// <summary>
|
|
/// If not null, this entity generates this value as a baseline number of research points per second, eg: Probers.
|
|
/// Actual glimmer research sources will scale with GlimmerEquilibriumRatio
|
|
/// </summary>
|
|
[DataField]
|
|
public int? ResearchPointGeneration = null;
|
|
|
|
/// <summary>
|
|
/// Controls whether this entity requires electrical power to generate research points.
|
|
/// </summary>
|
|
[DataField]
|
|
public bool RequiresPower = true;
|
|
|
|
/// <summary>
|
|
/// Above GlimmerEquilibrium, glimmer generation is increased exponentially, but has an offset to prevent things from spiralling out of control.
|
|
/// Increasing the offset will make this entity's exponential growth weaker, while decreasing it makes it stronger. Negative numbers are valid by the way :)
|
|
/// </summary>
|
|
[DataField]
|
|
public int GlimmerExponentOffset = 0;
|
|
}
|