diff --git a/Content.Client/Xenoarchaeology/Ui/XenoArtifactGraphControl.xaml.cs b/Content.Client/Xenoarchaeology/Ui/XenoArtifactGraphControl.xaml.cs index 53965ca032f..d0f38b0097b 100644 --- a/Content.Client/Xenoarchaeology/Ui/XenoArtifactGraphControl.xaml.cs +++ b/Content.Client/Xenoarchaeology/Ui/XenoArtifactGraphControl.xaml.cs @@ -1,4 +1,5 @@ using Content.Client.Xenoarchaeology.Artifact; +using Content.Shared.Random; using Content.Shared.Xenoarchaeology.Artifact.Components; using Robust.Client.AutoGenerated; using Robust.Client.Graphics; @@ -7,6 +8,7 @@ using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.XAML; using Robust.Shared.Input; +using Robust.Shared.Random; using System.Linq; using System.Numerics; @@ -16,6 +18,7 @@ namespace Content.Client.Xenoarchaeology.Ui; public sealed partial class XenoArtifactGraphControl : BoxContainer { [Dependency] private readonly IEntityManager _entityManager = default!; + [Dependency] private readonly IRobustRandom _rand = default!; private readonly XenoArtifactSystem _artifactSystem; @@ -154,6 +157,11 @@ protected override void Draw(DrawingHandleScreen handle) var text = _artifactSystem.GetNodeId(node); var dimensions = handle.GetDimensions(_font, text, 1); handle.DrawString(_font, pos - new Vector2(dimensions.X / 2, dimensions.Y / 2), text, color); + + if (node.Comp.Shattered) + { + DrawShatteredNode(handle, pos, color, node.Comp.ShatterPattern); + } } } @@ -204,5 +212,91 @@ private float GetBiggestWidth(List> nodes) .Max(p => p.Value.Count); return (NodeDiameter * num) + MinXSpacing * (num - 1); } -} + private void DrawShatteredNode(DrawingHandleScreen handle, Vector2 pos, Color color, ShatterPatternTypes type) + { + var shatteredColor = Color.ToSrgb(color.WithAlpha(0.9f)); + + switch (type) + { + case ShatterPatternTypes.Strike: + DrawShatterStrike(handle, pos, shatteredColor); + break; + case ShatterPatternTypes.Bolt: + DrawShatterBolt(handle, pos, shatteredColor); + break; + case ShatterPatternTypes.Spider: + DrawShatterSpider(handle, pos, shatteredColor); + break; + case ShatterPatternTypes.Fracture: + DrawShatterFracture(handle, pos, shatteredColor); + break; + case ShatterPatternTypes.Split: + DrawShatterSplit(handle, pos, shatteredColor); + break; + case ShatterPatternTypes.Fragment: + DrawShatterFragment(handle, pos, shatteredColor); + break; + default: + DrawShatterStrike(handle, pos, shatteredColor); + break; + } + } + + private void DrawShatterStrike(DrawingHandleScreen handle, Vector2 pos, Color color) + { + handle.DrawLine(pos + new Vector2(-12, -18), pos + new Vector2(-3, -6), color); + handle.DrawLine(pos + new Vector2(-3, -6), pos + new Vector2(-9, 4), color); + handle.DrawLine(pos + new Vector2(-3, -6), pos + new Vector2(7, 1), color); + handle.DrawLine(pos + new Vector2(7, 1), pos + new Vector2(14, 15), color); + } + + private void DrawShatterBolt(DrawingHandleScreen handle, Vector2 pos, Color color) + { + handle.DrawLine(pos + new Vector2(-10, -18), pos + new Vector2(-2, -8), color); + handle.DrawLine(pos + new Vector2(-2, -8), pos + new Vector2(-8, 2), color); + handle.DrawLine(pos + new Vector2(-8, 2), pos + new Vector2(4, 10), color); + handle.DrawLine(pos + new Vector2(4, 10), pos + new Vector2(-2, 18), color); + handle.DrawLine(pos + new Vector2(-2, -8), pos + new Vector2(8, -4), color); + handle.DrawLine(pos + new Vector2(4, 10), pos + new Vector2(12, 6), color); + } + + private void DrawShatterSpider(DrawingHandleScreen handle, Vector2 pos, Color color) + { + handle.DrawLine(pos + new Vector2(0, -18), pos + new Vector2(0, 18), color); + handle.DrawLine(pos + new Vector2(-15, 0), pos + new Vector2(15, 0), color); + handle.DrawLine(pos + new Vector2(-10, -10), pos + new Vector2(10, 10), color); + handle.DrawLine(pos + new Vector2(10, -10), pos + new Vector2(-10, 10), color); + handle.DrawLine(pos + new Vector2(0, 0), pos + new Vector2(6, -15), color); + handle.DrawLine(pos + new Vector2(0, 0), pos + new Vector2(-12, 6), color); + } + + private void DrawShatterFracture(DrawingHandleScreen handle, Vector2 pos, Color color) + { + handle.DrawLine(pos + new Vector2(-18, -2), pos + new Vector2(-6, -2), color); + handle.DrawLine(pos + new Vector2(-6, -2), pos + new Vector2(4, -12), color); + handle.DrawLine(pos + new Vector2(-6, -2), pos + new Vector2(2, 6), color); + handle.DrawLine(pos + new Vector2(2, 6), pos + new Vector2(12, 4), color); + handle.DrawLine(pos + new Vector2(2, 6), pos + new Vector2(6, 16), color); + } + + private void DrawShatterSplit(DrawingHandleScreen handle, Vector2 pos, Color color) + { + handle.DrawLine(pos + new Vector2(0, 18), pos + new Vector2(0, 2), color); + handle.DrawLine(pos + new Vector2(0, 2), pos + new Vector2(-12, -10), color); + handle.DrawLine(pos + new Vector2(0, 2), pos + new Vector2(12, -10), color); + handle.DrawLine(pos + new Vector2(-12, -10), pos + new Vector2(-8, -18), color); + handle.DrawLine(pos + new Vector2(12, -10), pos + new Vector2(8, -18), color); + } + + private void DrawShatterFragment(DrawingHandleScreen handle, Vector2 pos, Color color) + { + handle.DrawLine(pos + new Vector2(-14, -14), pos + new Vector2(-2, -2), color); + handle.DrawLine(pos + new Vector2(-2, -2), pos + new Vector2(8, -12), color); + handle.DrawLine(pos + new Vector2(-2, -2), pos + new Vector2(-10, 8), color); + handle.DrawLine(pos + new Vector2(-2, -2), pos + new Vector2(10, 6), color); + handle.DrawLine(pos + new Vector2(10, 6), pos + new Vector2(4, 16), color); + } + + public delegate void NodeHandler(DrawingHandleScreen handle, Vector2 pos, Color color); +} diff --git a/Content.Server/Xenoarchaeology/Artifact/XAE/Components/XAEChargeBatteryComponent.cs b/Content.Server/Xenoarchaeology/Artifact/XAE/Components/XAEChargeBatteryComponent.cs index d63a52f42bd..2f9341e9270 100644 --- a/Content.Server/Xenoarchaeology/Artifact/XAE/Components/XAEChargeBatteryComponent.cs +++ b/Content.Server/Xenoarchaeology/Artifact/XAE/Components/XAEChargeBatteryComponent.cs @@ -11,4 +11,9 @@ public sealed partial class XAEChargeBatteryComponent : Component /// [DataField("radius")] public float Radius = 15f; + + /// + /// The percent increase in charge for nearby batteries + /// + public float ChargePercent = 100.0f; } diff --git a/Content.Server/Xenoarchaeology/Artifact/XAE/XAEChargeBatterySystem.cs b/Content.Server/Xenoarchaeology/Artifact/XAE/XAEChargeBatterySystem.cs index 914e8d0fe38..5aa434f7268 100644 --- a/Content.Server/Xenoarchaeology/Artifact/XAE/XAEChargeBatterySystem.cs +++ b/Content.Server/Xenoarchaeology/Artifact/XAE/XAEChargeBatterySystem.cs @@ -25,7 +25,15 @@ protected override void OnActivated(Entity ent, ref X _lookup.GetEntitiesInRange(args.Coordinates, ent.Comp.Radius, _batteryEntities); foreach (var battery in _batteryEntities) { - _battery.SetCharge(battery.AsNullable(), battery.Comp.MaxCharge); + if (ent.Comp.ChargePercent >= 100f) // Skip calculation if charge to full + { + _battery.SetCharge(battery.AsNullable(), battery.Comp.MaxCharge); + continue; + } + + // Calculate charge on the battery based on charge percent. + var charge = MathF.Min(battery.Comp.MaxCharge, battery.Comp.LastCharge + ent.Comp.ChargePercent / 100f * battery.Comp.MaxCharge); + _battery.SetCharge(battery.AsNullable(), charge); } } } diff --git a/Content.Shared/Xenoarchaeology/Artifact/Components/XenoArtifactComponent.cs b/Content.Shared/Xenoarchaeology/Artifact/Components/XenoArtifactComponent.cs index ce037c7c2e9..b48d3662bc8 100644 --- a/Content.Shared/Xenoarchaeology/Artifact/Components/XenoArtifactComponent.cs +++ b/Content.Shared/Xenoarchaeology/Artifact/Components/XenoArtifactComponent.cs @@ -112,7 +112,7 @@ public sealed partial class XenoArtifactComponent : Component /// The total number of nodes that make up this artifact. /// [DataField] - public MinMax NodeCount = new(10, 16); + public MinMax NodeCount = new(12, 18); /// /// The amount of nodes that go in each segment. @@ -133,13 +133,46 @@ public sealed partial class XenoArtifactComponent : Component [DataField] public MinMax ScatterPerLayer = new(0, 2); + /// + /// Lower threshold in which nodes will be considered "root" + /// + [DataField] + public int RootNodeThreshold = 0; + + /// + /// Threshold at which nodes will switch from main to deep. + /// + [DataField] + public int DeepNodeThreshold = 3; + + /// + /// Effects that can be used during this artifact generation. + /// Used on nodes of depth at most + /// + [DataField] + public EntityTableSelector RootEffectsTable = new NestedSelector + { + TableId = "XenoArtifactDefaultEffectsRoot" + }; + + /// + /// Effects that can be used during this artifact generation. + /// Used on nodes between depths and + /// + [DataField] + public EntityTableSelector MainEffectsTable = new NestedSelector + { + TableId = "XenoArtifactDefaultEffectsMain" + }; + /// /// Effects that can be used during this artifact generation. + /// Used on nodes of depth or deeper /// [DataField] - public EntityTableSelector EffectsTable = new NestedSelector + public EntityTableSelector DeepEffectsTable = new NestedSelector { - TableId = "XenoArtifactEffectsDefaultTable" + TableId = "XenoArtifactDefaultEffectsDeep" }; /// diff --git a/Content.Shared/Xenoarchaeology/Artifact/Components/XenoArtifactNodeComponent.cs b/Content.Shared/Xenoarchaeology/Artifact/Components/XenoArtifactNodeComponent.cs index a8983b639c6..502a87acbb4 100644 --- a/Content.Shared/Xenoarchaeology/Artifact/Components/XenoArtifactNodeComponent.cs +++ b/Content.Shared/Xenoarchaeology/Artifact/Components/XenoArtifactNodeComponent.cs @@ -1,4 +1,5 @@ using Content.Shared.Destructible.Thresholds; +using Robust.Shared.Audio; using Robust.Shared.GameStates; namespace Content.Shared.Xenoarchaeology.Artifact.Components; @@ -55,14 +56,50 @@ public sealed partial class XenoArtifactNodeComponent : Component /// /// The maximum factor by which using the durability of an artifact will scale it's Research Value. /// - [DataField] + [DataField, AutoNetworkedField] public float DurabilityResearchMultiplier = 2f; /// /// The variance from MaxDurability present when a node is created. /// - [DataField] + [DataField, AutoNetworkedField] public MinMax MaxDurabilityCanDecreaseBy = new(0, 2); + + /// + /// The lifetime consumed durability of the node. + /// + [DataField, AutoNetworkedField] + public int TotalConsumedDurability = 0; + + /// + /// The threshold at which the node has a 50% chance of shattering on activation. + /// + [DataField, AutoNetworkedField, ViewVariables(VVAccess.ReadWrite)] + public int AverageShatterDurabilityThreshold = 10; + + /// + /// The threshold at which the node has a 100% chance of shattering on activation. + /// + [DataField, AutoNetworkedField, ViewVariables(VVAccess.ReadWrite)] + public int MaxShatterDurabilityThreshold = 15; + + /// + /// Shattered nodes cannot be have their durability increased. + /// + [DataField, AutoNetworkedField, ViewVariables(VVAccess.ReadWrite)] + public bool Shattered = false; + + /// + /// Determines the pattern shown on the UI for the analysis console. + /// + [DataField, AutoNetworkedField, ViewVariables(VVAccess.ReadWrite)] + public ShatterPatternTypes ShatterPattern = ShatterPatternTypes.Strike; + + /// + /// Sound to play when a node is shattered. + /// + [DataField, AutoNetworkedField, ViewVariables(VVAccess.ReadOnly)] + public SoundSpecifier ShatterSound = new SoundPathSpecifier("/Audio/Effects/glass_break1.ogg"); #endregion #region Research @@ -85,3 +122,8 @@ public sealed partial class XenoArtifactNodeComponent : Component public int ConsumedResearchValue; #endregion } + +public enum ShatterPatternTypes +{ + Strike, Bolt, Spider, Fracture, Split, Fragment +} diff --git a/Content.Shared/Xenoarchaeology/Artifact/SharedXenoArtifactSystem.Node.cs b/Content.Shared/Xenoarchaeology/Artifact/SharedXenoArtifactSystem.Node.cs index 590b317745c..a5c21e79a66 100644 --- a/Content.Shared/Xenoarchaeology/Artifact/SharedXenoArtifactSystem.Node.cs +++ b/Content.Shared/Xenoarchaeology/Artifact/SharedXenoArtifactSystem.Node.cs @@ -1,9 +1,12 @@ using System.Linq; +using Content.Shared.Database; using Content.Shared.EntityTable; using Content.Shared.NameIdentifier; using Content.Shared.Xenoarchaeology.Artifact.Components; using Content.Shared.Xenoarchaeology.Artifact.Prototypes; +using Robust.Shared.Audio.Systems; using Robust.Shared.Prototypes; +using Robust.Shared.Random; using Robust.Shared.Utility; namespace Content.Shared.Xenoarchaeology.Artifact; @@ -64,17 +67,18 @@ public void AdjustNodeDurability(Entity ent, int dur { if (!Resolve(ent, ref ent.Comp)) return; - SetNodeDurability(ent, ent.Comp.Durability + durabilityDelta); } /// /// Sets a node's durability to the specified value. HIGHLY recommended to not be less than 0. /// - public void SetNodeDurability(Entity ent, int durability) + public void SetNodeDurability(Entity ent, int durability, bool ignoreShatter = false) { if (!Resolve(ent, ref ent.Comp)) return; + if (ent.Comp.Shattered && !ignoreShatter) + return; ent.Comp.Durability = Math.Clamp(durability, 0, ent.Comp.MaxDurability); UpdateNodeResearchValue((ent, ent.Comp)); @@ -95,8 +99,12 @@ public Entity CreateNode(Entity public Entity CreateNode(Entity ent, XenoArchTriggerPrototype trigger, int depth = 0) { - var entProtoId = _entityTable.GetSpawns(ent.Comp.EffectsTable) - .First(); + // Get the correct table based on the depth of the node. Deeper nodes have more valuable options. + var tableByDepth = depth <= ent.Comp.RootNodeThreshold ? ent.Comp.RootEffectsTable : + depth >= ent.Comp.DeepNodeThreshold ? ent.Comp.DeepEffectsTable : + ent.Comp.MainEffectsTable; + + var entProtoId = _entityTable.GetSpawns(tableByDepth).First(); AddNode((ent, ent), entProtoId, out var nodeEnt, dirty: false); DebugTools.Assert(nodeEnt.HasValue, "Failed to create node on artifact."); @@ -383,12 +391,31 @@ public void UpdateNodeResearchValue(Entity node) var artifact = _xenoArtifactQuery.Get(nodeComponent.Attached.Value); - var nonactiveNodes = GetActiveNodes(artifact); // This seems like its... wrong... - var durabilityEffect = MathF.Pow((float)nodeComponent.Durability / nodeComponent.MaxDurability, 2); + var maxDurability = nodeComponent.MaxDurability <= 0 ? 1 : nodeComponent.MaxDurability; + var durabilityEffect = MathF.Pow((float)nodeComponent.Durability / maxDurability, 2); var durabilityMultiplier = nodeComponent.DurabilityResearchMultiplier - (nodeComponent.DurabilityResearchMultiplier - 1) * durabilityEffect; var predecessorNodes = GetPredecessorNodes((artifact, artifact), node); var predecessorMultiplier = Math.Pow(1.25, Math.Pow(predecessorNodes.Count, 1.5f)); nodeComponent.ResearchValue = (int)(nodeComponent.BasePointValue * predecessorMultiplier * durabilityMultiplier); } -} + + public void Shatter(Entity node) + { + if (!_net.IsServer) + return; + + if (!Resolve(node, ref node.Comp)) + return; + + if (node.Comp.Shattered) + return; + + node.Comp.ShatterPattern = RobustRandom.Pick(Enum.GetValues()); + node.Comp.Durability = 0; + node.Comp.Shattered = true; + + _audio.PlayPvs(node.Comp.ShatterSound, node.Owner); + Dirty(node); + } +} \ No newline at end of file diff --git a/Content.Shared/Xenoarchaeology/Artifact/SharedXenoArtifactSystem.Unlock.cs b/Content.Shared/Xenoarchaeology/Artifact/SharedXenoArtifactSystem.Unlock.cs index 6ac49f0ce28..77ea9852892 100644 --- a/Content.Shared/Xenoarchaeology/Artifact/SharedXenoArtifactSystem.Unlock.cs +++ b/Content.Shared/Xenoarchaeology/Artifact/SharedXenoArtifactSystem.Unlock.cs @@ -10,8 +10,6 @@ namespace Content.Shared.Xenoarchaeology.Artifact; public abstract partial class SharedXenoArtifactSystem { - [Dependency] private readonly SharedAudioSystem _audio = default!; - private EntityQuery _unlockingQuery; private void InitializeUnlock() @@ -77,10 +75,8 @@ public void FinishUnlockingState(Entity node) + { + var activationDelta = node.Comp.TotalConsumedDurability - node.Comp.MaxDurability; + var extraActivations = activationDelta < 0 ? 0 : activationDelta; + + // When extraActivations is at 0, probability is 0%. + // When extraActivations = a, probability is 50% + // When extraActivations = m, probability is 100% + // Everything between is a consistent curve. + var a = (float)node.Comp.AverageShatterDurabilityThreshold; + var m = (float)node.Comp.MaxShatterDurabilityThreshold; + var n = -.69314718056f /* Approx -ln(2) */ / MathF.Log(a / m); + var shatterChance = MathF.Pow(extraActivations / m, n); + + return RobustRandom.Prob(shatterChance); + } + + } /// diff --git a/Content.Shared/Xenoarchaeology/Artifact/SharedXenoArtifactSystem.cs b/Content.Shared/Xenoarchaeology/Artifact/SharedXenoArtifactSystem.cs index a4a4cfc45a8..8e09591a87a 100644 --- a/Content.Shared/Xenoarchaeology/Artifact/SharedXenoArtifactSystem.cs +++ b/Content.Shared/Xenoarchaeology/Artifact/SharedXenoArtifactSystem.cs @@ -1,6 +1,7 @@ using Content.Shared.Actions; using Content.Shared.Popups; using Content.Shared.Xenoarchaeology.Artifact.Components; +using Robust.Shared.Audio.Systems; using Robust.Shared.Containers; using Robust.Shared.Network; using Robust.Shared.Prototypes; @@ -21,6 +22,7 @@ public abstract partial class SharedXenoArtifactSystem : EntitySystem [Dependency] private readonly SharedActionsSystem _actions = default!; [Dependency] private readonly SharedContainerSystem _container = default!; [Dependency] private readonly SharedPopupSystem _popup = default!; + [Dependency] private readonly SharedAudioSystem _audio = default!; /// public override void Initialize() diff --git a/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/item_xenoartifacts.yml b/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/item_xenoartifacts.yml index 31daa0f4e08..31ca19da48f 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/item_xenoartifacts.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/item_xenoartifacts.yml @@ -53,14 +53,12 @@ graph: Artifact node: done - type: XenoArtifact - effectsTable: !type:GroupSelector - children: - - !type:NestedSelector - tableId: XenoArtifactEffectsDefaultTable - weight: 54 - - !type:NestedSelector - tableId: XenoArtifactEffectsHandheldOnlyTable - weight: 2 + rootEffectsTable: !type:NestedSelector + tableId: XenoArtifactDefaultEffectsRootHandheld + mainEffectsTable: !type:NestedSelector + tableId: XenoArtifactDefaultEffectsMainHandheld + deepEffectsTable: !type:NestedSelector + tableId: XenoArtifactDefaultEffectsDeepHandheld - type: entity parent: BaseXenoArtifactItem @@ -69,8 +67,11 @@ components: - type: XenoArtifact nodeCount: - min: 9 - max: 13 + min: 10 + max: 18 + segmentSize: + min: 5 + max: 10 - type: entity id: ArtifactFragment diff --git a/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/structure_xenoartifacts.yml b/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/structure_xenoartifacts.yml index 7d85e375b21..40e99d5b20f 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/structure_xenoartifacts.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/structure_xenoartifacts.yml @@ -47,6 +47,15 @@ components: - type: XenoArtifact nodeCount: - min: 9 + min: 13 + max: 26 + segmentSize: + min: 8 max: 13 + nodesPerSegmentLayer: + min: 1 + max: 4 + scatterPerLayer: + min: 0 + max: 4 diff --git a/Resources/Prototypes/XenoArch/effect_tables.yml b/Resources/Prototypes/XenoArch/effect_tables.yml new file mode 100644 index 00000000000..8c6d6e1707c --- /dev/null +++ b/Resources/Prototypes/XenoArch/effect_tables.yml @@ -0,0 +1,623 @@ +- type: entityTable + id: XenoArtifactDefaultEffectsRoot + table: !type:GroupSelector + children: + - !type:NestedSelector + tableId: XenoArtifactEffectsRoot + weight: 397.0 # Total weights of the table so distribution remains even + # Eventually full size only artifact effects will go here + +- type: entityTable + id: XenoArtifactDefaultEffectsMain + table: !type:GroupSelector + children: + - !type:NestedSelector + tableId: XenoArtifactEffectsMain + weight: 425.0 # Total weights of the table so distribution remains even + # Eventually full size only artifact effects will go here + +- type: entityTable + id: XenoArtifactDefaultEffectsDeep + table: !type:GroupSelector + children: + - !type:NestedSelector + tableId: XenoArtifactEffectsDeep + weight: 337.0 # Total weights of the table so distribution remains even + # Eventually full size only artifact effects will go here + +- type: entityTable + id: XenoArtifactDefaultEffectsRootHandheld + table: !type:GroupSelector + children: + - !type:NestedSelector + tableId: XenoArtifactEffectsRoot + weight: 397.0 # Total weights of the table so distribution remains even + - !type:NestedSelector + tableId: XenoArtifactEffectsRootHandheldOnly + weight: 54.0 # Total weights of the table so distribution remains even + +- type: entityTable + id: XenoArtifactDefaultEffectsMainHandheld + table: !type:GroupSelector + children: + - !type:NestedSelector + tableId: XenoArtifactEffectsMain + weight: 425.0 # Total weights of the table so distribution remains even + - !type:NestedSelector + tableId: XenoArtifactEffectsMainHandheldOnly + weight: 37.0 # Total weights of the table so distribution remains even + +- type: entityTable + id: XenoArtifactDefaultEffectsDeepHandheld + table: !type:GroupSelector + children: + - !type:NestedSelector + tableId: XenoArtifactEffectsDeep + weight: 337.0 # Total weights of the table so distribution remains even + - !type:NestedSelector + tableId: XenoArtifactEffectsDeepHandheldOnly + weight: 30.0 # Total weights of the table so distribution remains even + +- type: entityTable # Root Nodes (Depth 0) + id: XenoArtifactEffectsRoot + table: !type:GroupSelector + children: + - id: XenoArtifactAnomalySpawn + weight: 1.0 + - id: XenoArtifactArtifactSpawn + weight: 0.0 # Here for parity + - id: XenoArtifactEffectBadFeeling + weight: 10.0 + - id: XenoArtifactBoom + weight: 0.0 # Here for parity + - id: XenoArtifactCashSpawn + weight: 0.0 # Here for parity + - id: XenoArtifactOldCashSpawn + weight: 8.0 + - id: XenoArtifactChargeBatteryLow + weight: 3.0 + - id: XenoArtifactChargeBattery + weight: 0.0 # Here for parity + - id: XenoArtifactChemicalPuddle + weight: 10.0 + - id: XenoArtifactColdWave + weight: 10.0 + - id: XenoArtifactEffectCreationGasAmmonia + weight: 8.0 + - id: XenoArtifactEffectCreationGasCarbonDioxide + weight: 10.0 + - id: XenoArtifactEffectCreationGasFrezon + weight: 3.0 + - id: XenoArtifactEffectCreationGasNitrousOxide + weight: 10.0 + - id: XenoArtifactEffectCreationGasPlasma + weight: 8.0 + - id: XenoArtifactEffectCreationGasTritium + weight: 3.0 + - id: XenoArtifactEmp + weight: 1.0 + - id: XenoArtifactExplosionScary + weight: 0.0 # Here for parity + - id: XenoArtifactFaunaSpawn + weight: 10.0 + - id: XenoArtifactFloraSpawn + weight: 10.0 + - id: XenoArtifactFoamDangerous + weight: 8.0 + - id: XenoArtifactFoamGood + weight: 8.0 + - id: XenoArtifactFoamMild + weight: 10.0 + - id: XenoArtifactEffectGoodFeeling + weight: 10.0 + - id: XenoArtifactHealBrute + weight: 3.0 + - id: XenoArtifactHealBurn + weight: 3.0 + - id: XenoArtifactHealRare + weight: 1.0 + - id: XenoArtifactHealAll + weight: 0.0 # Here for parity + - id: XenoArtifactHeatWave + weight: 8.0 + - id: XenoArtifactHostileFaunaSpawn + weight: 3.0 + - id: XenoArtifactIgnite + weight: 3.0 + - id: XenoArtifactEffectJunkSpawn + weight: 10.0 + - id: XenoArtifactKnock + weight: 3.0 + - id: XenoArtifactEffectLightFlicker + weight: 10.0 + - id: XenoArtifactMagnet + weight: 3.0 + - id: XenoArtifactMagnetNegative + weight: 3.0 + - id: XenoArtifactMonkeySpawn + weight: 8.0 + - id: XenoArtifactPhasing + weight: 8.0 + - id: XenoArtifactPolyLuminous + weight: 8.0 + - id: XenoArtifactPolyLizard + weight: 8.0 + - id: XenoArtifactPolyMonkey + weight: 8.0 + - id: XenoArtifactPortal + weight: 1.0 + - id: XenoArtifactPotassiumWave + weight: 8.0 + - id: XenoArtifactPuddleRare + weight: 1.0 + - id: XenoArtifactRadioactive + weight: 10.0 + - id: XenoArtifactRadioactiveStrong + weight: 3.0 + - id: XenoArtifactRandomInstrumentSpawn + weight: 10.0 + - id: XenoArtifactShatterWindows + weight: 8.0 + - id: XenoArtifactShuffle + weight: 3.0 + - id: XenoArtifactSolutionStorage + weight: 10.0 + - id: XenoArtifactAngryCarpSpawn + weight: 3.0 + - id: XenoArtifactMaterialSpawnGlassFew + weight: 10.0 + - id: XenoArtifactMaterialSpawnGlassMany + weight: 3.0 + - id: XenoArtifactMaterialSpawnGlassStack + weight: 0.0 # Here for parity + - id: XenoArtifactMaterialSpawnSteelFew + weight: 10.0 + - id: XenoArtifactMaterialSpawnSteelMany + weight: 3.0 + - id: XenoArtifactMaterialSpawnSteelStack + weight: 0.0 # Here for parity + - id: XenoArtifactMaterialSpawnPlasticFew + weight: 10.0 + - id: XenoArtifactMaterialSpawnPlasticMany + weight: 3.0 + - id: XenoArtifactMaterialSpawnPlasticStack + weight: 0.0 # Here for parity + - id: XenoArtifactRawMaterialSpawnBananiumFew + weight: 3.0 + - id: XenoArtifactRawMaterialSpawnBananiumMore + weight: 1.0 + - id: XenoArtifactRawMaterialSpawnBananiumMany + weight: 0.0 # Here for parity + - id: XenoArtifactRawMaterialSpawnGoldFew + weight: 10.0 + - id: XenoArtifactRawMaterialSpawnGoldMore + weight: 1.0 + - id: XenoArtifactRawMaterialSpawnGoldMany + weight: 0.0 # Here for parity + - id: XenoArtifactRawMaterialSpawnPlasmaFew + weight: 10.0 + - id: XenoArtifactRawMaterialSpawnPlasmaMore + weight: 1.0 + - id: XenoArtifactRawMaterialSpawnPlasmaMany + weight: 0.0 # Here for parity + - id: XenoArtifactRawMaterialSpawnSilverFew + weight: 10.0 + - id: XenoArtifactRawMaterialSpawnSilverMore + weight: 1.0 + - id: XenoArtifactRawMaterialSpawnSilverMany + weight: 0.0 # Here for parity + - id: XenoArtifactRawMaterialSpawnUraniumFew + weight: 10.0 + - id: XenoArtifactRawMaterialSpawnUraniumMore + weight: 1.0 + - id: XenoArtifactRawMaterialSpawnUraniumMany + weight: 0.0 # Here for parity + - id: XenoArtifactStealth + weight: 3.0 + - id: XenoArtifactTeleport + weight: 3.0 + - id: XenoArtifactThrowThingsAround + weight: 8.0 + - id: XenoArtifactWandering + weight: 8.0 + +- type: entityTable # Main Nodes (Depth 1-2) + id: XenoArtifactEffectsMain + table: !type:GroupSelector + children: + - id: XenoArtifactAnomalySpawn + weight: 1.0 + - id: XenoArtifactArtifactSpawn + weight: 1.0 + - id: XenoArtifactEffectBadFeeling + weight: 8.0 + - id: XenoArtifactBoom + weight: 1.0 + - id: XenoArtifactCashSpawn + weight: 1.0 + - id: XenoArtifactOldCashSpawn + weight: 3.0 + - id: XenoArtifactChargeBatteryLow + weight: 8.0 + - id: XenoArtifactChargeBattery + weight: 3.0 + - id: XenoArtifactChemicalPuddle + weight: 10.0 + - id: XenoArtifactColdWave + weight: 10.0 + - id: XenoArtifactEffectCreationGasAmmonia + weight: 3.0 + - id: XenoArtifactEffectCreationGasCarbonDioxide + weight: 8.0 + - id: XenoArtifactEffectCreationGasFrezon + weight: 8.0 + - id: XenoArtifactEffectCreationGasNitrousOxide + weight: 8.0 + - id: XenoArtifactEffectCreationGasPlasma + weight: 8.0 + - id: XenoArtifactEffectCreationGasTritium + weight: 8.0 + - id: XenoArtifactEmp + weight: 3.0 + - id: XenoArtifactExplosionScary + weight: 1.0 + - id: XenoArtifactFaunaSpawn + weight: 8.0 + - id: XenoArtifactFloraSpawn + weight: 8.0 + - id: XenoArtifactFoamDangerous + weight: 8.0 + - id: XenoArtifactFoamGood + weight: 8.0 + - id: XenoArtifactFoamMild + weight: 10.0 + - id: XenoArtifactEffectGoodFeeling + weight: 8.0 + - id: XenoArtifactHealBrute + weight: 3.0 + - id: XenoArtifactHealBurn + weight: 3.0 + - id: XenoArtifactHealRare + weight: 3.0 + - id: XenoArtifactHealAll + weight: 1.0 + - id: XenoArtifactHeatWave + weight: 8.0 + - id: XenoArtifactHostileFaunaSpawn + weight: 8.0 + - id: XenoArtifactIgnite + weight: 8.0 + - id: XenoArtifactEffectJunkSpawn + weight: 3.0 + - id: XenoArtifactKnock + weight: 3.0 + - id: XenoArtifactEffectLightFlicker + weight: 8.0 + - id: XenoArtifactMagnet + weight: 8.0 + - id: XenoArtifactMagnetNegative + weight: 8.0 + - id: XenoArtifactMonkeySpawn + weight: 8.0 + - id: XenoArtifactPhasing + weight: 3.0 + - id: XenoArtifactPolyLuminous + weight: 8.0 + - id: XenoArtifactPolyLizard + weight: 8.0 + - id: XenoArtifactPolyMonkey + weight: 8.0 + - id: XenoArtifactPortal + weight: 1.0 + - id: XenoArtifactPotassiumWave + weight: 8.0 + - id: XenoArtifactPuddleRare + weight: 2.0 + - id: XenoArtifactRadioactive + weight: 10.0 + - id: XenoArtifactRadioactiveStrong + weight: 8.0 + - id: XenoArtifactRandomInstrumentSpawn + weight: 8.0 + - id: XenoArtifactShatterWindows + weight: 3.0 + - id: XenoArtifactShuffle + weight: 3.0 + - id: XenoArtifactSolutionStorage + weight: 10.0 + - id: XenoArtifactAngryCarpSpawn + weight: 8.0 + - id: XenoArtifactMaterialSpawnGlassFew + weight: 3.0 + - id: XenoArtifactMaterialSpawnGlassMany + weight: 3.0 + - id: XenoArtifactMaterialSpawnGlassStack + weight: 1.0 + - id: XenoArtifactMaterialSpawnSteelFew + weight: 3.0 + - id: XenoArtifactMaterialSpawnSteelMany + weight: 3.0 + - id: XenoArtifactMaterialSpawnSteelStack + weight: 1.0 + - id: XenoArtifactMaterialSpawnPlasticFew + weight: 3.0 + - id: XenoArtifactMaterialSpawnPlasticMany + weight: 3.0 + - id: XenoArtifactMaterialSpawnPlasticStack + weight: 1.0 + - id: XenoArtifactRawMaterialSpawnBananiumFew + weight: 3.0 + - id: XenoArtifactRawMaterialSpawnBananiumMore + weight: 2.0 + - id: XenoArtifactRawMaterialSpawnBananiumMany + weight: 3.0 + - id: XenoArtifactRawMaterialSpawnGoldFew + weight: 8.0 + - id: XenoArtifactRawMaterialSpawnGoldMore + weight: 10.0 + - id: XenoArtifactRawMaterialSpawnGoldMany + weight: 1.0 + - id: XenoArtifactRawMaterialSpawnPlasmaFew + weight: 8.0 + - id: XenoArtifactRawMaterialSpawnPlasmaMore + weight: 10.0 + - id: XenoArtifactRawMaterialSpawnPlasmaMany + weight: 1.0 + - id: XenoArtifactRawMaterialSpawnSilverFew + weight: 8.0 + - id: XenoArtifactRawMaterialSpawnSilverMore + weight: 10.0 + - id: XenoArtifactRawMaterialSpawnSilverMany + weight: 1.0 + - id: XenoArtifactRawMaterialSpawnUraniumFew + weight: 8.0 + - id: XenoArtifactRawMaterialSpawnUraniumMore + weight: 10.0 + - id: XenoArtifactRawMaterialSpawnUraniumMany + weight: 1.0 + - id: XenoArtifactStealth + weight: 3.0 + - id: XenoArtifactTeleport + weight: 3.0 + - id: XenoArtifactThrowThingsAround + weight: 3.0 + - id: XenoArtifactWandering + weight: 8.0 + +- type: entityTable # Deep Nodes (Depth 3+) + id: XenoArtifactEffectsDeep + table: !type:GroupSelector + children: + - id: XenoArtifactAnomalySpawn + weight: 3.0 + - id: XenoArtifactArtifactSpawn + weight: 3.0 + - id: XenoArtifactEffectBadFeeling + weight: 1.0 + - id: XenoArtifactBoom + weight: 3.0 + - id: XenoArtifactCashSpawn + weight: 3.0 + - id: XenoArtifactOldCashSpawn + weight: 0.0 # Here for parity + - id: XenoArtifactChargeBatteryLow + weight: 0.0 # Here for parity + - id: XenoArtifactChargeBattery # Full Charge + weight: 10.0 + - id: XenoArtifactChemicalPuddle + weight: 10.0 + - id: XenoArtifactColdWave + weight: 8.0 + - id: XenoArtifactEffectCreationGasAmmonia + weight: 3.0 + - id: XenoArtifactEffectCreationGasCarbonDioxide + weight: 3.0 + - id: XenoArtifactEffectCreationGasFrezon + weight: 10.0 + - id: XenoArtifactEffectCreationGasNitrousOxide + weight: 3.0 + - id: XenoArtifactEffectCreationGasPlasma + weight: 10.0 + - id: XenoArtifactEffectCreationGasTritium + weight: 10.0 + - id: XenoArtifactEmp + weight: 8.0 + - id: XenoArtifactExplosionScary + weight: 1.0 + - id: XenoArtifactFaunaSpawn + weight: 1.0 + - id: XenoArtifactFloraSpawn + weight: 1.0 + - id: XenoArtifactFoamDangerous + weight: 8.0 + - id: XenoArtifactFoamGood + weight: 8.0 + - id: XenoArtifactFoamMild + weight: 3.0 + - id: XenoArtifactEffectGoodFeeling + weight: 1.0 + - id: XenoArtifactHealBrute + weight: 1.0 + - id: XenoArtifactHealBurn + weight: 1.0 + - id: XenoArtifactHealRare + weight: 2.0 + - id: XenoArtifactHealAll + weight: 2.0 + - id: XenoArtifactHeatWave + weight: 8.0 + - id: XenoArtifactHostileFaunaSpawn + weight: 10.0 + - id: XenoArtifactIgnite + weight: 10.0 + - id: XenoArtifactEffectJunkSpawn + weight: 0.0 # Here for parity + - id: XenoArtifactKnock + weight: 8.0 + - id: XenoArtifactEffectLightFlicker + weight: 3.0 + - id: XenoArtifactMagnet + weight: 10.0 + - id: XenoArtifactMagnetNegative + weight: 10.0 + - id: XenoArtifactMonkeySpawn + weight: 3.0 + - id: XenoArtifactPhasing + weight: 1.0 + - id: XenoArtifactPolyLuminous + weight: 3.0 + - id: XenoArtifactPolyLizard + weight: 3.0 + - id: XenoArtifactPolyMonkey + weight: 3.0 + - id: XenoArtifactPortal + weight: 3.0 + - id: XenoArtifactPotassiumWave + weight: 8.0 + - id: XenoArtifactPuddleRare + weight: 3.0 + - id: XenoArtifactRadioactive + weight: 3.0 + - id: XenoArtifactRadioactiveStrong + weight: 10.0 + - id: XenoArtifactRandomInstrumentSpawn + weight: 0.0 # Here for parity + - id: XenoArtifactShatterWindows + weight: 3.0 + - id: XenoArtifactShuffle + weight: 8.0 + - id: XenoArtifactSolutionStorage + weight: 10.0 + - id: XenoArtifactAngryCarpSpawn + weight: 8.0 + - id: XenoArtifactMaterialSpawnGlassFew + weight: 0.0 # Here for parity + - id: XenoArtifactMaterialSpawnGlassMany + weight: 2.0 + - id: XenoArtifactMaterialSpawnGlassStack + weight: 3.0 + - id: XenoArtifactMaterialSpawnSteelFew + weight: 0.0 # Here for parity + - id: XenoArtifactMaterialSpawnSteelMany + weight: 2.0 + - id: XenoArtifactMaterialSpawnSteelStack + weight: 3.0 + - id: XenoArtifactMaterialSpawnPlasticFew + weight: 0.0 # Here for parity + - id: XenoArtifactMaterialSpawnPlasticMany + weight: 2.0 + - id: XenoArtifactMaterialSpawnPlasticStack + weight: 3.0 + - id: XenoArtifactRawMaterialSpawnBananiumFew + weight: 1.0 + - id: XenoArtifactRawMaterialSpawnBananiumMore + weight: 3.0 + - id: XenoArtifactRawMaterialSpawnBananiumMany + weight: 3.0 + - id: XenoArtifactRawMaterialSpawnGoldFew + weight: 1.0 + - id: XenoArtifactRawMaterialSpawnGoldMore + weight: 3.0 + - id: XenoArtifactRawMaterialSpawnGoldMany + weight: 8.0 + - id: XenoArtifactRawMaterialSpawnPlasmaFew + weight: 1.0 + - id: XenoArtifactRawMaterialSpawnPlasmaMore + weight: 3.0 + - id: XenoArtifactRawMaterialSpawnPlasmaMany + weight: 8.0 + - id: XenoArtifactRawMaterialSpawnSilverFew + weight: 1.0 + - id: XenoArtifactRawMaterialSpawnSilverMore + weight: 3.0 + - id: XenoArtifactRawMaterialSpawnSilverMany + weight: 8.0 + - id: XenoArtifactRawMaterialSpawnUraniumFew + weight: 1.0 + - id: XenoArtifactRawMaterialSpawnUraniumMore + weight: 3.0 + - id: XenoArtifactRawMaterialSpawnUraniumMany + weight: 8.0 + - id: XenoArtifactStealth + weight: 8.0 + - id: XenoArtifactTeleport + weight: 3.0 + - id: XenoArtifactThrowThingsAround + weight: 3.0 + - id: XenoArtifactWandering + weight: 8.0 + +- type: entityTable # Root Handheld (Depth 0) + id: XenoArtifactEffectsRootHandheldOnly + table: !type:GroupSelector + children: + - id: XenoArtifactSpeedUp + weight: 3.0 + - id: XenoArtifactToolCrowbar + weight: 10.0 + - id: XenoArtifactToolScrewdriver + weight: 10.0 + - id: XenoArtifactToolWrench + weight: 10.0 + - id: XenoArtifactToolWirecutter + weight: 10.0 + - id: XenoArtifactToolJaws + weight: 2.0 + - id: XenoArtifactToolPowerDrill + weight: 2.0 + - id: XenoArtifactToolKnife + weight: 3.0 + - id: XenoArtifactOmnitool + weight: 1.0 + - id: XenoArtifactToolDrill + weight: 3.0 + +- type: entityTable # Main Handheld (Depth 1-2) + id: XenoArtifactEffectsMainHandheldOnly + table: !type:GroupSelector + children: + - id: XenoArtifactSpeedUp + weight: 10.0 + - id: XenoArtifactToolCrowbar + weight: 3.0 + - id: XenoArtifactToolScrewdriver + weight: 3.0 + - id: XenoArtifactToolWrench + weight: 3.0 + - id: XenoArtifactToolWirecutter + weight: 3.0 + - id: XenoArtifactToolJaws + weight: 3.0 + - id: XenoArtifactToolPowerDrill + weight: 3.0 + - id: XenoArtifactToolKnife + weight: 2.0 + - id: XenoArtifactOmnitool + weight: 2.0 + - id: XenoArtifactToolDrill + weight: 5.0 + +- type: entityTable # Deep Handheld (Depth 3+) + id: XenoArtifactEffectsDeepHandheldOnly + table: !type:GroupSelector + children: + - id: XenoArtifactSpeedUp + weight: 10.0 + - id: XenoArtifactToolCrowbar + weight: 0.0 # Here for parity + - id: XenoArtifactToolScrewdriver + weight: 0.0 # Here for parity + - id: XenoArtifactToolWrench + weight: 0.0 # Here for parity + - id: XenoArtifactToolWirecutter + weight: 0.0 # Here for parity + - id: XenoArtifactToolJaws + weight: 3.0 + - id: XenoArtifactToolPowerDrill + weight: 3.0 + - id: XenoArtifactToolKnife + weight: 3.0 + - id: XenoArtifactOmnitool + weight: 8.0 + - id: XenoArtifactToolDrill + weight: 3.0 \ No newline at end of file diff --git a/Resources/Prototypes/XenoArch/effects.yml b/Resources/Prototypes/XenoArch/effects.yml index 61b09a111f7..e1d2025da73 100644 --- a/Resources/Prototypes/XenoArch/effects.yml +++ b/Resources/Prototypes/XenoArch/effects.yml @@ -1,146 +1,3 @@ -- type: entityTable - id: XenoArtifactEffectsDefaultTable - table: !type:GroupSelector - children: - # hijacks use key, prevents from using artifact, sadly - #- id: XenoArtifactEffectUniversalIntercom - # weight: 10.0 - - id: XenoArtifactSolutionStorage - weight: 10.0 - - id: XenoArtifactPhasing - weight: 2.0 - - id: XenoArtifactWandering - weight: 4.0 - - id: XenoArtifactSpeedUp - weight: 4.0 - - id: XenoArtifactGhost - weight: 2.0 - - id: XenoArtifactEffectBadFeeling - weight: 10.0 - - id: XenoArtifactEffectGoodFeeling - weight: 10.0 - - id: XenoArtifactEffectJunkSpawn - weight: 10.0 - - id: XenoArtifactEffectLightFlicker - weight: 10.0 - - id: XenoArtifactPotassiumWave - weight: 7.0 - - id: XenoArtifactFloraSpawn - weight: 10.0 - - id: XenoArtifactChemicalPuddle - weight: 10.0 - - id: XenoArtifactThrowThingsAround - weight: 10.0 - - id: XenoArtifactColdWave - weight: 10.0 - - id: XenoArtifactHeatWave - weight: 4.0 - - id: XenoArtifactFoamMild - weight: 8.0 - - id: XenoArtifactRandomInstrumentSpawn - weight: 10.0 - - id: XenoArtifactMonkeySpawn - weight: 10.0 - - id: XenoArtifactRadioactive - weight: 8.0 - - id: XenoArtifactChargeBattery - weight: 10.0 - - id: XenoArtifactKnock - weight: 4.0 - - id: XenoArtifactMagnet - weight: 2.0 - - id: XenoArtifactMagnetNegative - weight: 2.0 - - id: XenoArtifactStealth - weight: 1.0 - - id: XenoArtifactRareMaterialSpawnSilver - weight: 1.8 # amount is laughable - - id: XenoArtifactRareMaterialSpawnPlasma - weight: 2.0 # amount is laughable - - id: XenoArtifactRareMaterialSpawnGold - weight: 1.8 # amount is laughable - - id: XenoArtifactRareMaterialSpawnUranium - weight: 1.0 # amount is laughable - - id: XenoArtifactAngryCarpSpawn - weight: 4.0 - - id: XenoArtifactFaunaSpawn - weight: 10.0 - - id: XenoArtifactHostileFaunaSpawn - weight: 10.0 - - id: XenoArtifactCashSpawn - weight: 10.0 - - id: XenoArtifactShatterWindows - weight: 8.0 - - id: XenoArtifactFoamGood - weight: 4.0 - - id: XenoArtifactFoamDangerous - weight: 2.0 - - id: XenoArtifactPuddleRare - weight: 2.0 - - id: XenoArtifactAnomalySpawn - weight: 10.0 - - id: XenoArtifactIgnite - weight: 2.0 - - id: XenoArtifactTeleport - weight: 2.0 - - id: XenoArtifactEmp - weight: 2.0 - - id: XenoArtifactPolyMonkey - weight: 2.0 - - id: XenoArtifactPolyLuminous - weight: 2.0 - - id: XenoArtifactPolyLizard - weight: 2.0 - - id: XenoArtifactRadioactiveStrong - weight: 3.0 - - id: XenoArtifactMaterialSpawnGlass - weight: 3.3 - - id: XenoArtifactMaterialSpawnSteel - weight: 3.3 - - id: XenoArtifactMaterialSpawnPlastic - weight: 3.3 - - id: XenoArtifactPortal - weight: 2.0 - - id: XenoArtifactArtifactSpawn - weight: 0.5 - - id: XenoArtifactShuffle - weight: 3.0 - - id: XenoArtifactHealAll - weight: 1.0 - #- id: XenoArtifactTesla - # weight: 10.0 - #- id: XenoArtifactSingularity - # weight: 10.0 - - id: XenoArtifactExplosionScary - weight: 1.0 - - id: XenoArtifactBoom - weight: 5.0 - - id: XenoArtifactEffectCreationGasPlasma - weight: 2.0 - - id: XenoArtifactEffectCreationGasTritium - weight: 2.0 - - id: XenoArtifactEffectCreationGasAmmonia - weight: 3.0 - - id: XenoArtifactEffectCreationGasFrezon - weight: 1.0 - - id: XenoArtifactEffectCreationGasNitrousOxide - weight: 4.0 - - id: XenoArtifactEffectCreationGasCarbonDioxide - weight: 4.0 - -- type: entityTable - id: XenoArtifactEffectsHandheldOnlyTable - table: !type:GroupSelector - children: - #- id: XenoArtifactBecomeRandomInstrument - # weight 10.0 # removed until we have value-based system - #- id: XenoArtifactGun - # weight 4.0 #it conflicts with default interaction - it should activate artifact nodes - - id: XenoArtifactOmnitool - weight: 10.0 - - id: XenoArtifactDrill - weight: 10.0 - - type: entity id: BaseXenoArtifactEffect name: effect @@ -161,7 +18,7 @@ abstract: true components: - type: XenoArtifactNode - maxDurability: 1 + maxDurability: 0 # One time effects shouldn't need to be activated again maxDurabilityCanDecreaseBy: min: 0 max: 0 @@ -287,7 +144,7 @@ sprintModifier: 1.3 - type: entity - id: XenoArtifactDrill + id: XenoArtifactToolDrill parent: BaseOneTimeXenoArtifactEffect description: Obtains ability of drill components: @@ -369,6 +226,138 @@ - MindRoleGhostRoleFreeAgent - type: GhostTakeoverAvailable +- type: entity + id: XenoArtifactToolCrowbar + parent: BaseOneTimeXenoArtifactEffect + description: Obtains ability to pry + components: + - type: XAEApplyComponents + components: + - type: ToolTileCompatible + - type: Tool + qualities: + - Pyring + speedModifier: 2 # Very powerful to balance out the desire to sell or scrap for points + useSound: /Audio/Items/crowbar_use.ogg + + +- type: entity + id: XenoArtifactToolScrewdriver + parent: BaseOneTimeXenoArtifactEffect + description: Obtains ability to screw + components: + - type: XAEApplyComponents + components: + - type: ToolTileCompatible + - type: Tool + qualities: + - Screwing + speedModifier: 2 # Very powerful to balance out the desire to sell or scrap for points + useSound: /Audio/Items/screwdriver_use.ogg + +- type: entity + id: XenoArtifactToolWrench + parent: BaseOneTimeXenoArtifactEffect + description: Obtains ability to tighten + components: + - type: XAEApplyComponents + components: + - type: ToolTileCompatible + - type: Tool + qualities: + - Anchoring + speedModifier: 2 # Very powerful to balance out the desire to sell or scrap for points + useSound: /Audio/Items/wrench_use.ogg + +- type: entity + id: XenoArtifactToolWirecutter + parent: BaseOneTimeXenoArtifactEffect + description: Obtains ability to cut + components: + - type: XAEApplyComponents + components: + - type: ToolTileCompatible + - type: Tool + qualities: + - Cutting + speedModifier: 2 # Very powerful to balance out the desire to sell or scrap for points + useSound: /Audio/Items/wrench_use.ogg + +- type: entity + id: XenoArtifactToolJaws + parent: BaseOneTimeXenoArtifactEffect + description: Obtains ability to cut and pry + components: + - type: XAEApplyComponents + components: + - type: ToolTileCompatible + - type: Tool + qualities: + - Prying + speedModifier: 2 # Very powerful to balance out the desire to sell or scrap for points + useSound: /Audio/Items/jaws_pry.ogg + - type: MultipleTool + statusShowBehavior: true + entries: + - behavior: Prying + useSound: + path: /Audio/Items/jaws_pry.ogg + changeSound: + path: /Audio/Items/change_drill.ogg + - behavior: Cutting + useSound: + path: /Audio/Items/jaws_cut.ogg + changeSound: + path: /Audio/Items/change_drill.ogg + +- type: entity + id: XenoArtifactToolPowerDrill + parent: BaseOneTimeXenoArtifactEffect + description: Obtains ability to screw and tighten + components: + - type: XAEApplyComponents + components: + - type: ToolTileCompatible + - type: Tool + qualities: + - Screwing + speedModifier: 2 # Very powerful to balance out the desire to sell or scrap for points + useSound: /Audio/Items/drill_use.ogg + - type: MultipleTool + statusShowBehavior: true + entries: + - behavior: Screwing + useSound: + path: /Audio/Items/jaws_pry.ogg + changeSound: + path: /Audio/Items/drill_use.ogg + - behavior: Anchoring + useSound: + path: /Audio/Items/jaws_cut.ogg + changeSound: + path: /Audio/Items/ratchet.ogg + +- type: entity + id: XenoArtifactToolKnife + parent: BaseOneTimeXenoArtifactEffect + description: Gains a sharp edge + componens: + - type: XAEApplyComponents + components: + - type: ToolTileCompatible + - type: Tool + qualities: + - Slicing + speedModifier: 2 # Very powerful to balance out the desire to sell or scrap for points + useSound: /Audio/Items/drill_use.ogg + - type: MeleeWeapon + wideAnimationRotation: -135 + damage: + types: + Slash: 12 # A decently powerful knife + soundHit: + path: /Audio/Weapons/bladeslice.ogg + - type: entity id: XenoArtifactOmnitool parent: BaseOneTimeXenoArtifactEffect @@ -686,6 +675,17 @@ intensity: 1 slope: 0.3 +- type: entity + id: XenoArtifactChargeBatteryLow + parent: BaseXenoArtifactEffect + description: Partially charges nearby batteries + components: + - type: XAEChargeBattery + chargePercent: 20.0 + - type: XAETelepathic + messages: + - charge-artifact-popup + - type: entity id: XenoArtifactChargeBattery parent: BaseXenoArtifactEffect @@ -746,9 +746,20 @@ movementVisibilityRate: 0.10 - type: entity - id: XenoArtifactRareMaterialSpawn - parent: BaseXenoArtifactEffect # todo: splice into different well-named effects, amounts should reflect how rare material is - description: Create rare materials + id: XenoArtifactRawMaterialSpawn + abstract: true + parent: BaseXenoArtifactEffect + components: + - type: XenoArtifactNode + maxDurability: 4 + maxDurabilityCanDecreaseBy: + min: 0 + max: 2 + +- type: entity + id: XenoArtifactRawMaterialSpawnSilverFew + parent: XenoArtifactRawMaterialSpawn + description: Create a bit of raw silver components: - type: XAEApplyComponents applyIfAlreadyHave: true @@ -760,32 +771,14 @@ table: !type:AllSelector children: - id: SilverOre1 - rolls: !type:ConstantNumberSelector - value: 6 - prob: 0.3 - - id: PlasmaOre1 - rolls: !type:ConstantNumberSelector - value: 6 - prob: 0.3 - - id: GoldOre1 - rolls: !type:ConstantNumberSelector - value: 6 - prob: 0.3 - - id: UraniumOre1 - rolls: !type:ConstantNumberSelector - value: 6 - prob: 0.3 + rolls: !type:RangeNumberSelector + range: 2, 6 - type: entity - id: XenoArtifactRareMaterialSpawnSilver - parent: BaseXenoArtifactEffect - description: Create rare materials + id: XenoArtifactRawMaterialSpawnSilverMore + parent: XenoArtifactRawMaterialSpawn + description: Create raw silver components: - - type: XenoArtifactNode - maxDurability: 4 - maxDurabilityCanDecreaseBy: - min: 0 - max: 2 - type: XAEApplyComponents applyIfAlreadyHave: true refreshOnReactivate: true @@ -796,20 +789,86 @@ table: !type:AllSelector children: - id: SilverOre1 - rolls: !type:ConstantNumberSelector - value: 6 - prob: 0.3 + rolls: !type:RangeNumberSelector + range: 7, 11 - type: entity - id: XenoArtifactRareMaterialSpawnPlasma - parent: BaseXenoArtifactEffect - description: Create plasma + id: XenoArtifactRawMaterialSpawnSilverMany + parent: XenoArtifactRawMaterialSpawn + description: Create a lot of raw silver + components: + - type: XAEApplyComponents + applyIfAlreadyHave: true + refreshOnReactivate: true + components: + - type: EntityTableSpawner + deleteSpawnerAfterSpawn: false + spawnDetached: true + table: !type:AllSelector + children: + - id: SilverOre1 + rolls: !type:RangeNumberSelector + range: 13, 25 + +- type: entity + id: XenoArtifactRawMaterialSpawnBananiumFew + parent: XenoArtifactRawMaterialSpawn + description: Create a bit of raw bananium + components: + - type: XAEApplyComponents + applyIfAlreadyHave: true + refreshOnReactivate: true + components: + - type: EntityTableSpawner + deleteSpawnerAfterSpawn: false + spawnDetached: true + table: !type:AllSelector + children: + - id: BananiumOre1 + rolls: !type:RangeNumberSelector + range: 2, 6 + +- type: entity + id: XenoArtifactRawMaterialSpawnBananiumMore + parent: XenoArtifactRawMaterialSpawn + description: Create raw bananium + components: + - type: XAEApplyComponents + applyIfAlreadyHave: true + refreshOnReactivate: true + components: + - type: EntityTableSpawner + deleteSpawnerAfterSpawn: false + spawnDetached: true + table: !type:AllSelector + children: + - id: BananiumOre1 + rolls: !type:RangeNumberSelector + range: 7, 11 + +- type: entity + id: XenoArtifactRawMaterialSpawnBananiumMany + parent: XenoArtifactRawMaterialSpawn + description: Create a lot of raw bananium + components: + - type: XAEApplyComponents + applyIfAlreadyHave: true + refreshOnReactivate: true + components: + - type: EntityTableSpawner + deleteSpawnerAfterSpawn: false + spawnDetached: true + table: !type:AllSelector + children: + - id: BananiumOre1 + rolls: !type:RangeNumberSelector + range: 13, 25 + +- type: entity + id: XenoArtifactRawMaterialSpawnPlasmaFew + parent: XenoArtifactRawMaterialSpawn + description: Create a bit of raw plasma components: - - type: XenoArtifactNode - maxDurability: 4 - maxDurabilityCanDecreaseBy: - min: 0 - max: 2 - type: XAEApplyComponents applyIfAlreadyHave: true refreshOnReactivate: true @@ -820,20 +879,68 @@ table: !type:AllSelector children: - id: PlasmaOre1 - rolls: !type:ConstantNumberSelector - value: 6 - prob: 0.3 + rolls: !type:RangeNumberSelector + range: 2, 6 - type: entity - id: XenoArtifactRareMaterialSpawnGold - parent: BaseXenoArtifactEffect - description: Create gold + id: XenoArtifactRawMaterialSpawnPlasmaMore + parent: XenoArtifactRawMaterialSpawn + description: Create raw plasma + components: + - type: XAEApplyComponents + applyIfAlreadyHave: true + refreshOnReactivate: true + components: + - type: EntityTableSpawner + deleteSpawnerAfterSpawn: false + spawnDetached: true + table: !type:AllSelector + children: + - id: PlasmaOre1 + rolls: !type:RangeNumberSelector + range: 7, 11 + +- type: entity + id: XenoArtifactRawMaterialSpawnPlasmaMany + parent: XenoArtifactRawMaterialSpawn + description: Create a lot of raw plasma + components: + - type: XAEApplyComponents + applyIfAlreadyHave: true + refreshOnReactivate: true + components: + - type: EntityTableSpawner + deleteSpawnerAfterSpawn: false + spawnDetached: true + table: !type:AllSelector + children: + - id: PlasmaOre1 + rolls: !type:RangeNumberSelector + range: 13, 25 + +- type: entity + id: XenoArtifactRawMaterialSpawnGoldFew + parent: XenoArtifactRawMaterialSpawn + description: Create a bit of raw gold + components: + - type: XAEApplyComponents + applyIfAlreadyHave: true + refreshOnReactivate: true + components: + - type: EntityTableSpawner + deleteSpawnerAfterSpawn: false + spawnDetached: true + table: !type:AllSelector + children: + - id: XenoArtifactEffectGoodFeelingOre1 + rolls: !type:RangeNumberSelector + range: 2, 6 + +- type: entity + id: XenoArtifactRawMaterialSpawnGoldMore + parent: XenoArtifactRawMaterialSpawn + description: Create raw gold components: - - type: XenoArtifactNode - maxDurability: 3 - maxDurabilityCanDecreaseBy: - min: 0 - max: 1 - type: XAEApplyComponents applyIfAlreadyHave: true refreshOnReactivate: true @@ -844,20 +951,32 @@ table: !type:AllSelector children: - id: GoldOre1 - rolls: !type:ConstantNumberSelector - value: 6 - prob: 0.3 + rolls: !type:RangeNumberSelector + range: 7, 11 - type: entity - id: XenoArtifactRareMaterialSpawnUranium - parent: BaseXenoArtifactEffect - description: Create uranium + id: XenoArtifactRawMaterialSpawnGoldMany + parent: XenoArtifactRawMaterialSpawn + description: Create a lot of raw gold + components: + - type: XAEApplyComponents + applyIfAlreadyHave: true + refreshOnReactivate: true + components: + - type: EntityTableSpawner + deleteSpawnerAfterSpawn: false + spawnDetached: true + table: !type:AllSelector + children: + - id: GoldOre1 + rolls: !type:RangeNumberSelector + range: 13, 25 + +- type: entity + id: XenoArtifactRawMaterialSpawnUraniumFew + parent: XenoArtifactRawMaterialSpawn + description: Create a bit of raw uranium components: - - type: XenoArtifactNode - maxDurability: 4 - maxDurabilityCanDecreaseBy: - min: 0 - max: 2 - type: XAEApplyComponents applyIfAlreadyHave: true refreshOnReactivate: true @@ -868,9 +987,44 @@ table: !type:AllSelector children: - id: UraniumOre1 - rolls: !type:ConstantNumberSelector - value: 3 - prob: 0.3 + rolls: !type:RangeNumberSelector + range: 2, 6 + +- type: entity + id: XenoArtifactRawMaterialSpawnUraniumMore + parent: XenoArtifactRawMaterialSpawn + description: Create raw uranium + components: + - type: XAEApplyComponents + applyIfAlreadyHave: true + refreshOnReactivate: true + components: + - type: EntityTableSpawner + deleteSpawnerAfterSpawn: false + spawnDetached: true + table: !type:AllSelector + children: + - id: UraniumOre1 + rolls: !type:RangeNumberSelector + range: 7, 11 + +- type: entity + id: XenoArtifactRawMaterialSpawnUraniumMany + parent: XenoArtifactRawMaterialSpawn + description: Create a lot of raw uranium + components: + - type: XAEApplyComponents + applyIfAlreadyHave: true + refreshOnReactivate: true + components: + - type: EntityTableSpawner + deleteSpawnerAfterSpawn: false + spawnDetached: true + table: !type:AllSelector + children: + - id: UraniumOre1 + rolls: !type:RangeNumberSelector + range: 13, 25 - type: entity id: XenoArtifactAngryCarpSpawn @@ -973,7 +1127,7 @@ - id: MobKangarooSpace - type: entity - id: XenoArtifactCashSpawn + id: XenoArtifactOldCashSpawn parent: BaseXenoArtifactEffect description: Create money components: @@ -1002,6 +1156,36 @@ - id: TreasureCoinDiamond weight: 0.1 +- type: entity + id: XenoArtifactCashSpawn + parent: BaseXenoArtifactEffect + description: Create money + components: + - type: XenoArtifactNode + maxDurability: 2 + maxDurabilityCanDecreaseBy: + min: 0 + max: 1 + - type: XAEApplyComponents + applyIfAlreadyHave: true + refreshOnReactivate: true + components: + - type: EntityTableSpawner + deleteSpawnerAfterSpawn: false + spawnDetached: true + table: !type:GroupSelector + rolls: !type:RangeNumberSelector + range: 2, 4 + children: + - id: SpaceCash10 + weight: 0.75 + - id: SpaceCash100 + weight: 0.5 + - id: SpaceCash500 + weight: 0.25 + - id: SpaceCash1000 + weight: 0.1 + - type: entity id: XenoArtifactShatterWindows parent: BaseXenoArtifactEffect @@ -1177,9 +1361,45 @@ slope: 0.3 - type: entity - id: XenoArtifactMaterialSpawnGlass + id: XenoArtifactMaterialSpawnGlassFew parent: BaseXenoArtifactEffect - description: Create glass + description: Create a bit of glass + components: + - type: XAEApplyComponents + applyIfAlreadyHave: true + refreshOnReactivate: true + components: + - type: EntityTableSpawner + deleteSpawnerAfterSpawn: false + spawnDetached: true + table: !type:GroupSelector + rolls: !type:RangeNumberSelector + range: 2, 4 + children: + - id: SheetGlass1 + +- type: entity + id: XenoArtifactMaterialSpawnGlassMany + parent: BaseXenoArtifactEffect + description: Create a lot of glass + components: + - type: XAEApplyComponents + applyIfAlreadyHave: true + refreshOnReactivate: true + components: + - type: EntityTableSpawner + deleteSpawnerAfterSpawn: false + spawnDetached: true + table: !type:GroupSelector + rolls: !type:RangeNumberSelector + range: 1, 3 + children: + - id: SheetGlass10 + +- type: entity + id: XenoArtifactMaterialSpawnGlassStack + parent: BaseXenoArtifactEffect + description: Create a stack of glass components: - type: XAEApplyComponents applyIfAlreadyHave: true @@ -1193,9 +1413,45 @@ - id: SheetGlass - type: entity - id: XenoArtifactMaterialSpawnSteel + id: XenoArtifactMaterialSpawnSteelFew parent: BaseXenoArtifactEffect - description: Create steel + description: Create a bit of steel + components: + - type: XAEApplyComponents + applyIfAlreadyHave: true + refreshOnReactivate: true + components: + - type: EntityTableSpawner + deleteSpawnerAfterSpawn: false + spawnDetached: true + table: !type:GroupSelector + rolls: !type:RangeNumberSelector + range: 2, 4 + children: + - id: SheetSteel1 + +- type: entity + id: XenoArtifactMaterialSpawnSteelMany + parent: BaseXenoArtifactEffect + description: Create a lot of steel + components: + - type: XAEApplyComponents + applyIfAlreadyHave: true + refreshOnReactivate: true + components: + - type: EntityTableSpawner + deleteSpawnerAfterSpawn: false + spawnDetached: true + table: !type:GroupSelector + rolls: !type:RangeNumberSelector + range: 1, 3 + children: + - id: SheetSteel10 + +- type: entity + id: XenoArtifactMaterialSpawnSteelStack + parent: BaseXenoArtifactEffect + description: Create a stack of steel components: - type: XAEApplyComponents applyIfAlreadyHave: true @@ -1209,9 +1465,45 @@ - id: SheetSteel - type: entity - id: XenoArtifactMaterialSpawnPlastic + id: XenoArtifactMaterialSpawnPlasticFew + parent: BaseXenoArtifactEffect + description: Create a bit of platic + components: + - type: XAEApplyComponents + applyIfAlreadyHave: true + refreshOnReactivate: true + components: + - type: EntityTableSpawner + deleteSpawnerAfterSpawn: false + spawnDetached: true + table: !type:GroupSelector + rolls: !type:RangeNumberSelector + range: 2, 4 + children: + - id: SheetPlastic1 + +- type: entity + id: XenoArtifactMaterialSpawnPlasticMany + parent: BaseXenoArtifactEffect + description: Create a lot of plastic + components: + - type: XAEApplyComponents + applyIfAlreadyHave: true + refreshOnReactivate: true + components: + - type: EntityTableSpawner + deleteSpawnerAfterSpawn: false + spawnDetached: true + table: !type:GroupSelector + rolls: !type:RangeNumberSelector + range: 1, 3 + children: + - id: SheetPlastic10 + +- type: entity + id: XenoArtifactMaterialSpawnPlasticStack parent: BaseXenoArtifactEffect - description: Create plastic + description: Create a stack of plastic components: - type: XAEApplyComponents applyIfAlreadyHave: true @@ -1263,6 +1555,58 @@ messages: - shuffle-artifact-popup +- type: entity + id: XenoArtifactHealBrute + parent: BaseXenoArtifactEffect + description: Mends brute injuries + components: + - type: XAEDamageInArea + damageChance: 1 + radius: 8 + whitelist: + components: + - MobState + damage: + types: + Blunt: -50 + Piercing: -50 + Slash: -50 + +- type: entity + id: XenoArtifactHealBurn + parent: BaseXenoArtifactEffect + description: Soothes burn injuries + components: + - type: XAEDamageInArea + damageChance: 1 + radius: 8 + whitelist: + components: + - MobState + damage: + types: + Heat: -50 + Cold: -50 + Shock: -50 + +- type: entity + id: XenoArtifactHealRare + parent: BaseXenoArtifactEffect + description: Cures uncommon injuries + components: + - type: XAEDamageInArea + damageChance: 1 + radius: 8 + whitelist: + components: + - MobState + damage: + types: + Caustic: -50 + Poison: -50 + Radiation: -50 + Genetic: -50 + - type: entity id: XenoArtifactHealAll parent: BaseXenoArtifactEffect @@ -1276,12 +1620,16 @@ - MobState damage: types: - Blunt: -100 - Piercing: -100 - Slash: -100 - Heat: -100 - Cold: -100 - Shock: -100 + Blunt: -50 + Piercing: -50 + Slash: -50 + Heat: -50 + Cold: -50 + Shock: -50 + Caustic: -50 + Poison: -50 + Radiation: -50 + Genetic: -50 - type: entity id: XenoArtifactTesla