Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Feature #699473

Aimless AI units (e.g., civ2civ3_earth "Storm")

Added by Jacob Nevins about 4 years ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
Category:
General
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

civ2civ3_earth has a "Storm" unit which haunts Deep Ocean and can attack Ocean; it is unreachable and has very high attack/defence.

At the moment, it moves with purpose like any other AI unit; so piles of storms can tend to hang out near populated areas, converge on ships etc.

I think it would be better if they wandered around their territory aimlessly, blundering into ships by accident (or maybe attacking ships they find themselves next to). Possible ways to trigger this from the ruleset:
  • As an AI side effect of vision=0? (but this might be a lot of work to make work)
  • Flag "Aimless" or "Blind" affecting only AI behaviour?

History

#1 Updated by Jacob Nevins about 4 years ago

In particular, I'm worried that it may be possible to "farm" civ2civ3_earth's Storms, and use them to defend your strategic locations.

#2 Updated by David Fernandez (bard) about 4 years ago

Jacob Nevins wrote:

In particular, I'm worried that it may be possible to "farm" civ2civ3_earth's Storms, and use them to defend your strategic locations.

I agree. It is a flaw of "storm" units that I did not think of.

I did notice that AI behaviour was not really suitable for this kind of units (natural forces), because as you say, if a ship is in vision range of one storm, other storms will come to try to attack the ship too.
My first versions of the ruleset included land storms (on mountains and deserts) that I had to discard for same reasons.

I remember to test vision=0, hopping that they would move/attack randomly, until I saw that they remained immobile. However, I find more intuitive your suggestion of a "Blind" flag.

If you implement such aimless AI, I certainly would use it, and not only for storms, but also for other animals that do not use to chase their preys.

#3 Updated by Marko Lindqvist 3 months ago

Attached patch adds "RandomMovement" unit type flag that makes unit to make random movement in the beginning of the owner's phase. Owner can never control units movement.
When unit moves to a random direction, it first tries to do ACTION_ATTACK, and if that fails, it will try ACTION_UNIT_MOVE, ACTION_UNIT_MOVE2, and ACTION_UNIT_MOVE3. No other actions are currently supported, but will be easy to add when we learn what actions we would need to support.

#4 Updated by Marko Lindqvist 2 months ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

#5 Updated by David Fernandez (bard) 2 months ago

Marko Lindqvist wrote:

Attached patch adds "RandomMovement" unit type flag that makes unit to make random movement in the beginning of the owner's phase. Owner can never control units movement.
When unit moves to a random direction, it first tries to do ACTION_ATTACK, and if that fails, it will try ACTION_UNIT_MOVE, ACTION_UNIT_MOVE2, and ACTION_UNIT_MOVE3. No other actions are currently supported, but will be easy to add when we learn what actions we would need to support.

Thank you for this. Sounds good. I plan to use it in my ruleset.

Also available in: Atom PDF