Random Factions as Enemy Sides in a Multiplayer Campaign
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.
-
- Developer
- Posts: 546
- Joined: January 12th, 2011, 2:18 am
- Location: Pennsylvania, USA
Random Factions as Enemy Sides in a Multiplayer Campaign
As part of my Random Campaign, I decided it would be cool to create a 1 player, 3 scenario campaign under the Multiplayer button, so that a player can easily play a mini-campaign with whatever Era they download.
This would make use of the Era chosen on the map selection screen to do the following:
1. let the player pick his faction like for a normal multiplayer scenario.
2. use a Random faction from the era for each of the enemy sides in all three scenarios of the campaign.
3. Do 1 & 2 in such a fashion that any Era downloaded from the add-on server can be used.
I'm not sure if this could be done, or how easy it would be if it can be.
Ideally, I'd specify an enemy side in each of the scenarios with a side tag something like this:
and that would be it for determining side leader & recruit list. And configure the rest of the side info from the Multiplayer Game Setup menu (such as gold, income, fog status, ect.)
(and for future scenarios change the values of gold & income based on the original settings)
but my understanding of the [side] faction key is that it doesn't work that way.
Can it be done at all?
With WML?
With Lua?
This would make use of the Era chosen on the map selection screen to do the following:
1. let the player pick his faction like for a normal multiplayer scenario.
2. use a Random faction from the era for each of the enemy sides in all three scenarios of the campaign.
3. Do 1 & 2 in such a fashion that any Era downloaded from the add-on server can be used.
I'm not sure if this could be done, or how easy it would be if it can be.
Ideally, I'd specify an enemy side in each of the scenarios with a side tag something like this:
Code: Select all
[side]
side=2
allow_player=no
controller=ai
faction=Random
[/side]
(and for future scenarios change the values of gold & income based on the original settings)
but my understanding of the [side] faction key is that it doesn't work that way.
Can it be done at all?
With WML?
With Lua?
Co-Author of Winds of Fate
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
Re: Random Factions as Enemy Sides in a Multiplayer Campaign
Try it a few times without specifying a faction, and see what you get.SigurdTheDragon wrote:I'm not sure if this could be done, or how easy it would be if it can be.
-
- Developer
- Posts: 546
- Joined: January 12th, 2011, 2:18 am
- Location: Pennsylvania, USA
Re: Random Factions as Enemy Sides in a Multiplayer Campaign
Thanks, did that, and it's working the way I want, but only for the first scenario.
I can't seem to figure out how to get player 1's leader & recruit list to persist to the second scenario.
Also can't figure out how to get random sides in the second scenario.
I tried following examples from 2 different MP campaigns, (World Conquest & 2player Battle System), but couldn't get those to work in my campaign. They are both 1.8 Campaigns & I'm doing this in 1.9 not sure if that's the problem, but there's nothing on the wiki about significant side tag changes. Tried how I have it set up in my SP campaign that doesn't work either.
also, I am jumping from scenario 1 to 2 using debug mode's :cl
I figure I gotta have id & save_id the same, but that's not working.
Here's my latest attempt. I am using this in the 1st & 2nd scenarios:
How do I need to write a side tag to get Player 1's faction to persist?
EDIT- Hmmm...the error seems to have something to do with how I'm using the [generator] tag. When I use a premade map, it works, at least for side 1.
I can't seem to figure out how to get player 1's leader & recruit list to persist to the second scenario.
Also can't figure out how to get random sides in the second scenario.
I tried following examples from 2 different MP campaigns, (World Conquest & 2player Battle System), but couldn't get those to work in my campaign. They are both 1.8 Campaigns & I'm doing this in 1.9 not sure if that's the problem, but there's nothing on the wiki about significant side tag changes. Tried how I have it set up in my SP campaign that doesn't work either.
also, I am jumping from scenario 1 to 2 using debug mode's :cl
I figure I gotta have id & save_id the same, but that's not working.
Here's my latest attempt. I am using this in the 1st & 2nd scenarios:
Code: Select all
[side]
side=1
id=Player1
save_id=Player1
persistent=yes
canrecruit=yes
controller=human
team_lock=yes
[/side]
EDIT- Hmmm...the error seems to have something to do with how I'm using the [generator] tag. When I use a premade map, it works, at least for side 1.
Co-Author of Winds of Fate
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.