newTalent{
name = "Stone Golem",
copied from wild-gift/summon-melee
without changing it (name changed of course).
AND I added in the class code the same code that wilder summoners have:
getStatDesc = function(stat, actor)
if stat == actor.STAT_CUN then
return "Max summons: "..math.floor(actor:getCun()/10)
end
end,
BUT it still breaks the game completely as soon as the level loads, and it fills the log with like 40 pages of:
Lua Error: /data-Chrono_Xorn/talents/Chrono_Xorn.lua
At [C]:-1 checkMaxSummon
At /data-Chrono_Xorn/talents/Chrono_Xorn.lua:1807 on_pre_use
At /mod/addons/verdant/superload/mod/class/Actor.lua:424 preUseTalent
At /engine/HotkeysIconsDisplay.lua:174 display
At /engine/HotkeysIconsDisplay.lua:264 toScreen
At /mod/class/uiset/Minimalist.lua:1920 displayHotkeys
At /mod/class/uiset/Minimalist.lua:2154 display
At /mod/class/Game.lua:1562
Lua Error: /data-Chrono_Xorn/talents/Chrono_Xorn.lua
At [C]:-1 checkMaxSummon
At /data-Chrono_Xorn/talents/Chrono_Xorn.lua:1807 on_pre_use
At /mod/addons/verdant/superload/mod/class/Actor.lua:424 preUseTalent
At /engine/HotkeysIconsDisplay.lua:174 display
At /engine/HotkeysIconsDisplay.lua:264 toScreen
At /mod/class/uiset/Minimalist.lua:1920 displayHotkeys
At /mod/class/uiset/Minimalist.lua:2154 display
At /mod/class/Game.lua:1562
Lua Error: /data-Chrono_Xorn/talents/Chrono_Xorn.lua
At [C]:-1 checkMaxSummon
At /data-Chrono_Xorn/talents/Chrono_Xorn.lua:1807 on_pre_use
At /mod/addons/verdant/superload/mod/class/Actor.lua:424 preUseTalent
At /engine/HotkeysIconsDisplay.lua:174 display
At /engine/HotkeysIconsDisplay.lua:264 toScreen
At /mod/class/uiset/Minimalist.lua:1920 displayHotkeys
At /mod/class/uiset/Minimalist.lua:2154 display
At /mod/class/Game.lua:1562
The line causing the error is the checkmaxsummon from
on_pre_use = function(self, t, silent)
if not self:canBe("summon") and not silent then game.logPlayer(self, "You cannot summon; you are suppressed!") return end
return not checkMaxSummon(self, silent)
end,
So, if the talent is copied, and the code from the class that uses it is copied, what else do I need to do?