Ye Official Callbacks Request Thread

All development conversation and discussion takes place here

Moderator: Moderator

Message
Author
Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Ye Official Callbacks Request Thread

#1 Post by Doctornull »

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!
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Fortescue
Wyrmic
Posts: 285
Joined: Sat Feb 08, 2014 1:02 am

Re: Ye Official Callbacks Request Thread

#2 Post by Fortescue »

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.

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: Ye Official Callbacks Request Thread

#3 Post by Doctornull »

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.
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: Ye Official Callbacks Request Thread

#4 Post by Doctornull »

callbackOnSummon_Post(self, t, entity)

Callback triggered after summoned entity is created.
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

PureQuestion
Master Artificer
Posts: 726
Joined: Fri Feb 03, 2012 3:53 am

Re: Ye Official Callbacks Request Thread

#5 Post by PureQuestion »

Doctornull wrote:items which heal on wilder summoning.
This is, unfortunately, not how callbacks work.

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: Ye Official Callbacks Request Thread

#6 Post by Doctornull »

PureQuestion wrote:This is, unfortunately, not how callbacks work.
Callbacks should work for wearable items.

You may consider this a request for that.
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Ye Official Callbacks Request Thread

#7 Post by darkgod »

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 ;)

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: Ye Official Callbacks Request Thread

#8 Post by Doctornull »

darkgod wrote:With a little trick they do, just make your item teach a passive talent that has the callback
You are awesome.
PureQuestion wrote:This is, unfortunately, not how callbacks work.
You are useless!

---

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.
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Nagyhal
Wyrmic
Posts: 282
Joined: Tue Feb 15, 2011 12:01 am

Re: Ye Official Callbacks Request Thread

#9 Post by Nagyhal »

edit: Pointless post, carry on :mrgreen:

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: Ye Official Callbacks Request Thread

#10 Post by Doctornull »

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 )
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Nagyhal
Wyrmic
Posts: 282
Joined: Tue Feb 15, 2011 12:01 am

Re: Ye Official Callbacks Request Thread

#11 Post by Nagyhal »

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!

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: Ye Official Callbacks Request Thread

#12 Post by HousePet »

Seconding a request for callbacks on items.
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.

Nagyhal
Wyrmic
Posts: 282
Joined: Tue Feb 15, 2011 12:01 am

Re: Ye Official Callbacks Request Thread

#13 Post by Nagyhal »

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.

Nagyhal
Wyrmic
Posts: 282
Joined: Tue Feb 15, 2011 12:01 am

Re: Ye Official Callbacks Request Thread

#14 Post by Nagyhal »

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:

Code: Select all

speed, hit, damtype, mult = hd.speed, hd.hit, hd.damtype, hd.mult
if hd.stop then return hit end
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.)

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: Ye Official Callbacks Request Thread

#15 Post by Doctornull »

Suggestion for naming conventions:

callbackPreMelee(...)

callbackPostMeleeHit(...)
callbackPostMeleeMiss(...)
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Post Reply