how to make a campaign, if you have more than one scenario

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.
User avatar
perseo
Posts: 324
Joined: January 8th, 2011, 4:09 am

Re: how to make a campaign, if you have more than one scenar

Post by perseo »

Put this on your campaign:

Code: Select all

    [event]
        name=turn 1
        [message]
            speaker=Someone
            message= _ "Bla bla bla."
            [option]
                message= _ "Allright!"
                [command]
                    [message]
                             speaker=someone
                             message= _"Amazing!"
                    [/message]
                    [endlevel]
                        result=victory
                        next_scenario=02-next
                        bonus=yes
                        {NEW_GOLD_CARRYOVER 40}
                    [/endlevel]
                [/command]
            [/option]
        [/message]
    [/event]
¡Salud! If this doesn't work I'll give you a cookie
"I was pulling a barrow, when I saw a stalking horse
what a beautiful day!- he said- for visiting a red herring
and getting hoarse."
Working on this campaign: The septentrional tower
schlamarcel
Posts: 107
Joined: September 2nd, 2010, 5:20 pm

Re: how to make a campaign, if you have more than one scenar

Post by schlamarcel »

sorry, you have to give me a cockie :(
is the wml maybe different at wesnoth 1.9.13 ?
User avatar
perseo
Posts: 324
Joined: January 8th, 2011, 4:09 am

Re: how to make a campaign, if you have more than one scenar

Post by perseo »

Have you waited more than a turn? Please post your real scenario file, not the one of the example if you don't mind.
¡Salud!
"I was pulling a barrow, when I saw a stalking horse
what a beautiful day!- he said- for visiting a red herring
and getting hoarse."
Working on this campaign: The septentrional tower
Ceres
Forum Regular
Posts: 620
Joined: September 18th, 2010, 7:56 pm
Location: Germany

Re: how to make a campaign, if you have more than one scenar

Post by Ceres »

schlamarcel wrote:@ ceres
what should there be in ...

#define VICTORY
...
#enddef
Your definition of {VICTORY}. I only wanted to clarify that just defining a macro isn't enough, you have to call it as well (and you have to define it before calling it, of course).
User avatar
perseo
Posts: 324
Joined: January 8th, 2011, 4:09 am

Re: how to make a campaign, if you have more than one scenar

Post by perseo »

Of course but I don't understand what my "event turn 1" doesn't work.
¡Salud!
"I was pulling a barrow, when I saw a stalking horse
what a beautiful day!- he said- for visiting a red herring
and getting hoarse."
Working on this campaign: The septentrional tower
User avatar
SkyOne
Posts: 1310
Joined: January 3rd, 2009, 7:23 pm

Re: how to make a campaign, if you have more than one scenar

Post by SkyOne »

perseo wrote: I don't understand what my "event turn 1" doesn't work.
perseo, the reason why you have to give a cookie to schlamarcel is:
1) you picked the turn 1 [event] (should be the start [event], but prestart events have been installed with objectives)
2) you did not put another option
3) missing ID in the first [message] tag

Actually, we-all missed to mention to put ID in the code.:augh:


EDIT: schlamarcel, the code you need is probably something like it:

Code: Select all

victory_when_enemies_defeated=no # not 100% sure this is necessary or not, but this is logically needed.
# and the most people put this one before (above) [side] tags.
[event]
    name=die # perseo's event is probably fine, too.
    [filter]
        id=P3
    [/filter]
    [message]
        speaker=P1
        message= _ "xyz"
    [/message]
    [message]
        speaker=P2
        message= _ "xyz."
    [/message]
    [message]
        id=victory_1 # as an example.
        speaker=P1
        message= _ "xyz"

        [option]
            message= _ "xyz"
            [command]
                [endlevel]
                    result=victory
                    bonus=yes
                    {NEW_GOLD_CARRYOVER 30}
                    next_scenario=2.1
                [/endlevel]
            [/command]
        [/option]

        [option]
            message= _ "xyz"
            [command]
                [endlevel]
                    result=victory
                    bonus=yes
                    {NEW_GOLD_CARRYOVER 30}
                    next_scenario=2.3
                [/endlevel]
            [/command]
        [/option]

        [option]
            message= _ "xyz"
            [command]
                [endlevel]
                    result=victory
                    bonus=yes
                    {NEW_GOLD_CARRYOVER 30}
                    next_scenario=2.2
                [/endlevel]
            [/command]
        [/option]
   [/message]
[/event]
P.S. your campaign-folder-name is Kampaign, right?
Fate of a Princess/feedback thread: "What is in own heart that is the most important, not who you are."
Drake Campaign: Brave Wings/feedback thread, Naga Campaign: Return of the Monster, Saurian Campaign: Across the Ocean
Northern Forces - now on 1.12 server
schlamarcel
Posts: 107
Joined: September 2nd, 2010, 5:20 pm

Re: how to make a campaign, if you have more than one scenar

Post by schlamarcel »

thanks, now it works
User avatar
perseo
Posts: 324
Joined: January 8th, 2011, 4:09 am

Re: how to make a campaign, if you have more than one scenar

Post by perseo »

SkyOne wrote: 1) you picked the turn 1 [event] (should be the start [event], but prestart events have been installed with objectives)
2) you did not put another option
3) missing ID in the first [message] tag
I got lost on this part, you can say that you win after killing an enemy and then end the scenario when you pick up and object (for example).
I think that options work even if you have only one option, look after tRoW in ka'lian missions (when you finish the three first you still have to click even when there's only one option). Maybe the main problem was the ID and the speaker.
¡Salud!
"I was pulling a barrow, when I saw a stalking horse
what a beautiful day!- he said- for visiting a red herring
and getting hoarse."
Working on this campaign: The septentrional tower
Post Reply