Selective abilities and skirmish

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
User avatar
TL
Posts: 511
Joined: March 3rd, 2007, 3:02 am

Selective abilities and skirmish

Post by TL »

Hi! I'm rather new to Wesnoth but I have a habit of compulsively modding anything I can get my hands on, so I've been fiddling with WML a bit. I've had some small early successes, but now I'm stumped trying to implement an idea I thought up.

The idea is basically to create a conditional skirmish type ability ("ability A") which functions as normal skirmish, except not against units with the anti-skirmish ability ("ability B", which is essentially just a dummy ability--it's only intended to be used for a description of the effect, and as a filter target for ability A). Unfortunately, I have a couple problems:

1. Using [filter_adjacent] I can figure out a way to get a skirmish ability that is enabled if there is any adjacent unit with a certain ability, and by adding [not] I can have a skirmish ability that is enabled only if there is an adjacent unit who does not have a certain ability, but I cannot figure out any way I can have a skirmish ability that is disabled if there is any adjacent unit with a certain ability.

2. Somewhat related: The only way I could get the skirmish ability working as above was to define six seperate [skirmisher] tags, each with a [filter_adjacent] looking at a different direction, but this method seems kind of clunky. Is there a better way to do this? Such as hopefully one that gets around problem #1?

3. Also related: is it possible to set up an ability's filter to pass units which are/are not on the same side as the ability's owner? Really not sure how the side filter works there.

4. The game handles conditional skirmishing abilities, after a fashion, but not quite the fashion I would have liked; skirmishing doesn't get turned on/off until after you move and pathfinding is pretty screwy. Basically you can scootch 1-2 extra hexes through ZOC hexes which the skirmishing would not have been enabled for. Mostly it's the inconsistency of sometimes being able to cheat an extra hex of movement before skirmishing kicks off properly that annoys me. I'm guessing this probably can't be helped, so I suppose this one is really more along the lines of a feature request than a request for help (unless someone does know how to get working selective skirmish abilities).

Thanks in advance for any help!
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

Been a while...still need help with these? :P
Post Reply