Different Leaders... and may they die?

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
NightWalker
Posts: 2
Joined: May 20th, 2006, 2:58 pm

Different Leaders... and may they die?

Post by NightWalker »

Hi!


I was reading about creating campaigns, and from the wiki it seemed to me, that the leader you specify on scenario 1 of a campaign will be your leader all the time. Now, the wiki is anything but complete, therefore I ask here:

is it possible to have a different leader in one of the scenarios? and is it possible, that, if this leader dies, the campaign as a whole is not over?

I ask, because I have thought of a plot going something like... (bared down)

a) there is a King. He is the main leader in most campaigns. In one scenario however, he sends his general to battle the enemies in the east, while he does so with those in the west. The events take place more or less at the same time, but the player would play them one after the other.

b) even if the General loses in the scenario, and gets killed, the campaign is not over, of course, the following scenarios for the King would be more difficult, or at least: different.

For example, in the next scenario he needs to fight only one enemy leader, if the General was victorious, or two if the General has died.


Is such a campaign setup possible in WML?

(Also the separation of recallable units and gold between the two would be nice).


Cheers!
User avatar
Ranger M
Art Contributor
Posts: 1965
Joined: December 8th, 2005, 9:13 pm
Location: England

Re: Different Leaders... and may they die?

Post by Ranger M »

NightWalker wrote:Is such a campaign setup possible in WML?

(Also the separation of recallable units and gold between the two would be nice).
changing the leader is possible (it is done in A New Order) and splitting the recall is also possible (soon to be done in IoA if I can remember how)
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Different Leaders... and may they die?

Post by zookeeper »

NightWalker wrote:Is such a campaign setup possible in WML?
Yes, that's very possible to do. What you basically need to do is to store the king unit (which is carried from the previous scenario) in the beginning of the general scenario, replace the king with the general, and restore the king unit after that scenario is over. If the general dies, you just need to create an event that triggers when he dies, and inside that event manually trigger victory (you can have the victory dialog not appear, which might make sense at that point).
NightWalker wrote:(Also the separation of recallable units and gold between the two would be nice).
This is doable as well. A little bit more complex, as you have to store the gold and the recall list in the beginning of the general scenario and restore them later while destroying the recall list of the general, but not at all impossible.
NightWalker
Posts: 2
Joined: May 20th, 2006, 2:58 pm

Post by NightWalker »

Thanks a lot


for your quick answers!


I'm not anywhere doing something like that, as, while experienced at programming, I am new to Wesnoth (from the creation side of it :-) ),
but I wanted to know before planning too much (or: anything, actually)...

Cheers!
Post Reply