modding

"You now also use your x in place of x when equipping weapons and ammo as well as when calculating weapon damage."

I can't seem to wrap my head around the way lua for skills that replace weapon stat calc and equip requirements with another stat work.
For example if ↓

newTalent{
	name = "Strength of Purpose",
	type = {"chronomancy/guardian", 1},
	points = 5,
	require = { stat = { mag=function(level) return 12 + level * 6 end }, },
	mode = "passive",
	getDamage = function(self, t) return self:getTalentLevel(t) * 10 end,
	getPercentInc = function(self, t) return math.sqrt(self:getTalentLevel(t) / 5) / 2 end,
	info = function(self, t)
		local damage = t.getDamage(self, t)
		local inc = t.getPercentInc(self, t)
		return ([[Increases Physical Power by %d, and increases weapon damage by %d%% when using swords, axes, maces, knives, or bows.
		You now also use your Magic in place of Strength when equipping weapons and ammo as well as when calculating weapon damage.
		These bonuses override rather than stack with weapon mastery, dagger mastery, and bow mastery.]]):
		format(damage, 100*inc)
	end,
}

Is changed to something like ↓ and given to a custom class the skill will have no effect.

newTalent{
	name = "Magic Enhanced Strength",
	type = {"spell/Body enhancements", 1},
	points = 5,
	require = { stat = { mag=function(level) return 12 + level * 6 end }, },
	mode = "passive",
	getDamage = function(self, t) return self:getTalentLevel(t) * 10 end,
	getPercentInc = function(self, t) return math.sqrt(self:getTalentLevel(t) / 5) / 2 end,
	info = function(self, t)
		local damage = t.getDamage(self, t)
		local inc = t.getPercentInc(self, t)
		return ([[Increases Physical Power by %d, and increases weapon damage by %d%% when using swords, axes, maces, knives, or bows.
		You now also use your Magic in place of Strength when equipping weapons and ammo as well as when calculating weapon damage.
		These bonuses override rather than stack with weapon mastery, dagger mastery, and bow mastery.]]):
		format(damage, 100*inc)
	end,
}

I have no idea what I'm missing, is there another lua file that somehow is loaded by the skill or am I completely misreading the lua?

Syndicate content