ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Thu Oct 17, 2019 8:14 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sun Oct 22, 2017 12:50 pm 
Offline
Low Yeek

Joined: Tue Jan 12, 2016 11:15 am
Posts: 9
G'day, I've had a bit of a hankering to play around making addons.

I've made minor changes before, but I'm wanting to do more.

For the most part it's pretty easy to open up the currently existing classes and addons that already work, and cannibalise/learn from them.

But there's some things that don't quite make sense (for example one ability has "local hit = self:attackTarget(target, nil, t.getDamage(self, t), true)", I can work out what most of it means, but I don't know what the nil refers to).

Is there a comprehensive list of how things work and what each command does? There's the reference for modules, is everything that I need to know about in there, and I'm just not looking hard enough? Or is there another list somewhere?

I've managed to get a single skill tree working so far! There's just some things that are a bit confusing or I've had to give up on slightly to move forward.


Top
 Profile  
 
PostPosted: Sun Oct 22, 2017 5:33 pm 
Offline
Uruivellas

Joined: Mon Jan 27, 2014 10:40 am
Posts: 703
There is no comprehensive list of anything, as far as I'm aware. Everything in lua is cobbled together.

(In the case of your example, you would find the definition of attackTarget in mod/class/interface/combat.lua. "nil" here is being passed as the damage type of the attack: attackTarget sees you gave it no damage type, so the attack uses whatever damage type your attack would normally do - so, usually, physical.)

People are usually willing to help explain, though - I did all my stuff by cannibalising other addons and asking for help on IRC. I still barely know what I'm doing, but things do eventually start to make a bit of sense. One important revelation I had is that tome/lua doesn't have any central definitions. I used to assume that somewhere there was a guideline for talent creation; something that would look for a talent's cooldown, range, etc. There is no such thing, though. The building blocks of a talent are relevant only because other things look for them. Everything in lua only exists when something else looks for it.

I hope some of this helps.


Top
 Profile  
 
PostPosted: Sun Oct 22, 2017 11:54 pm 
Offline
Low Yeek

Joined: Tue Jan 12, 2016 11:15 am
Posts: 9
astralInferno wrote:
There is no comprehensive list of anything, as far as I'm aware. Everything in lua is cobbled together.

(In the case of your example, you would find the definition of attackTarget in mod/class/interface/combat.lua. "nil" here is being passed as the damage type of the attack: attackTarget sees you gave it no damage type, so the attack uses whatever damage type your attack would normally do - so, usually, physical.)

People are usually willing to help explain, though - I did all my stuff by cannibalising other addons and asking for help on IRC. I still barely know what I'm doing, but things do eventually start to make a bit of sense. One important revelation I had is that tome/lua doesn't have any central definitions. I used to assume that somewhere there was a guideline for talent creation; something that would look for a talent's cooldown, range, etc. There is no such thing, though. The building blocks of a talent are relevant only because other things look for them. Everything in lua only exists when something else looks for it.

I hope some of this helps.


I had a strange feeling that was going to be the answer!

I'll just keep sifting through things and see what I can scrape together aha. Looking through the Combat.lua does clear up some things though, might have to look through the rest at some point and see what other little things pop out.


Top
 Profile  
 
PostPosted: Mon Oct 23, 2017 7:49 am 
Offline
Uruivellas

Joined: Tue May 14, 2013 3:45 pm
Posts: 851
Actor.lua and Combat.lua contain a lot of the most common and important functions that talents will call. I'd recommend getting some sort of tool for searching the codebase so you can find the definitions of things like your attacktarget.


Top
 Profile  
 
PostPosted: Mon Oct 23, 2017 9:03 am 
Offline
Low Yeek

Joined: Tue Jan 12, 2016 11:15 am
Posts: 9
Razakai wrote:
Actor.lua and Combat.lua contain a lot of the most common and important functions that talents will call. I'd recommend getting some sort of tool for searching the codebase so you can find the definitions of things like your attacktarget.


Yeah, that's about close enough to what I need to understand! Now it's just a matter of sifting through and remembering it without having to dive back in every 30 seconds.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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