ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Mon Jul 22, 2019 10:22 am

All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: What am I doing wrong?
PostPosted: Thu Oct 15, 2015 1:54 pm 

Joined: Sun Jun 15, 2014 12:19 am
Posts: 1148
Location: Yeehaw, pardner
Whenever I mouse over my talent I made, it errors out, closes the level up screen and adds a level to it.

Lua Error: /engine/interface/ActorTalents.lua:80: bad argument #2 to 'info' (no value)
At [C]:-1
At [C]:-1 info
At /engine/interface/ActorTalents.lua:80 info
At /mod/class/Actor.lua:5468 getTalentFullDescription
At /mod/dialogs/LevelupDialog.lua:907 getTalentDesc
At /mod/dialogs/LevelupDialog.lua:682 tooltip
At /mod/dialogs/elements/TalentTrees.lua:184 updateTooltip
At /mod/dialogs/elements/TalentTrees.lua:110 fct
At /engine/Mouse.lua:76 receiveMouseMotion
At /engine/Mouse.lua:96 delegate
At /engine/ui/Dialog.lua:602 mouseEvent
At /engine/ui/Dialog.lua:343 fct
At /engine/Mouse.lua:76

And the talent...
newTalent {
    name = "Overpower", short_name = "MIC_OVERPOWER",
    type = {"spells/arcane-remnants", 3},
    require = spells_req3,
    points = 5,
    mana = 30,
    cooldown = 20,
    range = 5,
    radius = 0,
    getRadius = function(self, t)
        local talLevel = self:getTalentLevel(t)
        if talLevel >= 4 then return 1 else return 0 end
    tactical = { DISABLE = 2 },
    direct_hit = true,
    requires_target = true,
    getDuration = function(self, t) self:combatTalentLimit(t, 6, 2, 4) end,
    target = function(self, t)
        return {type="ball", range = self:getTalentRange(t), radius = getRadius(self, t), talent = t}
    action = function(self, t)
        local tg = self:getTalentTarget(self, t)
        local x, y = self:getTarget(tg)
        if not x or not y then return nil end
        self:project(tg, x, y, function(tx, ty)
            local target =, ty, Map.ACTOR)
            if not target or target == self then return end
            if target:canBe("pin") then
                    target:setEffect(target.EFF_PINNED, t.getDuration(self, t), {apply_power=self:combatSpellpower()})
                    game.logSeen(target, "%s resists the pin!",
            if target:canBe("silence") then
                    target:setEffect(target.EFF_SILENCED, t.getDuration(self, t), {apply_power=self:combatSpellpower()})
                    game.logSeen(target, "%s resists the silence!",
        local _
        game:playSoundNear(self, "talents/arcane")

        return true
    info = function (self, t)
        return ([[Silences and pins everything within a radius %d ball for %d turns.
        The radius of the ball will increase to one at talent levels 4 and greater.
        Apply chance will increase with your spellpower and effect length will increase with talent level.]]):
        format(self:getTalentRadius(self, t), t.getDuration(self, t))

EDIT: Er... fixed. Forgot to add a return statement to all of my functions. :shock:

A little bit of a starters guide written by yours truly here.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group