AI terrain affinity

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
white_haired_uncle
Posts: 1230
Joined: August 26th, 2018, 11:46 pm
Location: A country place, far outside the Wire

AI terrain affinity

Post by white_haired_uncle »

I'm creating fire elemental units. They will heal when over lava, and maybe get a damage bonus or something. I'd like to inform the AI that this unit should have an affinity for lava, but I'm not really finding anything. Best I can think of is to give the unit a good defense on unwalkable. Better ideas? Am I missing something?
Speak softly, and carry Doombringer.
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2365
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: AI terrain affinity

Post by Lord-Knightmare »

white_haired_uncle wrote: April 20th, 2024, 3:33 am I'm creating fire elemental units. They will heal when over lava, and maybe get a damage bonus or something. I'd like to inform the AI that this unit should have an affinity for lava, but I'm not really finding anything. Best I can think of is to give the unit a good defense on unwalkable. Better ideas? Am I missing something?
In situations like this, from the scenario design side, I would add "micro AI lurker" to them if I were you. This would make them prefer lava terrain for movement, attacking from, etc.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
white_haired_uncle
Posts: 1230
Joined: August 26th, 2018, 11:46 pm
Location: A country place, far outside the Wire

Re: AI terrain affinity

Post by white_haired_uncle »

Thank you. I searched a couple of the AI pages for "terrain", I must have overlooked that one. That looks better than I had hoped.
Speak softly, and carry Doombringer.
Post Reply