Multiplayer Never Defeats Until End

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
Dyrcona
Posts: 15
Joined: December 26th, 2021, 12:59 pm

Multiplayer Never Defeats Until End

Post by Dyrcona »

I made my first map and scenario last night for multiplayer. It's a really simple 6 player area map with no villages, etc. When I test played the map by itself, everything seemed to work, including the defeat condition for the human player against 5 computer players.

I think it worked with a really basic scenario file, too, but I made a change at some point where it never ends until the very end even if all of the human-controlled units are destroyed. I added a defeat condition for each side this morning hoping that would fix it, but it doesn't.

Can someone look at my scenario and tell me what I'm doing wrong?

Thanks!
6p_Murder_Bowl.cfg
(1.53 KiB) Downloaded 38 times
User avatar
Dyrcona
Posts: 15
Joined: December 26th, 2021, 12:59 pm

Re: Multiplayer Never Defeats Until End

Post by Dyrcona »

OK. I think I figured it out. I added an explicit

Code: Select all

victory_when_enemies_defeated=yes
to the multiplayer. I guess something I did in the side tags at some point overrode the default.

I need to be more patient before jumping to the forum, but maybe someone else can learn from my example?
User avatar
Dyrcona
Posts: 15
Joined: December 26th, 2021, 12:59 pm

Re: Multiplayer Never Defeats Until End

Post by Dyrcona »

I typed too soon. I just played my scenario/map with the attached version of the cfg file and after my human controlled leader was killed, the game continued until my remaining units killed another leader and then it said I had been defeated.

I said it worked before because I tested it with only two players, myself and 1 computer. With more than 1 computer player, it isn't working. I've looked through the WML for the standard multiplayer scenarios, and they don't do all of this.

Here's my latest scenario for the sake of completeness. I have no idea why it doesn't end when my leader dies.
6p_Murder_Bowl.cfg
(1.56 KiB) Downloaded 32 times
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2340
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: Multiplayer Never Defeats Until End

Post by Lord-Knightmare »

No map file to load the scenario. Also, maybe leave out the defeat_condition= key completely in all sides and see how that works? Most MP scenarios don't mention this key.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
User avatar
Dyrcona
Posts: 15
Joined: December 26th, 2021, 12:59 pm

Re: Multiplayer Never Defeats Until End

Post by Dyrcona »

Oh. I'm on a roll today.... I think I see my problem. It's not a bug with my code nor is it a bug in Wesnoth. I'm playing it wrong with 5 enemy computer players, or at least I misunderstood how that works.

According to https://wiki.wesnoth.org/ScenarioWML#Sc ... Conditions, "If any two not-defeated sides are enemies, the scenario will continue." This explains why it ended when my units destroyed the enemy leader. There was only one other leader left at the time.

I guess that I just expected the you are defeated message to pop up when I lost and for my guys not to be able to continue to fight, but the computer players' units continue to fight on after defeat in multiplayer, even the campaigns with multiple opponents.

Sorry for the noise, but again maybe someone else will have the same confusion and see me rambling to myself.
User avatar
Dyrcona
Posts: 15
Joined: December 26th, 2021, 12:59 pm

Re: Multiplayer Never Defeats Until End

Post by Dyrcona »

Lord-Knightmare wrote: January 21st, 2022, 8:21 pm No map file to load the scenario. Also, maybe leave out the defeat_condition= key completely in all sides and see how that works? Most MP scenarios don't mention this key.
Right, I didn't think the map file was particularly relevant, plus it is embarrassingly simple because I'm just learning to use the map editor. I will attach it for anyone who wants to see it. It is basically an empty arena and rather boring to play. I might just delete it or use it as a test bed for other ideas.

I used to make maps for Warcraft III and Starcraft, but I never shared them widely. I learned about Wesnoth some time ago but only started playing it in the last few months. I hope to make better maps in the near future and share them as add ons. I have some campaign ideas, but I think it will be a while before I'm ready to share much.

I will delete the defeat and victory condition keys. They aren't the issue. My expectations were misaligned with how multiplayer scenarios end.
Attachments
6p_Murder_Bowl.map
(1.36 KiB) Downloaded 27 times
User avatar
beetlenaut
Developer
Posts: 2814
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: Multiplayer Never Defeats Until End

Post by beetlenaut »

The reason Lord-Knightmare mentioned the map is that we couldn't load and try out your scenario without it. That's often the first step we use in trying to solve someone's problem.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
Post Reply