we have ETA for building getting finished.
now we need ETA for unit arrival to the location you click it
could someone do that?
would be awesome.
ETA for unit arrival? does such widget exist?
Moderator: Moderators
Re: ETA for unit arrival? does such widget exist?
+1, would be coolTradeMark wrote:we have ETA for building getting finished.
now we need ETA for unit arrival to the location you click it
could someone do that?
would be awesome.
Re: ETA for unit arrival? does such widget exist?
Just happened to make that in the morning.
Widget displays the ETA for move, fight and build commands. Current building ETA is added but not a queued buildings ETA. There seems to be a consistent ~ +10% error in the ETA.
Widget displays the ETA for move, fight and build commands. Current building ETA is added but not a queued buildings ETA. There seems to be a consistent ~ +10% error in the ETA.
Last edited by Pako on 08 Aug 2009, 17:34, edited 1 time in total.
Re: ETA for unit arrival? does such widget exist?
upped, when there is an average flaw of +10%, why dont u subtrahete it?
edit: tested it, it seems that it ignores hills - i mean when com climbs a hill, hes slower
edit: tested it, it seems that it ignores hills - i mean when com climbs a hill, hes slower
Re: ETA for unit arrival? does such widget exist?
You would have to get the real move speed instead of the max speed in a units unitdefs to most accurately estimate arrival time?
So count how far the unit moves on the x,z axis for 1 second, then divide the distance by how far it moved?
So count how far the unit moves on the x,z axis for 1 second, then divide the distance by how far it moved?
Re: ETA for unit arrival? does such widget exist?
does it calculate the time from the path spring calculates for each unit? because its the only way to make it accurate, idk is that possible with lua yet?
notice that higher slopes makes units move slower etc.
also the acceleration should be added to calculations, some units might have really slow acceleration...
notice that higher slopes makes units move slower etc.
also the acceleration should be added to calculations, some units might have really slow acceleration...
Re: ETA for unit arrival? does such widget exist?
That would be the most fail approach.SkyStar wrote:You would have to get the real move speed instead of the max speed in a units unitdefs to most accurately estimate arrival time?
So count how far the unit moves on the x,z axis for 1 second, then divide the distance by how far it moved?
Path length is calculated.does it calculate the time from the path spring calculates for each unit? because its the only way to make it accurate, idk is that possible with lua yet?
notice that higher slopes makes units move slower etc.
also the acceleration should be added to calculations, some units might have really slow acceleration...
Acceleration is hard to calculate because the unit can be initially moving to any direction and map specifications can affect the velocity. Vertical deceleration could be easily calculated in the pathing loop if the specifications is known.
I didnt think those imperfections would be important as because human perception of time is very distorded and units often get slown down by other units or be transported by air trans etc. Also the ETA doesnt seem to have any real usage/purpose other than more advanced players can more accurately compare the units cost effectiness in long paths from lab to the battlefield. Most of all I dont think I would be perverse enough coder to fix those distortions. Getting those last few seconds of accuracy will be 90% of more work to put in the widget as I dont know shit about Spring moving algorithms or pathing. This widget was made only to improme existing widget and it works fine even for that.
Re: ETA for unit arrival? does such widget exist?
Hi,
T#H#A#N#K#S
Not bad .. but with a couple of quirks ...
First it crashed after ca.30min playing ->
Error in Update(): [string "E:\Games\Spring\LuaUI\Widgets\gui_move_eta...."]:94: attempt to index field '?' (a nil value)
Second, i have the good Build-ETA widget and so realy dont need a
second that show me anything build related ....
Third, it would o.k. to display the eta ONLY to way points or to the FIRST build point (the build time is unknow and hard to get - so all ETA after the build order is senseles ...)
With this all sortet it would a very good widget IMHO
Regards
R-TEAM
T#H#A#N#K#S

Not bad .. but with a couple of quirks ...
First it crashed after ca.30min playing ->
Error in Update(): [string "E:\Games\Spring\LuaUI\Widgets\gui_move_eta...."]:94: attempt to index field '?' (a nil value)
Second, i have the good Build-ETA widget and so realy dont need a
second that show me anything build related ....
Third, it would o.k. to display the eta ONLY to way points or to the FIRST build point (the build time is unknow and hard to get - so all ETA after the build order is senseles ...)
With this all sortet it would a very good widget IMHO

Regards
R-TEAM
Re: ETA for unit arrival? does such widget exist?
Update
-fixed some bugs
-more consistent building eta
-meta key enables non-cumulative ETA
-fixed some bugs
-more consistent building eta
-meta key enables non-cumulative ETA
- Attachments
-
- gui_move_eta.lua
- (5.9 KiB) Downloaded 28 times