Quantcast Cirk's Fastcast - WoWInterface
Thread Tools Display Modes
03-21-06, 02:05 AM   #1
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Cirk's Fastcast

Fastcast provides functionality for speeding up chain-casting of normal cast-time and channeled spells for players on high latency connections.

Current version
Fastcast is currently version 1.11.2.

Download page
http://www.wowinterface.com/download...fo.php?id=4733

Known bugs
None when running with the default client.

Future enhancements
None planned.

Notes
Fastcast is the end point of development that started with Channelcast (channeling protection), then to Channelcast beta (for the addition of fast casting). Due to the overwhelming interest in the fast casting feature, a UI and name change were in order, and Fastcast was born.

-- Cirk of Doomhammer
__________________
Cirk's Addons

Last edited by Cirk : 08-09-06 at 05:52 AM. Reason: Fastcast v1.11.1 release
  Reply With Quote
03-21-06, 01:32 PM   #2
teedog
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 13
After installed Fastcast, the following macro which I normally spam no longer works after one cast (instant cast due to Presence of Mind).

Code:
/cast Presence of Mind
/script UseInventoryItem(GetInventorySlotInfo("Trinket1Slot"));
/cast Frostbolt(Rank 10);
Also, do I understand the FAQ correctly that since I am casting Frostbolt from a macro, Fastcast will have no beneficial effect on it?

Thanks for this wonderful mod!
  Reply With Quote
03-21-06, 02:33 PM   #3
teedog
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 13
Does Fastcast take into account spell interruption? Suppose you are a healer in the Vaelastrasz fight. A normal 3 second heal becomes 4 seconds due to spell interruption from the aoe damage. With a padding of 0.2, Fastcast will cancel the spell at 3.2 seconds. No heal is cast and tank is dead.

Can Fastcast determine how much your cast time is increased by due to interruption, and adjust accordingly?

Last edited by teedog : 03-21-06 at 02:37 PM.
  Reply With Quote
03-21-06, 03:18 PM   #4
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Originally Posted by teedog
After installed Fastcast, the following macro which I normally spam no longer works after one cast (instant cast due to Presence of Mind).
I believe you need to have a call to SpellStopCasting after you cast PoM for this to work. (That should be the case regardless of whether you use Fastcast or not).


Originally Posted by teedog
Also, do I understand the FAQ correctly that since I am casting Frostbolt from a macro, Fastcast will have no beneficial effect on it?
What this means is that you can't chain-cast your next spell (say another Frostbolt) with Fastcast allowing you to cast the second spell early. I.e., you'll have to wait for the full duration of your first macro-cast Frostbolt (i.e., including the server-time lag).


Originally Posted by teedog
Does Fastcast take into account spell interruption? Suppose you are a healer in the Vaelastrasz fight. A normal 3 second heal becomes 4 seconds due to spell interruption from the aoe damage. With a padding of 0.2, Fastcast will cancel the spell at 3.2 seconds. No heal is cast and tank is dead.

Can Fastcast determine how much your cast time is increased by due to interruption, and adjust accordingly?
From the Questions section of the download description:
Q. Does Fastcast still work if your casting is slowed by a debuff, or if you are taking damage?
A. Yes it does. Fastcast uses the information on spell duration provided by the client, and handles changes to this when damage is taken. For channeled spells, when you take damage you lose cast-time remaining, and Fastcast handles that too.

Note also that Fastcast will only interrupt a spell when you try and cast another one and the spell's cast time + padding time has been reached but the spell is still casting. In other words it won't cancel the spell except in response to a user action - no timer based interruptions are used.


Cheers,
-- Cirk
__________________
Cirk's Addons

Last edited by Cirk : 03-21-06 at 03:23 PM.
  Reply With Quote
03-21-06, 03:58 PM   #5
teedog
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 13
Originally Posted by Cirk
I believe you need to have a call to SpellStopCasting after you cast PoM for this to work. (That should be the case regardless of whether you use Fastcast or not).
Strange I've been spamming this macro for the last few months without problems until installing Fastcast. If I add SpellStopCasting to the macro, I can't spam it since it would stop my Frostbolt casting.
  Reply With Quote
03-21-06, 04:01 PM   #6
teedog
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 13
Re: spell interruption

Eeeep I didn't read the FAQ carefully enough, sorry!

But what about the following scenario caused by lag? Can anything be done about it other than increasing the padding? I suppose it would be a rare case.

Params
1s latency
0.5s padding
3s heal

0.0s - start cast
2.6s - take damage adding 1s to cast time
3.5s - mod stops cast (client has not received report of damage due to bad lag)
3.6s - client receives report of damage from server due to bad latency
4.0s - heal never cast since cancelled at 3.5s

Last edited by teedog : 03-21-06 at 04:05 PM.
  Reply With Quote
03-21-06, 04:39 PM   #7
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Originally Posted by teedog
Strange I've been spamming this macro for the last few months without problems until installing Fastcast. If I add SpellStopCasting to the macro, I can't spam it since it would stop my Frostbolt casting.
Hmm, well according to this thread on the UI forums, you need to do:
Code:
/cast Presence of Mind
/script SpellStopCasting();
/script UseInventoryItem(GetInventorySlotInfo("Trinket1Slot"));
/cast Frostbolt(Rank 10);
Can you try that and see if it works?

Originally Posted by teedog
But what about the following scenario caused by lag? Can anything be done about it other than increasing the padding? I suppose it would be a rare case.
Yeah, that situation (where you pressed your heal key again at 3.5s, causing Fastcast to cancel the current spell) could definitely ruin your day, although hopefully that will be a very rare occurrence.

If you are worried, turn off Fastcast when you are casting those long heals and they most definitely positively must have them land (or don't spam your slow healing spells ). You can also try putting long casting spells like this into a macro (for healers, perhaps with an announce so that other healers or your target knows its coming) which should prevent Fastcast from allowing it to be interrupted by a second press of the same macro.


-- Cirk
__________________
Cirk's Addons

Last edited by Cirk : 03-21-06 at 07:02 PM.
  Reply With Quote
03-21-06, 05:54 PM   #8
teedog
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 13
Code:
/cast Presence of Mind
/script SpellStopCasting();
/script UseInventoryItem(GetInventorySlotInfo("Trinket1Slot"));
/cast Frostbolt(Rank 10);
That only works if you only want to cast a Frostbolt once. If you spam this macro, the first time will launch an instant PoM Frostbolt. The second time will start a normal Frostbolt cast. The third time will stop the Frostbolt cast and start a new one. And so on. So other than the first instant Frostbolt you never cast anything.

Code:
/cast Presence of Mind
/script UseInventoryItem(GetInventorySlotInfo("Trinket1Slot"));
/cast Frostbolt(Rank 10);
I used to spam this. First time launches a PoM instant Frostbolt. Second time starts a normal Frostbolt. Subsequently each press will either have no effect since you're casting Frostbolt or will start a new cast. Eventually the trinket and/or the PoM cooldown will end and the macro will cast those as well.

Not sure why Fastcast is not allowing me to do this.
  Reply With Quote
03-21-06, 06:57 PM   #9
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Originally Posted by teedog
I used to spam this. First time launches a PoM instant Frostbolt. Second time starts a normal Frostbolt. Subsequently each press will either have no effect since you're casting Frostbolt or will start a new cast. Eventually the trinket and/or the PoM cooldown will end and the macro will cast those as well.

Not sure why Fastcast is not allowing me to do this.
Ah, I get where you are coming from now, and I know why its not allowing it too! Basically Fastcast checks for the cooldown on the action, and because of the PoM cooldown, won't allow the macro to fire again (oops, damn macros always get me).

If you want to try a fix for this, change line 499 of Fastcast.lua from:
Code:
if (((id ~= _thisActionId) or IsAttackAction(id)) and (GetActionCooldown(id) == 0)) then
to:
Code:
if (((id ~= _thisActionId) or IsAttackAction(id)) and ((GetActionCooldown(id) == 0) or isMacro)) then
Hope that fixes it for you, let me know how it goes!
-- Cirk
__________________
Cirk's Addons
  Reply With Quote
03-21-06, 07:26 PM   #10
teedog
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 13
Thanks! Will let you know when I get a chance to test it.
  Reply With Quote
03-22-06, 06:39 AM   #11
Azareus78
A Kobold Labourer
Join Date: Mar 2006
Posts: 1
Ok, I've run debugon when casting Ice Block, here the result:

--->Requesting new action 20
Fastcast_OnEvent(SPELLCAST_STOP) with action 20
UseAction(20,1) +2.040
--->ignoring action due to cooldown
UseAction(20,1) +2.747
--->ignoring action due to cooldown


and so on....


I think that it checks the cooldown and then stops the action so it's impossible to remove iceblock pressing the action button (quite the same problem of the post above)....
  Reply With Quote
03-22-06, 12:10 PM   #12
mark718
A Defias Bandit
Join Date: Mar 2006
Posts: 2
I currently use the following macro to activate all my timers. Up until I installed fastcast, it would allow me to activate all three abilities or whichever ones were not on cooldown at the time (ie, Arcane Power and ZHC, or just ToEP).

/cast Arcane Power
/script SpellStopCasting()
/usebyname Talisman of Ephemeral Power
/script SpellStopCasting()
/usebyname Zandalarian Hero Charm

As you can see, I use the UseByName mod off curse-gaming. Anyway, after installing Fastcast, I can no longer activate my trinkets while Arcane Power is on cooldown. Pressing the macro would yield nothing even though the trinkets were ready for use. Upon disactivating fastcast, the macro begins to function as it should.
  Reply With Quote
03-22-06, 02:29 PM   #13
Raknor
A Defias Bandit
Join Date: Mar 2006
Posts: 2
Interesting addon, could be very useful. But unfortunatly I can't use it :/

I got a couple of self written addons that make heavy use of keybindings, CastSpell and CastSpellByName. Can you please update your addon to hook these functions as well?
  Reply With Quote
03-22-06, 03:54 PM   #14
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Originally Posted by Azareus78
Ok, I've run debugon when casting Ice Block, here the result:
...
I think that it checks the cooldown and then stops the action so it's impossible to remove iceblock pressing the action button (quite the same problem of the post above)....
Thanks for running that test for me Azareus78, yeah for some reason the cooldown check is interfering here, and I'm not quite sure why. I'll do some more experimenting on my end, see if I can figure out what exactly is happening that makes this scenario different to other toggle type actions with a cooldown (such as Stealth).


Originally Posted by mark718
I currently use the following macro to activate all my timers. Up until I installed fastcast, it would allow me to activate all three abilities or whichever ones were not on cooldown at the time (ie, Arcane Power and ZHC, or just ToEP).
...
As you can see, I use the UseByName mod off curse-gaming. Anyway, after installing Fastcast, I can no longer activate my trinkets while Arcane Power is on cooldown. Pressing the macro would yield nothing even though the trinkets were ready for use. Upon disactivating fastcast, the macro begins to function as it should.
Hi mark718, yeah that looks like the same problem that teedog was having (see teedog's earlier posts) and that modification to Fastcast.lua I posted above should also fix the issue for you. I'll be doing some testing on that for the next release of Fastcast, but if you get a chance to try it out and let me know if it works for you, that'd be great.


Originally Posted by Raknor
Interesting addon, could be very useful. But unfortunatly I can't use it :/

I got a couple of self written addons that make heavy use of keybindings, CastSpell and CastSpellByName. Can you please update your addon to hook these functions as well?
Thats an interesting idea Raknor, I didn't hook those functions because normally these functions would be called via macros (and therefore triggered from the action bar), and most key-binding direct addons that I was thinking of (buffing mods, etc.) use instant cast spells. However, there are mods (like yours) that use cast-time spells directly from key-bindings or their own non-action buttons.

One of the big difficulties however with not using UseAction and the action functions is that without being able to call IsCurrentAction, there is no easy way to know if the client has accepted the spellcast request or not, which can really complicate the sequencing logic (think what happens if there are multiple requests to the function before a SPELLCAST_STOP or SPELLCAST_START event occurs - which one was it actually for?). I may look into this for a future relase, but due to the complexity its not very high on my priority list at the moment.

Feel free to have a play around with it yourself and see if you can get it to work with hooked CastSpell and CastSpellByName functions though, I'd be intrigued to see a solution if you can come up with one.

Thanks all for the feedback!
-- Cirk
__________________
Cirk's Addons
  Reply With Quote
03-22-06, 05:16 PM   #15
gomer
A Kobold Labourer
Join Date: Mar 2006
Posts: 1
Originally Posted by Cirk
Ah, I get where you are coming from now, and I know why its not allowing it too! Basically Fastcast checks for the cooldown on the action, and because of the PoM cooldown, won't allow the macro to fire again (oops, damn macros always get me).

If you want to try a fix for this, change line 499 of Fastcast.lua from:
Code:
if (((id ~= _thisActionId) or IsAttackAction(id)) and (GetActionCooldown(id) == 0)) then
to:
Code:
if (((id ~= _thisActionId) or IsAttackAction(id)) and ((GetActionCooldown(id) == 0) or isMacro)) then
Hope that fixes it for you, let me know how it goes!
-- Cirk
I haven't had a chance to check yet, but I have my own macro that I usually spam that uses my ToEP then casts Starfire. Would I have the same problem as in this mage example if I were not to make this change to the code? Is there any negative effect to changing that line of code whatsoever?

Edit: I'm asking since all the mage macro examples have 'buff' spells (PoM, AP) along with trinkets and my macro only has a trinket and the one damage spell and I'm not sure if it's the trinket causing the problem, or the buff spells, or both in their examples.

Last edited by gomer : 03-22-06 at 05:19 PM.
  Reply With Quote
03-22-06, 05:28 PM   #16
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Originally Posted by gomer
I haven't had a chance to check yet, but I have my own macro that I usually spam that uses my ToEP then casts Starfire. Would I have the same problem as in this mage example if I were not to make this change to the code? Is there any negative effect to changing that line of code whatsoever?
Hi gomer. The change I described basically removes the cooldown test if your action is a macro rather than a spell or skill ability, which is definitely what it should do (since macros may do many other things too, unrelated to the cooldown of their first spell action). There shouldn't be any negative effects to making this change.

In your example however, your macro probably won't show a cooldown because ToEP is an item rather than a spell, and I don't think the game's macro code recognizes cooldowns from items.

Cheers
-- Cirk
__________________
Cirk's Addons
  Reply With Quote
03-22-06, 10:33 PM   #17
mark718
A Defias Bandit
Join Date: Mar 2006
Posts: 2
Originally Posted by Cirk
Hi mark718, yeah that looks like the same problem that teedog was having (see teedog's earlier posts) and that modification to Fastcast.lua I posted above should also fix the issue for you. I'll be doing some testing on that for the next release of Fastcast, but if you get a chance to try it out and let me know if it works for you, that'd be great.
-- Cirk
Yup, Cirk, that seems to have worked it out. Thanks.
  Reply With Quote
03-23-06, 04:04 AM   #18
Raknor
A Defias Bandit
Join Date: Mar 2006
Posts: 2
Originally Posted by Cirk
Thats an interesting idea Raknor, I didn't hook those functions because normally these functions would be called via macros (and therefore triggered from the action bar), and most key-binding direct addons that I was thinking of (buffing mods, etc.) use instant cast spells. However, there are mods (like yours) that use cast-time spells directly from key-bindings or their own non-action buttons.

One of the big difficulties however with not using UseAction and the action functions is that without being able to call IsCurrentAction, there is no easy way to know if the client has accepted the spellcast request or not, which can really complicate the sequencing logic (think what happens if there are multiple requests to the function before a SPELLCAST_STOP or SPELLCAST_START event occurs - which one was it actually for?). I may look into this for a future relase, but due to the complexity its not very high on my priority list at the moment.

Feel free to have a play around with it yourself and see if you can get it to work with hooked CastSpell and CastSpellByName functions though, I'd be intrigued to see a solution if you can come up with one.
The error message you get if a spell can't be casted for some reason comes instantly in the next frame, it's not influenced by lag.

Example of what happens:

CastSpell(123, BOOKTYPE_SPELL).
a) No other spell cast active1
- If gobal cooldown -> abort silently
- If other cooldown -> error
- If low mana, no target and so on -> error
- Else send request to server, no message. Server will send SPELLCAST_START and the likes.
b) Other spell active right now
- If global cooldown -> abort silently
- If other cooldown -> error
- If low mana, no target and so on -> error
- Else report error

Since it's highly unlikely to cast multiple spells each frame (unless you hit the hotkey insanely fast or fps is extremely low) this should work reasonably well to detect whether a cast was started clientside.
  Reply With Quote
03-23-06, 05:20 AM   #19
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Originally Posted by Raknor
The error message you get if a spell can't be casted for some reason comes instantly in the next frame, it's not influenced by lag.
...
Actually if the client can determine a failure reason, it happens inside the CastSpell or CastSpellByName call (same thing for UseAction), and that isn't the issue. The issue comes about in the couple of hundred of milliseconds after the spell request has been sent to the server. For actions, we can use IsActionCurrent to determine whether the action "request" is currently in the queue, waiting for a response from the server. When we get a SPELLCAST_START/STOP/CHANNEL_START/etc., the IsActionCurrent state either changes immediately (instant spells, channeled spells) or stays current for the duration of the spell (normal cast-time spells, provided we didn't do a SpellStopCasting followed by another action immediately before, which confuses the client) or effect (stealth, etc.). For toggle type actions (channeled spells, stealth, etc.) its important to be able to recognize this IsActionCurrent behavior so that we don't accidentally allow the user to send the same action again and accidentally cancel it. (Yeah I know, thats what the default client does anyway if you double tap or spam you keys at the wrong time, but I'm trying to improve on that ).

We could (for example) simply disallow another CastSpell or CastSpellByName action until we get a server response (of some sort) if we can determine that the spell has gone to the server (e.g., we didn't get a failure generated by the client immediately) since unlike actions, you can't normally have more than one going at a time. But, then that would also prevent being able to use macros such as the common PoM + big damage spell that many mages like to use (since we'd be not allowing the second CastSpellByName call until we'd seen a response from the first call).

Alternatively, we allow both (or multiple) calls to go through, but then when we get the SPELLCAST_... responses back from the server, to which spells did they apply? Thats the tricky part of the whole thing, and you could probably craft some custom solutions for yourself that you understand the limitations of, etc., but making it robust enough for everyone to use would be a lot more work.

Bottom line, long term it'd probably be possible to implement CastSpell and CastSpellByName similar to how the UseAction code works right now in Fastcast, but identifying all the loose ends and corner cases is what makes it tricky, and at this point (for me anyway ) low priority.

Cheers
-- Cirk
__________________
Cirk's Addons
  Reply With Quote
03-24-06, 05:30 AM   #20
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Fastcast v1.9.1 is now available, which has fixes for:
  • Mage Ice Block spell not cancelling from a second key press.
  • Macros that start with a spell that has a cooldown (e.g., PoM combos) not working.
  • Not being able to stop wand casting by pressing your Shoot action key a second time.

Basically I removed the cooldown check that I added during my "improvements" to the spellcasting control logic between Channelcast v1.9.2beta2 and Fastcast v1.9.0. Turns out it was not needed anyway, and was the root cause of all those problems.

Anyway, hope that fixes those bugs for you all!
-- Cirk
__________________
Cirk's Addons
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Released AddOns » Cirk's Fastcast

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off