From 944804eedb3cb3e8f1c7e83904d595a86c6fe4a7 Mon Sep 17 00:00:00 2001 From: Sean Petrie Date: Thu, 28 Oct 2021 22:46:45 -0500 Subject: [PATCH] Patched Terrifying Tremble --- CHANGELOG.md | 1 + .../Bugfixes/Features/Backgrounds.cs | 15 +++ TabletopTweaks/Bugfixes/Items/Weapons.cs | 24 ++++ TabletopTweaks/Config/Blueprints.json | 2 + TabletopTweaks/Config/Fixes.json | 4 + TabletopTweaks/Info.json | 2 +- TabletopTweaks/MechanicsChanges/DRRework.cs | 3 +- .../NewComponents/AddWeaponDamageTrigger.cs | 59 +++++++++ .../Archetypes/ChannelerOfTheUnknown.cs | 8 +- .../Bloodlines/DestinedBloodline.cs | 20 +-- TabletopTweaks/NewContent/ContentAdder.cs | 1 + .../WeaponEnchantments/TerrifyingTremble.cs | 124 ++++++++++++++++++ TabletopTweaks/TabletopTweaks.csproj | 2 + TabletopTweaks/Utilities/DescriptionTools.cs | 16 ++- TabletopTweaks/Utilities/Helpers.cs | 3 + 15 files changed, 266 insertions(+), 18 deletions(-) create mode 100644 TabletopTweaks/NewComponents/AddWeaponDamageTrigger.cs create mode 100644 TabletopTweaks/NewContent/WeaponEnchantments/TerrifyingTremble.cs diff --git a/CHANGELOG.md b/CHANGELOG.md index 2893f217..ea1c242b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## Version 1.9.5 * Loremaster now supports Hunter, Skald, and Warpriest +* Terrifying Tremble's on kill effect now works ## Version 1.9.4 * Updated handling of nested activatable abilities diff --git a/TabletopTweaks/Bugfixes/Features/Backgrounds.cs b/TabletopTweaks/Bugfixes/Features/Backgrounds.cs index 2935ec0a..97b3b60f 100644 --- a/TabletopTweaks/Bugfixes/Features/Backgrounds.cs +++ b/TabletopTweaks/Bugfixes/Features/Backgrounds.cs @@ -29,6 +29,7 @@ static void Postfix() { if (ModSettings.Fixes.BaseFixes.IsDisabled("FixBackgroundModifiers")) { return; } Main.LogHeader("Patching Backgrounds"); PatchMiner(); + PatchFarmhand(); PatchBackgrounds(); void PatchBackgrounds() { @@ -68,6 +69,20 @@ void PatchMiner() { }); var addFacts = BackgroundMiner.GetComponent(); addFacts.m_Facts = addFacts.m_Facts.AppendToArray(EarthBreakerProficiency.ToReference()); + Main.LogPatch("Patched", BackgroundMiner); + } + void PatchFarmhand() { + var KamaProficiency = Resources.GetBlueprint("403740e8112651141a12f0d73d793dbc"); + var BackgroundFarmhand = Resources.GetBlueprint("25b35e09665310d4faac3020f8198cfb"); + + BackgroundFarmhand.AddComponent(c => { + c.Proficiency = WeaponCategory.Kama; + c.StackBonusType = ModifierDescriptor.Enhancement; + c.StackBonus = 1; + }); + var addFacts = BackgroundFarmhand.GetComponent(); + addFacts.m_Facts = addFacts.m_Facts.AppendToArray(KamaProficiency.ToReference()); + Main.LogPatch("Patched", BackgroundFarmhand); } } } diff --git a/TabletopTweaks/Bugfixes/Items/Weapons.cs b/TabletopTweaks/Bugfixes/Items/Weapons.cs index ca3cb311..40fb7ef5 100644 --- a/TabletopTweaks/Bugfixes/Items/Weapons.cs +++ b/TabletopTweaks/Bugfixes/Items/Weapons.cs @@ -19,6 +19,7 @@ using System.Reflection.Emit; using TabletopTweaks.Config; using TabletopTweaks.Extensions; +using TabletopTweaks.Utilities; namespace TabletopTweaks.Bugfixes.Items { static class Weapons { @@ -31,8 +32,11 @@ static void Postfix() { Initialized = true; Main.LogHeader("Patching Weapons"); + PatchBladeOfTheMerciful(); PatchHonorableJudgement(); + PatchTerribleTremble(); + PatchThunderingBurst(); void PatchBladeOfTheMerciful() { @@ -95,6 +99,26 @@ void PatchHonorableJudgement() { }); Main.LogPatch("Patched", JudgementOfRuleEnchantment); } + void PatchTerribleTremble() { + if (ModSettings.Fixes.Items.Weapons.IsDisabled("TerrifyingTremble")) { return; } + + var TerrifyingTrembleItem = Resources.GetBlueprint("8c31891423c4405393741e829aebec85"); + var Enhancement5 = Resources.GetBlueprint("bdba267e951851449af552aa9f9e3992"); + var Ultrasound = Resources.GetBlueprint("582849db96824254ebcc68f0b7484e51"); + var TerrifyingTrembleEnchant_TTT = Resources.GetModBlueprint("TerrifyingTrembleEnchant_TTT"); + + TerrifyingTrembleItem.m_DescriptionText = Helpers.CreateTaggedString($"{TerrifyingTrembleItem.name}.description", + "Whenever the wielder of this +5 ultrasound earthbreaker lands a killing blow, he deals sonic damage equal to his ranks in " + + "the Athletics skill to all enemies within 10 feet. Successful Reflex save (DC 30) halves the damage."); + + TerrifyingTrembleItem.m_Enchantments = new BlueprintWeaponEnchantmentReference[] { + Enhancement5.ToReference(), + Ultrasound.ToReference(), + TerrifyingTrembleEnchant_TTT.ToReference(), + }; + + Main.LogPatch("Patched", TerrifyingTrembleItem); + } void PatchThunderingBurst() { if (ModSettings.Fixes.Items.Weapons.IsDisabled("ThunderingBurst")) { return; } diff --git a/TabletopTweaks/Config/Blueprints.json b/TabletopTweaks/Config/Blueprints.json index f0c77bd2..5b0e4322 100644 --- a/TabletopTweaks/Config/Blueprints.json +++ b/TabletopTweaks/Config/Blueprints.json @@ -567,6 +567,8 @@ "TemporaryEnhancement6NonStacking": "653817e3-3cbb-4b86-8d39-a4103cc8a533", "TrainedGraceFeature": "2eaea009-af02-4038-b7ca-afa83ea1fc87", "TrainedThrowFeature": "e44ffa12-1bd7-4743-8565-f87aba5b8784", + "TerrifyingTrembleAbility_TTT": "52febc56-6db6-4bfe-9682-46479df873fb", + "TerrifyingTrembleEnchant_TTT": "92b4314b-a2d6-43ae-b5bd-0d742d683b8a", "TwoHandedDamageMultiplierEnchantment": "ae2be9fe-fbd5-438f-821f-0113db8fd572", "WarriorSpiritAnarchicBuff": "2879d872-0883-482f-aca0-a81e3fde0c8a", "WarriorSpiritAnarchicToggle": "c1ccb3b4-b296-4c73-9792-c31a9a269d35", diff --git a/TabletopTweaks/Config/Fixes.json b/TabletopTweaks/Config/Fixes.json index 55e92d6a..d4196758 100644 --- a/TabletopTweaks/Config/Fixes.json +++ b/TabletopTweaks/Config/Fixes.json @@ -715,6 +715,10 @@ "Enabled": true, "Description": "Fixes the critical multiplier calculation of energy burst (like flaming burst) effects to get the correct value." }, + "TerrifyingTremble": { + "Enabled": true, + "Description": "Implements the missing on kill effect. Whenever the wielder of this weapon lands a killing blow, he deals sonic damage equal to his ranks in the Athletics skill to all enemies within 10 feet. Successful Reflex save (DC 30) halves the damage." + }, "ThunderingBurst": { "Enabled": true, "Description": "Fixes thundering burst to deal D10s like the description says instead of D8s." diff --git a/TabletopTweaks/Info.json b/TabletopTweaks/Info.json index ca3c1f43..e55e6245 100644 --- a/TabletopTweaks/Info.json +++ b/TabletopTweaks/Info.json @@ -9,5 +9,5 @@ "ManagerVersion": "0.23.0", "Repository": "https://raw.githubusercontent.com/Vek17/WrathMods-TabletopTweaks/master/Repository.json", "Requirements": [], - "Version": "1.9.4" + "Version": "1.9.5" } \ No newline at end of file diff --git a/TabletopTweaks/MechanicsChanges/DRRework.cs b/TabletopTweaks/MechanicsChanges/DRRework.cs index 0b78b2b1..75f46665 100644 --- a/TabletopTweaks/MechanicsChanges/DRRework.cs +++ b/TabletopTweaks/MechanicsChanges/DRRework.cs @@ -465,7 +465,8 @@ static void PatchArmorDR() { Resources.GetBlueprint("06d2f00616ad40c3b136d06dffc8f0b5"), // ColorlessRemainsBreastplate_SolidFeature Resources.GetBlueprint("ff2d26e87b5f2bc4ba1823e242f10890"), // ForMounted_HalfplateOfSynergyFeature Resources.GetBlueprint("e19008b823a221043b9184ef3c271db1"), // RealmProtectorFeature - Resources.GetBlueprint("79babe38a7306ba4c81f2fa3c88d1bae") // StuddedArmorOfTrinityFeature + Resources.GetBlueprint("79babe38a7306ba4c81f2fa3c88d1bae"), // StuddedArmorOfTrinityFeature + Resources.GetBlueprint("8c7de3b7d51a4b49a46990d8dbc84853") // ThroneKeeperFeature }; foreach (BlueprintUnitFact armorBlueprint in armorFactsWithPhysicalDR) { diff --git a/TabletopTweaks/NewComponents/AddWeaponDamageTrigger.cs b/TabletopTweaks/NewComponents/AddWeaponDamageTrigger.cs new file mode 100644 index 00000000..ad42003c --- /dev/null +++ b/TabletopTweaks/NewComponents/AddWeaponDamageTrigger.cs @@ -0,0 +1,59 @@ +using Kingmaker.Armies.TacticalCombat; +using Kingmaker.Armies.TacticalCombat.Parts; +using Kingmaker.Blueprints.Items.Ecnchantments; +using Kingmaker.Blueprints.JsonSystem; +using Kingmaker.ElementsSystem; +using Kingmaker.EntitySystem.Entities; +using Kingmaker.PubSubSystem; +using Kingmaker.RuleSystem.Rules.Damage; +using Kingmaker.UnitLogic.Mechanics.Components; + +namespace TabletopTweaks.NewComponents { + [TypeId("d6c77d2de4804f8e9aa06e01c9fb77fa")] + class AddWeaponDamageTrigger : WeaponEnchantmentLogic, + IInitiatorRulebookHandler, + IRulebookHandler { + + private void RunAction(UnitEntityData target) { + if (this.Actions.HasActions) { + IFactContextOwner factContextOwner = base.Fact as IFactContextOwner; + if (factContextOwner == null) { + return; + } + factContextOwner.RunActionInContext(this.Actions, target); + } + } + + public void OnEventAboutToTrigger(RuleDealDamage evt) { + if (evt?.AttackRoll?.Weapon != this.Owner) { + return; + } + if (TacticalCombatHelper.IsActive) { + UnitPartTacticalCombat unitPartTacticalCombat = evt.Target.Get(); + int num = (unitPartTacticalCombat != null) ? unitPartTacticalCombat.Count : 1; + WasTargetAlive = num > TacticalCombatHelper.GetDeathCount(evt.Target, evt.Target.HPLeft, num); + return; + } + WasTargetAlive = !evt.Target.Descriptor.State.IsDead; + } + + public void OnEventDidTrigger(RuleDealDamage evt) { + if (evt?.AttackRoll?.Weapon != this.Owner) { + return; + } + this.Apply(evt); + } + + private void Apply(RuleDealDamage evt) { + bool IsDead = (evt.Target.Descriptor.Stats.HitPoints <= evt.Target.Descriptor.Damage); + if (this.TargetKilledByThisDamage && (!WasTargetAlive || !IsDead)) { + return; + } + this.RunAction(evt.Target); + } + + private bool WasTargetAlive; + public bool TargetKilledByThisDamage; + public ActionList Actions; + } +} diff --git a/TabletopTweaks/NewContent/Archetypes/ChannelerOfTheUnknown.cs b/TabletopTweaks/NewContent/Archetypes/ChannelerOfTheUnknown.cs index c5955150..62c0b0da 100644 --- a/TabletopTweaks/NewContent/Archetypes/ChannelerOfTheUnknown.cs +++ b/TabletopTweaks/NewContent/Archetypes/ChannelerOfTheUnknown.cs @@ -178,7 +178,7 @@ public static void AddChannelerOfTheUnknown() { bp.AddComponent(c => { c.Descriptor = new SpellDescriptorWrapper(SpellDescriptor.ChannelNegativeHarm); }); - bp.AddComponent(Helpers.CreateContextRankConfig(c => { + bp.AddContextRankConfig(c => { c.m_Type = AbilityRankType.DamageDice; c.m_BaseValueType = ContextRankBaseValueType.ClassLevel; c.m_Class = new BlueprintCharacterClassReference[] { ClericClass.ToReference() }; @@ -187,15 +187,15 @@ public static void AddChannelerOfTheUnknown() { c.m_StepLevel = 2; c.m_Min = 1; c.m_UseMin = true; - })); - bp.AddComponent(Helpers.CreateContextRankConfig(c => { + }); + bp.AddContextRankConfig(c => { c.m_Type = AbilityRankType.DamageBonus; c.m_BaseValueType = ContextRankBaseValueType.CustomProperty; c.m_CustomProperty = MythicChannelProperty.ToReference(); c.m_Progression = ContextRankProgression.AsIs; c.m_Min = 0; c.m_UseMin = true; - })); + }); bp.AddComponent(c => { c.Actions = Helpers.CreateActionList( new Conditional() { diff --git a/TabletopTweaks/NewContent/Bloodlines/DestinedBloodline.cs b/TabletopTweaks/NewContent/Bloodlines/DestinedBloodline.cs index 7722dc14..445973a4 100644 --- a/TabletopTweaks/NewContent/Bloodlines/DestinedBloodline.cs +++ b/TabletopTweaks/NewContent/Bloodlines/DestinedBloodline.cs @@ -175,7 +175,7 @@ public static void AddBloodragerDestinedBloodline() { bp.SetName(BloodragerDestinedFatedBloodrager.Name); bp.SetDescription(BloodragerDestinedFatedBloodrager.Description); bp.IsClassFeature = true; - bp.AddComponent(Helpers.Create(c => { + bp.AddComponent(c => { c.Descriptor = ModifierDescriptor.Luck; c.Stat = StatType.AC; c.Multiplier = 1; @@ -183,8 +183,8 @@ public static void AddBloodragerDestinedBloodline() { ValueType = ContextValueType.Rank, ValueRank = AbilityRankType.StatBonus }; - })); - bp.AddComponent(Helpers.Create(c => { + }); + bp.AddComponent(c => { c.Descriptor = ModifierDescriptor.Luck; c.Stat = StatType.SaveFortitude; c.Multiplier = 1; @@ -192,8 +192,8 @@ public static void AddBloodragerDestinedBloodline() { ValueType = ContextValueType.Rank, ValueRank = AbilityRankType.StatBonus }; - })); - bp.AddComponent(Helpers.Create(c => { + }); + bp.AddComponent(c => { c.Descriptor = ModifierDescriptor.Luck; c.Stat = StatType.SaveReflex; c.Multiplier = 1; @@ -201,8 +201,8 @@ public static void AddBloodragerDestinedBloodline() { ValueType = ContextValueType.Rank, ValueRank = AbilityRankType.StatBonus }; - })); - bp.AddComponent(Helpers.Create(c => { + }); + bp.AddComponent(c => { c.Descriptor = ModifierDescriptor.Luck; c.Stat = StatType.SaveWill; c.Multiplier = 1; @@ -210,13 +210,13 @@ public static void AddBloodragerDestinedBloodline() { ValueType = ContextValueType.Rank, ValueRank = AbilityRankType.StatBonus }; - })); - bp.AddComponent(Helpers.Create(c => { + }); + bp.AddComponent(c => { c.m_BaseValueType = ContextRankBaseValueType.FeatureRank; c.m_Type = AbilityRankType.StatBonus; c.m_Feature = BloodragerDestinedFatedBloodrager.ToReference(); c.m_Progression = ContextRankProgression.AsIs; - })); + }); }); var BloodragerDestinedCertainStrike = Helpers.CreateBlueprint("BloodragerDestinedCertainStrike", bp => { bp.SetName("Certain Strike"); diff --git a/TabletopTweaks/NewContent/ContentAdder.cs b/TabletopTweaks/NewContent/ContentAdder.cs index 7e57f442..92de8a61 100644 --- a/TabletopTweaks/NewContent/ContentAdder.cs +++ b/TabletopTweaks/NewContent/ContentAdder.cs @@ -23,6 +23,7 @@ static void Postfix() { WeaponEnchantments.NonStackingTempEnchantments.AddWeaponEnhancements(); WeaponEnchantments.TwoHandedDamageMultiplier.AddTwoHandedDamageMultiplierEnchantment(); + WeaponEnchantments.TerrifyingTremble.AddTerrifyingTrembleEnchant(); Races.Dwarf.AddDwarfHeritage(); Races.Elf.AddElfHeritage(); diff --git a/TabletopTweaks/NewContent/WeaponEnchantments/TerrifyingTremble.cs b/TabletopTweaks/NewContent/WeaponEnchantments/TerrifyingTremble.cs new file mode 100644 index 00000000..261e8766 --- /dev/null +++ b/TabletopTweaks/NewContent/WeaponEnchantments/TerrifyingTremble.cs @@ -0,0 +1,124 @@ +using Kingmaker.Blueprints; +using Kingmaker.Blueprints.Items.Ecnchantments; +using Kingmaker.Blueprints.Items.Weapons; +using Kingmaker.Designers.EventConditionActionSystem.Actions; +using Kingmaker.ElementsSystem; +using Kingmaker.EntitySystem.Stats; +using Kingmaker.Enums.Damage; +using Kingmaker.RuleSystem.Rules.Damage; +using Kingmaker.UnitLogic.Abilities.Blueprints; +using Kingmaker.UnitLogic.Abilities.Components; +using Kingmaker.UnitLogic.Abilities.Components.Base; +using Kingmaker.UnitLogic.Mechanics; +using Kingmaker.UnitLogic.Mechanics.Actions; +using Kingmaker.UnitLogic.Mechanics.Components; +using Kingmaker.UnitLogic.Mechanics.Conditions; +using Kingmaker.Utility; +using TabletopTweaks.Extensions; +using TabletopTweaks.NewComponents; +using TabletopTweaks.Utilities; + +namespace TabletopTweaks.NewContent.WeaponEnchantments { + static class TerrifyingTremble { + public static void AddTerrifyingTrembleEnchant() { + var TerrifyingTrembleItem = Resources.GetBlueprint("8c31891423c4405393741e829aebec85"); + var ThunderingBlowsAbility = Resources.GetBlueprint("a9c0ab0293b0c3245881b27ea4e8f95d"); + + var TerrifyingTrembleAbility_TTT = Helpers.CreateBlueprint($"TerrifyingTrembleAbility_TTT", bp => { + var effects = ThunderingBlowsAbility.GetComponent(); + bp.SetName("Terrifying Tremble"); + bp.SetDescription("Whenever the wielder of this weapon lands a killing blow, " + + "he deals sonic damage equal to his ranks in the Athletics skill to all enemies within 10 feet. " + + "Successful Reflex save (DC 30) halves the damage."); + bp.m_Icon = TerrifyingTrembleItem.Icon; + bp.ResourceAssetIds = ThunderingBlowsAbility.ResourceAssetIds; + bp.LocalizedSavingThrow = Helpers.CreateString($"{bp.name}.save", $""); + bp.LocalizedDuration = Helpers.CreateString($"{bp.name}.duration", $""); + bp.CanTargetEnemies = true; + bp.ActionType = Kingmaker.UnitLogic.Commands.Base.UnitCommand.CommandType.Free; + bp.Type = AbilityType.Special; + bp.AddComponent(c => { + c.m_Radius = 10.Feet(); + c.m_TargetType = TargetType.Enemy; + c.m_Condition = new ConditionsChecker(); + }); + bp.AddComponent(c => { + c.Actions = Helpers.CreateActionList( + new Conditional() { + ConditionsChecker = new ConditionsChecker() { + Conditions = new Condition[] { + new ContextConditionIsEnemy(), + new ContextConditionIsMainTarget(){ + Not = true + } + } + }, + IfTrue = Helpers.CreateActionList( + new ContextActionSavingThrow() { + m_ConditionalDCIncrease = new ContextActionSavingThrow.ConditionalDCIncrease[0], + Type = SavingThrowType.Reflex, + HasCustomDC = true, + CustomDC = 30, + Actions = Helpers.CreateActionList( + new ContextActionDealDamage() { + DamageType = new DamageTypeDescription() { + Type = DamageType.Energy, + Common = new DamageTypeDescription.CommomData(), + Physical = new DamageTypeDescription.PhysicalData(), + Energy = DamageEnergyType.Sonic + }, + Duration = new ContextDurationValue() { + m_IsExtendable = true, + DiceCountValue = new ContextValue(), + BonusValue = new ContextValue() + }, + Value = new ContextDiceValue() { + DiceCountValue = new ContextValue(), + BonusValue = new ContextValue() { + ValueType = ContextValueType.Rank + } + }, + HalfIfSaved = true, + IsAoE = true + } + ) + } + ), + IfFalse = Helpers.CreateActionList() + } + ); + }); + bp.AddContextRankConfig(c => { + c.m_BaseValueType = ContextRankBaseValueType.BaseStat; + c.m_Stat = StatType.SkillAthletics; + }); + bp.AddComponent(c => { + c.DC = 30; + }); + bp.AddComponent(c => { + c.PrefabLink = effects.PrefabLink; + c.PositionAnchor = AbilitySpawnFxAnchor.ClickedTarget; + c.OrientationAnchor = effects.OrientationAnchor; + }); + }); + var TerrifyingTrembleEnchant_TTT = Helpers.CreateBlueprint($"TerrifyingTrembleEnchant_TTT", bp => { + bp.m_Description = Helpers.CreateString($"{bp.name}.description", ""); + bp.m_EnchantName = Helpers.CreateString($"{bp.name}.name", $""); + bp.m_Prefix = Helpers.CreateString($"{bp.name}.prefix", $""); + bp.m_Suffix = Helpers.CreateString($"{bp.name}.suffix", $""); + bp.m_EnchantmentCost = 1; + bp.m_IdentifyDC = 5; + bp.AddComponent(c => { + c.Actions = Helpers.CreateActionList( + new ContextActionCastSpell() { + m_Spell = TerrifyingTrembleAbility_TTT.ToReference(), + DC = new ContextValue(), + SpellLevel = new ContextValue() + } + ); + c.TargetKilledByThisDamage = true; + }); + }); + } + } +} diff --git a/TabletopTweaks/TabletopTweaks.csproj b/TabletopTweaks/TabletopTweaks.csproj index 7a8fca2e..d0c2593b 100644 --- a/TabletopTweaks/TabletopTweaks.csproj +++ b/TabletopTweaks/TabletopTweaks.csproj @@ -206,6 +206,7 @@ + @@ -385,6 +386,7 @@ + diff --git a/TabletopTweaks/Utilities/DescriptionTools.cs b/TabletopTweaks/Utilities/DescriptionTools.cs index 24709e9b..31ec780b 100644 --- a/TabletopTweaks/Utilities/DescriptionTools.cs +++ b/TabletopTweaks/Utilities/DescriptionTools.cs @@ -101,7 +101,12 @@ static class DescriptionTools { }, new EncyclopediaEntry { Entry = "Saving_Throw", - Patterns = { "Saving Throw" } + Patterns = { + "Saving Throw", + "Reflex Save", + "Will Save", + "Fortitude Save" + } }, new EncyclopediaEntry { Entry = "Spell_Resistance", @@ -174,7 +179,10 @@ static class DescriptionTools { }, new EncyclopediaEntry { Entry = "Skills", - Patterns = { "Skills? Checks?" } + Patterns = { + "Skills? Checks?", + "Skills?" + } }, new EncyclopediaEntry { Entry = "Combat_Maneuvers", @@ -277,6 +285,10 @@ static class DescriptionTools { "Piercing", "Slashing" } + }, + new EncyclopediaEntry { + Entry = "Damage", + Patterns = { "damage" } } }; diff --git a/TabletopTweaks/Utilities/Helpers.cs b/TabletopTweaks/Utilities/Helpers.cs index b38a8f59..e46cfbed 100644 --- a/TabletopTweaks/Utilities/Helpers.cs +++ b/TabletopTweaks/Utilities/Helpers.cs @@ -107,6 +107,9 @@ public static ContextActionConditionalSaved CreateConditionalSaved(GameAction[] // All localized strings created in this mod, mapped to their localized key. Populated by CreateString. static Dictionary textToLocalizedString = new Dictionary(); + public static LocalizedString CreateTaggedString(string key, string value) { + return CreateString(key, DescriptionTools.TagEncyclopediaEntries(value)); + } public static LocalizedString CreateString(string key, string value) { // See if we used the text previously. // (It's common for many features to use the same localized text.