What determines if a talent gets an icon in the hotkey bar?
Posted: Tue Jan 01, 2019 5:41 pm
I have a passive talent in my addon, that annoys by getting an icon in the hotkey bar that you can click on - which makes nothing happen.
I don't want that icon.
My example is the dwarven birth talent 'Power Is Money'. It gets no icon, of course,it just works in the background.
My talent:
How to I remove this icon from the hotkey area (without wiping it from the level upgrade dialog, which happens when I remove the png file, for example) ?
I don't want that icon.
My example is the dwarven birth talent 'Power Is Money'. It gets no icon, of course,it just works in the background.
Code: Select all
newTalent{
name = "Power is Money",
type = {"race/dwarf", 3},
require = racial_req3,
points = 5,
mode = "passive",
getMaxSaves = function(self, t) return self:combatTalentScale(t, 8, 50) end,
getGold = function(self, t) return self:combatTalentLimit(t, 40, 85, 65) end, -- Limit > 40
-- called by _M:combatPhysicalResist, _M:combatSpellResist, _M:combatMentalResist in mod.class.interface.Combat.lua
getSaves = function(self, t)
return util.bound(self.money / t.getGold(self, t), 0, t.getMaxSaves(self, t))
end,
info = function(self, t)
return ([[Money is the heart of the Dwarven Empire; it rules over all other considerations.
Increases Physical, Mental and Spell Saves based on the amount of gold you possess.
+1 save every %d gold, up to +%d. (currently +%d)]]):
format(t.getGold(self, t), t.getMaxSaves(self, t), t.getSaves(self, t))
end,
}
Code: Select all
newTalent{
-- shortname gives icon name
name = "Smash Down", short_name = 'MT_SMASH_DOWN',
type = {"race/mountaintroll", 1},
mode = "passive",
-- at level 5, prevent increase when wearing body / feet armour
-- need to check if armour or feet has .size_category > 1, because those are allowed...
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}, stat = { str = function(level) return 12 + (level-1) * 5 end }, level = function(level) return 0 + (level-1) end },
points = 10,
-- start at 6, lvl 5 at 20 and lvl 10 at 43
statBonus = function(self, t) return (3 + 3 * self:getTalentLevelRaw(t) + (self:getTalentLevelRaw(t) * self:getTalentLevelRaw(t)) / 10) end,
passives = function(self, t, p)
self:talentTemporaryValue(p, "inc_stats", {[self.STAT_STR]=t.statBonus(self, t)})
self:talentTemporaryValue(p, "inc_stats", {[self.STAT_CON]=t.statBonus(self, t)})
end,
no_unlearn_last = true,
on_learn = function(self, t)
self:learnTalent(self.T_DUAL_WEAPON_MASTERY, true, 1, {no_unlearn=true})
if self:getTalentLevel(t) >= 5 then self:attr("allow_mainhand_2h_in_1h", 1) end
-- copied from Armour Training
for inven_id, inven in pairs(self.inven) do
if inven.worn then
for i = #inven, 1, -1 do
local o = inven[i]
if (o.slot == "BODY") or (o.slot == "FEET") then
local o = inven[i]
game.logPlayer(self, "Your muscles have grown too big for your %s.", o:getName{do_color=true})
local o = self:removeObject(inven, i, true)
self:addObject(self.INVEN_INVEN, o)
self:sortInven()
end
end
end
end
end,
info = function(self, t)
return ([[You have trained long and hard with the masters to gain the strength (%d) and constition (%d) Mountain Trolls are known for. At talent level 5, you have grown enough to wield a 2 handed weapon in your main hand with a single-handed weapon in your other hand, but no armour on your body or feet will fit you anymore. At level 10, you can wield 2 handed weapons in each hand.]]):
format(t.statBonus(self, t), t.statBonus(self, t))
end,
}