Demiplane modifiers groups & tiers (#678)

* data setup

* demiplanes modficators combine refactor

* generationProb

* demiplane tiers setup

* migration, and t2 loots

* t2 balance tweaks

* retags

* weather modifiers group

* maplight modifiers

* more passed checks

* wanderer buy positions localization fix

* fixes
This commit is contained in:
Ed
2024-12-16 00:38:29 +03:00
committed by GitHub
parent 57a795261f
commit 862df73ff2
44 changed files with 1358 additions and 2141 deletions

View File

@@ -12,6 +12,12 @@ public sealed partial class CP14DemiplaneLocationPrototype : IPrototype
{
[IdDataField] public string ID { get; } = default!;
/// <summary>
/// Location Tier. Can be generated only in demiplane keys with the corresponding tier
/// </summary>
[DataField]
public int Tier = 1;
[DataField(required: true)]
public ProtoId<DungeonConfigPrototype> LocationConfig;

View File

@@ -0,0 +1,12 @@
using Robust.Shared.Prototypes;
namespace Content.Shared._CP14.Demiplane.Prototypes;
/// <summary>
///
/// </summary>
[Prototype("cp14DemiplaneModifierCategory")]
public sealed partial class CP14DemiplaneModifierCategoryPrototype : IPrototype
{
[IdDataField] public string ID { get; } = default!;
}

View File

@@ -13,16 +13,16 @@ public sealed partial class CP14DemiplaneModifierPrototype : IPrototype
[IdDataField] public string ID { get; } = default!;
/// <summary>
/// Abstract danger of this modifier. The demiplane has a threat limit, which it gains from modifiers until it reaches the limit.
/// Modifier Tier. Can be generated only in demiplane keys with the corresponding tier
/// </summary>
[DataField]
public float Difficulty = 0;
[DataField(required: true)]
public List<int> Tiers = new();
/// <summary>
/// The abstract value of this modifier. The demiplane has a limit of rewards it gains from modifiers until it reaches the limit.
/// Each modifier belongs to specific categories. Used by the generator to determine what to generate
/// </summary>
[DataField]
public float Reward = 0;
[DataField(required: true)]
public Dictionary<ProtoId<CP14DemiplaneModifierCategoryPrototype>, float> Categories = new();
/// <summary>
/// How often can this modifier be generated? Determined by weight from all modifiers available for the location
@@ -30,6 +30,14 @@ public sealed partial class CP14DemiplaneModifierPrototype : IPrototype
[DataField]
public float GenerationWeight = 1;
/// <summary>
/// If this modifier is chosen to be generated - it can simply be ignored with some chance.
/// This is useful, for example, for the Fun category. According to the basic logic it should always be filled,
/// but thanks to this field, we can just have a chance that nothing will be generated.
/// </summary>
[DataField]
public float GenerationProb = 1f;
/// <summary>
/// Can this modifier be generated multiple times within a single demiplane?
/// </summary>