EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > UI Developer Discussion

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 08-14-2009, 07:12 PM
IFoundTheLight IFoundTheLight is offline
A Young Mystail Rat
Interface Author - Click to view interfaces
 
Join Date: Aug 2009
Server: Unkown
Posts: 4
Default Casting Bar Cast Time

Does anyone know how to get the current cast time since the cast as started of the current cast.
Reply With Quote
  #2  
Unread 08-15-2009, 08:36 PM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 256
Default

Can you rephrase that? I can't really decode what you're asking. You might be able to attach a Location Effector to the casting bar becoming visible and at a certain point calculate a time in seconds based on the relative location and speed of the effector. But I can't wrap my head around what you're asking to say more.
Reply With Quote
  #3  
Unread 08-15-2009, 09:51 PM
dragowulf's Avatar
dragowulf dragowulf is offline
A man among men
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Nagafen
Posts: 934
Default

I think what he's trying to ask is if there is a way to get the cast time in seconds showing the current cast second and the maximum spell cast seconds (e.g. 0.5s/6s).

So to answer your question, no.
__________________
May Jesus Have Mercy On Us
Reply With Quote
  #4  
Unread 08-16-2009, 01:16 AM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 256
Default

I wouldn't say that's impossible.

Make a Location Effector that takes a while to complete. When the casting bar becomes visible start the effector animating. Based on the speed of the effector and the relative location from the start position calculate how long the animation has been going on. Next take the casting bar's progress and extrapolate the maximum casting time.

Say the start location of the effector element is 0,0 and the destination is 10000,0 with a speed of 1000,0. Take a single frame of on move of the effector's element. If the element's location is 1455,0 and the progress bar's progress is 0.333 we can deduce that we are 1.455s into the cast with a total casting time of 4.37s at completion.

I admit that this is totally reliant on the accuracy of the progress bar and you'll get a different total casting time per frame due to calculation rounding.

Just because I'm someone who doesn't say things without backing it up... here's a modded default casting bar that instead of showing the spell name it shows something like "1.4s of 5.2s"... meaning 1.4 seconds into a 5.2 second cast. Big note... this usable example shows that the data the game gives us isn't accurate enough to correctly calculate the total casting time without some extra code to account for whatever is missing. IE a 10s spell will be calcuated as 10.1-2 and a 30s spell will be calculated as 30.4-5
Attached Files
File Type: xml eq2ui_mainhud_casting.xml (4.4 KB, 614 views)
Reply With Quote
  #5  
Unread 08-16-2009, 02:15 AM
dragowulf's Avatar
dragowulf dragowulf is offline
A man among men
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Nagafen
Posts: 934
Default

Wow. I honestly didn't think of LocationEffectors, yet I use them all the time for these sort of things.

But yeah it isn't accurate. A 30 sec spell was tripping out between 25-27.


Again a place where EQ2's UI fails.
__________________
May Jesus Have Mercy On Us
Reply With Quote
  #6  
Unread 08-16-2009, 03:35 AM
IFoundTheLight IFoundTheLight is offline
A Young Mystail Rat
Interface Author - Click to view interfaces
 
Join Date: Aug 2009
Server: Unkown
Posts: 4
Default

Is there a way to only grab the max length of the spell cast once? set it to a variable and then keep it each time?

and is there a place i can find out more about this scripting feature? commands and format
Reply With Quote
  #7  
Unread 08-16-2009, 04:35 AM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 256
Default

We don't get anything like arrays where we can keep that sort of information easily. We cannot tell what the cast time is before or during a spell cast. We cannot tell if a spell has fully cast or was canceled by the user even if we wanted to store the maximum second value.

The scripting isn't really documented by SoE. We more or less figure things out from each other or trial and error. That being why these sub-forums exist.
Reply With Quote
  #8  
Unread 08-16-2009, 11:59 AM
dragowulf's Avatar
dragowulf dragowulf is offline
A man among men
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Nagafen
Posts: 934
Default

Quote:
Originally Posted by EQAditu View Post
We don't get anything like arrays where we can keep that sort of information easily. We cannot tell what the cast time is before or during a spell cast. We cannot tell if a spell has fully cast or was canceled by the user even if we wanted to store the maximum second value.

The scripting isn't really documented by SoE. We more or less figure things out from each other or trial and error. That being why these sub-forums exist.
Well sometimes the casting bar goes invisible before the spell casting is completely finished. It's a bug that's been in since launch.

Since EQ2's UI is such a pain we need a workaround for literally everything we do.

I'll play around with EQAditu's code.
__________________
May Jesus Have Mercy On Us
Reply With Quote
  #9  
Unread 08-17-2009, 09:50 AM
Zonx's Avatar
Zonx Zonx is offline
A Green Troll
This person is a EQ2Map developer.
Featured
 
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
Default

You could calculate the max time the first time both the prog and effector have updated, store that as a variable on the parent window MaxTime='variableName', and replace the script with one that omits that bit of code.

But due to rounding, early calcs of MaxTime will be less accurate than later calcs.

And cast times for the same ability will often vary through-out a session due to temp haste buffs, so its probably not a good idea to store MaxTime for use in subsequent casts.
Reply With Quote
Reply



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
Forum Jump


All times are GMT -5. The time now is 05:39 AM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI