unfortunately,
Code: Select all
racial_req1 = {
stat = { str=function(level) return 12 + (level-1) * 5 end },
level = function(level) return 0 + (level-1) end,
}
...
require = { special={desc="After level 4, you can only study further when not wearing armour on your body and your feet", fct=function(self) return ((self.getTalentLevel(t) <= 4) or (self.GetTalentLevel(t) > 4 and not self:getInven("BODY") and not self:getInven("FEET"))) end}, racial_req1 },
does not show any strength needs on the screen. Did I understand you incorrectly?
On looking at ActorTalents.lua, I see
Code: Select all
function _M:canLearnTalent(t, offset, ignore_special)
-- Check prerequisites
if rawget(t, "require") then
local req = t.require
if type(req) == "function" then req = req(self, t) end
local tlev = self:getTalentLevelRaw(t) + (offset or 1)
-- Obviously this requires the ActorStats interface
if req.stat then
for s, v in pairs(req.stat) do
v = util.getval(v, tlev)
if self:getStat(s) < v then return nil, "not enough stat: "..s:upper() end
end
end
if req.level then
if self.level < util.getval(req.level, tlev) then
return nil, "not enough levels"
end
end
if req.special and not ignore_special then
if not req.special.fct(self, t, offset) then
return nil, req.special.desc
end
end
if req.talent then
for _, tid in ipairs(req.talent) do
if type(tid) == "table" then
if type(tid[2]) == "boolean" and tid[2] == false then
if self:knowTalent(tid[1]) then return nil, "missing dependency" end
else
if self:getTalentLevelRaw(tid[1]) < tid[2] then return nil, "missing dependency" end
end
else
if not self:knowTalent(tid) then return nil, "missing dependency" end
end
end
end
end
really nothing that iterates over multiple entries after require. Should I conclude this just can't be done?