Unknown Scenario Error

A place to post your WML questions and answers for multiplayer/single player scenarios.

Moderators: Forum Moderators, Developers

Unknown Scenario Error

Postby gogogomez » August 26th, 2008, 3:45 am

I am trying to create my first campaign (obviously) and keep getting an error saying "unknown scenario 'caravan'". Caravan is the name of the first scenario in the campaign. Here are the cfg files:

Main:

#textdomain wesnoth-Outlaws
[textdomain]
name="wesnoth-Outlaws"
path="data/campaigns/outlaws/translations"

[/textdomain]

[campaign]
id=outlaws
name= _ "Outlaws"
abbrev= _ "OUTLAWS"
first_scenario= "caravan"
define=CAMPAIGN_OUTLAWS

difficulties=EASY,NORMAL,HARD
difficulty_descriptions={MENU_IMG_TXT2 "units/human-peasants/peasant.png~RC(magenta>red)" _"Peasant" _"(Easy)"} + ";" + {MENU_IMG_TXT2 "units/human-outlaws/outlaw.png~RC(magenta>red)" _"Outlaw" _"(Normal)"} + ";" + {MENU_IMG_TXT2 "units/human-outlaws/fugitive.png~RC(magenta>red)" _"Fugitive" _"(Difficult)"}
icon="units/human-outlaws/fugitive.png~RC(magenta>red)"

description= _ "the eastern outskirts of Wesnoth, near the border with the largely unknown eastern lands, is a brutal and unforgiving landscape. It is here that Mance Rayder and his men make their hard, brutal living."



[/campaign]


#ifdef Outlaws
[binary_path]
path=data/campaigns/outlaws/
[/binary_path]

[+units]
{@campaigns/outlaws/units}
[/units]

{@campaigns/outlaws/scenarios}

#endif


And here is the scenario file I want the campaign to read:

#textdomain wesnoth-Outlaws
[scenario]

id=caravan
next_scenario=Rivals

name= _ "caravan"
map_data="{data/campaigns/outlaws/maps/caravan.map}"
{TURNS 18 14 10}



[story]
[part]
story= _ "On the eastern outskirts of Wesnoth, near the border with the largely unknown eastern lands, the influence of the rulers in Weldyn is barely felt.
background=story/frontier.jpg
[/part]
[part]
story= _ "Outlaws and bandits operate with near impunity, with only the token expedition of the King's troops to worry about. These outlaws prey on caravans that come west from the spring to the fall to trade with the growing cities and towns of Wesnoth."
background=story/frontier.jpg
[/part]
[part]
story= _ "It is here, where the only real law is the power of the sword or mace, that Mance Rayder and his men make their hard, brutal living."
background=story/frontier.jpg
[/part]
[part]
story= _ "But among these Orcs, beggars and thieves, Mance Rayder is set apart by not only his brawn but his ambition. He has plan that, if successful, will change not only his fortunes, but those of the entire eastern border province as well." "
background=story/frontier.jpg
[/part]
[part]
story= _ "But the plan is risky. And implementing it will incur the wrath of local Orc tribes, rival outlaws, and even the Crown itself."
background=story/frontier.jpg
[/part]
[/story]

{DUSK}
{FIRST_WATCH}
{SECOND_WATCH}
{DAWN}
{MORNING}
{AFTERNOON}

[event]
name=prestart
[objectives]
side=1
[objective]
description=_"Defeat Enemy Leader"
condition=win
[/objective]

[objective]
description=_"Death of Mance"
condition=lose
[/objective]

[objective]
description=_"Turns run out"
condition=lose
[/objective]
[/objectives]

[/event]

[side]
side=1
controller=human
team_name=1
user-team_name=_"Mance's Raiders"

type=fighter
description=Mance
canrecruit=yes
random_traits=no
[modifications]
{TRAIT_HEALTHY}
{TRAIT_INTELLIGENT}
{TRAIT_RESILIENT}

[/modifications]


recruit=footpad,poacher,thief

[GOLD 90 70 50]
[INCOME 0 0 0]

[/side]

[side]
side=2
controller=ai
canrecruit=yes
type=Horseman
description="Harry Mudd"
user_description= _ "Harry Mudd"
canrecruit=yes
side=2
recruit=Horseman
{GOLD 92 92 92}
[/side]

[message]
description=Mance
message= _ "Here comes the Caravan. Look, they have horsemen guards, these are surely rich merchants. We should collect much booty on this raid! For fortune! For plunder!"
[/message]

[/scenario]
gogogomez
 
Posts: 14
Joined: August 26th, 2008, 3:38 am

Re: Unknown Scenario Error

Postby cylosae » August 26th, 2008, 4:36 am

Hmm..
I think the proble is on line 13 and line 26,

line 13 contains declaration CAMPAIGN_OUTLAWS macro
Code: Select all
define=CAMPAIGN_OUTLAWS


but line 26 Outlaws macro is required
Code: Select all
#ifdef Outlaws


to solve it just replace Outlaws with CAMPAIGN_OUTLAWS (line 26)
Code: Select all
#ifdef CAMPAIGN_OUTLAWS
1 to 4 kB/s internet connection!
you know what's that like?
cylosae
 
Posts: 16
Joined: August 15th, 2008, 12:57 am

Re: Unknown Scenario Error

Postby gogogomez » August 26th, 2008, 5:28 am

Thanks. Doing as you suggested revealed numerous errors in my scenario wml syntax, and then still gave the unknown scenario error. I am in over my head, apparently.

I thought that my problems would be in getting the AI in the scenarios to act appropriately, but the wml is more daunting than I anticipated. Not worth delving into given this. Which is too bad, I thought I had a good idea for a campaign.
gogogomez
 
Posts: 14
Joined: August 26th, 2008, 3:38 am

Re: Unknown Scenario Error

Postby cylosae » August 26th, 2008, 7:05 am

main.cfg is alright but
scenario "caravan" still contains some errors:

on line 8 written:
Code: Select all
map_data="{data/campaigns/outlaws/maps/caravan.map}"

cause map not found
change to:
Code: Select all
map_data="{campaigns/outlaws/maps/caravan.map}"


on line 69 written:
Code: Select all
user-team_name=_"Mance's Raiders"


invalid name, change to:
Code: Select all
user_team_name=_"Mance's Raiders"


on line 85-86 written:
Code: Select all
[GOLD 90 70 50]
[INCOME 0 0 0]


treat as tag, change to:
Code: Select all
{GOLD 90 70 50}
{INCOME 0 0 0}



and at last this may cause error except unit type fighter already defined
on line 75, written:
Code: Select all
type=fighter

change to defined unit (ex: Peasant)
Code: Select all
type=Peasant
Last edited by cylosae on August 26th, 2008, 8:47 am, edited 1 time in total.
1 to 4 kB/s internet connection!
you know what's that like?
cylosae
 
Posts: 16
Joined: August 15th, 2008, 12:57 am

Re: Unknown Scenario Error

Postby Migrant » August 26th, 2008, 7:07 am

I'm getting a similar problem on my first try at making a campaign... I've spent several hours at this now, and compared with other campaign files, but no luck, even tried re-writing the whole thing...

The error message I get is:
"The game could not be loaded: load_game_failed: Map not found"

If anyone could help I'd REALLY appreciate it...

Here's my code

Main:
Code: Select all
[textdomain]
  name="Test_Campaign"
  path="data/campaigns/Test_Campaign/translations"
[/textdomain]

[campaign]
  #textdomain wesnoth-Test_Campaign

  id=test
  name= _ "Test Campaign"
  abbrev=Test
  define=CAMPAIGN_TEST

  icon=units/goblins/rouser.png~RC(magenta>red)
  image=portraits/Neoriceisgood/orcish_grunt.png
  description= _ "Future Awesome Goblins Campaign"

  difficulties=EASY,NORMAL,HARD
  difficulty_descriptions={MENU_IMG_TXT2 units/goblins/spearman.png "Goblin Wannabe" _"Easy"} +
    ";" + {MENU_IMG_TXT2 units/goblins/impaler.png "Goblin Rouser" _"Medium"} +
    ";" + {MENU_IMG_TXT2 units/goblins/wolf-rider.png "Goblin Howler" _"Hard"}

  first_scenario=test1

[/campaign]

#ifdef CAMPAIGN_TEST

[binary_path]
   path=data/campaigns/Test_Campaign
[/binary_path]

{@campaigns/Test_Campaign/scenarios}

#endif




Sceario:

Code: Select all
[scenario]
#textdomain wesnoth-Test_Campaign
  name= _ "A Simple Test Scenario"
  id=test1
  turns=20
  map_data="{@campaigns/Test_Campaign/maps/{NAME}}"
  next_scenario=""

        {DAWN}
        {MORNING}
        {AFTERNOON}
        {DUSK}
        {FIRST_WATCH}
        {SECOND_WATCH}

        [side]
                type=Goblin Spearman
                description=Mons
      user_description= _ "Mons"
                unrenamable=yes
      unit_description= _ "Mons is the new Goblin King!"




                side=1
                canrecruit=1

                controller=human
                recruit=Goblin Spearman
                team_name=Goblins
                {GOLD 100 50 0}
                {INCOME 10 5 0}
        [/side]

        [side]
                type=Peasant
                description=Peasant

                side=2
                canrecruit=1

                controller=ai
                recruit=Peasant



                team_name=Village
                {GOLD 100 50 0}
                {INCOME 10 5 0}
        [/side]

        [story]
                [part]
                         story= _ "The goblins are moving to pillage the town!"
                         background=maps/mainmenu.png
                [/part]
        [/story]

        [event]
                name=prestart
                [objectives]
                        side=1
                        [objective]
                                description= _ "Defeat Enemy Leader"
                                condition=win
                        [/objective]
                        [objective]
                                description= _ "Death of your Leader"
                                condition=lose
                        [/objective]
                        [objective]
                                description= _ "Turns run out"
                                condition=lose
                        [/objective]
                [/objectives]
        [/event]




[/scenario]



The map file itself is a bit too boring to post... it starts with
Code: Select all
border_size=1
usage=map

Gg          , Gg          , Gg          , ...

etc.

Thanks in advance,

Migrant


EDIT - had pasted the wrong code in the scenario part, corrected now.
Last edited by Migrant on August 26th, 2008, 7:13 am, edited 2 times in total.
Migrant
 
Posts: 14
Joined: August 18th, 2008, 5:21 pm

Re: Unknown Scenario Error

Postby Migrant » August 26th, 2008, 7:10 am

Also, when I try to use "~RC(magenta>red)" in the difficulties description tag, it crashes when opening the campaing, saying that MENU_IMG_TXT2 only supports 3 things, and not four, or something like it. Any ideas on how I could change the units colors from magenta?

Cheers,
Migrant
Migrant
 
Posts: 14
Joined: August 18th, 2008, 5:21 pm

Re: Unknown Scenario Error

Postby cylosae » August 26th, 2008, 7:29 am

Migrant wrote:I'm getting a similar problem on my first try at making a campaign... I've spent several hours at this now, and compared with other campaign files, but no luck, even tried re-writing the whole thing...

The error message I get is:
"The game could not be loaded: load_game_failed: Map not found"



Map not found means problem on your scenario
let see line 6:
Code: Select all
map_data="{@campaigns/Test_Campaign/maps/{NAME}}"


{NAME} clause above, I don't realy sure what it's mean, but I think better if replace it with map file name ex: test1.map
Code: Select all
map_data="{@campaigns/Test_Campaign/maps/test1.map}"


if not work yet try remove @
Code: Select all
map_data="{campaigns/Test_Campaign/maps/test1.map}"
Last edited by cylosae on August 27th, 2008, 3:10 am, edited 1 time in total.
1 to 4 kB/s internet connection!
you know what's that like?
cylosae
 
Posts: 16
Joined: August 15th, 2008, 12:57 am

Re: Unknown Scenario Error

Postby Migrant » August 26th, 2008, 7:59 am

oh gosh!!! i forgot to change that when moving things around when re-rewriting to code xD
Thanks so much! Just tested it, it works great now.
Migrant
 
Posts: 14
Joined: August 18th, 2008, 5:21 pm

Re: Unknown Scenario Error

Postby gogogomez » August 26th, 2008, 10:42 am

Thanks, everyone, for the helpful replies. Have made the suggested changes but still get the unknown scenario _caravan error.
gogogomez
 
Posts: 14
Joined: August 26th, 2008, 3:38 am

Re: Unknown Scenario Error

Postby opensourcejunkie » August 26th, 2008, 12:15 pm

I read your storyline so far, and even at this early stage it sounds good! If you could, post your entire campaign folder up here, and I'll take a look at it. Getting the campaign to run in the first place is the most difficult part, IMHO.

--OSJ
what if the Bible's claims about Christ depicted accurate, verifiable history? given some research, you might be surprised at the evidence...
opensourcejunkie
 
Posts: 549
Joined: August 11th, 2008, 3:19 pm

Re: Unknown Scenario Error

Postby gogogomez » August 26th, 2008, 12:30 pm

read your storyline so far, and even at this early stage it sounds good! If you could, post your entire campaign folder up here, and I'll take a look at it. Getting the campaign to run in the first place is the most difficult part, IMHO.


What I am trying to create is a campaign where an outlaw moves from his current state of affairs to a lord, through raiding and other forms of force. The underlying idea that "nobles" may not really be that noble at all. I have a couple of raid scenarios, a turf war with Orc raiders, and a final run-in with troops from the crown storyboarded so far.

Are you asking me to post the entire campaign file (entitled Outlaws)? Is so, here goes. I had to make it a zip file, could not figure out another way to post it.

I was using the Campaign Liberty as a guide for my wml code, and once I got the error I got irritated and sloppy, so my main and scenario files may be in worse shape now than when I began this post.

Thanks in advance for any help you give!!
Attachments
Outlaws.zip
(340.41 KiB) Downloaded 193 times
gogogomez
 
Posts: 14
Joined: August 26th, 2008, 3:38 am

Re: Unknown Scenario Error

Postby DEATH_is_undead » August 26th, 2008, 4:58 pm

In the Caravan file, it states:
Code: Select all
id=the_raid
This should be:
Code: Select all
id=the_caravan


A simple error, probably done when tired. Good luck with this though, it looks good.
Wiki:Death_is_undead
Wesnoth Life
To be kicked in the a** merely means your leading the group.
User avatar
DEATH_is_undead
 
Posts: 819
Joined: March 4th, 2007, 3:00 pm
Location: Northern United States

Re: Unknown Scenario Error

Postby gogogomez » August 26th, 2008, 5:04 pm

Ok. Still trying to figure out the problem, but I think there is a mistake with how the campaign file tells the program to get the scenario. Unfortunately, I am at a loss as to what is the issue. I think it is one of these things (ranked from most likely to least likely) 1. wml syntax error in main file. 2. somehow saved the scenario file incorrectly (it is .cfg and it is a text doc. edited using wordpad--so not sure where I could have gone wrong there) 3. Scenario file wml errors in naming and identification.

I have tried to fix each one myself and have been unsuccessful. This post is my last hope.
gogogomez
 
Posts: 14
Joined: August 26th, 2008, 3:38 am

Re: Unknown Scenario Error

Postby DEATH_is_undead » August 26th, 2008, 5:38 pm

DEATH_is_undead wrote:In the Caravan file, it states:
Code: Select all
id=the_raid
This should be:
Code: Select all
id=the_caravan

Did you try this?
Wiki:Death_is_undead
Wesnoth Life
To be kicked in the a** merely means your leading the group.
User avatar
DEATH_is_undead
 
Posts: 819
Joined: March 4th, 2007, 3:00 pm
Location: Northern United States

Re: Unknown Scenario Error

Postby gogogomez » August 26th, 2008, 5:53 pm

the raid id thing occurred when I tried to use the Liberty campaign and its 1st scenario (the raid) as a guide. I knew I was getting sloppy at that point. Changed it, still get unknown scenario the caravan error. So it is definitely a problem involving not telling the program where to find the scenario, or mis-naming it at some point.

Although BEFORE I made the change the error I got was the same but it said "unknown scenario: the_raid" if that helps.
gogogomez
 
Posts: 14
Joined: August 26th, 2008, 3:38 am

Next

Return to WML Workshop

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 0 guests