Ye Official Callbacks Request Thread
Moderator: Moderator
-
- Sher'Tul Godslayer
- Posts: 2402
- Joined: Tue Jun 18, 2013 10:46 pm
- Location: Ambush!
Ye Official Callbacks Request Thread
Callbacks are awesome. They allow talents (sustained & passive) and timed effects to add per-actor hooks which get called just like hooks would, but they're way more efficient because they only apply to those specific actors who have the talent or are subject to the timed effect.
Callbacks are new, and there are not enough of them yet. Here is where you can request more!
Callbacks are new, and there are not enough of them yet. Here is where you can request more!
Re: Ye Official Callbacks Request Thread
I want a callback for any projectile object that collides with an actor.
For example, I want a talent that "blocks" projectiles regardless of their composition (physical / magical / mental / etc...). If it has a travel time, I want to be able to block it.
For example, I want a talent that "blocks" projectiles regardless of their composition (physical / magical / mental / etc...). If it has a travel time, I want to be able to block it.
-
- Sher'Tul Godslayer
- Posts: 2402
- Joined: Tue Jun 18, 2013 10:46 pm
- Location: Ambush!
Re: Ye Official Callbacks Request Thread
callbackOnFireSpell_Location(self, t, x, y)
callbackOnFireSpell_Grids(self, t, {{x,y},{x,y},{x,y},...})
Use this in Spell/Fire to set Inferno on tiles if Wildfire is active, other addon talents can do cool non-Inferno things.
callbackOnWilderSummon(self, t, summon_string)
Use this for Grand Arrival and for items which heal on wilder summoning.
Please separate out callbackOnCrit into callbackOnCrit_Physical, callbackOnCrit_Mental and callbackOnCrit_Spell because having a function call for events which will never be relevant is a waste of time and against the idea of callbacks.
callbackOnFireSpell_Grids(self, t, {{x,y},{x,y},{x,y},...})
Use this in Spell/Fire to set Inferno on tiles if Wildfire is active, other addon talents can do cool non-Inferno things.
callbackOnWilderSummon(self, t, summon_string)
Use this for Grand Arrival and for items which heal on wilder summoning.
Please separate out callbackOnCrit into callbackOnCrit_Physical, callbackOnCrit_Mental and callbackOnCrit_Spell because having a function call for events which will never be relevant is a waste of time and against the idea of callbacks.
-
- Sher'Tul Godslayer
- Posts: 2402
- Joined: Tue Jun 18, 2013 10:46 pm
- Location: Ambush!
Re: Ye Official Callbacks Request Thread
callbackOnSummon_Post(self, t, entity)
Callback triggered after summoned entity is created.
Callback triggered after summoned entity is created.
-
- Master Artificer
- Posts: 726
- Joined: Fri Feb 03, 2012 3:53 am
Re: Ye Official Callbacks Request Thread
This is, unfortunately, not how callbacks work.Doctornull wrote:items which heal on wilder summoning.
-
- Sher'Tul Godslayer
- Posts: 2402
- Joined: Tue Jun 18, 2013 10:46 pm
- Location: Ambush!
Re: Ye Official Callbacks Request Thread
Callbacks should work for wearable items.PureQuestion wrote:This is, unfortunately, not how callbacks work.
You may consider this a request for that.
Re: Ye Official Callbacks Request Thread
With a little trick they do, just make your item teach a passive talent that has the callback
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

-
- Sher'Tul Godslayer
- Posts: 2402
- Joined: Tue Jun 18, 2013 10:46 pm
- Location: Ambush!
Re: Ye Official Callbacks Request Thread
You are awesome.darkgod wrote:With a little trick they do, just make your item teach a passive talent that has the callback
You are useless!PureQuestion wrote:This is, unfortunately, not how callbacks work.
---
callbackOnCalculate_Spellpower
callbackOnCalculate_Physpower
callbackOnCalculate_Mindpower - These would all be called inside actor:getXpower. This would allow for talents like Arcane Cunning to be implemented without superloading, and for ephemeral debuffs like Indimidated.
Re: Ye Official Callbacks Request Thread
edit: Pointless post, carry on 

-
- Sher'Tul Godslayer
- Posts: 2402
- Joined: Tue Jun 18, 2013 10:46 pm
- Location: Ambush!
Re: Ye Official Callbacks Request Thread
General interface to trigger whenever a talent is used:
callbackOnUseTalent
Interface to trigger whenever a class of talent is used:
callbackOnUseTalent_spell
callbackOnUseTalent_mind
callbackOnUseTalent_technique
callbackOnUseTalent_cunning
callbackOnUseTalent_nature
callbackOnUseTalent_infusion
callbackOnUseTalent_rune
callbackOnUseTalent_taint
etc. (are there more classes of talents?)
Specific interface to trigger whenever a specific talent is used:
"callbackOnUseTalent_%s" : format( t.short_name )
callbackOnUseTalent
Interface to trigger whenever a class of talent is used:
callbackOnUseTalent_spell
callbackOnUseTalent_mind
callbackOnUseTalent_technique
callbackOnUseTalent_cunning
callbackOnUseTalent_nature
callbackOnUseTalent_infusion
callbackOnUseTalent_rune
callbackOnUseTalent_taint
etc. (are there more classes of talents?)
Specific interface to trigger whenever a specific talent is used:
"callbackOnUseTalent_%s" : format( t.short_name )
Re: Ye Official Callbacks Request Thread
Any chance of a callback at the beginning of the base damage projector function in damage_types.lua?
There's already both a callback and a hook for the end of the damage projector function, and there's a hook at the beginning, too, but no callback.
Essentially I just want to deal additional damage upon damaging an enemy, but because the damage type used provides a beneficial effect for the source, it needs to occur before the triggering damage kills a target.
I'll do it in hooks/load.lua for now, but a callback would be just perfect! Thanks for hearing me out!
There's already both a callback and a hook for the end of the damage projector function, and there's a hook at the beginning, too, but no callback.
Essentially I just want to deal additional damage upon damaging an enemy, but because the damage type used provides a beneficial effect for the source, it needs to occur before the triggering damage kills a target.
I'll do it in hooks/load.lua for now, but a callback would be just perfect! Thanks for hearing me out!
Re: Ye Official Callbacks Request Thread
Seconding a request for callbacks on items.
Slipping on a passive talent is kinda missing the point on what makes callbacks good.
Slipping on a passive talent is kinda missing the point on what makes callbacks good.
My feedback meter decays into coding. Give me feedback and I make mods.
Re: Ye Official Callbacks Request Thread
Can't believe there's no hook/callback on level up!
Please see to it that this dreadful state of affairs is amended at once.
Please see to it that this dreadful state of affairs is amended at once.
Re: Ye Official Callbacks Request Thread
ElectronicRU and I have been discussing callbacks quite a bit on the IRC channel.
One thing that - for me - is a huge omission is the inability to interrupt melee attacks.
callbackOnMeleeHit and callbackOnMeleeMiss are invoked only after the hit/miss status of an attack is decided. callbackOnMeleeAttack is placed at the end of the entire attack function ("attackTargetWith") and doesn't do anything, the hook "Combat:attackTargetWith" looks like it sends something back, but in reality this only determines whether particles display and whether whatever making the attack treats the attack as if it had succeeded.
Truth be told, none of us can figure out what the return values of "Combat:attackTargetWith" are actually good for.
I'd like a callback at the beginning of the "attackTargetWith" function in Combat.lua which can cause the provoking melee attack to be altered / interrupted (attackTarget is useable in this way but will only work for bump attacks, and only once per bump - rather per weapon strike.)
The Combat:attackTarget hook is the best-featured of its kind, and may send back the following information, although it is not in a place to be of very much use:
I'd like to see a similar check at the beginning of attackTargetWith, before the damage is projected and roughly at the point at which Repel and Evasion are checked for (before, after or within these features is not something I can decide.)
And I'd like to see all callbacks made equal to their equivalent hooks, and given the same ability to pass data back to their calling functions, within reason (I understand that multiple addons having similar callbacks can create strange interactions, but ElectronicRU is working on that, and besides the same should be true for hooks anyway.)
One thing that - for me - is a huge omission is the inability to interrupt melee attacks.
callbackOnMeleeHit and callbackOnMeleeMiss are invoked only after the hit/miss status of an attack is decided. callbackOnMeleeAttack is placed at the end of the entire attack function ("attackTargetWith") and doesn't do anything, the hook "Combat:attackTargetWith" looks like it sends something back, but in reality this only determines whether particles display and whether whatever making the attack treats the attack as if it had succeeded.
Truth be told, none of us can figure out what the return values of "Combat:attackTargetWith" are actually good for.
I'd like a callback at the beginning of the "attackTargetWith" function in Combat.lua which can cause the provoking melee attack to be altered / interrupted (attackTarget is useable in this way but will only work for bump attacks, and only once per bump - rather per weapon strike.)
The Combat:attackTarget hook is the best-featured of its kind, and may send back the following information, although it is not in a place to be of very much use:
Code: Select all
speed, hit, damtype, mult = hd.speed, hd.hit, hd.damtype, hd.mult
if hd.stop then return hit end
And I'd like to see all callbacks made equal to their equivalent hooks, and given the same ability to pass data back to their calling functions, within reason (I understand that multiple addons having similar callbacks can create strange interactions, but ElectronicRU is working on that, and besides the same should be true for hooks anyway.)
-
- Sher'Tul Godslayer
- Posts: 2402
- Joined: Tue Jun 18, 2013 10:46 pm
- Location: Ambush!
Re: Ye Official Callbacks Request Thread
Suggestion for naming conventions:
callbackPreMelee(...)
callbackPostMeleeHit(...)
callbackPostMeleeMiss(...)
callbackPreMelee(...)
callbackPostMeleeHit(...)
callbackPostMeleeMiss(...)