Unit Speed Issue

For code related discussions and questions
User avatar
DylanDog
Code contributor
Code contributor
Posts: 347
Joined: 08 Apr 2009, 15:15
Location: Germany
Contact:

Unit Speed Issue

Post by DylanDog »

This post is related to AI script.

Units which belongs to a group always move with the highest speed of the slower tank in the group, not with their own higher speed.

Would it be possible to modify this at least for the below two listed functions such that the unit moves at his higher speed even if belonging to a group?

orderDroid(DROID, order)
orderDroidLoc(DROID, order, x, y)

While when using the orderGroup functions the units should move with the highest speed of the slower tank, which is already the case:

orderGroup(GROUP, order)
orderGroupLoc(GROUP, order, x, y)

This gives AI developers the chance to choose the speed for a certain action...if I want to achieve this today, I need to modify a lot the AI script and put units with same propulsion and body in the same team...too much work.

If you agree I will open a trouble ticket for this.
My Warzone 2100 mods:
Download DyDo-AI for Warzone skirmish/multiplayer games.
Download A2C-HM (Alpha 2 Campaign - Hard Mode).
Download A3C-HM (Alpha 3 Campaign - Hard Mode).
KukY
Regular
Regular
Posts: 1859
Joined: 20 Mar 2009, 21:56

Re: Unit Speed Issue

Post by KukY »

In game,player can change this by pressing F11 (It says "Formation speed limiting OFF", default is ON).
User avatar
DylanDog
Code contributor
Code contributor
Posts: 347
Joined: 08 Apr 2009, 15:15
Location: Germany
Contact:

Re: Unit Speed Issue

Post by DylanDog »

13KukYNexus666 wrote:In game,player can change this by pressing F11 (It says "Formation speed limiting OFF", default is ON).
and how can I tell an AI to do this?
My Warzone 2100 mods:
Download DyDo-AI for Warzone skirmish/multiplayer games.
Download A2C-HM (Alpha 2 Campaign - Hard Mode).
Download A3C-HM (Alpha 3 Campaign - Hard Mode).
Thyranim
Trained
Trained
Posts: 190
Joined: 20 Dec 2008, 16:35
Location: Germany

Re: Unit Speed Issue

Post by Thyranim »

so if you give the group an order to move somewhere, and after that give a single droid of this group an order to move somewhere, than it stays at the slowest speed?!?
O_o
KukY
Regular
Regular
Posts: 1859
Joined: 20 Mar 2009, 21:56

Re: Unit Speed Issue

Post by KukY »

Thyranim wrote:so if you give the group an order to move somewhere, and after that give a single droid of this group an order to move somewhere, than it stays at the slowest speed?!?
O_o
No.
DylanDog wrote:
13KukYNexus666 wrote:In game,player can change this by pressing F11 (It says "Formation speed limiting OFF", default is ON).
and how can I tell an AI to do this?
I don't know, human player must do that.
guciomir
Trained
Trained
Posts: 133
Joined: 05 May 2009, 22:27

Re: Unit Speed Issue

Post by guciomir »

13KukYNexus666 wrote:
Thyranim wrote:so if you give the group an order to move somewhere, and after that give a single droid of this group an order to move somewhere, than it stays at the slowest speed?!?
O_o
No.
I think this is the main problem DylanDog is facing :/
so yes, for AI it will stay at the slowest speed
KukY
Regular
Regular
Posts: 1859
Joined: 20 Mar 2009, 21:56

Re: Unit Speed Issue

Post by KukY »

guciomir wrote:I think this is the main problem DylanDog is facing :/
so yes, for AI it will stay at the slowest speed
You missed a part:
Thyranim wrote:so if you give the group an order to move somewhere, and after that give a single droid of this group an order to move somewhere, than it stays at the slowest speed?!?
O_o
He asked for AFTER detaching single unit from group.
Then it will travel at it's max speed.
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Unit Speed Issue

Post by cybersphinx »

13KukYNexus666 wrote:He asked for AFTER detaching single unit from group.
Then it will travel at it's max speed.
There's a bugreport somewhere that this doesn't always work.
User avatar
DylanDog
Code contributor
Code contributor
Posts: 347
Joined: 08 Apr 2009, 15:15
Location: Germany
Contact:

Re: Unit Speed Issue

Post by DylanDog »

Thyranim wrote:so if you give the group an order to move somewhere, and after that give a single droid of this group an order to move somewhere, than it stays at the slowest speed?!?
O_o
correct, but we are talking about AI script not human playing.
guciomir wrote: I think this is the main problem DylanDog is facing :/
so yes, for AI it will stay at the slowest speed
Guciomir is right. The issue is that I keep the unit in the team and give that unit only an order to move or scout -> then it moves at max speed of the lowest unit in the group. I obviuosly do not want to move that unit away from the group as I cannot develop an AI which controls each single unit, I have to keep it in a group/team.
My Warzone 2100 mods:
Download DyDo-AI for Warzone skirmish/multiplayer games.
Download A2C-HM (Alpha 2 Campaign - Hard Mode).
Download A3C-HM (Alpha 3 Campaign - Hard Mode).
User avatar
DylanDog
Code contributor
Code contributor
Posts: 347
Joined: 08 Apr 2009, 15:15
Location: Germany
Contact:

Re: Unit Speed Issue

Post by DylanDog »

@ cybersphynx, Per, Zarel and al others...

Would it be possible to modify the code at least for the below two listed functions such that the unit moves at his higher speed even if belonging to a group?

orderDroid(DROID, order)
orderDroidLoc(DROID, order, x, y)

While when using the orderGroup functions the units should move with the highest speed of the slower tank, which is already the case:

orderGroup(GROUP, order)
orderGroupLoc(GROUP, order, x, y)
My Warzone 2100 mods:
Download DyDo-AI for Warzone skirmish/multiplayer games.
Download A2C-HM (Alpha 2 Campaign - Hard Mode).
Download A3C-HM (Alpha 3 Campaign - Hard Mode).
KukY
Regular
Regular
Posts: 1859
Joined: 20 Mar 2009, 21:56

Re: Unit Speed Issue

Post by KukY »

There is a hotkey F11 to turn on or off formation speed limiting.
I think that users should decide should that be on or off.
Just you need to make users know about that.
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: Unit Speed Issue

Post by Zarel »

DylanDog wrote:@ cybersphynx, Per, Zarel and al others...

Would it be possible to modify the code at least for the below two listed functions such that the unit moves at his higher speed even if belonging to a group?

orderDroid(DROID, order)
orderDroidLoc(DROID, order, x, y)

While when using the orderGroup functions the units should move with the highest speed of the slower tank, which is already the case:

orderGroup(GROUP, order)
orderGroupLoc(GROUP, order, x, y)
The problem is that if you select a bunch of units and click on a destination, orderDroidLoc is called, not orderGroupLoc. Not to mention I'm pretty sure the speed limiting isn't done in those functions.
13KukYNexus666 wrote:There is a hotkey F11 to turn on or off formation speed limiting.
I think that users should decide should that be on or off.
Just you need to make users know about that.
He's already answered this question: viewtopic.php?p=41648#p41648

Please pay better attention to threads. :/
KukY
Regular
Regular
Posts: 1859
Joined: 20 Mar 2009, 21:56

Re: Unit Speed Issue

Post by KukY »

Zarel wrote:He's already answered this question: viewtopic.php?p=41648#p41648
Please pay better attention to threads. :/
I don't think that is an anwser.
I just said what I think about that.
My opinion is that user should decide will speed limiting be on or off.
Some users may like it more with that limiting.
So, player, not AI should decide that.

Wait, isn't there a way to set default status of speed limiting to OFF?
And then users could turn it on if they like it.
Something like at beggining of game automatize function of that hotkey.
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: Unit Speed Issue

Post by Zarel »

13KukYNexus666 wrote:I don't think that is an anwser.
I just said what I think about that.
My opinion is that user should decide will speed limiting be on or off.
Some users may like it more with that limiting.
So, player, not AI should decide that.
The AI should decide whether its own units should get speed limiting.
KukY
Regular
Regular
Posts: 1859
Joined: 20 Mar 2009, 21:56

Re: Unit Speed Issue

Post by KukY »

I get it now.
Speed limiting should be local, not global.
Post Reply