diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs index 1712c7a218..5c83440e5f 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs @@ -18,6 +18,7 @@ public sealed partial class ArtifactSystem /// /// Generate an Artifact tree with fully developed nodes. /// + /// /// The tree being generated. /// The amount of nodes it has. private void GenerateArtifactNodeTree(EntityUid artifact, ref ArtifactTree tree, int nodeAmount) @@ -114,12 +115,12 @@ public sealed partial class ArtifactSystem /// private Dictionary GetDepthWeights(IEnumerable depths, int targetDepth) { + // this function is just a normal distribution with a + // mean of target depth and standard deviation of 0.75 var weights = new Dictionary(); foreach (var d in depths) { - //TODO: is this equation sus? idk. -emo - // 0.3 / (|current_iterated_depth - our_actual_depth| + 1)^2 - var w = 0.3f / MathF.Pow(Math.Abs(d - targetDepth) + 1, 2); + var w = 10f / (0.75f * MathF.Sqrt(2 * MathF.PI)) * MathF.Pow(MathF.E, -MathF.Pow((d - targetDepth) / 0.75f, 2)); weights.Add(d, w); } return weights;