Help with WML for a particular 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.
Post Reply
User avatar
pauxlo
Posts: 1047
Joined: September 19th, 2006, 8:54 pm

Re: Help with WML for a particular scenario

Post by pauxlo »

Another thing (which may or may not cause the error, I can't test this now) are these lines in the campaign tag:

Code: Select all

[campaign]
    ...
    difficulty_descriptions={MENU_IMG_TXT2 "units/human-loyalists/sergeant.png" _"Sergeant" _"(Easy)"} +
    ";" + {MENU_IMG_TXT2 "units/human-loyalists/lieutenant.png" _"Lieutenant" _"(Normal)"} + ";" + {MENU_IMG_TXT2 "units/human-loyalists/general.png" _"General" _"(Hard)"}
    
    description= _"A great orcish uprising tends to destabilise the Northlands. As the future Lord Protector of the Northern Alliance can you crush the rebellion and establish peace again? 
" + _"(Intermediate level, 30 scenarios.)"
[/campaign]
These should be each on one (physical) line, not two.
chak_abhi
Posts: 347
Joined: June 24th, 2010, 3:37 pm

Re: Help with WML for a particular scenario

Post by chak_abhi »

At last, I have finally done it. THANKS TO EVERYONE WHO HAVE TRIED TO HELP ME.

However there remains another issue. My background images don't show up with the story. They are all in .jpg format. Is there any image size restrictions or any other restrictions on images which leads to this problem?
Ceres
Forum Regular
Posts: 620
Joined: September 18th, 2010, 7:56 pm
Location: Germany

Re: Help with WML for a particular scenario

Post by Ceres »

Same problem as before, there are whitespaces in the file names. If you are making filepaths, better copy&paste it from your explorer, and such things won't happen.
chak_abhi
Posts: 347
Joined: June 24th, 2010, 3:37 pm

Re: Help with WML for a particular scenario

Post by chak_abhi »

Ceres wrote:Same problem as before, there are whitespaces in the file names. If you are making filepaths, better copy&paste it from your explorer, and such things won't happen.
Thanks again Ceres. It works fine now.
chak_abhi
Posts: 347
Joined: June 24th, 2010, 3:37 pm

Re: Help with WML for a particular scenario

Post by chak_abhi »

I need help once more.Can anyone point out what error I am overlooking in the following scenario?Without it the campaign runs fine.

Code: Select all

#textdomain wesnoth-Rebellion_in_the_North
[scenario]
    id=16_Unusual_Ally
    name=_ "Unusual Ally"
    map_data="{~add-ons/Rebellion_in_the_North/maps/16_Unusual_Ally.map}"
    {TURNS 28 23 20}
    next_scenario=17_Way_to_the_north
    {DEFAULT_SCHEDULE}
    {DEFAULT_MUSIC_PLAYLIST}

    [story]
    [part]
    story= _ "After the orcs were defeated,Earl Raman and Krshan worked together to bring the earldom under the rule of law.As the word of liberation of Dorset spread out the peasants,traders and soldiers who were forced into hiding by the invaders came forward to help them.Earl Raman set up a strong defensive line north of the city."
    background=story/Dorset.png
    [/part]
    [part]
    story= _ "The remaining orcs were chased out.The safety of the earldom was further ensured by heavy snowfalls which made travelling difficult.Krshan was eager to hear news of Krag Kumbha,but there was no sign of arrival of Sandrom or any of the gryphons."
    background=story/Dorset.png
    [/part]
    [part]
    story= _ "About two weeks later a rider approached the earl and reported that in the swamp of Khatra,situated south of the river Bork some orcs were battling with saurians.It was strange since all saurian tribes were supposed to be on the side of the rebel orcs.So Earl Raman suspected that the orcs were on the side of Krag Kumbha.He wanted to investigate the situation."
    background=farnorth.png
    [/part]
    [part]
    story= _ "Krshan dissuaded him.He insisted that he would lead his army there.The Earl was to look over the administration of Dorset.Earl Raman agreed to the proposal after some hesitation.So the party set out north towards the swamp."
    background=farnorth.png
    [/part]
    [part]
    show_title=yes
    {TO_UNUSUAL_ALLY}
    background=farnorth.png
    [/part]
    [/story]

    [side]
    type=Lieutenant
    id=Krshan
    name=_"Krshan"
    side=1
    canrecruit=yes
    controller=human
    gold=0
    team_name=Alliance
    user_team_name=_"Alliance"
    fog="no"
    share_view="no"
    shroud="no"
    share_maps="no"
    income="0"
    recruit=Bowman, Spearman, Footpad, Poacher, Thug
    [/side]

    [side]
    type=Orcish Warrior
    controller=ai
    id=Ghatatkach
    name=_"Ghatatkach"
    side=2
    canrecruit=yes
    {GOLD 250 200 200}
    recruit="Orcish Archer, Orcish Grunt, Wolf Rider, Naga Fighter"
    team_name=Alliance
    user_team_name=_"Alliance"
    income="2"
    [ai]
        recruitment_ignore_bad_combat=yes
        recruitment_ignore_bad_movement=yes
        passive_leader=yes
        recruitment_pattern=fighter,fighter,archer
        {NO_SCOUTS}
        grouping=defensive
        caution=1.0
    [/ai]
    [/side]

    {STARTING_VILLAGES 2 5}

    [side]
    type=Saurian Flanker
    controller=ai
    id=Thrix
    name=_"Thrix"
    side=3
    canrecruit=yes
    {GOLD 200 250 300}
    recruit="Saurian Skirmisher, Saurian Augur, Saurian Oracle, Saurian Ambusher, Saurian Soothsayer"
    team_name=Enemies
    user_team_name=_"Enemies"
    income="8"
    [ai]
        recruitment_ignore_bad_combat=yes
        recruitment_pattern=scout,fighter,archer
        recruitment_ignore_bad_movement=yes
        {ATTACK_DEPTH 2 3 5}
    [/ai]
    [/side]

    [side]
    type=Saurian Flanker
    controller=ai
    id=Kiross
    name=_"Kiross"
    side=4
    canrecruit=yes
    {GOLD 200 250 300}
    recruit="Saurian Skirmisher, Saurian Augur, Saurian Oracle, Saurian Ambusher, Saurian Soothsayer"
    team_name=Enemies
    user_team_name=_"Enemies"
    income="8"
    [ai]
        recruitment_ignore_bad_combat=yes
        recruitment_pattern=scout,fighter,archer
        recruitment_ignore_bad_movement=yes
        {ATTACK_DEPTH 2 3 5}
    [/ai]
    [/side]
 
    [event]
    name=prestart
     
    [recall]
    id=Vaman
    [/recall] 

    [store_gold]
            side=1
            variable=sandrom_gold
    [/store_gold]

    [modify_side]
        side=1
        gold=100
    [/modify_side]

    [gold]
    side=1
    amount=$krshan4_gold
    [/gold]
    {CLEAR_VARIABLE krshan4_gold}

    [disallow_recruit]
    side=1
    type=Gryphon Rider
    [/disallow_recruit]

    [objectives]
            side=1
            [objective]
                description= _ "Defeat all enemies"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Krshan"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Vaman"
                condition=lose
            [/objective]
            [objective]
                description= _ "Turns run out"
                condition=lose
            [/objective]

            note={EARLY_FINISH_BONUS_NOTE}+{NEW_GOLD_CARRYOVER_NOTE_40}
    [/objectives]
    [/event]

    [event]
    name=start
    [message]
    speaker=narrator
    message= _ "The Swamp of Khatra was always hot and humid.The snows were scanty here.Krshan found that a large number of saurians were attacking a small group of orcs."
    image=wesnoth-icon.png
    [/message]
    [message]
    speaker=Ghatatkach
    message= _ "Get off from me,damn lizards!I have no more gold to give you.Leave me in peace!"
    [/message]
    [message]
    speaker=Thrix
    message= _ "We will take you prisonersss!Massster will give uss more gold!"
    [/message]
    [message]
    speaker=Krshan
    message= _ "Whats going on here?"
    [/message]
    [message]
    speaker=Kiross
    message= _ "Get off humanss and dwarvess!Do not interfere in our mattersss!"
    [/message]
    [message]
    speaker=Ghatatkach
    message= _ "Are you from Earl Raman?Please help me out then."
    [/message]
    [message]
    speaker=Krshan
    message= _ "We are friends of Earl Raman.Who are you orc?"
    [/message]
    [message]
    speaker=Ghatatkach
    message= _ "I am Ghatatkach.I was appointed governor of Prestim by Krag Kumbha weeks before the rebellion started.The rebels attacked and sacked Prestim.I took refuge in these swamps,with my small army.Then they invaded Dorset and captured it.All hope was lost.Yet they couldn't capture me because of my Naga friends.Now they are sending these sneak thieves after me,who have already stolen most of my gold."
    [/message]
    [message]
    speaker=Krshan
    message= _ "I am Krshan,next in line for Lord Protectorship of the Northern Alliance.We have come to help the Earl.We have liberated Dorset recently.We will help you out."
    [/message]
    [/event]

    [event]
    name=enemies defeated
    [if]
        [have_unit]
        id=Ghatatkach
        [/have_unit]
    [then]
    [message]
    speaker=Ghatatkach
    message= _ "Thank you humans and dwarves.I am on your side now.You will find my services helpful in your journey to the north."
    [/message]
    [message]
    speaker=Krshan
    message= _ "Well,thanks.Do you know who is behind this rebellion?"
    [/message]
    [message]
    speaker=Ghatatkach
    message= _ "I am not sure,but it may be Bakkhil,once a trusted man of Krag Kumbha.He was very ambitious and the peace and prosperity of the far north may be of lesser importance to him than fighting wars and taking lives of the innocent."
    [/message]
    [message]
    speaker=Krshan
    message= _ "Ok,we will find soon.Lets return to Dorset to decide our plans with Earl Raman."
    [/message]
    {MODIFY_UNIT (id=Ghatatkach) side 1 canrecruit no}
    [/then]
    
    [else]
    [message]
    speaker=Krshan
    message= _ "Ghatatkach has fallen.He might have been a good ally with his uncanny knowledge about the far north.Anyway,we must move on."
    [/message]
    [/else]
    [/if]
    [endlevel]
    result=victory
    next_scenario=17_Way_to_the_north
    bonus=yes
    {NEW_GOLD_CARRYOVER 40}
    [/endlevel]
    [/event]
 
    [event]
    name=last breath
    [filter]
    id=Ghatatkach
    [/filter]
    [message]
    speaker=unit
    message= _ "I die,but keep on fighting human allies.May you restore Krag Kumbha to supremacy and peace in these lands."
    [/message]
    [/event]

    [event]
        name=time over
        [message]
        speaker=Krshan
        message= _ "Too late!We will never get rid of these saurians!"
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]

{~add-ons/Rebellion_in_the_North/utils/deaths.cfg}

[/scenario]





Ceres
Forum Regular
Posts: 620
Joined: September 18th, 2010, 7:56 pm
Location: Germany

Re: Help with WML for a particular scenario

Post by Ceres »

What was the error message?
What I can see right now: MODIFY_UNIT only accepts three arguments: filter, one key, one value. You need one MODIFY_UNIT for each key.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Help with WML for a particular scenario

Post by zookeeper »

I hope you realize that you can easily find the source of the errors yourself.
chak_abhi
Posts: 347
Joined: June 24th, 2010, 3:37 pm

Re: Help with WML for a particular scenario

Post by chak_abhi »

Ceres wrote:What was the error message?
What I can see right now: MODIFY_UNIT only accepts three arguments: filter, one key, one value. You need one MODIFY_UNIT for each key.
Thanks Ceres.In fact there was no error message,it only showed "Unknown Scenario:16_Unusual_Ally".You pointed out the error correctly.
chak_abhi
Posts: 347
Joined: June 24th, 2010, 3:37 pm

Re: Help with WML for a particular scenario

Post by chak_abhi »

The following scenario is intended to end after the death of the main enemy leader(Bakkhil), but it doesn't.Will someone please point out the error which is causing this problem?

Code: Select all

#textdomain wesnoth-Rebellion_in_the_North
[scenario]
    id=28_End_of_the_Rebellion
    name=_ "End of the Rebellion"
    map_data="{~add-ons/Rebellion_in_the_North/maps/28_End_of_the_Rebellion.map}"
    turns=-1
    next_scenario=29_Epilogue
    victory_when_enemies_defeated="no"
    {AFTERNOON}
    {DUSK}
    {FIRST_WATCH}
    {SECOND_WATCH}
    {DAWN}
    {MORNING}
    {DEFAULT_MUSIC_PLAYLIST}

    [story]
    [part]
    story= _ "Only two days had passed since Krshan,Aric,Vaman and Princess Radah had their light-hearted discussion a gryphon rider flew into Dwarven Doors bringing report that the rebel leader Bakkhil had arrived in the not-so known orcish tribal city of Rumyr with a substantial force.More of the rebels were assembling there."
    background=maps/wesnoth.png
    [/part]
    [part]
    story= _ "Rumyr was officially within Alliance territory,but being at the remotest corner it functioned almost autonomously.The journey from Dwarven Doors to Rumyr was very difficult and time consuming even during the summer.But Krshan was determined to root out the evil this time.He sent an informer to Vaman and a gryphon to Krag Kumbha requesting them to join the encounter."
    background=maps/wesnoth.png
    [/part]
    [part]
    story= _ "Vaman appeared at Dwarven Doors within a fortnight.He had been elected the king of their indeed,and brought with him not only the veterans of the far-north but also quite a few novices.Krag Kumbha sent back a message with the gryphon that he would be landing at Glamdrol within a month."
    background=maps/wesnoth.png
    [/part]
    [part]
    story= _ "The humans and dwarves travelled to Glamdrol once more.Krag Kumbha arrived on time.Together they marched on the rebel stronghold of Rumyr where Bakkhil had gathered a formidable army.Krag Kumbha decided to attack from the north and separated from them with some dwarf guides.The others camped south-west of the fortress."
    background=maps/wesnoth.png
    [/part]
    [part]
    show_title=yes
    {TO_END_OF_THE_REBELLION}
    background=maps/wesnoth.png
    [/part]
    [/story]

    [side]
    type=Grand Marshal
    id=Krshan
    name=_"Krshan"
    side=1
    canrecruit=yes
    controller=human
    {GOLD 550 400 400}
    team_name=Alliance
    user_team_name=_"Alliance"
    fog="no"
    share_view="yes"
    shroud="no"
    share_maps="no"
    income="0"
    recruit=Bowman, Spearman, Footpad, Poacher, Thug, Gryphon Rider, Cavalryman, Horseman, Mage
    [/side]
    {STARTING_VILLAGES 1 4}

    [side]
    type=Orcish Sovereign
    controller=ai
    id=Krag Kumbha
    name=_"Krag Kumbha"
    side=2
    [modifications]
    {TRAIT_QUICK}
    {TRAIT_RESILIENT}
    [/modifications]
    profile=portraits/kumbha.png
    canrecruit=yes
    {GOLD 1500 1300 1100}
    recruit="Orcish Warrior, Orcish Crossbowman, Goblin Knight, Goblin Pillager, Orcish Slayer, Orcish Grunt, Orcish Archer, Wolf Rider, Troll Whelp, Orcish Assassin, Troll, Troll Rocklobber"
    team_name=Alliance
    user_team_name=_"Alliance"
    income="6"
    persistent=yes
    fog="no"
    share_view="no"
    shroud="no"
    [ai]
        recruitment_ignore_bad_combat=yes
        recruitment_ignore_bad_movement=yes
        passive_leader=yes
    [/ai]
    [/side]
    {STARTING_VILLAGES 2 6}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 2 "Orcish Slayer" 2}

    [side]
    type=Orcish Sovereign
    controller=ai
    id=Bakkhil
    name=_"Bakkhil"
    profile=portraits/Bakkhil.png
    side=3
    canrecruit=yes
    {GOLD 800 1200 1400}
    recruit="Orcish Warrior, Orcish Crossbowman, Goblin Knight, Goblin Pillager, Orcish Slayer, Orcish Grunt, Orcish Archer, Wolf Rider, Ogre, Orcish Assassin"
    team_name=Enemies
    user_team_name=_"Enemies"
    {INCOME 8 10 12}
    [ai]
        recruitment_ignore_bad_combat=yes
        recruitment_ignore_bad_movement=yes
        passive_leader=yes

        [target]
        side=1
        value=5.0
        [/target]
      
        [target]
        side=2
        value=3.0
        [/target]
  
        [target]
        side=8
        value=4.0
        [/target]
 
        [target]
        side=9
        value=2.0
        [/target]
    [/ai]
    [/side]
    {STARTING_VILLAGES 3 10}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 3 "Orcish Slayer" 2}

    [side]
    type=Orcish Warlord
    controller=ai
    generate_name=yes
    side=4
    canrecruit=yes
    {GOLD 400 600 700}
    recruit="Orcish Warrior, Orcish Crossbowman, Goblin Knight, Orcish Slayer, Ogre, Orcish Grunt, Orcish Archer, Wolf Rider"
    team_name=Enemies
    user_team_name=_"Enemies"
    income="6"
    [ai]
        recruitment_ignore_bad_combat=yes
        recruitment_ignore_bad_movement=yes

        [target]
        side=1
        value=5.0
        [/target]
      
        [target]
        side=2
        value=3.0
        [/target]
  
        [target]
        side=8
        value=4.0
        [/target]
 
        [target]
        side=9
        value=2.0
        [/target]
    [/ai]
    [/side]
    {STARTING_VILLAGES 4 3}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 4 "Orcish Slayer" 2}

    [side]
    type=Orcish Warlord
    controller=ai
    generate_name=yes
    side=5
    canrecruit=yes
    {GOLD 400 600 700}
    recruit="Orcish Warrior, Orcish Crossbowman, Goblin Knight, Orcish Slayer, Ogre, Orcish Grunt, Orcish Archer, Wolf Rider"
    team_name=Enemies
    user_team_name=_"Enemies"
    income="6"
    [ai]
        recruitment_ignore_bad_combat=yes
        recruitment_ignore_bad_movement=yes

        [target]
        side=1
        value=5.0
        [/target]
      
        [target]
        side=2
        value=3.0
        [/target]
  
        [target]
        side=8
        value=4.0
        [/target]
 
        [target]
        side=9
        value=2.0
        [/target]
    [/ai]
    [/side]
    {STARTING_VILLAGES 5 3} 
    {LIMIT_CONTEMPORANEOUS_RECRUITS 5 "Orcish Slayer" 2}

    [side]
    type=Orcish Warlord
    controller=ai
    generate_name=yes
    side=6
    canrecruit=yes
    {GOLD 400 600 700}
    recruit="Orcish Warrior, Orcish Crossbowman, Goblin Knight, Orcish Slayer, Ogre, Orcish Grunt, Orcish Archer, Wolf Rider"
    team_name=Enemies
    user_team_name=_"Enemies"
    income="6"
    [ai]
        recruitment_ignore_bad_combat=yes
        recruitment_ignore_bad_movement=yes

        [target]
        side=1
        value=5.0
        [/target]
      
        [target]
        side=2
        value=3.0
        [/target]
  
        [target]
        side=8
        value=4.0
        [/target]
 
        [target]
        side=9
        value=2.0
        [/target]
    [/ai]
    [/side]
    {STARTING_VILLAGES 6 3}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 6 "Orcish Slayer" 2} 


    [side]
    type=Orcish Warlord
    controller=ai
    generate_name=yes
    side=7
    canrecruit=yes
    {GOLD 400 600 700}
    recruit="Orcish Warrior, Orcish Crossbowman, Goblin Knight, Orcish Slayer, Ogre, Orcish Grunt, Orcish Archer, Wolf Rider"
    team_name=Enemies
    user_team_name=_"Enemies"
    income="6"
    [ai]
        recruitment_ignore_bad_combat=yes
        recruitment_ignore_bad_movement=yes

        [target]
        side=1
        value=5.0
        [/target]
      
        [target]
        side=2
        value=3.0
        [/target]
  
        [target]
        side=8
        value=4.0
        [/target]
 
        [target]
        side=9
        value=2.0
        [/target]
    [/ai]
    [/side]
    {STARTING_VILLAGES 7 3}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 7 "Orcish Slayer" 2} 

    [side]
    no_leader=yes
    controller=human
    side=8
    recruit=Dwarvish Fighter, Dwarvish Thunderer, Dwarvish Scout, Dwarvish Ulfserker, Dwarvish Guardsman
    {GOLD 800 600 600}
    income=4
    team_name=Alliance
    user_team_name=_"Alliance"
    [/side]
  
    [side]
    no_leader=yes
    controller=ai
    side=9
    {GOLD 800 600 600}
    income=4
    team_name=Alliance
    user_team_name=_"Alliance"
    [ai]
        recruitment_ignore_bad_combat=yes
        recruitment_ignore_bad_movement=yes
        recruitment_pattern=fighter, fighter, archer, mixed fighter, scout
        passive_leader=yes
        {NO_SCOUTS}
    [/ai]
    [/side] 

    

#define CASTLE_OF_ELVES
    x=37,37,38,38,38,39,39
    y=42,43,41,42,43,42,43
#enddef

#define CASTLE_OF_VAMAN
    x=48,48,48,48,49,49,49,50,50,50,50
    y=19,20,21,22,20,21,22,19,20,21,22
#enddef

#define CASTLE_OF_TROLLS
    x=44,44,45,45,45,46,46
    y=11,12,11,12,13,11,12
#enddef

#define AVOID_ALLIES
    [ai]
        [avoid]
            {CASTLE_OF_VAMAN}
        [/avoid]
        [avoid]
            {CASTLE_OF_ELVES}
        [/avoid]
        [avoid]
            {CASTLE_OF_TROLLS}
        [/avoid]
    [/ai]
#enddef

    [event]
    name=prestart

    [recall]
    id=Sandrom
    [/recall]
 
    [recall]
    id=Vaman
    [/recall]

    [recall]
    id=Aric
    [/recall] 

    [recall]
    id=Princess Radah
    [/recall] 

    #Krag Kumbha bodyguards
    {GENERIC_UNIT 2 (Orcish Warlord) 36 6} {GUARDIAN}
    {GENERIC_UNIT 2 (Troll Warrior) 40 6} {GUARDIAN}

    #north guards
    {GENERIC_UNIT 3 (Orcish Warlord) 27 18} {GUARDIAN}
    {GENERIC_UNIT 3 (Orcish Slurbow) 26 18} {GUARDIAN}
    {GENERIC_UNIT 3 (Orcish Warlord) 26 19} {GUARDIAN}
    {GENERIC_UNIT 3 (Orcish Slurbow) 27 19} {GUARDIAN}

    {GENERIC_UNIT 3 (Orcish Warlord) 29 18} {GUARDIAN}
    {GENERIC_UNIT 3 (Orcish Slurbow) 29 19} {GUARDIAN}
    {GENERIC_UNIT 3 (Orcish Warlord) 30 19} {GUARDIAN}
    {GENERIC_UNIT 3 (Orcish Slurbow) 30 18} {GUARDIAN}

    #west guards
    {GENERIC_UNIT 3 (Orcish Warlord) 16 25} {GUARDIAN}
    {GENERIC_UNIT 3 (Orcish Slurbow) 17 26} {GUARDIAN}
    {GENERIC_UNIT 3 (Orcish Warlord) 17 25} {GUARDIAN}
    
    {GENERIC_UNIT 3 (Orcish Warlord) 16 28} {GUARDIAN}
    {GENERIC_UNIT 3 (Orcish Slurbow) 17 28} {GUARDIAN}
    {GENERIC_UNIT 3 (Orcish Warlord) 17 29} {GUARDIAN}

    #south guards
    {GENERIC_UNIT 3 (Orcish Warlord) 27 36} {GUARDIAN}
    {GENERIC_UNIT 3 (Orcish Slurbow) 26 35} {GUARDIAN}
    {GENERIC_UNIT 3 (Orcish Warlord) 26 34} {GUARDIAN}
    {GENERIC_UNIT 3 (Orcish Slurbow) 27 35} {GUARDIAN}

    {GENERIC_UNIT 3 (Orcish Warlord) 29 36} {GUARDIAN}
    {GENERIC_UNIT 3 (Orcish Slurbow) 29 35} {GUARDIAN}
    {GENERIC_UNIT 3 (Orcish Warlord) 30 34} {GUARDIAN}
    {GENERIC_UNIT 3 (Orcish Slurbow) 30 35} {GUARDIAN}

    #east guards
    {GENERIC_UNIT 3 (Orcish Warlord) 42 25} {GUARDIAN}
    {GENERIC_UNIT 3 (Orcish Slurbow) 41 26} {GUARDIAN}
    {GENERIC_UNIT 3 (Orcish Warlord) 41 25} {GUARDIAN}
    
    {GENERIC_UNIT 3 (Orcish Warlord) 42 28} {GUARDIAN}
    {GENERIC_UNIT 3 (Orcish Slurbow) 41 28} {GUARDIAN}
    {GENERIC_UNIT 3 (Orcish Warlord) 41 29} {GUARDIAN}

    [objectives]
            side=1
            [objective]
                description= _ "Defeat Bakkhil"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Krshan"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Krag Kumbha"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Vaman"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Aric"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Princess Radah"
                condition=lose
            [/objective]
            
            note={NO_GOLD_CARRYOVER_NOTE}
    [/objectives]

    [/event]

    [event]
    name=start
    [message]
    speaker=Bakkhil
    message= _ "So the human worms and stupid midgets have arrived.The coward is here too.You will face the might of my soldiers shortly."
    [/message]
    [message]
    speaker=Krshan
    message= _ "You think you can take on our combined forces alone?After what happened recently in Dorset,Prestim,Borstep,Barag Gor and Tirigaz?Well,wish you luck!"
    [/message]
    [message]
    speaker=Krag Kumbha
    message= _ "Better surrender now,and I will let you die a quick death.If I have to use force,not only you will face torture but also your accomplices will be severely punished."
    [/message]
    [message]
    speaker=Bakkhil
    message= _ "Hear,hear,the coward is speaking.It is you and your sidekicks who will face torture and death soon."
    [/message]
    [message]
    speaker=Krshan
    message= _ "So you leave us no choice but to attack you.Vaman,you dwarves know every inch of the land in those mountains.Please take the dwarves and surround them on the east.That will deny them any breathing space."
    [/message]
    [message]
    speaker=Vaman
    message= _ "All right.I will be in position by dawn."
    image=portraits/vaman.png
    [/message]
    [store_unit]
            [filter]
                id=Vaman
            [/filter]

            kill=yes
            variable=vaman
        [/store_unit]

        [store_unit]
            [filter]
                side=1
                race=dwarf
            [/filter]

            kill=yes
            variable=dwarf
        [/store_unit]
    [/event]

    [event]
        name=turn 4

        [move_unit_fake]
            type=$vaman.type
            side=8
            x=51,50,49
            y=20,20,21
        [/move_unit_fake]

        {VARIABLE vaman.x 49}
        {VARIABLE vaman.y 21}
        {VARIABLE vaman.canrecruit yes}
        {VARIABLE vaman.side 8}

        [unstore_unit]
            variable=vaman
        [/unstore_unit]

        {FOREACH dwarf m}
            {VARIABLE dwarf[$m].side 8}

            [unstore_unit]
                variable=dwarf[$m]
            [/unstore_unit]
        {NEXT m}

        {CLEAR_VARIABLE stored_Gruu,stored_trolls}


        [terrain]
            {CASTLE_OF_VAMAN}
            terrain=Ce
        [/terrain]

        [terrain]
            x=49
            y=21
            terrain=Ke
        [/terrain]

        [redraw]
        [/redraw]

    [message]
    speaker=Vaman
    message= _ "I am in position,Krshan."
    [/message]
    [message]
    speaker=Krshan
    message= _ "Excellent!Now see how those rebels wither under the might of the dwarves!"
    [/message]

    [objectives]
             side=8
            [objective]
                description= _ "Defeat Bakkhil"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Krshan"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Krag Kumbha"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Vaman"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Aric"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Princess Radah"
                condition=lose
            [/objective]
            
            note={NO_GOLD_CARRYOVER_NOTE}
    [/objectives]
    [/event]

    [event]
    name=turn 12 
 
    [if]
    [variable]
    name=elves
    numerical_equals=1
    [/variable]
    [then]
    
    [move_unit_fake]
    type=Elvish Enchantress
    side=9
    x=42,41,40,39,38
    y=43,43,42,42,42
    [/move_unit_fake]
    [unit]
    type=Elvish Enchantress
    id=Menoka
    name= _"Menoka"
    side=9
    x,y=38,42
    canrecruit=yes
    [/unit]

    [allow_recruit]
    side=9
    type=Elvish Fighter, Elvish Archer, Elvish Scout, Elvish Shaman, Elvish Captain, Elvish Hero, Elvish Marksman, Elvish Ranger, Elvish Druid, Elvish Sorceress
    [/allow_recruit]

        [terrain]
            {CASTLE_OF_ELVES}
            terrain=Ce
        [/terrain]

        [terrain]
            x=38
            y=42
            terrain=Ke
        [/terrain]

        [redraw]
        [/redraw]

    [message]
    speaker=Menoka
    message= _ "Dear brother Krshan,I am here to help you."
    [/message]
    [message]
    speaker=Krshan
    message= _ "Menoka?You are here?What a pleasant surprise!"
    [/message]
    [message]
    speaker=Menoka
    message= _ "I was in Wesmere when I received news of your attack on Rumyr.I have brought with me as many of the elves I could gather."
    [/message]
    [message]
    speaker=Krshan
    message= _ "How nice of you Menoka to come to our aid!Now lets crush these rebels and restore peace in the northlands and far-north."
    [/message]
    
    [/then]
    [/if]

    [if]
    [variable]
    name=trolls
    numerical_equals=1
    [/variable]
    [then]

    [move_unit_fake]
    type=Great Troll
    side=9
    x=51,50,49,48,47,46,45
    y=9,9,10,10,11,11,12
    [/move_unit_fake]
    [unit]
    type=Great Troll
    side=9
    x,y=45,12
    id=Moidanav
    name=_"Moidanav"
    canrecruit=yes
    [/unit]

    [allow_recruit]
    side=9
    type=Troll Whelp, Troll, Troll Rocklobber, Troll Shaman
    [/allow_recruit]

        [terrain]
            {CASTLE_OF_TROLLS}
            terrain=Ce
        [/terrain]

        [terrain]
            x=45
            y=12
            terrain=Ke
        [/terrain]

        [redraw]
        [/redraw]

    [message]
    speaker=Moidanav
    message= _ "Enjoying yourselves,humans and dwarves?Me come to help!"
    [/message]
    [message]
    speaker=Krshan
    message= _ "Moidanav?You are here?What a pleasant surprise!"
    [/message]
    [message]
    speaker=Moidanav
    message= _ "Me visit trolls in this area.Me got news of this battle.We come to help. Me bring many trolls."
    [/message]
    [message]
    speaker=Krshan
    message= _ "How nice of you Moidanav to come to our aid!Now lets crush these rebels and restore peace in the northlands and far-north."
    [/message]


    [/then]
    [/if]

    [message]
    speaker=Bakkhil
    message= _ "Those invaders have got more help.We must summon the reinforcements."
    [/message]
 
    [gold]
    side=3
    amount=400
    [/gold]
    [gold]
    side=4
    amount=300
    [/gold]
    [gold]
    side=5
    amount=300
    [/gold]
    [gold]
    side=6
    amount=300
    [/gold]
    [gold]
    side=7
    amount=300
    [/gold]

    [/event]

    [event]
    name=moveto
    [filter]
    side=1,2,8,9
    x=26-30
    y=25-28
    [/filter]

    [message]
    speaker=Bakkhil
    message= _ "They are getting near!Call the reserves!"
    [/message]

    {LOYAL_UNIT 3 (Orcish Warlord) 26 25} {GUARDIAN}
    {LOYAL_UNIT 3 (Orcish Slurbow) 30 25} {GUARDIAN}
    {LOYAL_UNIT 3 (Ogre) 26 28} {GUARDIAN}
    {LOYAL_UNIT 3 (Direwolf Rider) 30 28} {GUARDIAN}

    [/event]

    [event]
    name=last breath
    [filter]
    id=Menoka
    [/filter]

    [message]
    speaker=unit
    message= _ "Farewell Krshan,dear brother.Fight bravely and victory will be yours."
    [/message]
    [message]
    speaker=Krshan
    message= _ "YOU BRUTES!YOU WILL PAY FOR THIS!FORWARD MEN,CUT THESE BEASTS INTO PIECES AND FEED THEM TO THEIR OWN WOLVES!"
    [/message]

    [/event]

    [event]
    name=last breath
    [filter]
    id=Moidanav
    [/filter]

    [message]
    speaker=unit
    message= _ "Farewell Krshan.Brave fight.Victory yours will be."
    [/message]
    [message]
    speaker=Krshan
    message= _ "YOU BRUTES!YOU WILL PAY FOR THIS!FORWARD MEN,CUT THESE BEASTS INTO PIECES AND FEED THEM TO THEIR OWN WOLVES!"
    [/message]

    [/event]
    
    
    

    [event]
    name=last breath
    [filter]
    id=Bakkhil
    [/filter]

    [message]
    speaker=unit
    message= _ "Noooo!Orcs....must rule...I can't die...like this!"
    [/message]
    [message]
    speaker=Princess Radah
    message= _ "So nice are the last words of the self proclaimed orcish sovereign!"
    [/message]
    [message]
    speaker=Krag Kumbha
    message= _ "Yes,orcs are great,but not the rebel ones who know only to ransack all that is good!"
    [/message]
    [message]
    speaker=Bakkhil
    message= _ "Shame..on..you,..cowards!..May you..never..know..peace!May you...aargh..."
    [/message]
    [message]
    speaker=Krshan
    message= _ "May you shut up your ugly mouth and die quickly.For peace and prosperity of the northlands and the far-north!"
    [/message]

    

    [endlevel]
    result=victory
    bonus=no
    {NEW_GOLD_CARRYOVER 0}
    [/endlevel]

    [/event]

    
    [event]
    name=victory

    [if]
    [have_unit]
    id=Menoka
    [/have_unit]
    [then]
    [message]
    speaker=Krshan
    message= _ "Thank you so much Menoka.Please come to Dwarven Doors with us.You deserve a treat."
    [/message]
    [message]
    speaker=Menoka
    message= _ "Sounds good,little brother.We all will go after I have completed our work in Wesmere."
    [/message]
    {VARIABLE Menoka 1}
    [/then]
    [/if]

    [if]
    [have_unit]
    id=Moidanav
    [/have_unit]
    [then]
    [message]
    speaker=Krshan
    message= _ "Thank you so much Moidanav.Please come to Dwarven Doors with us.You deserve a treat."
    [/message]
    [message]
    speaker=Moidanav
    message= _ "Sounds good,Krshan.We all go after me complete our work here."
    [/message]
    {VARIABLE Moidanav 1}
    [/then]
    [/if]

    {MODIFY_UNIT (side=8) side 1}
    [/event]

{~add-ons/Rebellion_in_the_North/utils/deaths.cfg}

[/scenario]

    



       

Ceres
Forum Regular
Posts: 620
Joined: September 18th, 2010, 7:56 pm
Location: Germany

Re: Help with WML for a particular scenario

Post by Ceres »

chak_abhi's code wrote:victory_when_enemies_defeated="no"
You set you won't win when enemy is defeated, so you don't.
Besides, you may shorten you schedule to {DEFAULT_SCHEDULE_AFTERNOON}.
chak_abhi
Posts: 347
Joined: June 24th, 2010, 3:37 pm

Re: Help with WML for a particular scenario

Post by chak_abhi »

Ceres wrote:
chak_abhi's code wrote:victory_when_enemies_defeated="no"
You set you won't win when enemy is defeated, so you don't.
Thanks.This may have been the error.I'll test this.
chak_abhi
Posts: 347
Joined: June 24th, 2010, 3:37 pm

Re: Help with WML for a particular scenario

Post by chak_abhi »

I need help once more please.
In a particular scenario in my campaign the leaders fail to show up on turn 1,for which the player is automatically declared defeated.This problem has been experienced by some (but not all) players.Please help.
The particular scenario code:

Code: Select all

#textdomain wesnoth-Rebellion_in_the_North
[scenario]
    id=26_Punishment_for_treason
    name=_ "Punishment for treason"
    map_data="{~add-ons/Rebellion_in_the_North/maps/26_Punishment_for_treason.map}"
    {TURNS 48 45 40}
    next_scenario=27_Back_Home
    {DEFAULT_SCHEDULE}
    {DEFAULT_MUSIC_PLAYLIST}

    [story]
    [part]
    story= _ "Krshan sent a message by a gryphon rider to Dwarven Doors informing them about his home-coming as soon as Krag Kumbha arranged the ships.The friendly orcs did not want to leave their homeland.Krshan thanked them for their services and they returned to Prestim."
    background=farnorth.png
    [/part]
    [part]
    story= _ "Aric received the message sent by Krshan.It was mentioned there that they would land at Glamdrol.Aric was greatly disturbed,since they had no idea about the condition of the port-city.Though the orcs had been fended from Dwarven Doors it was possible that the rebels still had considerable presence in the western parts of Alliance territory,which was their land for centuries.He confunded in Princess Radah about his apprehensions and they both decided to lead an expedition to Glamdrol.The Wesnoth veterans were to remain to guard the capital."
    background=story/Glamdrol.jpg
    [/part]
    [part]
    story= _ "Glamdrol was an ancient orcish tribal capital.It was founded in about 40YW, when the orcs were planning to attack the elves and the humans.Its foundation was a part of their plans to establish strong footholds near the strategic locations of attack."
    background=story/Glamdrol.jpg
    [/part]
    [part]
    story= _ "The orcs were eventually defeated by the elves,dwarves and humans,their fortune waxed and waned throughout the ages,the Northern Alliance was established,but still Glamdrol remained under orcish rule.The orcs enrolled themselves in the Alliance,but still humans and dwarves had minimal presence in the city."
    background=story/Glamdrol.jpg
    [/part]
    [part]
    story= _ "It was not until the Lord Protectorship of Howgarth III Glamdrol gained prominence.Howgarth III planned to upgrade the city to a port which would boost trade relations with Wesnoth and the far-north as well as with distant lands.The plan was executed successfully,and the city attained a new look."
    background=story/Glamdrol.jpg
    [/part]
    [part]
    story= _ "Aric and Princess Radah marched to Glamdrol to secure the place for safe landing of Krshan and his troops,but to their horror found the city under strong grasp of enemies.There was nothing remaining of the excellent port.Everything was in ruins."
    background=story/Glamdrol.jpg
    [/part]
    [part]
    show_title=yes
    {TO_PUNISHMENT_FOR_TREASON}
    background=maps/wesnoth.png
    [/part]
    [/story]

    [side]
    no_leader=yes
    save_id=Krshan
    unrenamable=yes
    side=1
    canrecruit=yes
    controller=human
    gold=0
    team_name=Alliance
    user_team_name=_"Alliance"
    recruit=Cavalryman, Horseman, Spearman, Bowman, Mage 
    income="0"
    {FLAG_VARIANT loyalist}
    [/side]
    
    
    [side]
    type=Orcish Warlord
    id=Tan-Ghur
    name=_"Tan-Ghur"
    side=2
    canrecruit=yes
    controller=ai
    {GOLD 140 170 200}
    team_name=Enemies
    user_team_name=_"Enemies"
    
    #ifdef EASY
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Troll Whelp, Goblin Spearman
#endif

#ifdef NORMAL
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Orcish Slayer, Orcish Warrior, Troll Whelp, Troll, Troll Rocklobber, Goblin Spearman
#endif

#ifdef HARD
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Orcish Warrior, Goblin Knight, Goblin Pillager, Orcish Slayer, Troll Whelp, Troll, Troll Warrior, Troll Rocklobber, Goblin Spearman, Goblin Impaler
#endif
        [ai]
            {NO_SCOUTS}
            recruitment_ignore_bad_movement=yes
            recruitment_pattern=scout,fighter,fighter,mixed fighter,archer
            {ATTACK_DEPTH 5 5 6}
        [/ai]
        [ai]
            time_of_day=dusk,first_watch,second_watch
            aggression=0.75
            caution=0.0
            grouping=no
        [/ai]
    {INCOME 2 4 8}
    [/side]

    {STARTING_VILLAGES 2 10}
    

    [side]
    type=Orcish Warlord
    id=Tan-Lang
    name=_"Tan-Lang"
    side=3
    canrecruit=yes
    controller=ai
    {GOLD 140 170 200}
    team_name=Enemies
    user_team_name=_"Enemies"
    
    #ifdef EASY
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Troll Whelp, Goblin Spearman
#endif

#ifdef NORMAL
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Orcish Slayer, Orcish Warrior, Troll Whelp, Troll, Troll Rocklobber, Goblin Spearman
#endif

#ifdef HARD
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Orcish Warrior, Goblin Knight, Goblin Pillager, Orcish Slayer, Troll Whelp, Troll, Troll Warrior, Troll Rocklobber, Goblin Spearman, Goblin Impaler
#endif
        [ai]
            {NO_SCOUTS}
            recruitment_ignore_bad_movement=yes
            recruitment_pattern=scout,fighter,fighter,mixed fighter,archer
            {ATTACK_DEPTH 5 5 6}
        [/ai]
        [ai]
            time_of_day=dusk,first_watch,second_watch
            aggression=0.75
            caution=0.0
            grouping=no
        [/ai]
    {INCOME 2 4 8}
    [/side]

    {STARTING_VILLAGES 3 10}

    [side]
    type=Naga Myrmidon
    id=Xella
    name=_"Xella"
    side=4
    canrecruit=yes
    controller=ai
    {GOLD 80 100 120}
    team_name=Enemies
    user_team_name=_"Enemies"
    income="4"
    recruit=Naga Fighter, Naga Warrior 
    [/side]
    {STARTING_VILLAGES 4 12}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 4 "Naga Warrior" 2}

    
    

    
    [event]
        name=prestart
    
    [disallow_recruit]
    side=1
    type=Footpad, Thug, Poacher, Gryphon Rider
    [/disallow_recruit]

    
    [store_unit]
         [filter]
            side=1
         [/filter]
         variable=krshan7_army
         kill=yes
    [/store_unit] 

    {FOREACH aric5_army k}
            {VARIABLE aric5_army[$k].x "recall"}
            {VARIABLE aric5_army[$k].y "recall"}

            [unstore_unit]
                variable=aric5_army[$k]
            [/unstore_unit]
        {NEXT k}
    {CLEAR_VARIABLE aric5_army}

    [store_gold]
            side=1
            variable=krshan7_gold
    [/store_gold]

    [modify_side]
        side=1
        {GOLD 350 320 350}
    [/modify_side]


    [recall]
    id=Aric
    x,y=44,27
    [/recall]

    [recall]
    id=Princess Radah
    x,y=43,28
    [/recall]

    [objectives]
            side=1
            [objective]
                description= _ "Resist till the end of turns"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Princess Radah"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Aric"
                condition=lose
            [/objective]
            [objective]
                description= _ "Turns run out"
                condition=lose
            [/objective]

            note={EARLY_FINISH_BONUS_NOTE}+{NEW_GOLD_CARRYOVER_NOTE_40}
    [/objectives]

    [/event]

    [event]
    name=start
    [message]
    speaker=Aric
    message= _ "Krshan will arrive any time now.We must secure the beach-head to make sure he can land safely.Its a pity that they have damaged such a nice port so badly."
    [/message]
    [message]
    speaker=Princess Radah
    message= _ "Our adversaries are no pushovers.There are two warlords in the north,and some nagas out in the sea!"
    [/message]
    [message]
    speaker=Aric
    message= _ "They have fortified the river banks.We cannot defeat them outright.We must hold them as long as possible."
    [/message]
    [/event]

    [event]
    name=turns 1-10
    {FORCE_CHANCE_TO_HIT side=1 id="Tan-Ghur" 0 ()}
    {FORCE_CHANCE_TO_HIT side=1 id="Tan-Lang" 0 ()}
    [/event]

    [event]
        name=moveto
        [filter]
            side=1,5
            x=19-25
            y=12-14
        [/filter]

        
        {LOYAL_UNIT 4 (Cuttle Fish) 13 7}
#ifdef NORMAL
        {LOYAL_UNIT 4 (Cuttle Fish) 10 8}
#endif

#ifdef HARD
        {LOYAL_UNIT 4 (Cuttle Fish) 10 8}
        {LOYAL_UNIT 4 (Cuttle Fish) 12 12}
#endif
        [message]
            type=Cuttle Fish
            message= _ "Slurp, click, click, click!"
        [/message]
        [message]
            speaker=Aric
            message= _ "Some more of those dangerous water monsters are coming!"
        [/message]
    [/event]
    
    [event]
        name=turn 16
        
        
        {NAMED_LOYAL_UNIT 4 (Saurian Flanker) 35 15 (Flixta) ( _ "Flixta")}
        {LOYAL_UNIT 4 (Saurian Oracle) 34 16}
        {LOYAL_UNIT 4 (Saurian Soothsayer) 31 16}
#ifdef NORMAL
        {LOYAL_UNIT 4 (Saurian Skirmisher) 29 15}
        {LOYAL_UNIT 4 (Saurian Skirmisher) 30 17}
#endif

#ifdef HARD
        {LOYAL_UNIT 4 (Saurian Skirmisher) 29 15}
        {LOYAL_UNIT 4 (Saurian Skirmisher) 30 17}
        {LOYAL_UNIT 4 (Saurian Skirmisher) 40 19}
#endif
        [message]
            speaker=Flixta
            message= _ "You here! You will sssuffer for your attack against my people!"   
        [/message]

        [allow_recruit]
            type=Saurian Skirmisher
            side=2,3
        [/allow_recruit]

#ifdef HARD
        [allow_recruit]
            type=Saurian Ambusher
            side=2,3
        [/allow_recruit]
#endif
    [/event] 
     
    [event]
    name=turn 10

    {FOREACH krshan7_army l}
            {VARIABLE krshan7_army[$l].x "recall"}
            {VARIABLE krshan7_army[$l].y "recall"}

            [unstore_unit]
                variable=krshan7_army[$l]
            [/unstore_unit]
        {NEXT l}
    {CLEAR_VARIABLE aric5_army}
 
    [move_unit_fake]
    type=Transport Galleon
    side=5
    x=5,5,6,7,7,8,8,9,10,11,11,12,13,14,14,15,15,14,14,14,15,15,15,16,16,15,15,16,16,17,17,18,18,19
    y=1,2,2,3,4,4,5,6,6,7,8,8,9,9,10,11,12,12,13,14,15,16,17,17,18,19,20,20,21,22,23,23,24,25
    [/move_unit_fake]
    {PLACE_IMAGE ("units/transport/transport-galleon.png") 19 25}

    [move_unit_fake]
    type=Grand Marshal
    side=1
    x=19,20,21,22
    y=25,25,26,25
    [/move_unit_fake]

        [terrain]
            x=20,20,20,21,21,22,22,22
            y=24,25,26,25,26,24,25,26
            terrain=Ce
        [/terrain]

        [terrain]
            x=22
            y=25
            terrain=Ke
        [/terrain]
        [redraw]
        [/redraw]
    
    [recall]
    id=Krshan
    x,y=22,25
    [/recall]
 
    [recall]
    id=Vaman
    x,y=22,26
    [/recall]

    [recall]
    id=Sandrom
    x,y=23,26
    [/recall]

    [kill]
    side=1
    type=Orcish Warrior, Orcish Warlord, Orcish Archer, Orcish Crossbowman, Orcish Slurbow, Wolf Rider, Goblin Knight, Goblin Pillager, Direwolf Rider
    [/kill]

    [gold]
    side=1
    amount=$krshan7_gold
    [/gold]
    {CLEAR_VARIABLE krshan7_gold}

    [message]
    speaker=Krshan
    message= _ "What,rebels here too? You will now be punished for your treason against the Northern Alliance! Prepare to meet your deaths,foul orcs!"
    [/message]
    [message]
    speaker=Aric
    message= _ "Krshan,is it you?So finally you are back!"
    [/message]
    [message]
    speaker=Princess Radah
    message= _ "Oh,dear Krshan,you have returned!I was so worried!"
    [/message]
    [message]
    speaker=Krshan
    message= _ "Radah,you here?What a pleasant surprise!"
    [/message]
    [message]
    speaker=Princess Radah
    message= _ "Obviously I am here on behalf of Wesnoth!Hadn't I been here Dwarven Doors would have fallen to the orcs long ago."
    [/message]
    [message]
    speaker=Krshan
    message= _ "Is it so?You are as charming as ever Radah!"
    [/message]
    [message]
    speaker=Vaman
    message= _ "We have a battle to fight here,haven't we?"
    image=portraits/vaman.png
    [/message]
    [message]
    speaker=Krshan
    message= _ "Right you are Vaman.Just look how the rebels have destroyed the port!Anyway,onward for battle everyone!"
    [/message]
    [message]
    speaker=Aric
    message= _ "A substantial force is under me now.If you wish I will place them and myself under your command."
    [/message]
    [message]
    speaker=Krshan
    message= _ "Thanks Aric."
    [/message]
    {MODIFY_UNIT (id=Aric) canrecruit no}


    [allow_recruit]
    side=1
    type=Footpad, Thug, Poacher, Gryphon Rider
    [/allow_recruit]

    [message]
    speaker=Tan-Ghur
    message= _ "Those humans and dwarves who ravaged the far-north are back!We must use all available resources!They must be stopped here!"
    [/message]

    [gold]
    side=2
    {QUANTITY amount 150 180 200}
    [/gold]

    [gold]
    side=3
    {QUANTITY amount 150 180 200}
    [/gold]
 
    [gold]
    side=4
    amount=100
    [/gold]
    
    [objectives]
            side=1
            [objective]
                description= _ "Defeat all enemies"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Princess Radah"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Aric"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Krshan"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Vaman"
                condition=lose
            [/objective]
            [objective]
                description= _ "Turns run out"
                condition=lose
            [/objective]

            note={EARLY_FINISH_BONUS_NOTE}+{NEW_GOLD_CARRYOVER_NOTE_40}
    [/objectives]

    [/event]
    
    [event]
        name=die
        [filter]
            id=Tan-Ghur
        [/filter]

        [message]
            speaker=Tan-Lang
            message= _ "The human worms and midgets are advancing.We need to call some reinforcements!"
        [/message]

        [gold]
            side=3
            amount=150
        [/gold]
    [/event]

    
    [event]
        name=die
        [filter]
            id=Tan-Lang
        [/filter]

        [message]
            speaker=Tan-Ghur
            message= _ "The human worms and midgets are advancing.We need to call some reinforcements!"
        [/message]

        [gold]
            side=2
            amount=150
        [/gold]
    [/event]

    [event]
    name=time over
    [message]
    speaker=Krshan
    message= _ "We are growing weaker and the enemy stronger!We have lost!"
    [/message]
    [endlevel]
    result=defeat
    [/endlevel]
    [/event]

    [event]
    name=enemies defeated
    [message]
    speaker=Princess Radah
    message= _ "Finally the battle is won!Thank you Krshan,your timely arrival is all that what made the difference."
    [/message]
    [message]
    speaker=Krshan
    message= _ "I should thank you,Aric and Radah.If you hadn't come to resist the usurpers we might not have been able to land.Anyway,everyone of my team is tired.We need to rest.Lets proceed to Dwarven Doors."
    [/message]
        

    [if]
    [have_unit]
    race=merman
    [/have_unit]
    [then]
    [message]
    race=merman
    message= _ "Lord Krshan,we would like to return to Jotha if you permit.Now you are on dry land,where we can neither move nor fight well."
    [/message]
    [message]
    speaker=Krshan
    message= _ "You may leave.I will never forget your loyal services."
    [/message]
    [message]
    race=merman
    message= _ "Goodby,Lord Krshan.May you root out all evil and keep peace in the northlands and the far-north."
    [/message]
 
    [kill]
    side=1
    type=Merman Fighter, Merman Hunter, Mermaid Initiate, Merman Warrior, Merman Hoplite, Merman Triton, Merman Spearman, Merman Netcaster, Merman Javelineer, Merman Entangler, Mermaid Priestess, Mermaid Enchantress, Mermaid Diviner, Mermaid Siren
    [/kill]
    [/then]
    [/if]
    [endlevel]
    result=victory
    bonus=yes
    {NEW_GOLD_CARRYOVER 40}
    [/endlevel]
    [/event]

{~add-ons/Rebellion_in_the_North/utils/deaths.cfg}

[/scenario]
   
The scenario before this from which the starting leaders were recalled:

Code: Select all

#textdomain wesnoth-Rebellion_in_the_North
[scenario]
    id=21_The_siege_of_Dwarven_Doors
    name=_ "The siege of Dwarven Doors"
    map_data="{~add-ons/Rebellion_in_the_North/maps/21_The_siege_of_Dwarven_Doors.map}"
    turns=-1
    next_scenario=22_Hopeful_Spring
    victory_when_enemies_defeated="yes"
    {DEFAULT_SCHEDULE}
    {DEFAULT_MUSIC_PLAYLIST}

    [story]
    [part]
    story= _ "Aric,Princess Radah and their soldiers tried to rush to Dwarven Doors.But their progress was soon halted.Innumerable orcs blocked their path.They defeated one group of orcs only to be ambushed by another.The frequent skirmishes not only led to the a number of casualties but also depleted their supplies,and not to mention,they caused severe exhaustion of the whole battalion."
    background=story/Dwarven _Doors2.jpg
    [/part]
    [part]
    story= _ "It took them more than a month to break through the orcish forces.But there were some benefits too.A second group of soldiers despatched from Weldyn joined them.This group consisted mostly veteran soldiers.Their arrival strengthened Aric's army considerably.Finally they could spot the ramparts of the capital city of the Northern Alliance."
    background=story/Dwarven _Doors2.jpg
    [/part]
    [part]
    story= _ "Dwarven Doors usually look marvellous in winter.But neither Aric nor Princess Radah nor any of their soldiers were in any mood to enjoy the scenary.They found the city besieged by no less than 3 orcish armies.The city guards were battling with the orcs.At least the capital had not fallen,and still there was hope that it could be saved."
    background=story/Dwarven _Doors2.jpg
    [/part]
    [part]
    show_title=yes
    {TO_THE_SIEGE_OF_DWARVEN_DOORS}
    background=maps/wesnoth.png
    [/part]
    [/story]

    [side]
    no_leader=yes
    save_id=Krshan
    unrenamable=yes
    side=1
    canrecruit=yes
    controller=human
    gold=0
    team_name=Alliance
    user_team_name=_"Alliance"
    recruit=Cavalryman, Horseman, Spearman, Bowman, Mage, Swordsman, Longbowman, White Mage 
    income="4"
    {FLAG_VARIANT loyalist}
    [/side]
    {STARTING_VILLAGES 1 6}


    [side]
    type=Grand Marshal
    controller=ai
    id=Vikash I
    name=_"Vikash I"
    side=2
    unrenamable=yes
    canrecruit=yes
    {GOLD 600 500 500}
    recruit="Bowman, Spearman, Horseman, Cavalryman, Swordsman, Dwarvish Steelclad, Gryphon Rider, Mage, Red Mage, White Mage, Longbowman, Knight, Dragoon"
    team_name=Alliance
    user_team_name=_"Alliance"
    income="10"
    persistent=yes
    fog="no"
    share_view="no"
    shroud="no"
    [ai]
        recruitment_ignore_bad_combat=yes
        recruitment_ignore_bad_movement=yes
        passive_leader=yes
        passive_leader_shares_keep=yes
        recruitment_pattern=fighter,fighter,fighter,archer,mixed fighter,scout
        {NO_SCOUTS}
    [/ai]
    [ai]
        time_of_day=first_watch,second_watch
        aggression=0.25
        caution=1
        grouping=defensive
    [/ai]
    [/side]
    {STARTING_VILLAGES 2 20}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 2 "Swordsman" 2}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 2 "Dwarvish Steelclad" 2}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 2 "Longbowman" 2}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 2 "Knight" 1}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 2 "Dragoon" 1}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 2 "Red Mage" 1}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 2 "White Mage" 1}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 2 "Mage" 2}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 2 "Gryphon Rider" 1}

    [side]
    type=Orcish Warlord
    id=Meghnad
    name=_"Meghnad"
    side=3
    canrecruit=yes
    controller=ai
    {GOLD 300 400 450}
    team_name=Enemies
    user_team_name=_"Enemies"
    income="8"
    recruit=Orcish Grunt, Orcish Warrior, Orcish Archer, Orcish Crossbowman, Wolf Rider, Goblin Knight, Goblin Pillager, Orcish Assassin, Orcish Slayer 
    [ai]
        recruitment_ignore_bad_combat=yes
        recruitment_ignore_bad_movement=yes
        recruitment_pattern=scout,fighter,fighter,archer,mixed fighter
    [/ai]
    [/side]
    {STARTING_VILLAGES 3 6}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 3 "Orcish Slayer" 2}

    [side]
    type=Orcish Warlord
    generate_name=yes
    side=4
    canrecruit=yes
    controller=ai
    {GOLD 300 400 450}
    team_name=Enemies
    user_team_name=_"Enemies"
    income="8"
    recruit=Orcish Grunt, Orcish Warrior, Orcish Archer, Orcish Crossbowman, Wolf Rider, Goblin Knight, Goblin Pillager, Orcish Assassin, Orcish Slayer 
    [ai]
        recruitment_ignore_bad_combat=yes
        recruitment_ignore_bad_movement=yes
        recruitment_pattern=scout,fighter,fighter,archer,mixed fighter
    [/ai]
    [/side]
    {STARTING_VILLAGES 4 5}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 4 "Orcish Slayer" 1}

    [side]
    type=Orcish Warlord
    generate_name=yes
    side=5
    canrecruit=yes
    controller=ai
    {GOLD 300 400 450}
    team_name=Enemies
    user_team_name=_"Enemies"
    income="8"
    recruit=Orcish Grunt, Orcish Warrior, Orcish Archer, Orcish Crossbowman, Wolf Rider, Goblin Knight, Goblin Pillager, Orcish Assassin, Orcish Slayer 
    [ai]
        recruitment_ignore_bad_combat=yes
        recruitment_ignore_bad_movement=yes
        recruitment_pattern=scout,fighter,fighter,archer,mixed fighter
    [/ai]
    [/side]
    {STARTING_VILLAGES 5 6}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 5 "Orcish Slayer" 2}

    [side]
    no_leader=yes
    controller=ai
    side=6
    {GOLD 300 400 450}
    recruit=Troll Whelp, Troll, Troll Rocklobber, Troll Shaman
    [ai]
    recruitment_ignore_bad_combat=yes
    recruitment_ignore_bad_movement=yes
    [/ai]
    team_name=Enemies
    user_team_name=_"Enemies"
    income="8"
    
    [/side]
    {LIMIT_CONTEMPORANEOUS_RECRUITS 6 "Troll Shaman" 2}

    [side]
    no_leader=yes
    controller=ai
    side=7
    {GOLD 300 400 450}
    recruit=Orcish Grunt, Orcish Warrior, Orcish Archer, Orcish Crossbowman, Wolf Rider, Goblin Knight, Goblin Pillager, Orcish Assassin, Orcish Slayer
   
    [ai]
    recruitment_ignore_bad_combat=yes
    recruitment_ignore_bad_movement=yes
    recruitment_pattern=scout,fighter,fighter,archer,mixed fighter
    [/ai]
    team_name=Enemies
    user_team_name=_"Enemies"
    income="8"
    
    [/side]
    {LIMIT_CONTEMPORANEOUS_RECRUITS 7 "Orcish Slayer" 2}

    [side]
    no_leader=yes
    controller=ai
    side=8
    {GOLD 300 400 450}
    recruit=Orcish Grunt, Orcish Warrior, Orcish Archer, Orcish Crossbowman, Wolf Rider, Goblin Knight, Goblin Pillager, Orcish Assassin, Orcish Slayer
   
    [ai]
    recruitment_ignore_bad_combat=yes
    recruitment_ignore_bad_movement=yes
    recruitment_pattern=scout,fighter,fighter,archer,mixed fighter
    [/ai]
    team_name=Enemies
    user_team_name=_"Enemies"
    income="8"
    
    [/side]
    {LIMIT_CONTEMPORANEOUS_RECRUITS 8 "Orcish Slayer" 2}

    [side]
    no_leader=yes
    controller=ai
    side=9
    gold=500
    recruit=Troll Whelp, Troll, Troll Rocklobber, Gryphon, Young Ogre, Ogre, Mage, Red Mage, White Mage
    persistent=yes
    team_name=Alliance
    user_team_name=_"Alliance"
    income="4"
    [ai]
    recruitment_ignore_bad_combat=yes
    recruitment_ignore_bad_movement=yes
    recruitment_pattern=fighter,fighter,archer,mixed fighter,scout
    passive_leader=yes
    {NO_SCOUTS}
    [/ai]
    [/side]
    {LIMIT_CONTEMPORANEOUS_RECRUITS 9 "Troll" 2}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 9 "Troll Rocklobber" 2}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 9 "Ogre" 2}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 9 "Red Mage" 2}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 9 "White Mage" 1}
    {LIMIT_CONTEMPORANEOUS_RECRUITS 9 "Gryphon" 1}

    [event]
        name=prestart
    
    [disallow_recruit]
    side=1
    type=Footpad, Thug, Poacher, Gryphon Rider
    [/disallow_recruit]

    [store_gold]
            side=1
            variable=krshan6_gold
    [/store_gold]

    
    [gold]
    side=1
    amount=$aric4_gold
    [/gold]
    {CLEAR_VARIABLE aric4_gold}

    [recall]
    id=Aric
    x,y=30,32
    [/recall]

    [recall]
    id=Princess Radah
    x,y=29,33
    [/recall]

    [objectives]
            side=1
            [objective]
                description= _ "Defeat all enemies"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Princess Radah"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Aric"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Vikash I"
                condition=lose
            [/objective]

            note={NO_GOLD_CARRYOVER_NOTE}
    [/objectives]

    #attacking orcs east
    {GENERIC_UNIT 5 (Orcish Warrior) 30 19} 
    {GENERIC_UNIT 5 (Orcish Crossbowman) 32 19} 
    {GENERIC_UNIT 5 (Goblin Knight) 33 18} 
    {GENERIC_UNIT 5 (Orcish Crossbowman) 33 19} 
    {GENERIC_UNIT 5 (Goblin Pillager) 31 21}
    {GENERIC_UNIT 5 (Orcish Warrior) 33 20} 

    #attacking orcs west
    {GENERIC_UNIT 3 (Orcish Crossbowman) 20 12} 
    {GENERIC_UNIT 3 (Goblin Pillager) 20 14} 
    {GENERIC_UNIT 3 (Goblin Knight) 18 15} 
    {GENERIC_UNIT 4 (Orcish Warrior) 19 14} 
    {GENERIC_UNIT 4 (Orcish Crossbowman) 19 17}
    {GENERIC_UNIT 4 (Orcish Warrior) 20 16}

    #capital guards
    {GENERIC_UNIT 2 (Swordsman) 29 19} {GUARDIAN}
    {GENERIC_UNIT 2 (Swordsman) 31 19} {GUARDIAN}
    {GENERIC_UNIT 2 (Swordsman) 33 15} {GUARDIAN}
    {GENERIC_UNIT 2 (Longbowman) 33 17} {GUARDIAN}
    {GENERIC_UNIT 2 (Swordsman) 33 13} {GUARDIAN}
    {GENERIC_UNIT 2 (Longbowman) 31 12} {GUARDIAN}
    {GENERIC_UNIT 2 (Swordsman) 29 11} {GUARDIAN}
    {GENERIC_UNIT 2 (Swordsman) 27 11} {GUARDIAN}
    {GENERIC_UNIT 2 (Longbowman) 25 11} {GUARDIAN}
    {GENERIC_UNIT 2 (Longbowman) 27 19} {GUARDIAN}
    {GENERIC_UNIT 2 (Swordsman) 25 19} {GUARDIAN}
    {GENERIC_UNIT 2 (Swordsman) 23 18} {GUARDIAN}
    {GENERIC_UNIT 2 (Longbowman) 20 17} {GUARDIAN}
    {GENERIC_UNIT 2 (Swordsman) 21 15} {GUARDIAN}
    {GENERIC_UNIT 2 (Longbowman) 21 13} {GUARDIAN}
    {GENERIC_UNIT 2 (Swordsman) 23 12} {GUARDIAN}
    

    

    [/event]

    [event]
    name=start
    [message]
    speaker=Vikash I
    message= _ "Am I seeing correctly!Humans approaching the city!It can't be....."
    [/message]
    [message]
    speaker=Aric
    message= _ "Lord Vikash,are you well?"
    [/message]
    [message]
    speaker=Vikash I
    message= _ "Aric,is it you?I had given up all hope!I have been resisting orcish assaults continuously after you and Krshan left.I have men and supplies sufficient to hold the city for no more than a fortnight!"
    [/message]
    [message]
    speaker=Aric
    message= _ "I have with me Princess Radah of Wesnoth and a number of Wesnothian soldiers.We must win here."
    [/message]
    [message]
    speaker=Meghnad
    message= _ "You can't human!We have more forces than you and more are coming.Just see how the teeth of our wolves grind your bones!"
    [/message]
    [message]
    speaker=Princess Radah
    message= _ "I was saving some gold for this final battle.Take this Aric."
    [/message]
    [message]
    speaker=Aric
    message= _ "Thanks,Princess."
    [/message]

    #ifdef EASY
    [gold]
        side=1
        amount=400
    [/gold]
    [message]
    speaker=narrator
    message= _ "You receive 400 gold."
    image=wesnoth-icon.png
    [/message]
     #else
    [gold]
        side=1
        amount=350
    [/gold]
    [message]
    speaker=narrator
    message= _ "You receive 350 gold."
    image=wesnoth-icon.png
    [/message]
    #endif


    
    [/event]

    [event]
    name=turn 7
    [unit]
    type=Troll Warrior
    id=Grol
    name=_"Grol"
    side=6
    x=3
    y=6
    canrecruit=yes
    [/unit]

        [terrain]
            x=2,2,3,3,3,4,4
            y=5,6,5,6,7,5,6
            terrain=Ce
        [/terrain]

        [terrain]
            x=3
            y=6
            terrain=Ke
        [/terrain]
        [redraw]
        [/redraw]

    [message]
    speaker=Grol
    message= _ "Grol come to help orcs!We smash humans now!"
    [/message]

    [/event]

    [event]
    name=turn 12
    [unit]
    type=Orcish Warlord
    generate_name=yes
    side=7
    x=8
    y=30
    canrecruit=yes
    [/unit]

        [terrain]
            x=7,7,8,8,8,9,9
            y=30,31,29,30,31,30,31
            terrain=Ce
        [/terrain]

        [terrain]
            x=8
            y=30
            terrain=Ke
        [/terrain]
        [redraw]
        [/redraw]
 
    [message]
    speaker=Vikash I
    message= _ "More of them come."
    [/message]

    [/event]

    [event]
    name=turn 19
    [unit]
    type=Orcish Warlord
    id=Mahira
    name=_"Mahira"
    unrenamable=yes
    side=8
    x=44
    y=10
    canrecruit=yes
    [/unit]

        [terrain]
            x=43,43,44,44,44,45,45
            y=10,11,9,10,11,10,11
            terrain=Ce
        [/terrain]

        [terrain]
            x=44
            y=10
            terrain=Ke
        [/terrain]
        [redraw]
        [/redraw]
 
    [message]
    speaker=Mahira
    message= _ "Now we have surrounded you on all sides!Die humans!"
    [/message]

    [/event]

    [event]
    name=turn 21
    [unit]
    type=Ancient Lich
    id=Ro'Arthian
    name=_"Ro'Arthian"
    profile=portraits/Ro'Arthian.png
    side=9
    x=40
    y=3
    canrecruit=yes
    {IS_HERO}
    [/unit]

    [unit]
    type=Lich
    id=Ro'Sothian
    name=_"Ro'Sothian"
    profile=portraits/Ro'Sothian.png
    side=9
    x=39
    y=4
    ai_special=guardian
    [modifications]
    {TRAIT_LOYAL}
    [/modifications]
    {IS_HERO}
    [/unit]
 
        [terrain]
            x=39,39,40,40,40,41,41
            y=3,4,2,3,4,3,4
            terrain=Ce
        [/terrain]

        [terrain]
            x=40
            y=3
            terrain=Ke
        [/terrain]
        [redraw]
        [/redraw] 

    [message]
    speaker=Ro'Arthian
    message= _ "(A booming voice reverberates across the battle field) So you blasted orcs have picked the courage to attack humans again?!So many defeats,yet you learn nothing!Now we will show you your right place!"
    [/message]
    [message]
    speaker=Mahira
    message= _ "What!These are the liches who haunt Highbrook Pass!What are they doing here?"
    [/message]
    [message]
    speaker=Vikash I
    message= _ "Ro'Arthian!Is it you?"
    [/message]
    [message]
    speaker=Ro'Arthian
    message= _ "Obviously it is me,don't you know?Who are you chap?"
    [/message]
    [message]
    speaker=Vikash I
    message= _ "I am Vikash I,Lord Protector of the Northern Alliance.I requested you for help against these rebels."
    [/message]
    [message]
    speaker=Ro'Arthian
    message= _ "Oh,you are the Lord Protector?Greetings from us,friend!"
    [/message]
    [message]
    speaker=Ro'Sothian
    message= _ "We were informed about your plight by the gentle boy,Krshan or whatever his name was.Such a nice fellow,he gave us his mages.We have trained them,and now they will show their battle skills."
    [/message]

    [objectives]
            side=1
            [objective]
                description= _ "Defeat all enemies"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Princess Radah"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Aric"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Vikash I"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Ro'Sothian"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Ro'Arthian"
                condition=lose
            [/objective]

            note={NO_GOLD_CARRYOVER_NOTE}
    [/objectives]

    
    
    [/event]

    [event]
    name=turns 19-21
    {FORCE_CHANCE_TO_HIT side=1 id="Mahira" 0 ()}
    {FORCE_CHANCE_TO_HIT side=2 id="Mahira" 0 ()}
    [/event]

    [event]
    name=enemies defeated
    [message]
    speaker=Ro'Arthian
    message= _ "Back to hell,creatures of darkness!"
    [/message]
    [message]
    speaker=Vikash I
    message= _ "Finally...(sigh)..we have won!I thank God that Aric and Ro'Arthian have come in time.Now let me reveal that I had suffered some grievous injuries in the hands of the rebels about three weeks ago.I won't live long."
    [/message]
    [message]
    speaker=Aric
    message= _ "NO!It can't be!"
    [/message]
    [message]
    speaker=Ro'Sothian
    message= _ "No doubt we were needed here earlier.But waking up from the dead after so many years,its just tiring,very tiring indeed to travel such distances."
    [/message]
    [message]
    speaker=Vikash I
    message= _ "I will die soon,but in peace,for I know that Dwarven Doors is in safe hands.You need to send a message to Krshan by a gryphon asking him to return as early as possible."
    [/message]
    [message]
    speaker=Princess Radah
    message= _ "Do you have news about Krshan,Lord Vikash?Where is he now?"
    [/message]
    [message]
    speaker=Vikash I
    message= _ "He had contacted me some weeks back.He has reported that he has successfully saved Earl Raman,and then liberated Dorset and captured the orcish stronghold of Prestim.Krag Kumbha has joined forces with him.So he is safe for now."
    [/message]
    [message]
    speaker=Princess Radah
    message= _ "How far is Prestim from here?Can you send me there?"
    [/message]
    [message]
    speaker=Aric
    message= _"Thats out of the question,Princess.You..."
    [/message]
    [message]
    speaker=Princess Radah
    message= _ "Why?I want to help him and I must get to him as quickly as possible."
    [/message]
    [message]
    speaker=Vikash I
    message= _ "I appreciate your courage,or your love for Krshan,whatever it is Radah.But I must say that you cannot be sent there.Firstly,I do not have enough gryphons to transport you and your men to the far north.You cannot cross the mountains with our horses.If you try to walk,by the time you will reach there the war will probably be over. Secondly you have no idea about the oppressive cold of the far north.Krshan has told me that many of our soldiers sent there have died due to the bitter cold.So I suggest you remain here to repel any further attacks from the rebels,if they at all come.Krshan knows his stuff very well,and he has the dwarves with him to help.I am sure you will meet your friend soon."
    [/message]
    [message]
    speaker=Princess Radah
    message= _ "Well,then.I'll stay here."
    [/message]
    [message]
    speaker=Aric
    message= _ "What is the state of Knalga and Lord Angar?"
    [/message]
    [message]
    speaker=Vikash I
    message= _ "Knalga is safe for now.But I am sorry to say that Lord Angar is no more with us.His headquarters were attacked by several orcs and trolls.He fought bravely,and fell with no less than 94 wounds on his body.He slayed no less than 100 orcs and 50 trolls before falling.But he had managed to unite a number of Dwarvish tribes,led by Lord Pertaup, Lord Himbar, Lord Shiji, Lord Tipper and others.They repelled all the invaders,and also sent forces to me to defend the Capital.You had seen them today itself."
    [/message]
    [message]
    speaker=Ro'Arthian
    message= _ "Vikash,brave boy,may you spend your last moments peacefully."
    [/message]
    [message]
    speaker=Vikash I
    message= _ "Thank you, Ro'Arthian.You and your brother have proved to be one of the most consistent allies of the Northern Alliance.May you rest in peace."
    [/message]
    [message]
    speaker=Ro'Sothian
    message= _ "We will rise again,if the need arises,if Dwarven Doors or Knalga faces such serious threats!"
    [/message]
    [message]
    speaker=Ro'Arthian
    message= _ "Sure!"
    [/message]

    [if]
    [have_unit]
    id=Pala
    [/have_unit]
    [then]
    [message]
    speaker=Pala
    message= _ "That was some fighting,I have never seen anything like this before!I will remember it till I die!Now Aric,I must continue to Wesmere."
    [/message]
    [message]
    speaker=Aric
    message= _ "Thank you very much Pala.One of our riders will put you on the right way.We will remember your services forever."
    [/message]
    [store_unit]
    id=Pala
    kill=yes
    [/store_unit]
    [/then]
    [/if]
  
    [endlevel]
            result=victory
            bonus=yes
            {NEW_GOLD_CARRYOVER 0}
    [/endlevel]
    [/event]

    [event]
    name=last breath
    [filter]
    id=Ro'Sothian
    [/filter]
    [message]
    speaker=unit
    message= _ "We are sorry that we cannot help fools like you.Come on brother,lets leave."
    [/message]
    [endlevel]
    result=defeat
    [/endlevel]
    [/event]

    [event]
    name=last breath
    [filter]
    id=Ro'Arthian
    [/filter]
    [message]
    speaker=unit
    message= _ "We are sorry that we cannot help fools like you.Come on brother,lets leave."
    [/message]
    [endlevel]
    result=defeat
    [/endlevel]
    [/event]

    [event]
    name=last breath
    [filter]
    id=Vikash I
    [/filter]
    [message]
    speaker=unit
    message= _ "Aargh!I am finished!"
    [/message]
    [message]
    speaker=Aric
    message= _ "We needed him to hold Dwarven Doors. We're done for!"
    [/message]
    [endlevel]
    result=defeat
    [/endlevel]
    [/event]

    [event]
    name=moveto
    first_time_only=yes
    [filter]
    side=3,4,5,6,7,8
    x=26-28
    y=14-16
    [/filter]
    [message]
    speaker=Vikash I
    message= _ "The enemy is drawing near!My bodyguards must join the battle!"
    [/message]

    #ifdef EASY
    {GENERIC_UNIT 2 (Royal Guard) 26 13} {GUARDIAN}
    {GENERIC_UNIT 2 (Royal Guard) 28 16} {GUARDIAN}
    {GENERIC_UNIT 2 (Iron Mauler) 26 16} {GUARDIAN}
    {GENERIC_UNIT 2 (Master Bowman) 28 13} {GUARDIAN}

    #else
    {GENERIC_UNIT 2 (Royal Guard) 26 13} {GUARDIAN}
    {GENERIC_UNIT 2 (Iron Mauler) 28 16} {GUARDIAN}
    #endif

    [/event]

    

    [event]
    name=victory
      [store_unit]
         [filter]
            side=1
         [/filter]
         variable=aric5_army
         kill=yes
      [/store_unit]
        {FOREACH krshan6_army g}
            {VARIABLE krshan6_army[$g].x "recall"}
            {VARIABLE krshan6_army[$g].y "recall"}

            [unstore_unit]
                variable=krshan6_army[$g]
            [/unstore_unit]
        {NEXT g}
    {CLEAR_VARIABLE krshan6_army}

    
    
    [/event]
    

{~add-ons/Rebellion_in_the_North/utils/deaths.cfg}

[/scenario]


    




    
(There are a few scenarios in between too)
Max
Posts: 1449
Joined: April 13th, 2008, 12:41 am

Re: Help with WML for a particular scenario

Post by Max »

you're killing side 1 in the "The siege of Dwarven Doors". look at the victory event (aric5_army/aric6_army).
chak_abhi
Posts: 347
Joined: June 24th, 2010, 3:37 pm

Re: Help with WML for a particular scenario

Post by chak_abhi »

Max wrote:you're killing side 1 in the "The siege of Dwarven Doors". look at the victory event (aric5_army/aric6_army).
But side 1 is stored,isn't it?The same code has been used quite a few times before successfully.I myself faced no problem in play-testing the scenario.
Max
Posts: 1449
Joined: April 13th, 2008, 12:41 am

Re: Help with WML for a particular scenario

Post by Max »

ah - you're right. they are restored in a pre start event. i'm a bit confused - they're all put on the recall list. wouldn't that also happen for the leader of side 1? do you have a save game?
Post Reply