Modify unit macro, what are leaders called?

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
roadkill
Posts: 92
Joined: November 3rd, 2008, 11:48 am

Modify unit macro, what are leaders called?

Post by roadkill »

In my scenario I want to disable recruiting for side 1 at turn 2.

Is it possible to do it using the MODIFY_UNIT macro?

in the code below what do I need to change "leader" to?

I've tried canrecruit=1 (to try to specify all units on side 1 that can recruit), but it doesn't work.

Code: Select all

[event]
name=turn 2
[filter]
side=1
[/filter]
{MODIFY_UNIT "leader" canrecruit no}
[/event]
Also I read on the wiki that if a side has no unit that can recruit to game is automatically lost? is this true?

What the scenario I'm making involves is recruiting a party & then adventuring (no more recruiting). I can't delete the keep because the player could just hyjack a computers keep...

Is there something I will need to do to stop it being game over?
User avatar
beetlenaut
Developer
Posts: 2825
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: Modify unit macro, what are leaders called?

Post by beetlenaut »

roadkill wrote:Is it possible to do it using the MODIFY_UNIT macro?
It may be possible to use MODIFY_UNIT, but if it worked, it would have some strange consequences. Just use [set_recruit] instead, with a blank list of available units.
roadkill wrote:Also I read on the wiki that if a side has no unit that can recruit to game is automatically lost? is this true?
Usually, but not necessarily. You can put "victory_when_enemies_defeated=no" in the [scenario] tag, or no_leader=yes in the [side] tag.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
roadkill
Posts: 92
Joined: November 3rd, 2008, 11:48 am

Re: Modify unit macro, what are leaders called?

Post by roadkill »

beetlenaut wrote:It may be possible to use MODIFY_UNIT, but if it worked, it would have some strange consequences. Just use [set_recruit] instead, with a blank list of available units.
Awesome idea, yep its working.
Post Reply