Mining Rebalance (#30920)
* first pass * this shit too * ok fix that shit * buff * actually fix that
This commit is contained in:
@@ -63,7 +63,7 @@ public sealed class SalvageMagnetBoundUserInterface : BoundUserInterface
|
|||||||
switch (offer)
|
switch (offer)
|
||||||
{
|
{
|
||||||
case AsteroidOffering asteroid:
|
case AsteroidOffering asteroid:
|
||||||
option.Title = Loc.GetString($"dungeon-config-proto-{asteroid.DungeonConfig.ID}");
|
option.Title = Loc.GetString($"dungeon-config-proto-{asteroid.Id}");
|
||||||
var layerKeys = asteroid.MarkerLayers.Keys.ToList();
|
var layerKeys = asteroid.MarkerLayers.Keys.ToList();
|
||||||
layerKeys.Sort();
|
layerKeys.Sort();
|
||||||
|
|
||||||
|
|||||||
@@ -623,14 +623,14 @@ public sealed partial class BiomeSystem : SharedBiomeSystem
|
|||||||
var groupSize = rand.Next(layerProto.MinGroupSize, layerProto.MaxGroupSize + 1);
|
var groupSize = rand.Next(layerProto.MinGroupSize, layerProto.MaxGroupSize + 1);
|
||||||
|
|
||||||
// While we have remaining tiles keep iterating
|
// While we have remaining tiles keep iterating
|
||||||
while (groupSize >= 0 && remainingTiles.Count > 0)
|
while (groupSize > 0 && remainingTiles.Count > 0)
|
||||||
{
|
{
|
||||||
var startNode = rand.PickAndTake(remainingTiles);
|
var startNode = rand.PickAndTake(remainingTiles);
|
||||||
frontier.Clear();
|
frontier.Clear();
|
||||||
frontier.Add(startNode);
|
frontier.Add(startNode);
|
||||||
|
|
||||||
// This essentially may lead to a vein being split in multiple areas but the count matters more than position.
|
// This essentially may lead to a vein being split in multiple areas but the count matters more than position.
|
||||||
while (frontier.Count > 0 && groupSize >= 0)
|
while (frontier.Count > 0 && groupSize > 0)
|
||||||
{
|
{
|
||||||
// Need to pick a random index so we don't just get straight lines of ores.
|
// Need to pick a random index so we don't just get straight lines of ores.
|
||||||
var frontierIndex = rand.Next(frontier.Count);
|
var frontierIndex = rand.Next(frontier.Count);
|
||||||
@@ -643,9 +643,6 @@ public sealed partial class BiomeSystem : SharedBiomeSystem
|
|||||||
{
|
{
|
||||||
for (var y = -1; y <= 1; y++)
|
for (var y = -1; y <= 1; y++)
|
||||||
{
|
{
|
||||||
if (x != 0 && y != 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
var neighbor = new Vector2i(node.X + x, node.Y + y);
|
var neighbor = new Vector2i(node.X + x, node.Y + y);
|
||||||
|
|
||||||
if (frontier.Contains(neighbor) || !remainingTiles.Contains(neighbor))
|
if (frontier.Contains(neighbor) || !remainingTiles.Contains(neighbor))
|
||||||
|
|||||||
@@ -88,14 +88,14 @@ public sealed partial class DungeonJob
|
|||||||
var groupSize = random.Next(gen.MinGroupSize, gen.MaxGroupSize + 1);
|
var groupSize = random.Next(gen.MinGroupSize, gen.MaxGroupSize + 1);
|
||||||
|
|
||||||
// While we have remaining tiles keep iterating
|
// While we have remaining tiles keep iterating
|
||||||
while (groupSize >= 0 && availableTiles.Count > 0)
|
while (groupSize > 0 && availableTiles.Count > 0)
|
||||||
{
|
{
|
||||||
var startNode = random.PickAndTake(availableTiles);
|
var startNode = random.PickAndTake(availableTiles);
|
||||||
frontier.Clear();
|
frontier.Clear();
|
||||||
frontier.Add(startNode);
|
frontier.Add(startNode);
|
||||||
|
|
||||||
// This essentially may lead to a vein being split in multiple areas but the count matters more than position.
|
// This essentially may lead to a vein being split in multiple areas but the count matters more than position.
|
||||||
while (frontier.Count > 0 && groupSize >= 0)
|
while (frontier.Count > 0 && groupSize > 0)
|
||||||
{
|
{
|
||||||
// Need to pick a random index so we don't just get straight lines of ores.
|
// Need to pick a random index so we don't just get straight lines of ores.
|
||||||
var frontierIndex = random.Next(frontier.Count);
|
var frontierIndex = random.Next(frontier.Count);
|
||||||
@@ -108,9 +108,6 @@ public sealed partial class DungeonJob
|
|||||||
{
|
{
|
||||||
for (var y = -1; y <= 1; y++)
|
for (var y = -1; y <= 1; y++)
|
||||||
{
|
{
|
||||||
if (x != 0 && y != 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
var neighbor = new Vector2i(node.X + x, node.Y + y);
|
var neighbor = new Vector2i(node.X + x, node.Y + y);
|
||||||
|
|
||||||
if (frontier.Contains(neighbor) || !availableTiles.Contains(neighbor))
|
if (frontier.Contains(neighbor) || !availableTiles.Contains(neighbor))
|
||||||
@@ -142,7 +139,7 @@ public sealed partial class DungeonJob
|
|||||||
|
|
||||||
if (groupSize > 0)
|
if (groupSize > 0)
|
||||||
{
|
{
|
||||||
_sawmill.Warning($"Found remaining group size for ore veins!");
|
_sawmill.Warning($"Found remaining group size for ore veins of {gen.Replacement ?? "null"}!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public sealed partial class DungeonJob : Job<List<Dungeon>>
|
|||||||
private EntityQuery<PhysicsComponent> _physicsQuery;
|
private EntityQuery<PhysicsComponent> _physicsQuery;
|
||||||
private EntityQuery<TransformComponent> _xformQuery;
|
private EntityQuery<TransformComponent> _xformQuery;
|
||||||
|
|
||||||
private readonly DungeonConfigPrototype _gen;
|
private readonly DungeonConfig _gen;
|
||||||
private readonly int _seed;
|
private readonly int _seed;
|
||||||
private readonly Vector2i _position;
|
private readonly Vector2i _position;
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ public sealed partial class DungeonJob : Job<List<Dungeon>>
|
|||||||
EntityLookupSystem lookup,
|
EntityLookupSystem lookup,
|
||||||
TileSystem tile,
|
TileSystem tile,
|
||||||
SharedTransformSystem transform,
|
SharedTransformSystem transform,
|
||||||
DungeonConfigPrototype gen,
|
DungeonConfig gen,
|
||||||
MapGridComponent grid,
|
MapGridComponent grid,
|
||||||
EntityUid gridUid,
|
EntityUid gridUid,
|
||||||
int seed,
|
int seed,
|
||||||
@@ -102,7 +102,7 @@ public sealed partial class DungeonJob : Job<List<Dungeon>>
|
|||||||
/// <param name="reserve">Should we reserve tiles even if the config doesn't specify.</param>
|
/// <param name="reserve">Should we reserve tiles even if the config doesn't specify.</param>
|
||||||
private async Task<List<Dungeon>> GetDungeons(
|
private async Task<List<Dungeon>> GetDungeons(
|
||||||
Vector2i position,
|
Vector2i position,
|
||||||
DungeonConfigPrototype config,
|
DungeonConfig config,
|
||||||
DungeonData data,
|
DungeonData data,
|
||||||
List<IDunGenLayer> layers,
|
List<IDunGenLayer> layers,
|
||||||
HashSet<Vector2i> reservedTiles,
|
HashSet<Vector2i> reservedTiles,
|
||||||
@@ -139,7 +139,7 @@ public sealed partial class DungeonJob : Job<List<Dungeon>>
|
|||||||
|
|
||||||
protected override async Task<List<Dungeon>?> Process()
|
protected override async Task<List<Dungeon>?> Process()
|
||||||
{
|
{
|
||||||
_sawmill.Info($"Generating dungeon {_gen.ID} with seed {_seed} on {_entManager.ToPrettyString(_gridUid)}");
|
_sawmill.Info($"Generating dungeon {_gen} with seed {_seed} on {_entManager.ToPrettyString(_gridUid)}");
|
||||||
_grid.CanSplit = false;
|
_grid.CanSplit = false;
|
||||||
var random = new Random(_seed);
|
var random = new Random(_seed);
|
||||||
var position = (_position + random.NextPolarVector2(_gen.MinOffset, _gen.MaxOffset)).Floored();
|
var position = (_position + random.NextPolarVector2(_gen.MinOffset, _gen.MaxOffset)).Floored();
|
||||||
@@ -177,7 +177,7 @@ public sealed partial class DungeonJob : Job<List<Dungeon>>
|
|||||||
int seed,
|
int seed,
|
||||||
Random random)
|
Random random)
|
||||||
{
|
{
|
||||||
_sawmill.Debug($"Doing postgen {layer.GetType()} for {_gen.ID} with seed {_seed}");
|
_sawmill.Debug($"Doing postgen {layer.GetType()} for {_gen} with seed {_seed}");
|
||||||
|
|
||||||
// If there's a way to just call the methods directly for the love of god tell me.
|
// If there's a way to just call the methods directly for the love of god tell me.
|
||||||
// Some of these don't care about reservedtiles because they only operate on dungeon tiles (which should
|
// Some of these don't care about reservedtiles because they only operate on dungeon tiles (which should
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ public sealed partial class DungeonSystem : SharedDungeonSystem
|
|||||||
return mapId;
|
return mapId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GenerateDungeon(DungeonConfigPrototype gen,
|
public void GenerateDungeon(DungeonConfig gen,
|
||||||
EntityUid gridUid,
|
EntityUid gridUid,
|
||||||
MapGridComponent grid,
|
MapGridComponent grid,
|
||||||
Vector2i position,
|
Vector2i position,
|
||||||
@@ -214,7 +214,7 @@ public sealed partial class DungeonSystem : SharedDungeonSystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async Task<List<Dungeon>> GenerateDungeonAsync(
|
public async Task<List<Dungeon>> GenerateDungeonAsync(
|
||||||
DungeonConfigPrototype gen,
|
DungeonConfig gen,
|
||||||
EntityUid gridUid,
|
EntityUid gridUid,
|
||||||
MapGridComponent grid,
|
MapGridComponent grid,
|
||||||
Vector2i position,
|
Vector2i position,
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ public sealed class SpawnSalvageMissionJob : Job<bool>
|
|||||||
var dungeonOffset = new Vector2(0f, dungeonOffsetDistance);
|
var dungeonOffset = new Vector2(0f, dungeonOffsetDistance);
|
||||||
dungeonOffset = dungeonRotation.RotateVec(dungeonOffset);
|
dungeonOffset = dungeonRotation.RotateVec(dungeonOffset);
|
||||||
var dungeonMod = _prototypeManager.Index<SalvageDungeonModPrototype>(mission.Dungeon);
|
var dungeonMod = _prototypeManager.Index<SalvageDungeonModPrototype>(mission.Dungeon);
|
||||||
var dungeonConfig = _prototypeManager.Index<DungeonConfigPrototype>(dungeonMod.Proto);
|
var dungeonConfig = _prototypeManager.Index(dungeonMod.Proto);
|
||||||
var dungeons = await WaitAsyncTask(_dungeon.GenerateDungeonAsync(dungeonConfig, mapUid, grid, (Vector2i) dungeonOffset,
|
var dungeons = await WaitAsyncTask(_dungeon.GenerateDungeonAsync(dungeonConfig, mapUid, grid, (Vector2i) dungeonOffset,
|
||||||
_missionParams.Seed));
|
_missionParams.Seed));
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,12 @@ public partial struct MinMax
|
|||||||
Max = max;
|
Max = max;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Next(IRobustRandom random)
|
public readonly int Next(IRobustRandom random)
|
||||||
|
{
|
||||||
|
return random.Next(Min, Max + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public readonly int Next(System.Random random)
|
||||||
{
|
{
|
||||||
return random.Next(Min, Max + 1);
|
return random.Next(Min, Max + 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,10 @@
|
|||||||
using Content.Shared.Procedural.PostGeneration;
|
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
|
|
||||||
namespace Content.Shared.Procedural;
|
namespace Content.Shared.Procedural;
|
||||||
|
|
||||||
[Prototype]
|
[Virtual, DataDefinition]
|
||||||
public sealed partial class DungeonConfigPrototype : IPrototype
|
public partial class DungeonConfig
|
||||||
{
|
{
|
||||||
[IdDataField]
|
|
||||||
public string ID { get; private set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <see cref="Data"/>
|
/// <see cref="Data"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -18,7 +14,7 @@ public sealed partial class DungeonConfigPrototype : IPrototype
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The secret sauce, procedural generation layers that get run.
|
/// The secret sauce, procedural generation layers that get run.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField(required: true)]
|
[DataField]
|
||||||
public List<IDunGenLayer> Layers = new();
|
public List<IDunGenLayer> Layers = new();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -51,3 +47,10 @@ public sealed partial class DungeonConfigPrototype : IPrototype
|
|||||||
[DataField]
|
[DataField]
|
||||||
public int MaxOffset;
|
public int MaxOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Prototype]
|
||||||
|
public sealed class DungeonConfigPrototype : DungeonConfig, IPrototype
|
||||||
|
{
|
||||||
|
[IdDataField]
|
||||||
|
public string ID { get; private set; } = default!;
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@ using Robust.Shared.Prototypes;
|
|||||||
namespace Content.Shared.Procedural.DungeonGenerators;
|
namespace Content.Shared.Procedural.DungeonGenerators;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Runs another <see cref="DungeonConfigPrototype"/>.
|
/// Runs another <see cref="DungeonConfig"/>.
|
||||||
/// Used for storing data on 1 system.
|
/// Used for storing data on 1 system.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed partial class PrototypeDunGen : IDunGenLayer
|
public sealed partial class PrototypeDunGen : IDunGenLayer
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ namespace Content.Shared.Procedural.DungeonLayers;
|
|||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Generates on top of existing entities for sanity reasons moreso than performance.
|
/// Generates on top of existing entities for sanity reasons moreso than performance.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public sealed partial class OreDunGen : IDunGenLayer
|
[Virtual]
|
||||||
|
public partial class OreDunGen : IDunGenLayer
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If the vein generation should occur on top of existing entities what are we replacing.
|
/// If the vein generation should occur on top of existing entities what are we replacing.
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
using Robust.Shared.Prototypes;
|
||||||
|
|
||||||
|
namespace Content.Shared.Procedural.DungeonLayers;
|
||||||
|
|
||||||
|
[Prototype]
|
||||||
|
public sealed partial class OreDunGenPrototype : OreDunGen, IPrototype
|
||||||
|
{
|
||||||
|
[IdDataField]
|
||||||
|
public string ID { set; get; } = default!;
|
||||||
|
}
|
||||||
@@ -23,6 +23,6 @@ public sealed partial class SalvageDungeonModPrototype : IPrototype, IBiomeSpeci
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The config to use for spawning the dungeon.
|
/// The config to use for spawning the dungeon.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField("proto", customTypeSerializer: typeof(PrototypeIdSerializer<DungeonConfigPrototype>), required: true)]
|
[DataField(required: true)]
|
||||||
public string Proto = string.Empty;
|
public ProtoId<DungeonConfigPrototype> Proto = string.Empty;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ namespace Content.Shared.Salvage.Magnet;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public record struct AsteroidOffering : ISalvageMagnetOffering
|
public record struct AsteroidOffering : ISalvageMagnetOffering
|
||||||
{
|
{
|
||||||
public DungeonConfigPrototype DungeonConfig;
|
public string Id;
|
||||||
|
|
||||||
|
public DungeonConfig DungeonConfig;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Calculated marker layers for the asteroid.
|
/// Calculated marker layers for the asteroid.
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
|
using Content.Shared.Destructible.Thresholds;
|
||||||
using Content.Shared.Procedural;
|
using Content.Shared.Procedural;
|
||||||
using Content.Shared.Procedural.PostGeneration;
|
using Content.Shared.Procedural.DungeonLayers;
|
||||||
|
using Content.Shared.Random;
|
||||||
using Content.Shared.Random.Helpers;
|
using Content.Shared.Random.Helpers;
|
||||||
using Content.Shared.Salvage.Magnet;
|
using Content.Shared.Salvage.Magnet;
|
||||||
using Content.Shared.Store;
|
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
|
||||||
@@ -20,6 +21,10 @@ public abstract partial class SharedSalvageSystem
|
|||||||
"SwissCheeseAsteroid"
|
"SwissCheeseAsteroid"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private readonly ProtoId<WeightedRandomPrototype> _asteroidOreWeights = "AsteroidOre";
|
||||||
|
|
||||||
|
private readonly MinMax _asteroidOreCount = new(5, 7);
|
||||||
|
|
||||||
public ISalvageMagnetOffering GetSalvageOffering(int seed)
|
public ISalvageMagnetOffering GetSalvageOffering(int seed)
|
||||||
{
|
{
|
||||||
var rand = new System.Random(seed);
|
var rand = new System.Random(seed);
|
||||||
@@ -27,33 +32,40 @@ public abstract partial class SharedSalvageSystem
|
|||||||
// Asteroid seed
|
// Asteroid seed
|
||||||
if (seed % 2 == 0)
|
if (seed % 2 == 0)
|
||||||
{
|
{
|
||||||
var config = _asteroidConfigs[rand.Next(_asteroidConfigs.Count)];
|
var configId = _asteroidConfigs[rand.Next(_asteroidConfigs.Count)];
|
||||||
var configProto = _proto.Index(config);
|
var configProto =_proto.Index(configId);
|
||||||
var layers = new Dictionary<string, int>();
|
var layers = new Dictionary<string, int>();
|
||||||
|
|
||||||
// If we ever add more random layers will need to Next on these.
|
var data = new DungeonData();
|
||||||
foreach (var layer in configProto.Layers)
|
data.Apply(configProto.Data);
|
||||||
|
|
||||||
|
var config = new DungeonConfig()
|
||||||
{
|
{
|
||||||
switch (layer)
|
Data = data,
|
||||||
|
Layers = new(configProto.Layers),
|
||||||
|
MaxCount = configProto.MaxCount,
|
||||||
|
MaxOffset = configProto.MaxOffset,
|
||||||
|
MinCount = configProto.MinCount,
|
||||||
|
MinOffset = configProto.MinOffset,
|
||||||
|
ReserveTiles = configProto.ReserveTiles
|
||||||
|
};
|
||||||
|
|
||||||
|
var count = _asteroidOreCount.Next(rand);
|
||||||
|
var weightedProto = _proto.Index(_asteroidOreWeights);
|
||||||
|
for (var i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
case BiomeDunGen:
|
var ore = weightedProto.Pick(rand);
|
||||||
rand.Next();
|
config.Layers.Add(_proto.Index<OreDunGenPrototype>(ore));
|
||||||
break;
|
|
||||||
case BiomeMarkerLayerDunGen marker:
|
var layerCount = layers.GetOrNew(ore);
|
||||||
for (var i = 0; i < marker.Count; i++)
|
|
||||||
{
|
|
||||||
var proto = _proto.Index(marker.MarkerTemplate).Pick(rand);
|
|
||||||
var layerCount = layers.GetOrNew(proto);
|
|
||||||
layerCount++;
|
layerCount++;
|
||||||
layers[proto] = layerCount;
|
layers[ore] = layerCount;
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return new AsteroidOffering
|
return new AsteroidOffering
|
||||||
{
|
{
|
||||||
DungeonConfig = configProto,
|
Id = configId,
|
||||||
|
DungeonConfig = config,
|
||||||
MarkerLayers = layers,
|
MarkerLayers = layers,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ salvage-magnet-resources = {$resource ->
|
|||||||
[OrePlasma] Plasma
|
[OrePlasma] Plasma
|
||||||
[OreUranium] Uranium
|
[OreUranium] Uranium
|
||||||
[OreArtifactFragment] Artifact fragments
|
[OreArtifactFragment] Artifact fragments
|
||||||
|
[OreBananium] Bananium
|
||||||
*[other] {$resource}
|
*[other] {$resource}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
- type: Material
|
- type: Material
|
||||||
- type: PhysicalComposition
|
- type: PhysicalComposition
|
||||||
materialComposition:
|
materialComposition:
|
||||||
RawGold: 500
|
RawGold: 100
|
||||||
- type: Extractable
|
- type: Extractable
|
||||||
grindableSolutionName: goldore
|
grindableSolutionName: goldore
|
||||||
- type: SolutionContainerManager
|
- type: SolutionContainerManager
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
- type: Material
|
- type: Material
|
||||||
- type: PhysicalComposition
|
- type: PhysicalComposition
|
||||||
materialComposition:
|
materialComposition:
|
||||||
RawDiamond: 500
|
RawDiamond: 100
|
||||||
- type: Extractable
|
- type: Extractable
|
||||||
grindableSolutionName: diamondore
|
grindableSolutionName: diamondore
|
||||||
- type: SolutionContainerManager
|
- type: SolutionContainerManager
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
- type: Material
|
- type: Material
|
||||||
- type: PhysicalComposition
|
- type: PhysicalComposition
|
||||||
materialComposition:
|
materialComposition:
|
||||||
RawIron: 500
|
RawIron: 100
|
||||||
- type: Extractable
|
- type: Extractable
|
||||||
grindableSolutionName: ironore
|
grindableSolutionName: ironore
|
||||||
- type: SolutionContainerManager
|
- type: SolutionContainerManager
|
||||||
@@ -141,7 +141,7 @@
|
|||||||
- type: Material
|
- type: Material
|
||||||
- type: PhysicalComposition
|
- type: PhysicalComposition
|
||||||
materialComposition:
|
materialComposition:
|
||||||
RawPlasma: 500
|
RawPlasma: 100
|
||||||
- type: PointLight
|
- type: PointLight
|
||||||
radius: 1.2
|
radius: 1.2
|
||||||
energy: 0.6
|
energy: 0.6
|
||||||
@@ -177,7 +177,7 @@
|
|||||||
- type: Material
|
- type: Material
|
||||||
- type: PhysicalComposition
|
- type: PhysicalComposition
|
||||||
materialComposition:
|
materialComposition:
|
||||||
RawSilver: 500
|
RawSilver: 100
|
||||||
- type: Extractable
|
- type: Extractable
|
||||||
grindableSolutionName: silverore
|
grindableSolutionName: silverore
|
||||||
- type: SolutionContainerManager
|
- type: SolutionContainerManager
|
||||||
@@ -208,7 +208,7 @@
|
|||||||
- type: Material
|
- type: Material
|
||||||
- type: PhysicalComposition
|
- type: PhysicalComposition
|
||||||
materialComposition:
|
materialComposition:
|
||||||
RawQuartz: 500
|
RawQuartz: 100
|
||||||
- type: Extractable
|
- type: Extractable
|
||||||
grindableSolutionName: quartzore
|
grindableSolutionName: quartzore
|
||||||
- type: SolutionContainerManager
|
- type: SolutionContainerManager
|
||||||
@@ -239,7 +239,7 @@
|
|||||||
- type: Material
|
- type: Material
|
||||||
- type: PhysicalComposition
|
- type: PhysicalComposition
|
||||||
materialComposition:
|
materialComposition:
|
||||||
RawUranium: 500
|
RawUranium: 100
|
||||||
- type: PointLight
|
- type: PointLight
|
||||||
radius: 1.2
|
radius: 1.2
|
||||||
energy: 0.8
|
energy: 0.8
|
||||||
@@ -278,7 +278,7 @@
|
|||||||
- type: Material
|
- type: Material
|
||||||
- type: PhysicalComposition
|
- type: PhysicalComposition
|
||||||
materialComposition:
|
materialComposition:
|
||||||
RawBananium: 500
|
RawBananium: 100
|
||||||
- type: PointLight
|
- type: PointLight
|
||||||
radius: 1.2
|
radius: 1.2
|
||||||
energy: 1
|
energy: 1
|
||||||
@@ -334,7 +334,7 @@
|
|||||||
Quantity: 0.1
|
Quantity: 0.1
|
||||||
- type: PhysicalComposition
|
- type: PhysicalComposition
|
||||||
materialComposition:
|
materialComposition:
|
||||||
Coal: 500
|
Coal: 100
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: Coal
|
parent: Coal
|
||||||
@@ -357,7 +357,7 @@
|
|||||||
- type: Material
|
- type: Material
|
||||||
- type: PhysicalComposition
|
- type: PhysicalComposition
|
||||||
materialComposition:
|
materialComposition:
|
||||||
RawSalt: 500
|
RawSalt: 100
|
||||||
- type: Extractable
|
- type: Extractable
|
||||||
grindableSolutionName: saltore
|
grindableSolutionName: saltore
|
||||||
- type: SolutionContainerManager
|
- type: SolutionContainerManager
|
||||||
|
|||||||
@@ -1,24 +1,10 @@
|
|||||||
- type: weightedRandom
|
|
||||||
id: AsteroidOre
|
|
||||||
weights:
|
|
||||||
OreIron: 1.0
|
|
||||||
OreQuartz: 1.0
|
|
||||||
OreCoal: 1.0
|
|
||||||
OreSalt: 1.0
|
|
||||||
OreGold: 0.25
|
|
||||||
OreDiamond: 0.05
|
|
||||||
OreSilver: 0.25
|
|
||||||
OrePlasma: 0.15
|
|
||||||
OreUranium: 0.15
|
|
||||||
OreArtifactFragment: 0.15
|
|
||||||
|
|
||||||
# Large asteroids, typically 1
|
# Large asteroids, typically 1
|
||||||
- type: dungeonConfig
|
- type: dungeonConfig
|
||||||
id: BlobAsteroid
|
id: BlobAsteroid
|
||||||
# Floor generation
|
# Floor generation
|
||||||
layers:
|
layers:
|
||||||
- !type:NoiseDunGen
|
- !type:NoiseDunGen
|
||||||
tileCap: 1500
|
tileCap: 1000
|
||||||
capStd: 32
|
capStd: 32
|
||||||
iterations: 3
|
iterations: 3
|
||||||
layers:
|
layers:
|
||||||
@@ -35,10 +21,6 @@
|
|||||||
- !type:BiomeDunGen
|
- !type:BiomeDunGen
|
||||||
biomeTemplate: Asteroid
|
biomeTemplate: Asteroid
|
||||||
|
|
||||||
# Generate ore veins
|
|
||||||
- !type:BiomeMarkerLayerDunGen
|
|
||||||
markerTemplate: AsteroidOre
|
|
||||||
|
|
||||||
# Multiple smaller asteroids
|
# Multiple smaller asteroids
|
||||||
# This is a pain so we generate fewer tiles
|
# This is a pain so we generate fewer tiles
|
||||||
- type: dungeonConfig
|
- type: dungeonConfig
|
||||||
@@ -46,7 +28,7 @@
|
|||||||
# Floor generation
|
# Floor generation
|
||||||
layers:
|
layers:
|
||||||
- !type:NoiseDunGen
|
- !type:NoiseDunGen
|
||||||
tileCap: 1000
|
tileCap: 750
|
||||||
capStd: 32
|
capStd: 32
|
||||||
layers:
|
layers:
|
||||||
- tile: FloorAsteroidSand
|
- tile: FloorAsteroidSand
|
||||||
@@ -62,17 +44,13 @@
|
|||||||
- !type:BiomeDunGen
|
- !type:BiomeDunGen
|
||||||
biomeTemplate: Asteroid
|
biomeTemplate: Asteroid
|
||||||
|
|
||||||
# Generate ore veins
|
|
||||||
- !type:BiomeMarkerLayerDunGen
|
|
||||||
markerTemplate: AsteroidOre
|
|
||||||
|
|
||||||
# Long and spindly, less smooth than blob
|
# Long and spindly, less smooth than blob
|
||||||
- type: dungeonConfig
|
- type: dungeonConfig
|
||||||
id: SpindlyAsteroid
|
id: SpindlyAsteroid
|
||||||
# Floor generation
|
# Floor generation
|
||||||
layers:
|
layers:
|
||||||
- !type:NoiseDunGen
|
- !type:NoiseDunGen
|
||||||
tileCap: 1500
|
tileCap: 1000
|
||||||
capStd: 32
|
capStd: 32
|
||||||
layers:
|
layers:
|
||||||
- tile: FloorAsteroidSand
|
- tile: FloorAsteroidSand
|
||||||
@@ -89,17 +67,13 @@
|
|||||||
- !type:BiomeDunGen
|
- !type:BiomeDunGen
|
||||||
biomeTemplate: Asteroid
|
biomeTemplate: Asteroid
|
||||||
|
|
||||||
# Generate ore veins
|
|
||||||
- !type:BiomeMarkerLayerDunGen
|
|
||||||
markerTemplate: AsteroidOre
|
|
||||||
|
|
||||||
# Lots of holes in it
|
# Lots of holes in it
|
||||||
- type: dungeonConfig
|
- type: dungeonConfig
|
||||||
id: SwissCheeseAsteroid
|
id: SwissCheeseAsteroid
|
||||||
# Floor generation
|
# Floor generation
|
||||||
layers:
|
layers:
|
||||||
- !type:NoiseDunGen
|
- !type:NoiseDunGen
|
||||||
tileCap: 1500
|
tileCap: 1000
|
||||||
capStd: 32
|
capStd: 32
|
||||||
layers:
|
layers:
|
||||||
- tile: FloorAsteroidSand
|
- tile: FloorAsteroidSand
|
||||||
@@ -114,7 +88,3 @@
|
|||||||
# Generate biome
|
# Generate biome
|
||||||
- !type:BiomeDunGen
|
- !type:BiomeDunGen
|
||||||
biomeTemplate: Asteroid
|
biomeTemplate: Asteroid
|
||||||
|
|
||||||
# Generate ore veins
|
|
||||||
- !type:BiomeMarkerLayerDunGen
|
|
||||||
markerTemplate: AsteroidOre
|
|
||||||
|
|||||||
95
Resources/Prototypes/Procedural/Magnet/asteroid_ore_gens.yml
Normal file
95
Resources/Prototypes/Procedural/Magnet/asteroid_ore_gens.yml
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
- type: weightedRandom
|
||||||
|
id: AsteroidOre
|
||||||
|
weights:
|
||||||
|
OreIron: 1.0
|
||||||
|
OreQuartz: 1.0
|
||||||
|
OreCoal: 0.33
|
||||||
|
OreSalt: 0.25
|
||||||
|
OreGold: 0.25
|
||||||
|
OreSilver: 0.25
|
||||||
|
OrePlasma: 0.15
|
||||||
|
OreUranium: 0.15
|
||||||
|
OreArtifactFragment: 0.10
|
||||||
|
OreBananium: 0.10
|
||||||
|
|
||||||
|
- type: oreDunGen
|
||||||
|
id: OreIron
|
||||||
|
replacement: AsteroidRock
|
||||||
|
entity: AsteroidRockTin
|
||||||
|
count: 5
|
||||||
|
minGroupSize: 5
|
||||||
|
maxGroupSize: 7
|
||||||
|
|
||||||
|
- type: oreDunGen
|
||||||
|
id: OreQuartz
|
||||||
|
replacement: AsteroidRock
|
||||||
|
entity: AsteroidRockQuartz
|
||||||
|
count: 5
|
||||||
|
minGroupSize: 5
|
||||||
|
maxGroupSize: 7
|
||||||
|
|
||||||
|
- type: oreDunGen
|
||||||
|
id: OreCoal
|
||||||
|
replacement: AsteroidRock
|
||||||
|
entity: AsteroidRockCoal
|
||||||
|
count: 3
|
||||||
|
minGroupSize: 5
|
||||||
|
maxGroupSize: 7
|
||||||
|
|
||||||
|
- type: oreDunGen
|
||||||
|
id: OreSalt
|
||||||
|
replacement: AsteroidRock
|
||||||
|
entity: AsteroidRockSalt
|
||||||
|
count: 3
|
||||||
|
minGroupSize: 5
|
||||||
|
maxGroupSize: 7
|
||||||
|
|
||||||
|
- type: oreDunGen
|
||||||
|
id: OreGold
|
||||||
|
replacement: AsteroidRock
|
||||||
|
entity: AsteroidRockGold
|
||||||
|
count: 4
|
||||||
|
minGroupSize: 4
|
||||||
|
maxGroupSize: 6
|
||||||
|
|
||||||
|
- type: oreDunGen
|
||||||
|
id: OreSilver
|
||||||
|
replacement: AsteroidRock
|
||||||
|
entity: AsteroidRockSilver
|
||||||
|
count: 4
|
||||||
|
minGroupSize: 4
|
||||||
|
maxGroupSize: 6
|
||||||
|
|
||||||
|
- type: oreDunGen
|
||||||
|
id: OrePlasma
|
||||||
|
replacement: AsteroidRock
|
||||||
|
entity: AsteroidRockPlasma
|
||||||
|
count: 4
|
||||||
|
minGroupSize: 3
|
||||||
|
maxGroupSize: 6
|
||||||
|
|
||||||
|
- type: oreDunGen
|
||||||
|
id: OreUranium
|
||||||
|
replacement: AsteroidRock
|
||||||
|
entity: AsteroidRockUranium
|
||||||
|
count: 4
|
||||||
|
minGroupSize: 3
|
||||||
|
maxGroupSize: 6
|
||||||
|
|
||||||
|
- type: oreDunGen
|
||||||
|
id: OreBananium
|
||||||
|
replacement: AsteroidRock
|
||||||
|
entity: AsteroidRockBananium
|
||||||
|
count: 6
|
||||||
|
minGroupSize: 3
|
||||||
|
maxGroupSize: 6
|
||||||
|
|
||||||
|
- type: oreDunGen
|
||||||
|
id: OreArtifactFragment
|
||||||
|
replacement: AsteroidRock
|
||||||
|
entity: AsteroidRockArtifactFragment
|
||||||
|
count: 5
|
||||||
|
minGroupSize: 1
|
||||||
|
maxGroupSize: 2
|
||||||
|
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
WallRockSnow: WallRockSnowTin
|
WallRockSnow: WallRockSnowTin
|
||||||
maxCount: 30
|
maxCount: 30
|
||||||
minGroupSize: 10
|
minGroupSize: 10
|
||||||
maxGroupSize: 20
|
maxGroupSize: 15
|
||||||
radius: 4
|
radius: 4
|
||||||
|
|
||||||
- type: biomeMarkerLayer
|
- type: biomeMarkerLayer
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
WallRockSnow: WallRockSnowQuartz
|
WallRockSnow: WallRockSnowQuartz
|
||||||
maxCount: 30
|
maxCount: 30
|
||||||
minGroupSize: 10
|
minGroupSize: 10
|
||||||
maxGroupSize: 20
|
maxGroupSize: 15
|
||||||
radius: 4
|
radius: 4
|
||||||
|
|
||||||
- type: biomeMarkerLayer
|
- type: biomeMarkerLayer
|
||||||
@@ -36,8 +36,8 @@
|
|||||||
WallRockSand: WallRockSandCoal
|
WallRockSand: WallRockSandCoal
|
||||||
WallRockSnow: WallRockSnowCoal
|
WallRockSnow: WallRockSnowCoal
|
||||||
maxCount: 30
|
maxCount: 30
|
||||||
minGroupSize: 10
|
minGroupSize: 8
|
||||||
maxGroupSize: 20
|
maxGroupSize: 12
|
||||||
radius: 4
|
radius: 4
|
||||||
|
|
||||||
- type: biomeMarkerLayer
|
- type: biomeMarkerLayer
|
||||||
@@ -50,8 +50,8 @@
|
|||||||
WallRockSand: WallRockSandSalt
|
WallRockSand: WallRockSandSalt
|
||||||
WallRockSnow: WallRockSnowSalt
|
WallRockSnow: WallRockSnowSalt
|
||||||
maxCount: 30
|
maxCount: 30
|
||||||
minGroupSize: 10
|
minGroupSize: 8
|
||||||
maxGroupSize: 20
|
maxGroupSize: 12
|
||||||
radius: 4
|
radius: 4
|
||||||
|
|
||||||
# Medium value
|
# Medium value
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
WallRockChromite: WallRockChromiteGold
|
WallRockChromite: WallRockChromiteGold
|
||||||
WallRockSand: WallRockSandGold
|
WallRockSand: WallRockSandGold
|
||||||
WallRockSnow: WallRockSnowGold
|
WallRockSnow: WallRockSnowGold
|
||||||
maxCount: 30
|
maxCount: 20
|
||||||
minGroupSize: 5
|
minGroupSize: 5
|
||||||
maxGroupSize: 10
|
maxGroupSize: 10
|
||||||
radius: 4
|
radius: 4
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
WallRockChromite: WallRockChromiteSilver
|
WallRockChromite: WallRockChromiteSilver
|
||||||
WallRockSand: WallRockSandSilver
|
WallRockSand: WallRockSandSilver
|
||||||
WallRockSnow: WallRockSnowSilver
|
WallRockSnow: WallRockSnowSilver
|
||||||
maxCount: 30
|
maxCount: 20
|
||||||
minGroupSize: 5
|
minGroupSize: 5
|
||||||
maxGroupSize: 10
|
maxGroupSize: 10
|
||||||
radius: 4
|
radius: 4
|
||||||
@@ -97,8 +97,8 @@
|
|||||||
WallRockSand: WallRockSandPlasma
|
WallRockSand: WallRockSandPlasma
|
||||||
WallRockSnow: WallRockSnowPlasma
|
WallRockSnow: WallRockSnowPlasma
|
||||||
maxCount: 12
|
maxCount: 12
|
||||||
minGroupSize: 5
|
minGroupSize: 4
|
||||||
maxGroupSize: 10
|
maxGroupSize: 8
|
||||||
radius: 4
|
radius: 4
|
||||||
|
|
||||||
# Uranium
|
# Uranium
|
||||||
@@ -111,23 +111,9 @@
|
|||||||
WallRockChromite: WallRockChromiteUranium
|
WallRockChromite: WallRockChromiteUranium
|
||||||
WallRockSand: WallRockSandUranium
|
WallRockSand: WallRockSandUranium
|
||||||
WallRockSnow: WallRockSnowUranium
|
WallRockSnow: WallRockSnowUranium
|
||||||
maxCount: 12
|
maxCount: 15
|
||||||
minGroupSize: 5
|
minGroupSize: 4
|
||||||
maxGroupSize: 10
|
maxGroupSize: 8
|
||||||
radius: 4
|
|
||||||
|
|
||||||
- type: biomeMarkerLayer
|
|
||||||
id: OreBananium
|
|
||||||
entityMask:
|
|
||||||
AsteroidRock: AsteroidRockBananium
|
|
||||||
WallRock: WallRockBananium
|
|
||||||
WallRockBasalt: WallRockBasaltBananium
|
|
||||||
WallRockChromite: WallRockChromiteBananium
|
|
||||||
WallRockSand: WallRockSandBananium
|
|
||||||
WallRockSnow: WallRockSnowBananium
|
|
||||||
maxCount: 12
|
|
||||||
minGroupSize: 5
|
|
||||||
maxGroupSize: 10
|
|
||||||
radius: 4
|
radius: 4
|
||||||
|
|
||||||
- type: biomeMarkerLayer
|
- type: biomeMarkerLayer
|
||||||
|
|||||||
@@ -171,13 +171,6 @@
|
|||||||
- !type:BiomeMarkerLoot
|
- !type:BiomeMarkerLoot
|
||||||
proto: OreUranium
|
proto: OreUranium
|
||||||
|
|
||||||
- type: salvageLoot
|
|
||||||
id: OreBananium
|
|
||||||
guaranteed: true
|
|
||||||
loots:
|
|
||||||
- !type:BiomeMarkerLoot
|
|
||||||
proto: OreBananium
|
|
||||||
|
|
||||||
- type: salvageLoot
|
- type: salvageLoot
|
||||||
id: OreDiamond
|
id: OreDiamond
|
||||||
guaranteed: true
|
guaranteed: true
|
||||||
|
|||||||
@@ -26,62 +26,56 @@
|
|||||||
replacement: IronRock
|
replacement: IronRock
|
||||||
entity: IronRockIron
|
entity: IronRockIron
|
||||||
count: 50
|
count: 50
|
||||||
minGroupSize: 20
|
minGroupSize: 10
|
||||||
maxGroupSize: 30
|
maxGroupSize: 15
|
||||||
- !type:OreDunGen
|
- !type:OreDunGen
|
||||||
replacement: IronRock
|
replacement: IronRock
|
||||||
entity: IronRockCoal
|
entity: IronRockCoal
|
||||||
count: 50
|
count: 50
|
||||||
minGroupSize: 20
|
minGroupSize: 8
|
||||||
maxGroupSize: 30
|
maxGroupSize: 12
|
||||||
- !type:OreDunGen
|
- !type:OreDunGen
|
||||||
replacement: IronRock
|
replacement: IronRock
|
||||||
entity: IronRockQuartz
|
entity: IronRockQuartz
|
||||||
count: 50
|
count: 50
|
||||||
minGroupSize: 20
|
minGroupSize: 10
|
||||||
maxGroupSize: 30
|
maxGroupSize: 15
|
||||||
- !type:OreDunGen
|
- !type:OreDunGen
|
||||||
replacement: IronRock
|
replacement: IronRock
|
||||||
entity: IronRockSalt
|
entity: IronRockSalt
|
||||||
count: 50
|
count: 50
|
||||||
minGroupSize: 20
|
minGroupSize: 8
|
||||||
maxGroupSize: 30
|
maxGroupSize: 12
|
||||||
- !type:OreDunGen
|
- !type:OreDunGen
|
||||||
replacement: IronRock
|
replacement: IronRock
|
||||||
entity: IronRockGold
|
entity: IronRockGold
|
||||||
count: 50
|
count: 40
|
||||||
minGroupSize: 10
|
minGroupSize: 8
|
||||||
maxGroupSize: 20
|
maxGroupSize: 12
|
||||||
- !type:OreDunGen
|
- !type:OreDunGen
|
||||||
replacement: IronRock
|
replacement: IronRock
|
||||||
entity: IronRockSilver
|
entity: IronRockSilver
|
||||||
count: 50
|
count: 40
|
||||||
minGroupSize: 10
|
minGroupSize: 8
|
||||||
maxGroupSize: 20
|
maxGroupSize: 12
|
||||||
- !type:OreDunGen
|
- !type:OreDunGen
|
||||||
replacement: IronRock
|
replacement: IronRock
|
||||||
entity: IronRockPlasma
|
entity: IronRockPlasma
|
||||||
count: 50
|
count: 35
|
||||||
minGroupSize: 10
|
minGroupSize: 4
|
||||||
maxGroupSize: 20
|
maxGroupSize: 8
|
||||||
- !type:OreDunGen
|
- !type:OreDunGen
|
||||||
replacement: IronRock
|
replacement: IronRock
|
||||||
entity: IronRockUranium
|
entity: IronRockUranium
|
||||||
count: 50
|
count: 35
|
||||||
minGroupSize: 10
|
minGroupSize: 4
|
||||||
maxGroupSize: 20
|
maxGroupSize: 8
|
||||||
- !type:OreDunGen
|
|
||||||
replacement: IronRock
|
|
||||||
entity: IronRockBananium
|
|
||||||
count: 50
|
|
||||||
minGroupSize: 10
|
|
||||||
maxGroupSize: 20
|
|
||||||
- !type:OreDunGen
|
- !type:OreDunGen
|
||||||
replacement: IronRock
|
replacement: IronRock
|
||||||
entity: IronRockArtifactFragment
|
entity: IronRockArtifactFragment
|
||||||
count: 50
|
count: 25
|
||||||
minGroupSize: 2
|
minGroupSize: 1
|
||||||
maxGroupSize: 4
|
maxGroupSize: 3
|
||||||
- !type:OreDunGen
|
- !type:OreDunGen
|
||||||
replacement: IronRock
|
replacement: IronRock
|
||||||
entity: IronRockDiamond
|
entity: IronRockDiamond
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
id: OreBananium
|
id: OreBananium
|
||||||
oreEntity: BananiumOre1
|
oreEntity: BananiumOre1
|
||||||
minOreYield: 1
|
minOreYield: 1
|
||||||
maxOreYield: 3
|
maxOreYield: 2
|
||||||
|
|
||||||
- type: ore
|
- type: ore
|
||||||
id: OreDiamond
|
id: OreDiamond
|
||||||
@@ -83,8 +83,8 @@
|
|||||||
- type: ore
|
- type: ore
|
||||||
id: OreArtifactFragment
|
id: OreArtifactFragment
|
||||||
oreEntity: ArtifactFragment1
|
oreEntity: ArtifactFragment1
|
||||||
minOreYield: 2
|
minOreYield: 1
|
||||||
maxOreYield: 4
|
maxOreYield: 3
|
||||||
|
|
||||||
- type: weightedRandomOre
|
- type: weightedRandomOre
|
||||||
id: RandomOreDistributionStandard
|
id: RandomOreDistributionStandard
|
||||||
|
|||||||
Reference in New Issue
Block a user