How does STARTING_VILLAGES_AREA work?

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
Geos
Posts: 115
Joined: March 20th, 2008, 1:58 pm
Location: Italy

How does STARTING_VILLAGES_AREA work?

Post by Geos »

And just STARTING_VILLAGES?
Do I have to include any special path in my scenario to use this function?
Can it be inside the [side] tag?
If not, how does the engine know which side are you talking about?
I had no effect in my scenario, why??

Thank you. This forum so far is solving all my beginner doubts.
That's ridiculous, dragons have no windows...
User avatar
governor
Posts: 267
Joined: December 8th, 2006, 12:32 am

Re: How does STARTING_VILLAGES_AREA work?

Post by governor »

These are macros that are supplied by wesnoth devs and are automatically included in any user-made content (I.E. your scenario). They can be found in the wesnoth/data/core/macros folder. wesnoth/data/core/macros/utils.cfg contains both macros you are interested in.

When you open the file you will see the exact WML contents of the macro and you will see that their highest-level tag is [event] with name=prestart which means they can be succesfully used as children to either the [multiplayer] or [scenario] tag.

Note:
- The first parameter to the macro is the side you which to apply the macro to.
- Whats not clear (if you have no WML experience) is that STARTING_VILLAGES is the same as STARTING_VILLAGES_AREA except the radius that defines the area is centered around the starting location of that sides leader.
User avatar
Geos
Posts: 115
Joined: March 20th, 2008, 1:58 pm
Location: Italy

Re: How does STARTING_VILLAGES_AREA work?

Post by Geos »

Ok, now it makes sense, thank you very much.
That's ridiculous, dragons have no windows...
Post Reply