Page 1 of 1

low-accel units move slower with build order.

Posted: 12 Mar 2008, 04:57
by Pxtl
*update* Since we've isolated it as a Spring bug and not a mod request, could we move this thread to help/bugs?

Original post: Most mods have buggy TA L1 Conships - they move slow when given a build-order. I was wondering if this had at all been solved by anyone (whose work I could filch) or if this was still a universal problem.

Re: Anybody got working script for the TA L1 Construction Ships?

Posted: 12 Mar 2008, 10:55
by [Krogoth86]
This has to be some kind of engine bug as their scripts are looking ok...

Re: Anybody got working script for the TA L1 Construction Ships?

Posted: 12 Mar 2008, 11:30
by Forboding Angel
Have you taken the time to look in any non ta mod to see if it happens to the con ships there?

Re: Anybody got working script for the TA L1 Construction Ships?

Posted: 12 Mar 2008, 22:30
by zwzsg
Pxtl wrote:Most mods have buggy TA L1 Conships - they move slow when given a build-order.
I you mean move as in, moving the whole hull, then no script can fix it.
Forboding Angel wrote:Have you taken the time to look in any non ta mod to see if it happens to the con ships there?
Like if non TA mod makers made all their scripts from scratch... :roll:

Re: Anybody got working script for the TA L1 Construction Ships?

Posted: 12 Mar 2008, 22:36
by rattle
<--

Re: Anybody got working script for the TA L1 Construction Ships?

Posted: 13 Mar 2008, 08:01
by Forboding Angel
Well god forbid you spend 5 minutes of your day looking.

Re: Anybody got working script for the TA L1 Construction Ships?

Posted: 13 Mar 2008, 13:07
by Pxtl
Forboding Angel wrote:Well god forbid you spend 5 minutes of your day looking.
Is this snark directed at me? Because I just tested and it does not seem to happen in EE, or for naval engineers in AA-based mods. It's specific to the original Cavedog L1 boat. I'd heard similar posts about that before, but figured I'd check myself to be sure.

Which is why I assumed that the flaw exists in the script. Now, I could go through every single of the zillions of TA-based mod and see if anybody has fixed this by testing manually, I could learn scripting myself and spend the next few days trying to debug a decompiled script with a bug that shouldn't even be possible, or I can post a simple question in the forum asking if anybody has solved this before.

Re: Anybody got working script for the TA L1 Construction Ships?

Posted: 13 Mar 2008, 13:41
by [Krogoth86]
The problem:
The script has no single line that has anything to do with their movement speeds but just the regular things every other unit has too. With that said the script can't be the problem. The FBI also doesn't have extraordinary entries...

You might wanto to try "reincluding" them under a different name (i.e. all the files get a new name)...

Re: Anybody got working script for the TA L1 Construction Ships?

Posted: 13 Mar 2008, 21:30
by Evil4Zerggin
Some experimentation reveals the following startling conclusion:

Slow con ships appear to be due to "drag" that only appears when the ship is given a build order!

Try this experiment: make a con ship with maxVelocity 4 and acceleration 0.05. Have one build something and another just take a move. Boom--slow con ship.

Now, increase the acceleration to 0.2. Now the con ships move at the same speed!

It appears that giving a con ship a build order makes it experience more drag from the water (O.o). This drag increases with speed and must be overcome by the unit's acceleration. Unfortunately, I've not been able to figure out what in the source code might be causing it.

Re: Anybody got working script for the TA L1 Construction Ships?

Posted: 14 Mar 2008, 03:54
by Evil4Zerggin
For those wanting to fix this via increasing acceleration: I recommend a minimum acceleration of maxVelocity^2 * 0.007. Also, this is a problem with all constructors, not just naval constructors; it's just that naval constructors tend to have lower accelerations.

Re: Anybody got working script for the TA L1 Construction Ships?

Posted: 14 Mar 2008, 04:03
by Pxtl
It happens to hovers. I just tested with CTA hover constructors - they accel slow enough for the effect to be observed.

May happen to land units. Testing now.

Yup. Made an armcv with the same performance as an armcs. Same bug occurs. It is NOT naval-specific - we just notice the most there because boats have really, really crappy acceleration... which, in general, is an OTA feature so it's no surprise we don't see it in other mods.

Re: low-accel units move slower with build order.

Posted: 14 Mar 2008, 16:28
by Tobi
moved to H&B

Re: low-accel units move slower with build order.

Posted: 22 Mar 2008, 14:38
by Pxtl
I made a bug for this in Mantis, and Kloot has marked it fixed. So, next release (and SVN) should have this issue resolved. Yay Kloot!