EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   Request (https://www.eq2interface.com/forums/forumdisplay.php?f=25)
-   -   Autoattack timer (https://www.eq2interface.com/forums/showthread.php?t=11124)

dragowulf 11-13-2008 06:18 PM

I'm still talking to Rothgar. According to him it is extremely difficult trying to make the client hit zero at the exact same time that the server performs the next attack (because auto attack is calculated server-side).

Nonetheless, we'll take whatever he's able to give us. ;)

My question is though, how would razieh be able to do it perfectly, yet Rothgar can't:confused: That boggles my mind

reins 11-13-2008 08:15 PM

Being out of range does not consume an auto attack. As soon as you move in range the auto attack will fire.

As far as on screen notifications, the most glaring is combat bubbles. They have to have something to do with the mod.

gm9 11-14-2008 03:28 AM

If being out of range does not consume the auto-attack after all (hey, I don't know the mechanics) then actually your only choice for an attempt at synchronization is to go after the combat bubbles. For that you'd need to be able to visually distinguish your own auto-attack bubbles from all other damage types, including your auto-attack misses, and that for each weapon separately (assuming they don't always miss at the same time and assuming that a miss will still consume the auto-attack for that weapon). Again, no clue about that either. Your timing will be off though by the time it takes for auto-attack to be performed on the server, the damage being calculated on the server and sent back to the client and finally it being displayed in the UI.

Talking about combat bubbles, I tried ages ago to make an ingame real time dps monitor from them but as soon as there were too many bubbles on screen it would choke (data was just dropped, I'm not sure if it never appeared on screen or whether the code entered a race condition). And of course it wasn't terribly useful because I took the raw data without any normalization over time. Someone should try it today. /end derail.

Landiin 11-14-2008 08:37 AM

reins are you sure it does? I tested this with a long delay 2h; after I got the OOR msg I was able to walk up to a mob and stand there, then back out before the next AA round with out hitting it .

reins 11-14-2008 03:48 PM

Coming from a pvp server where targets move out of range all the time, ya i'm positive that being out of range does not consume the auto attack.

Try it with a bow, move to absolute max range then back out a bit. (You can tell by the shading on the ranged auto attack button). Toggle on ranged auto attack then step into range, it should fire immediately.

ananigma 11-14-2008 04:16 PM

Sorry if you already covered this but all it seems that you need to do is...

Create a Progress Bar that starts when an auto attack is triggered whether it lands, misses, etc. Very similar to the progress that bar that starts when you cast a Spell or Combat Art. Then have that progress bar determine it's length based on the delay of your auto attack. If you can create both that should work and you won't have the issues you are discussing such as lag, being out of range, and so on.

So basically...

You autoattack: Progress bar timer starts based on current delay and does not reset until the next autoattack is done. Not an infinite loop which reads your delay because weapon delays will change, auto attacks can be delayed, and lag can cause the timing to be off.

I am not a coder so I have no idea if this can be done or how it would be done. Wish I did because this would be a very helpful addition. However this seems to be the only way to do this and have it still be accurate.

Good Luck. :)

Landiin 11-14-2008 05:17 PM

Quote:

Originally Posted by reins (Post 77226)
Coming from a pvp server where targets move out of range all the time, ya i'm positive that being out of range does not consume the auto attack.

Try it with a bow, move to absolute max range then back out a bit. (You can tell by the shading on the ranged auto attack button). Toggle on ranged auto attack then step into range, it should fire immediately.

I'll try it with a ranged weapon tonight but I know it consume it for melee else I wouldn't of been able to walk up to the mob with AA on and not hit it.

samejima 11-15-2008 02:17 AM

Ranged auto attack and melee auto attack share the same timer bud, for the record hes right being out of range does not consume an auto attack. But you guys could code a UI that thought it did, it would be fun to see :D

Landiin 11-15-2008 02:59 AM

Ranged seems not to consume a AA, every time I would step in range it would shoot. That was not true for melee AA though. when I would see the OOR msg i could go and stand by the mob and back out and get the OOR msg again with out ever hitting the mob with melee. Maybe my timing is just to good in melee but I doubt it.

Drumstix42 11-15-2008 04:42 AM

Sure you're not just missing? :p Just kidding.

Landiin 11-15-2008 10:03 AM

I knew someone would say that, that is why I did these test on mobs 60+ levels below me. :rolleyes:

gm9 11-15-2008 10:39 AM

So either Landiin and Aditu or reins and razieh are auto-attack noobs like me? I guess either way I'm in good company then. Hope you guys figure it out. :)

Landiin 11-15-2008 11:19 AM

<- Noob for life!

dragowulf 11-15-2008 11:30 AM

Quote:

Originally Posted by Landiin (Post 77245)
<- Noob for life!

QFT 123456

samejima 11-15-2008 03:13 PM

Quote:

Originally Posted by gm9 (Post 77242)
So either Landiin and Aditu or reins and razieh are auto-attack noobs like me? I guess either way I'm in good company then. Hope you guys figure it out. :)

Why am I a noob sir!! :( I'm disagreeing with you guys! Yes it does give an out of range message but its easy to tell it doesn't consume the auto attack. Put on a weapon with 5 second delay or more and watch how fast the message spams. Its every half second or so, also you can easily tell that you instnatly swing when you go back into range.

dragowulf 11-15-2008 03:54 PM

Well after discussing with Rothgar, I can only say that I understand the auto attack mechanic much less.

samejima 11-15-2008 04:00 PM

Its not very complex. I don't understand why you would be confused especially if Rothgar explained it to you.

Edit: also I am an ultra cool sea turtle now :D

ananigma 11-15-2008 04:07 PM

There is ONLY one source that tells you exactly when you autoattack. That is your log file. The question is can you create a mod that reads a .txt file?? ACT does so I see no reason why not.

Razieh said:

1. It does not automatically loop in any facet

Of course not but if it is coded for the progress bar to start when an autoattack hits. It would be dumb to make it loop. Clearly this isn't the case because his progress bar doesn't restart until he autoattacks again.

2. It only restarts when an auto attack hits

Your log file tells you exactly when you autoattack. There has to be a way to make a mod that works like ACT's Double attack Plugin only on a UI mod. So instead of hearing "beep", the progress bar restarts.

3. I didn't use your timer codes as a base at all

Clearly not.

As far as being OOR/Stunned, this is completely mute if done right. You don't autoattack if your out of range. Thus the progress bar can not restart. Razieh stated his progress bar starts and doesn't restart unless a autoattack has occured.

So if you can create a Mod that reads your log file (.txt file), then create a regex that states when you autoattack. Your can use that regex to trigger a progress bar that will indicate when your next autoattack is due. To get the right timing for this, you already have DD: /Gamedata.Stats.*_Delay. If you can turn this DD into a timer for the progress bar. You now have a precise progress bar for every single attack regardless of whether your weapon delay changes. You can also use DD:/Gamedata.Self.Autoattack or /Gamedata.Self.Ranged to determine which weapon you are using and calculate the correct delay and bring up the right progress bar.

Damn I wish I was a coder because it can be done.

Drumstix42 11-15-2008 04:15 PM

There's no function in the UI to "read" any kind of file. So... Maybe with external programs like ACT it can be done.

dragowulf 11-15-2008 04:25 PM

Quote:

Originally Posted by samejima (Post 77252)
Its not very complex. I don't understand why you would be confused especially if Rothgar explained it to you.

Edit: also I am an ultra cool sea turtle now :D

It was sarcasm. :p

Oh and I've been a griffon for years.


Quote:

Originally Posted by Drumstix42 (Post 77254)
There's no function in the UI to "read" any kind of file. So... Maybe with external programs like ACT it can be done.

I'm not sure it would require an external program. Maybe. I'm sure it can be done without the use of a log file.

samejima 11-15-2008 04:29 PM

Griffons are lame imo! Zebras are where its at!

ananigma 11-15-2008 04:38 PM

Ok not the UI, a mod or XML file.

But can a XML file read a log (.txt) file?

Drumstix42 11-15-2008 04:58 PM

There are no "Mods" to the game. Anything going on is through the UI. It's written in XML but has many limitations with the game.

ananigma 11-15-2008 05:24 PM

Hmm...

So can an XML (even 3rd party) read your log file and use something in that file to start a time bar (like Mother's countdown timer window) on your EQ2 screen?

If not, what is stopping this?

This is just an idea but i dont understand why it wouldn't work.

*Write a code that reads you log file like ACT does.
*When it sees that you autoattack it sends a trigger to a progress bar (not necessarily EQ2 casting bar but something similar to Mother's or whatever).
*The timer is set using the DD stated above to give an accurate countdown.

Maybe I am not clear in my explanation, I dunno. To me this would work perfectly if this can be done. If not, can you explain what would keep it from working?? :confused:

I don't mean to pyre. I would like to figure this out as well. :)

Drumstix42 11-15-2008 06:48 PM

Far as I know with the functionality of Mother's timer windows is that the UI itself is setting the countdown and starting it.

There's no way to directly communicate with the UI outside of the UI. The only exception to this is displaying webpages in the in-game browser.

So if you wanted to code up some web browser countdown bar... lol. I can't see that being very useful due to lag of the log file being read, and then displayed on screen...

I don't think the log file is a very good way to go. Even 1 second of delay makes it pointless, IMHO.

EQAditu 11-16-2008 04:08 AM

1 Attachment(s)
This piqued my interest, so I thought I would actually test things out. I'm fairly certain that the OOR messages work differently than I remember they did in EoF beta when I did my tests last. Not really doing a study on it, they seemed to trigger 1-3 times a second at irregular intervals. Somewhat strange.

Anyhow, I used a little tool that I already had which was a long abandoned "Swing Meter" plugin for ACT.

Using a 4.0s weapon, it more or less correctly swings each time... though it's oddly early a lot. Could be rounding on the number EQ2 reports plus lag or something... it doesn't matter.

Anyhow, if being out of range fully consumed an auto attack, the purposely late swings would always be late in a multiple of ~4000ms. Clearly that's not the case, but it's strange how often it would be be late around the same amount each time. I certainly didn't attempt to do that. So it would seem that being OOR only partially consumes an auto attack but coming into range is not an instant attack either.

I think I mentioned this somewhere else, but I'll do so again here. A swing meter like the plugin I abandoned long ago has two major drawbacks. To be accurate with haste, the log file would have to be populated with haste or weapon delay pretty often. I suppose you could set up a chat channel that you cannot see to supply this information to ACT, but it's messy no matter what. Secondly and most importantly, ACT cannot tell the difference between two weapons of the same type. This would make it useless for anyone dual wielding with two piercing weapons for instance.

dragowulf 11-16-2008 06:08 AM

I've been thinking. All OOR/Stun/etc things aside. We can make this mod as progress bars by using a similar method as mother's timer window, correct?

If so:

Make it so that when an aa/rangedaa occurs, it takes the delay of the weapon and sets the auto attack progress bar timer.
Ex:
1. Auto-Attack occurs and sets the timer to true
2. The timer uses the 5.3 delay and counts down
3. The auto-attack is turned off and the timer sets to false


We could make it so whenever a CA/spell is used and the casting window is visible, the timer is delayed. Whenever the casting window is no longer visible, it starts the timer again.
Ex:
1. stopautoattacktimer if {mainhud.casting.visible=true}
-Casting window's onshow=parent.stopautoattacktimer=true
2. startautoattacktimer if {mainhud.casting.visible=false}
-Casting window's onhide=parent.startautoattacktimer=true


I'm not sure how this part could work out but..whenever the Out of Range Message occurs, it delays the timer untill the message changes???? EDIT: I'm completely unsure about this one
Ex:
1. OnScreenMessage onshow=if {MessageText.text='out of range'} then stopautoattacktimer=true
2. OnScreenMessage onhide=if {MessageText.text=''} then startautoattacktimer=true


Any thoughts? I'm also unsure of how it would be if you enabled auto attack on an unattackable npc because the timer would start.

EQAditu 11-16-2008 06:25 AM

Quote:

Originally Posted by dragowulf (Post 77295)
I've been thinking. All OOR/Stun/etc things aside. We can make this mod as progress bars by using a similar method as mother's timer window, correct?

It's still obvious that I'm somewhat new at UI modding because I didn't know you could even create timers with a better resolution than whole seconds. I was just using movement effectors though.

Quote:

Originally Posted by dragowulf (Post 77295)
If so:

Make it so that when an aa/rangedaa occurs, it takes the delay of the weapon and sets the auto attack progress bar timer.
Ex:
1. Auto-Attack occurs and sets the timer to true
2. The timer uses the 5.3 delay and counts down
3. The auto-attack is turned off and the timer sets to false

I'd think you would need to recalculate often, so probably as often as the casting bar toggles visibility off. (Before the timer starts)

Quote:

Originally Posted by dragowulf (Post 77295)
We could make it so whenever a CA/spell is used and the casting window is visible, the timer is delayed. Whenever the casting window is no longer visible, it starts the timer again.
Ex:
1. stopautoattacktimer if {mainhud.casting.visible=true}
-Casting window's onshow=parent.stopautoattacktimer=true
2. startautoattacktimer if {mainhud.casting.visible=false}
-Casting window's onhide=parent.startautoattacktimer=true

Quote:

Originally Posted by dragowulf (Post 77295)
I'm not sure how this part could work out but..whenever the Out of Range Message occurs, it delays the timer untill the message changes???? EDIT: I'm completely unsure about this one
Ex:
1. OnScreenMessage onshow=if {MessageText.text='out of range'} then stopautoattacktimer=true
2. OnScreenMessage onhide=if {MessageText.text=''} then startautoattacktimer=true

I don't believe that auto-attacks make use of that UI piece. Casting a spell on an OOR target would, but auto attack doesn't.

Quote:

Originally Posted by dragowulf (Post 77295)
Any thoughts? I'm also unsure of how it would be if you enabled auto attack on an unattackable npc because the timer would start.

That would be a temporary problem as the bar would start too soon and would remain unsynched until the casting of a skill delayed the bar from restarting until the actual auto attack delay had been met.

dragowulf 11-16-2008 08:03 PM

Well I'm sure that this way would work, but I'm not exactly sure if it would be the easiest.

EDIT: Attachment removed, check above^^^^^^^^^^^^

dragowulf 11-17-2008 12:16 AM

1 Attachment(s)
Well it does work, I used movement effectors.
This is pretty much what I've came up with for the movement effectors to work:
Code:

SpeedCalc=350/(Parent.Parent.PrimaryDelayValue.Text)
Parent.Parent.MoveRight.Speed=SpeedCalc ## &apos;,0&apos;
Parent.Parent.ProgressPage.ProgressTimer.Visible=false
Parent.Parent.ProgressPage.ProgressTimer.Visible=true

5.0=PrimaryDelayValue, 350=TimerBarSIZE...
To put the above code in simpler terms: 350 divided by 5.0 = 70.000, which comes out exactly to 5 seconds. (if the weapon delay was actually 5.0, but works with any number)

Only thing I'm unsure of is how to make it continuous. If we get something from Rothgar telling us when an AutoAttack occurs, my code would work almost perfect.

How Raz managed to get around that problem? I have no idea.:confused::confused::confused:

gm9 11-17-2008 04:58 AM

Aditu's post above is quite interesting. I see now why Rothgar thinks that a bar counting down the delay is too much of a hack, I wouldn't have thought that the variance would be this big.

So given Aditu's data you will need a way to trigger a progressbar restart even if it has not yet reached zero. While you could do that OnShow of the combat bubbles that wouldn't take care of a dual-wield situation because you could not know whether the second value is from your second weapon or again from your first weapon with a big variance, right? Unless we are certain that the variance always affects both weapons in the same way, but unless they have exactly the same delay that would be unlikely. So unless there is something else that can be used as a trigger which I am not seeing I'd say we need Rothgar's data.

Jida 11-17-2008 11:41 AM

Combat bubbles
 
There is a difference with auto attack combat bubbles and non auto attack combat bubbles.

If you disable all bubbles but your own its easier to see.

The difference is the outline around the numbers that fly above the monsters head.

So, if you can somehow in the UI see the combat bubble spam, and only reset it when you see the appropriate type appear. Then all is well in the world.

gm9 11-17-2008 01:01 PM

Yes, can be done, but how do you take care of dual wield (my post above), I don't think there is any way to differentiate which weapon the bubble is for, is there?

Jida 11-17-2008 01:18 PM

Only time that would be an issue is if the delays are different.

Otherwise its a non issue. because they will be naturally synced. and you just need to reset the timer from the last hit.

Most of the people I know have delays synced for melee weapons.

you switch to ranged attack, you will know that it switched and therefore use the bow/throwing weapon delay.

ananigma 11-17-2008 02:38 PM

How do you get the UI to read Combat Bubbles?

gm9 11-17-2008 02:49 PM

eq2ui_proxyactor.xml, add an OnShow event script to the CombatBubble page to trigger the bar to count down if LowerText has a specific ShadowStyle set (or not set). You probably do not need to read the actual value of the bubble unless there is something else sharing the same ShadowStyle which is not auto-attack related.

Jida 11-17-2008 02:59 PM

Sounds like its all worked out IMO.

If someone uses 2 different delays its worthless.

But most that I know don't care.

dragowulf 11-17-2008 10:21 PM

How can you make the script constant??????? I've noticed that EQ2 does not respond very well to loops.

I made an auto attack timer work, but it only works for when the auto attack is triggered and when you toggle the auto attack on/off the game crashes.

Any ideas?

Drumstix42 11-17-2008 10:23 PM

Post the code, and perhaps we can find a better route?

dragowulf 11-17-2008 10:40 PM

1 Attachment(s)
Ok. I'm using a LocationEffector. To make the delay count down, I took the Size of the movementbar and divided it by the Delay, which equals the Speed of the LocationEffector, which in turn counts down the delay number exactly and perfectly. :p

Code:

<?xml version="1.0" encoding="utf-8"?>
<Page eq2usescomwndcontrols="true" Location="317,572" Name="AutoAttack" PackLocation="center,bottom" ScrollExtent="429,43" Size="429,43" UserMovable="true">
<Page eq2usescomwndcontrols="true" Loaded="true" MaximumSize="429,43" Name="AutoAttackTimer" Press="true" ScrollExtent="429,43" Size="429,43">
<Text AbsorbsInput="false" Font="/TextStyles.Large.LargeStyle" Margin="1,0,2,2" Name="AutoAttackText" PackSize="absolute,fixed" ScrollExtent="429,22" ShadowStyle="/ShadowStylesNew.OutlineDrop.style" Size="429,22" TextAlignment="Center" TextColor="#F0D080">Primary Auto Attack</Text>
<Text AbsorbsInput="false" Color="#00FF40" DynamicData="/GameData.Stats.Primary_Delay" Enabled="false" Font="/TextStyles.Small.SmallStyle" Location="0,22" Name="PrimaryDelayValue" ScrollExtent="39,12" ShadowStyle="/ShadowStylesNew.Drop.style" Size="39,12" TextAlignment="Right" TextAlignmentVertical="Center" UserScrollable="false">10.0</Text>
<Page AbsorbsInput="false" Name="CalcPage">
<Button AbsorbsInput="false" DynamicData="/GameData.Self.AutoAttack" MaximumSize="0,0" Name="AutoAttack" OnShow="SpeedCalc=350/(Parent.Parent.PrimaryDelayValue.Text)
Parent.Parent.MoveRight.Speed=SpeedCalc ## &apos;,0&apos;
Parent.Parent.ProgressPage.ProgressTimer.Visible=false
Parent.Parent.ProgressPage.ProgressTimer.Visible=true" Opacity="0.000" Rotation="0.500" SpeedCalc="35.000" TextMaxLines="0" Visible="false" />
</Page>
<Page AbsorbsInput="false" Location="43,24" Name="ProgressPage" PackLocation="top,left" ScrollExtent="350,8" Size="350,8">
<Page BackgroundOpacity="0.475" Location="68,0" Name="Marker20" PackLocation="npn,nfn" ScrollExtent="1,8" Size="1,8" />
<Page BackgroundOpacity="0.475" Location="137,0" Name="Marker40" PackLocation="npn,nfn" ScrollExtent="1,8" Size="1,8" />
<Page BackgroundOpacity="0.475" Location="205,0" Name="Marker60" PackLocation="npn,nfn" ScrollExtent="1,8" Size="1,8" />
<Page BackgroundOpacity="0.475" Location="274,0" Name="Marker80" PackLocation="npn,nfn" ScrollExtent="1,8" Size="1,8" />
<Page BackgroundColor="#FF0000" BackgroundOpacity="1.000" Location="-350,0" Name="ProgressTimer" OnHide="Location=&apos;-350,0&apos;" OnShowEffector="MoveRight" PackSize="a,f" RStyleDefault="ProgressBar" ScrollExtent="350,8" Size="350,8" Visible="false" />
</Page>
<LocationEffector Loop="true" Name="MoveRight" Speed="35,0" />
<RectangleStyle Center="progress_fill" CenterShrinkV="true" CenterStretchH="false" Name="ProgressBar" NorthStretch="false" SouthStretch="false" TitleStretch="false" WestStretch="false" />
<ImageStyle Name="progress_fill">
<ImageFrame Name="progress_fill" Source="images/window_elements_generic.dds" SourceRect="218,464,219,470" />
</ImageStyle>
<Page AbsorbsInput="false" BackgroundOpacity="1.000" Location="40,21" Name="Frame" RStyleDefault="/rectlist.chat_bubble_frame" ScrollExtent="356,14" Size="356,14" />
<Image AbsorbsInput="false" Location="43,24" Name="Bkg" PackSize="absolute,fixed" ScrollExtent="350,8" Size="350,8" SourceRect="220,472,380,478" SourceResource="/images/window_elements_generic.dds" />
</Page>
</Page>



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

vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI