Making Addons Halp
Moderator: Moderator
-
- Uruivellas
- Posts: 834
- Joined: Mon Jan 27, 2014 10:40 am
Making Addons Halp
Is there a 'addons for dummies' thread anywhere? Has anyone written a guide to doing things? Is there an IRC where I could beg people to hold my hand as I fail to look competent?
I think I might be able to muddle through a really simple addon just by reading one that I have and mimicking it, but I'm still nervous.
...like, the wiki says to make a directory. Does it just mean a folder? None of the other addons are folders they're TEAAs...
Edit: iiiif it's not clear I have zero coding knowledge at all.
I think I might be able to muddle through a really simple addon just by reading one that I have and mimicking it, but I'm still nervous.
...like, the wiki says to make a directory. Does it just mean a folder? None of the other addons are folders they're TEAAs...
Edit: iiiif it's not clear I have zero coding knowledge at all.
Re: Making Addons Halp
Open up a TEAA with 7zip or whatever.
A little bit of a starters guide written by yours truly here.
-
- Uruivellas
- Posts: 708
- Joined: Wed Apr 30, 2008 5:55 pm
Re: Making Addons Halp
A .teaa is just a zip file holding the addon folder (the one the wiki tells you to make). A good starting point is to unzip a few of the simpler addons and poke them a bit. 

Addons: Arcane Blade Tweaks, Fallen Race, Monk Class, Weapons Pack
Currently working on Elementals. It's a big project, so any help would be appreciated.
Currently working on Elementals. It's a big project, so any help would be appreciated.

Re: Making Addons Halp
That awkward moment when you both post at the same time.grayswandir wrote:A .teaa is just a zip file holding the addon folder (the one the wiki tells you to make). A good starting point is to unzip a few of the simpler addons and poke them a bit.
A little bit of a starters guide written by yours truly here.
-
- Uruivellas
- Posts: 834
- Joined: Mon Jan 27, 2014 10:40 am
Re: Making Addons Halp
(Looks down at WinRAR)grayswandir wrote:A .teaa is just a zip file holding the addon folder (the one the wiki tells you to make). A good starting point is to unzip a few of the simpler addons and poke them a bit.
"newBirthDescriptor {
type = 'subrace',
name = 'Fallen',"
...hee.
-
- Uruivellas
- Posts: 834
- Joined: Mon Jan 27, 2014 10:40 am
Re: Making Addons Halp
New question, miraculously may be the last for now...
How do you set what icon a talent uses? New effects have it as part of their description, but talents don't seem to. Do you have to include the icon you want to use as new data named after the talent?
How do you set what icon a talent uses? New effects have it as part of their description, but talents don't seem to. Do you have to include the icon you want to use as new data named after the talent?
-
- Uruivellas
- Posts: 708
- Joined: Wed Apr 30, 2008 5:55 pm
Re: Making Addons Halp
Talents have their icon filename default to their shortname. You can override this with the image field, just like effects do.
Effects also have a default filename, but a lot of the time they reuse the talent icon instead.
Relevant code from data/talents.lua:
So, generally you just put the image file in the proper place in the overload directory.
Effects also have a default filename, but a lot of the time they reuse the talent icon instead.
Relevant code from data/talents.lua:
Code: Select all
if not t.image then
t.image = "talents/"..(t.short_name or t.name):lower():gsub("[^a-z0-9_]", "_")..".png"
end
Addons: Arcane Blade Tweaks, Fallen Race, Monk Class, Weapons Pack
Currently working on Elementals. It's a big project, so any help would be appreciated.
Currently working on Elementals. It's a big project, so any help would be appreciated.

-
- Uruivellas
- Posts: 834
- Joined: Mon Jan 27, 2014 10:40 am
Re: Making Addons Halp
You're a lifesaver! If all goes well, I'll be testing this in a few minutes.
edit: ...didn't work! I'll have to read through all the code again. wwhelp.
edit: ...didn't work! I'll have to read through all the code again. wwhelp.
-
- Uruivellas
- Posts: 834
- Joined: Mon Jan 27, 2014 10:40 am
Re: Making Addons Halp
Okay, I managed to find the FIRST bug (missed a comma), but I don't know what's messing things up this time...
Lua Error: /engine/utils.lua
/data-rhalorenrace/talents.lua:64: '}' expected (to close '{' at line 57) near 'getSave'
At [C]:-1
At [C]:-1 error
At /engine/utils.lua:1782 loadfilemods
At /engine/interface/ActorTalents.lua:31 loadDefinition
At /hooks/rhalorenrace/load.lua:9
At [string "return function(l, self, data) local ok=false..."]:1
At /mod/load.lua:271
At [C]:-1 require
At /engine/Module.lua:160 load
At /engine/Module.lua:955 instanciate
At /engine/utils.lua:2197 showMainMenu
At /engine/init.lua:162
At [C]:-1 dofile
At /loader/init.lua:204
newTalent{
short_name = 'INFERNO_SHIELD_OF_TAINT',
name = "Shield of Taint",
type = {"race/rhaloren", 2},
mode = "passive",
require = racial_req2,
points = 5
getSave = function(self, t) return self:combatTalentScale(t, 5, 25, 0.75) end,
power = function(self, t) return self:combatTalentScale(t, 7, 25) end,
passives = function(self, t, p)
self:talentTemporaryValue(p, "combat_spellresist", t.getSave(self, t))
self:talentTemporaryValue(p, "resists",{[DamageType.NATURE]=t.power(self, t)})
end,
info = function(self, t)
local netpower = t.power(self, t)
return ([[Unnatural power flows through the Rhalorens veins, helping them resist magic and causing natural energies to recoil from them.
Increase spell save by +%d and nature resistance by %d%%.]]):
format(t.getSave(self, t), netpower)
end,
}
The error is saying that there should be a } on the line with getSave, but the talents its based on don't have one. Can anyone point out the obvious for me?
(I'm saddened that this reveals what I was working on. I wanted it to be a surprise.)
Lua Error: /engine/utils.lua
At [C]:-1
At [C]:-1 error
At /engine/utils.lua:1782 loadfilemods
At /engine/interface/ActorTalents.lua:31 loadDefinition
At /hooks/rhalorenrace/load.lua:9
At [string "return function(l, self, data) local ok=false..."]:1
At /mod/load.lua:271
At [C]:-1 require
At /engine/Module.lua:160 load
At /engine/Module.lua:955 instanciate
At /engine/utils.lua:2197 showMainMenu
At /engine/init.lua:162
At [C]:-1 dofile
At /loader/init.lua:204
newTalent{
short_name = 'INFERNO_SHIELD_OF_TAINT',
name = "Shield of Taint",
type = {"race/rhaloren", 2},
mode = "passive",
require = racial_req2,
points = 5
getSave = function(self, t) return self:combatTalentScale(t, 5, 25, 0.75) end,
power = function(self, t) return self:combatTalentScale(t, 7, 25) end,
passives = function(self, t, p)
self:talentTemporaryValue(p, "combat_spellresist", t.getSave(self, t))
self:talentTemporaryValue(p, "resists",{[DamageType.NATURE]=t.power(self, t)})
end,
info = function(self, t)
local netpower = t.power(self, t)
return ([[Unnatural power flows through the Rhalorens veins, helping them resist magic and causing natural energies to recoil from them.
Increase spell save by +%d and nature resistance by %d%%.]]):
format(t.getSave(self, t), netpower)
end,
}
The error is saying that there should be a } on the line with getSave, but the talents its based on don't have one. Can anyone point out the obvious for me?
(I'm saddened that this reveals what I was working on. I wanted it to be a surprise.)
Re: Making Addons Halp
Comma missing after points = 5? Or is that the one you already found?
My feedback meter decays into coding. Give me feedback and I make mods.
-
- Uruivellas
- Posts: 834
- Joined: Mon Jan 27, 2014 10:40 am
Re: Making Addons Halp
Ah! No, that'll be it. Commas are my bane, thank you. X_x
(A few minutes later after realising she left this on the post screen)
I ACTUALLY GOT IN GAME THIS TIME. A Momentous occasion. I mean, I don't seem to have a doll working, and apparently I messed up my third talent real bad somehow, but I got in!
Lua Error: /engine/interface/ActorTalents.lua:80: bad argument #3 to 'info' (number expected, got nil)
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:921 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
Relevant talent:
newTalent{
short_name = 'INFERNO_BLOOD_TITHE',
name = "Blood Tithe",
type = {"race/rhaloren", 3},
require = racial_req3,
points = 5,
no_energy = true,
cooldown = 30,
is_spell = true,
tactical = { BUFF = 2 },
getLifeDrain = function(self, t) return self:getTalentLevel(t) * 3 end,
getDuration = function(self, t) return self:getTalentLevelRaw(t) + 5 end,
action = function(self, t)
self:setEffect(self.EFF_BLOOD_TITHE, self:getTalentLevelRaw(t) , {power= self:getTalentLevelRaw(t)})
return true
end,
info = function(self, t)
local lifedrain = t.getLifeDrain(self, t)
local Duration = t.getDuration(self, t)
return ([[Your hunger for knowledge and powers is embodied in the way you fight, and you draw vitality from the destruction you cause.
For the next %d turns, damage you deal will cause you to heal for %d%% of the damage done.]]):
format(Duration,LifeDrain,Penetration,Damage)
end,
}
...while I'm on this spell, I'm concerned about balancing the lifedrain. My original plan was a sustain that drained an amount of your resources each turn, but when I considered coding that I cried. Currently its 3-18% for 6-10 turns, but it feels like 3% would be useless. Maybe if I make it 2/level plus a base of five or something?
(A few minutes later after realising she left this on the post screen)
I ACTUALLY GOT IN GAME THIS TIME. A Momentous occasion. I mean, I don't seem to have a doll working, and apparently I messed up my third talent real bad somehow, but I got in!
Lua Error: /engine/interface/ActorTalents.lua:80: bad argument #3 to 'info' (number expected, got nil)
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:921 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
Relevant talent:
newTalent{
short_name = 'INFERNO_BLOOD_TITHE',
name = "Blood Tithe",
type = {"race/rhaloren", 3},
require = racial_req3,
points = 5,
no_energy = true,
cooldown = 30,
is_spell = true,
tactical = { BUFF = 2 },
getLifeDrain = function(self, t) return self:getTalentLevel(t) * 3 end,
getDuration = function(self, t) return self:getTalentLevelRaw(t) + 5 end,
action = function(self, t)
self:setEffect(self.EFF_BLOOD_TITHE, self:getTalentLevelRaw(t) , {power= self:getTalentLevelRaw(t)})
return true
end,
info = function(self, t)
local lifedrain = t.getLifeDrain(self, t)
local Duration = t.getDuration(self, t)
return ([[Your hunger for knowledge and powers is embodied in the way you fight, and you draw vitality from the destruction you cause.
For the next %d turns, damage you deal will cause you to heal for %d%% of the damage done.]]):
format(Duration,LifeDrain,Penetration,Damage)
end,
}
...while I'm on this spell, I'm concerned about balancing the lifedrain. My original plan was a sustain that drained an amount of your resources each turn, but when I considered coding that I cried. Currently its 3-18% for 6-10 turns, but it feels like 3% would be useless. Maybe if I make it 2/level plus a base of five or something?
Last edited by astralInferno on Fri Apr 03, 2015 11:59 am, edited 1 time in total.
Re: Making Addons Halp
You haven't defined Penetration.
My feedback meter decays into coding. Give me feedback and I make mods.
-
- Uruivellas
- Posts: 834
- Joined: Mon Jan 27, 2014 10:40 am
Re: Making Addons Halp
...oh man that IS obvious. I knew it would be obvious.
Thank you so much. DXD
Thank you so much. DXD
-
- Uruivellas
- Posts: 834
- Joined: Mon Jan 27, 2014 10:40 am
Re: Making Addons Halp
...I removed the penetration and the damage from the end, and it still gives exactly the same error. I am now really confused.
-
- Uruivellas
- Posts: 708
- Joined: Wed Apr 30, 2008 5:55 pm
Re: Making Addons Halp
astralInferno wrote:Lua Error: /engine/interface/ActorTalents.lua:80: bad argument #3 to 'info' (number expected, got nil)
Code: Select all
local lifedrain = t.getLifeDrain(self, t)
local Duration = t.getDuration(self, t)
return ([[Your hunger for knowledge and powers is embodied in the way you fight, and you draw vitality from the destruction you cause.
For the next %d turns, damage you deal will cause you to heal for %d%% of the damage done.]]):
format(Duration,LifeDrain,Penetration,Damage)
If you look, you define "local lifedrain", not "local LifeDrain".
Addons: Arcane Blade Tweaks, Fallen Race, Monk Class, Weapons Pack
Currently working on Elementals. It's a big project, so any help would be appreciated.
Currently working on Elementals. It's a big project, so any help would be appreciated.
