From 61262e9bed79a2b300711d01a463cfb95c04eeea Mon Sep 17 00:00:00 2001 From: git--amade Date: Mon, 10 Nov 2025 16:10:46 +0800 Subject: [PATCH 1/2] Fix error in getUnitTraitCurrent() --- modtools/set-personality.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modtools/set-personality.lua b/modtools/set-personality.lua index 9b1b421a70..16428310e5 100644 --- a/modtools/set-personality.lua +++ b/modtools/set-personality.lua @@ -85,7 +85,7 @@ function getUnitTraitCurrent(unit, trait) local base = getUnitTraitBase(unit, trait) local value = base if unit.status.current_soul.personality.temporary_trait_changes ~= nil then - value = value + unit.status.current_soul.personality.temporary_trait_changes[trait] + value = value + unit.status.current_soul.personality.temporary_trait_changes.traits[trait] end return value From 3ffba3d5f92125ab86af4194271e4db1d975f8e9 Mon Sep 17 00:00:00 2001 From: git--amade Date: Mon, 10 Nov 2025 16:13:10 +0800 Subject: [PATCH 2/2] Make getUnitBeliefList() global --- modtools/set-belief.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modtools/set-belief.lua b/modtools/set-belief.lua index c46b2adafc..ae9f53062d 100644 --- a/modtools/set-belief.lua +++ b/modtools/set-belief.lua @@ -153,7 +153,7 @@ end -- Gives a list of all the unit's beliefs and their values. -- Returns a table where the keys are the belief names and its values are its strength -- If tiers is true, the value is the tier of the belief instead of the trait's strength -local function getUnitBeliefList(unit, tiers) +function getUnitBeliefList(unit, tiers) local list = {} for id, beliefName in ipairs(df.value_type) do