Noob questions at creating multiplayer map
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.
Noob questions at creating multiplayer map
Hi everyone. I have some experience at developling. Recently i decided to go deep on WML, so i began to program my own multiplayer map, taking into account some maps that i played before.
As there are no tutorials, only the wml reference page, i make some mistakes and i need help for fixing my mistakes.
This is what i have at the moment.
When i play this map, i get this error.

Then, when i pass for side 2's turn, it gives the "lose game" message.
As there are no tutorials, only the wml reference page, i make some mistakes and i need help for fixing my mistakes.
This is what i have at the moment.
Spoiler:

Then, when i pass for side 2's turn, it gives the "lose game" message.
-
- Inactive Developer
- Posts: 2461
- Joined: August 15th, 2008, 8:46 pm
- Location: Germany
Re: Noob questions at creating multiplayer map
Based on the lua error message you got and the tag it relates to I'm guessing that comma-separated list for [objectives]side= is not allowed.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
Re: Noob questions at creating multiplayer map
Thank you. I noticed that correct tag was "side_for" and not side. And side_for is used for [messages], not by objetives. Is there a way to show differents objetives to each team?
And still, each time i pass turn, the game finish as i lose it.
And still, each time i pass turn, the game finish as i lose it.
-
- Posts: 1549
- Joined: June 18th, 2009, 1:45 am
Re: Noob questions at creating multiplayer map
turns="unlimited" -> turns=-1
Re: Noob questions at creating multiplayer map
Doesnt work. Also tried with
turns=-1
turn_at=1
But nothing
.
turns=-1
turn_at=1
But nothing

-
- Posts: 1549
- Joined: June 18th, 2009, 1:45 am
Re: Noob questions at creating multiplayer map
Also, side[0].canrecruit must be set to yes. That's why. Also with turns=-1.
Re: Noob questions at creating multiplayer map
<3 now i can continua. Thank you sir.
On a different topic, I want to set time map to night each time. But i cannot do this (I know there is a tag called [time], but even comparing to others map).
On a different topic, I want to set time map to night each time. But i cannot do this (I know there is a tag called [time], but even comparing to others map).
-
- Posts: 6
- Joined: April 8th, 2008, 8:20 am
Re: Noob questions at creating multiplayer map
it is explained here: http://wiki.wesnoth.org/BuildingScenariosSimpleSlann wrote:<3 now i can continua. Thank you sir.
On a different topic, I want to set time map to night each time. But i cannot do this (I know there is a tag called [time], but even comparing to others map).
Now my noob question
I just read alot on the code of wesnoth because Im trying to make an SX. Can anybody tell me where I could find finished code on some SX maps as examples?
thanks alot, Ruben
Re: Noob questions at creating multiplayer map
shoudent you do event that:
[objectives]
side=2
[objective]
description= _ "Enter the Central Palace"
condition=win
[/objective]
[objective]
description= _ "Death of Aerius"
condition=lose
[/objective]
{TURNS_RUN_OUT}
[/objectives]
but then also this: [event]
name=last breath
[filter]
id=thief
[/filter]
[message]
speaker=unit
message= _ "i lost!"
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
you only got objectives but add the last code i post also that game knows also that if thief dies he loses.
[objectives]
side=2
[objective]
description= _ "Enter the Central Palace"
condition=win
[/objective]
[objective]
description= _ "Death of Aerius"
condition=lose
[/objective]
{TURNS_RUN_OUT}
[/objectives]
but then also this: [event]
name=last breath
[filter]
id=thief
[/filter]
[message]
speaker=unit
message= _ "i lost!"
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
you only got objectives but add the last code i post also that game knows also that if thief dies he loses.
"This game cured me of my real life addiction."
-Flameslash
-Flameslash
-
- Inactive Developer
- Posts: 2461
- Joined: August 15th, 2008, 8:46 pm
- Location: Germany
Re: Noob questions at creating multiplayer map
Generally speaking, yes. One should put according code ([event]s) which implement the defeat/loss conditions shown.alluton wrote:you only got objectives but add the last code i post also that game knows also that if thief dies he loses.
However, the engine checks for whether a side has left a leader alive and if not, ends the game with loss for that side. It may not happem immediately however.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
-
- Posts: 1549
- Joined: June 18th, 2009, 1:45 am
Re: Noob questions at creating multiplayer map
Slann wrote:On a different topic, I want to set time map to night each time. But i cannot do this (I know there is a tag called [time], but even comparing to others map).
{DEFAULT_SCHEDULE}

{FIRST_WATCH}
Re: Noob questions at creating multiplayer map
Aah thanks man, i got it.monochromatic wrote:Slann wrote:On a different topic, I want to set time map to night each time. But i cannot do this (I know there is a tag called [time], but even comparing to others map).{DEFAULT_SCHEDULE}
![]()
{FIRST_WATCH}
EDIT: some more question. I want to specify which unit does a side start with. So, for example, set side 1 leader to be a Bandit. And i want to disable the posibility of recruit. How can i do this ?
-
- Posts: 1549
- Joined: June 18th, 2009, 1:45 am
Re: Noob questions at creating multiplayer map
side.canrecruit=yes side.type= (omit side.recruit). SideWMLSlann wrote:EDIT: some more question. I want to specify which unit does a side start with. So, for example, set side 1 leader to be a Bandit. And i want to disable the posibility of recruit. How can i do this ?
Re: Noob questions at creating multiplayer map
Thanks again Sir
. I hope im not abusing your confidence, but i need an example for switch conditional. I have this but doesnt work

Spoiler:
-
- Posts: 1549
- Joined: June 18th, 2009, 1:45 am
Re: Noob questions at creating multiplayer map
[switch] structure:
Code: Select all
[switch]
variable=VARIABLE_NAME
[case]
value=POSSIBLE_VALUE
[command]
ActionWML
[/command]
[/case]
[/switch]