Limit AI player to a given area?
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.
- beetlenaut
- Developer
- Posts: 2825
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: Limit AI player to a given area?
kurt751 wrote:Because the TerrainCodesWML page suggests "o" stands for orcs. Or so it seems.
The engine only recognizes whole terrain strings like "Cud". The engine doesn't pull that apart into "castle", "underground", and "dwarf" before deciding what tile to use or how it works. The developers just wanted people to be able to do that (as much as possible).Wiki wrote:Additional letters do not always follow the same meaning, but are as consistent as possible.
Yes, but in Simpleton's case, it wouldn't work because he is trying to limit just one side. That's the case where you would need to define some new overlays and a new movement type for any units used on that map. What we really need for this is a new micro AI that treats defined areas as impassable.kurt751 wrote:So, to limit movement of the AI, one just has to add to any existing terrain type following overlays:
Impassable Overlay: ..^Xo
Unwalkable Overlay: ..^Qov
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
Re: Limit AI player to a given area?
Giving something impassable overlay makes it impassable for everything that is not made able to move on impassable, not just ai. Though you could continually switch terrain in turn events.
Re: Limit AI player to a given area?
I see.beetlenaut wrote:The engine only recognizes whole terrain strings like "Cud".
In this case the "TerrainCodesWML" page is a little misleading. It should specify this "Decoding the Terrain Codes" part is just a mnemonic help for the humans, and that you can't just freely assemble terrain codes (which is what one could think after reading that chapter).
Are there other terrain strings, or are they all listed in the TerrainCodeTableWML page? I'm asking because some terrain overlays are nothing you couldn't do with a {PLACE_IMAGE} macro (sand crater comes to mind, or the unlit brazier), so I'm wondering how far the "terrainization" of scenery images went.
Re: Limit AI player to a given area?
I forgot about that...Ravana wrote:Giving something impassable overlay makes it impassable for everything that is not made able to move on impassable, not just ai.
Hmm, clever!Ravana wrote:Though you could continually switch terrain in turn events.
Wouldn't that tax the engine to much? If not there are lots of nice things you could do with that trick...