How to do starting villages.

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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
ScrubLord
Posts: 4
Joined: July 26th, 2018, 9:16 pm
Location: Europe

How to do starting villages.

Post by ScrubLord » August 7th, 2018, 7:52 pm

I don't know how to to add villages to a certain side in prestart. I did the {STARTING_VILLAGES} script without the AREA one, just for one village and it didn't work. What do i do?

User avatar
beetlenaut
Developer
Posts: 2225
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: How to do starting villages.

Post by beetlenaut » August 8th, 2018, 12:52 am

{STARTING_VILLAGES} creates an event, so it can't be used inside an event (like prestart). It won't cause an error, but it won't do anything either. Put it directly in the [scenario] tag.
Campaigns: Dead Water
The Founding of Borstep
Secrets of the Ancients

Dati_Ha-atel
Posts: 4
Joined: July 23rd, 2018, 1:11 pm

Re: How to do starting villages.

Post by Dati_Ha-atel » August 12th, 2018, 10:46 am

I don't know if it's the best way of doing it but I used the code below (example coordinates etc.) multiple times for campaign scenarios in 1.14 already and it works.

Code: Select all

[event]
    name=prestart
    [capture_village]
	side=1
	x,y=11,22
    [/capture_village]
[/event]

User avatar
ResExsention
Posts: 97
Joined: March 17th, 2018, 12:00 am
Location: Alberta, Canada

Re: How to do starting villages.

Post by ResExsention » August 18th, 2018, 8:41 pm

That would work. I don't think it's efficient though. Have you considered putting that in a macro? Like:

Code: Select all

#define CAPTURE_A_VILLAGE SIDE X Y
     [village]
          x={X}
          y={Y}
     [/village]
#enddef
Oh, and by the way, the [village] tag is sort of like [capture_village], but can be used in a side definition.
I am a ranger and my WML knives will implant themselves in your back.

Creator of the abandoned campaign Royalties Forgotten and the work in progress campaign Purger of Evil.
Maintainer of Fate of a Princess.

User avatar
Ravana
Moderator
Posts: 1853
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: How to do starting villages.

Post by Ravana » August 19th, 2018, 12:14 am

No matter what you do, having macro makes it less efficient.

User avatar
ResExsention
Posts: 97
Joined: March 17th, 2018, 12:00 am
Location: Alberta, Canada

Re: How to do starting villages.

Post by ResExsention » August 20th, 2018, 8:24 pm

How so? Maybe I said it wrong. Maybe I should have said reusable. Either way, [village] or [capture_village] in a macro do the same thing. It's all on performance, mostly.
I am a ranger and my WML knives will implant themselves in your back.

Creator of the abandoned campaign Royalties Forgotten and the work in progress campaign Purger of Evil.
Maintainer of Fate of a Princess.

Post Reply