Testing a multiplayer campaign

Discussion of all aspects of multiplayer development: unit balancing, map development, server development, and so forth.

Moderator: Forum Moderators

Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Post by Rhuvaen »

tomsik wrote:maybe you should add "objectives="
I did that in the last version, it prevents the "No objectives available" message but that isn't causing the problem :). I also set the "victory_when_enemies_defeated=yes" which was a much more likely candidate. Maybe some SP campaign designers can help here:
:?: - why does the second scenario end after turn one with defeat?
:?: - why is there no recall list?
User avatar
Tomsik
Posts: 1401
Joined: February 7th, 2005, 7:04 am
Location: Poland

Post by Tomsik »

Rhuvaen wrote: :?: - why is there no recall list?
i think devs didnt think about that whenn add "next_scenario" to [multiplayer] tag, i think do that recall list is possible in WML, but i dont know how, maybe someone other can help you
User avatar
Tomsik
Posts: 1401
Joined: February 7th, 2005, 7:04 am
Location: Poland

Post by Tomsik »

Rhuvaen wrote: :?: - why does the second scenario end after turn one with defeat?
no idea
Boucman
Inactive Developer
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Post by Boucman »

Multiplayer campaigns (allied or not) are, to say the least, highly experimental. I am not sure they are totally implemented, and I am sure they are totally untested. so it is very possible that you hit a software bug.

because of this highly experimental status, I would advise moving this thread to coder's corner to make sure the devs see it.
Fight key loggers: write some perl using vim
MadMax
Posts: 1792
Joined: June 6th, 2004, 3:29 pm
Location: Weldyn, Wesnoth

Post by MadMax »

try using [store_unit] on all of the leaders, and using a die event to unstore the defeated leader just before the next scenario.

Something like this:

Code: Select all

[event]
name=prestart
[store_unit]
[filter]
side=1
canrecruit=1
[/filter]
variable=side_1_leader
[/store_unit]
[store_unit]
[filter]
side=2
canrecruit=1
[/filter]
variable=side_2_leader
[/store_unit]
[/event]

[event]
name=die
[filter]
side=1
canrecruit=1
[/filter]
[unstore_unit]
variable=side_1_leader
find_vacant=yes
[/unstore_unit]
[endlevel]
result=continue #or whatever you want
bonus=no #or whatever you want
[/endlevel]
[/event]

[event]
name=die
[filter]
side=2
canrecruit=1
[/filter]
[unstore_unit]
variable=side_2_leader
find_vacant=yes
[/unstore_unit]
[endlevel]
result=continue #or whatever you want
bonus=no #or whatever you want
[/endlevel]
[/event]
"ILLEGITIMIS NON CARBORUNDUM"

Father of Flight to Freedom
http://www.wesnoth.org/wiki/FlightToFreedom
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Post by Rhuvaen »

MadMax wrote:try using [store_unit] on all of the leaders, and using a die event to unstore the defeated leader just before the next scenario.
That doesn't work with the "next_scenario" tag, because it just ignored the existing leaders... but I'll use it for my 'hacky' version, many thanks!
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

update

Post by Rhuvaen »

For some reason I experimented again with this yesterday, and got the recalls to work. It's all in the save_Id keys of side definitions. All it needs is a side definition like this:

Code: Select all

   [side]
   side=1
   canrecruit=1
   save_id="Player1"
   team_name="human"
   controller="human"
   type="Lieutenant"
   [/side]
EDIT: it also needs to know the leader type in order to work correctly, which of course precludes player-chosen faction/leader combinations.

The first scenario doesn't respect the type and recruit lists given in the side definitions, but takes whatever choice the player made in the game start-up dialog. The second scenario will then handle recall lists correctly.

Now the only problem that remains is that the second scenario always ends at the end of turn one with the defeat message. It seems it doesn't recognize the leader taken from the recall list as such.

All this refers to BfW 1.1.2a, but I guess this isn't an active direction of development currently (not that I'm aware of). I will probably check into the source to see what can be done about it some time in the near future (any pointers appreciated). If we can get this one issue sorted out, we could test multiplayer campaigns on the server (there might still be issues in a real network situation ;)).
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

IT'S WORKING :)

Post by Rhuvaen »

IT'S WORKING!!!

Basically I forgot to set the number of turns - the first scenario is okay because of MP default turns, but the second scenario was interpreted as having a turn limit of ZERO :roll: .

I also found the place in the source that requires a mandatory type definition for each side (which limits player choice to predefined leaders) and will experiment with patching it.

WE CAN MAKE MULTIPLAYER CAMPAIGNS!!!
Post Reply