Unknown Scenario Error

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
MightyMelvin
Posts: 7
Joined: September 25th, 2009, 12:21 pm

Unknown Scenario Error

Post by MightyMelvin »

Hey folks! I am trying to design my own campaign. But no matter how hard I try, I keep getting the "Unknown Scenario Error". I have carefully read the other topics about this problem but I can't find an answer there.
Oh and probably there will be other errors, but I especially would like to get rid of this one.

Campaign file:

Code: Select all

[textdomain]
	name="wesnoth-Ochuls_Secret"
	path="data/campaigns/Ochuls_Secret/translations"
[/textdomain]

[campaign]
#texdomain wesnoth-Ochuls_Secret
id=Ochuls_Secret
name= _ "Ochuls Secret"
icon=fugitive.png
description= _ "The undead have left their safe caves and are now roaming the free lands. It's time to end their evil deeds. Blablablabla"
abbrev=OS
define=CAMPAIGN_OCHULS_SECRET
first_scenario=HomeRun
difficulties=EASY,NORMAL,HARD
difficulty_descriptions= _ "&elvish-fighter.png=Easy;*&elvish-hero.png=Medium;&elvish-champion.png=Hard"
[/campaign]

#ifdef CAMPAIGN_OCHULS_SECRET

{@campaigns/Ochuls_Secret/scenarios}

#endif
Scenario file:

Code: Select all

[scenario]

id=HomeRun
next_scenario=Unknown

name ="Home Run"
map_data="{@campaigns/Ochuls_Secret/maps/HomeRun.map}"

{TURNS 10 10 10}

{DUSK}

music=knolls.ogg

[event]
	name=prestart
	[objectives]
	side=1
	[objective]
		description= _ "Reach the city before reinforcements arrive"
		condition=win
	[/objective]
	[objective]
		description= _ "Defeat the scouts"
		condition=win
	[/objective]
	[objective]
		description= _ "Death of leader"
		condition=lose
	[/objective]
	[/objectives]
[/event]

[side]
	side=1
	controller=human
	team_name=1
	user_team_name= _ "Wood Elves"

	type=Elvish_Fighter
	id=Velron
	canrecruit=yes

	recruit=Elvish Fighter

	{GOLD 0 0 0}
	{INCOME 5 5 5}
[/side]
[/scenario]
I used the jumpstart directory structure.
I am on a Mac, so its all located in ~/library/preferences/Wesnoth 1.6/data/campaigns/Ochuls Secret/

Hopefully its an obvious error! Thanks in advance.
Greets,
Melvin
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Unknown Scenario Error

Post by zookeeper »

MightyMelvin wrote:{@campaigns/Ochuls_Secret/scenarios}
MightyMelvin wrote:I am on a Mac, so its all located in ~/library/preferences/Wesnoth 1.6/data/campaigns/Ochuls Secret/
That'd be a mismatch.
MightyMelvin
Posts: 7
Joined: September 25th, 2009, 12:21 pm

Re: Unknown Scenario Error

Post by MightyMelvin »

Hmm, renamed the folder to Ochuls_Secret (thought that was less work than changing everything inside the main and scenario file).
When my map or scenario would have a space in it's name, should you type it with a space everywhere or with an underscore?

By the way it didn't remove the error... more suggestions?

Edit: thanks for quick reply by the way!
User avatar
SkyOne
Posts: 1310
Joined: January 3rd, 2009, 7:23 pm

Re: Unknown Scenario Error

Post by SkyOne »

MightyMelvin wrote:By the way it didn't remove the error... more suggestions?
It seems your error is from the difficulty_descriptions. It sometimes makes the unknown scenario error occur. Remove or correct it, then restart the game.
And you had better fix:

Code: Select all

type=Elvish_Fighter
before restarting. It will probably make an unknown unit type error.
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
MightyMelvin
Posts: 7
Joined: September 25th, 2009, 12:21 pm

Re: Unknown Scenario Error

Post by MightyMelvin »

Well, corrected these points. Somehow, I still get the error! It really drives me crazy.

_main.cfg:

Code: Select all

[textdomain]
	name="wesnoth-Ochuls_Secret"
	path="data/campaigns/Ochuls_Secret/translations"
[/textdomain]

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

[campaign]
#texdomain wesnoth-Ochuls_Secret
id=Ochuls_Secret
name= _ "Ochuls Secret"
icon=units/human-outlaws/fugitive.png
description= _ "The undead have left their safe caves and are now roaming the free lands. It's time to end their evil deeds."
abbrev=OS
define=CAMPAIGN_OCHULS_SECRET
first_scenario=HomeRun
difficulties=EASY,NORMAL,HARD
difficulty_descriptions={MENU_IMG_TXT2 units/human-outlaws/footpad.png _"Memorable" _"(Easy)"} + ";" + {MENU_IMG_TXT2 units/human-outlaws/highwayman.png _"Renowned" _"(Normal)"} + ";" + {MENU_IMG_TXT2 units/human-outlaws/fugitive.png _"Legendary" _"(Hard)"}

[/campaign]

#ifdef CAMPAIGN_OCHULS_SECRET
[binary_path]
  path=data/campaigns/Ochuls_Secret
[/binary_path]

{@campaigns/Ochuls_Secret/scenarios}

#endif
HomeRun.cfg:

Code: Select all

[scenario]

id=HomeRun
next_scenario=Unknown

name ="Home Run"
map_data="{@campaigns/Ochuls_Secret/maps/HomeRun.map}"

{TURNS 10 10 10}

{DUSK}

music=knolls.ogg

[event]
	name=prestart
	[objectives]
	side=1
	[objective]
		description= _ "Reach the city before reinforcements arrive"
		condition=win
	[/objective]
	[objective]
		description= _ "Defeat the scouts"
		condition=win
	[/objective]
	[objective]
		description= _ "Death of leader"
		condition=lose
	[/objective]
	[/objectives]
[/event]

[side]
	side=1
	controller=human
	team_name=1
	user_team_name= _ "Wood Elves"

	type=Horseman
	id=Velron
	canrecruit=yes

	recruit=Fencer

	{GOLD 0 0 0}
	{INCOME 5 5 5}
[/side]

[/scenario]
I'm very curious about what's wrong! Does anyone see a solution?
Greetz, Melvin
User avatar
SkyOne
Posts: 1310
Joined: January 3rd, 2009, 7:23 pm

Re: Unknown Scenario Error

Post by SkyOne »

I have actually made it work by using A Simple Campaign. Compare what different are in between them.
Or post your folder.

Your main file and scenario were not perfect, but good enough to work. So something else is incorrect.

EDIT: oh, I have added side=2 simply because A Simple Campaign is two side.
Making the first scenario work is the hardest, but it will be easier after that. (by beetlenaut) My first scenario took almost a month to work though.
Attachments
Ochuls_Secret.zip
(23.11 KiB) Downloaded 137 times
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
MightyMelvin
Posts: 7
Joined: September 25th, 2009, 12:21 pm

Re: Unknown Scenario Error

Post by MightyMelvin »

Thanks! That problem is solved now.
I couldn't find out what caused it, but I think it has something to do with the extension of the scenario file.

New issue: game crashing since I replaced the "A simple campaign" map with my own map. I'm trying to figure that one out. Could it be that the map needs 3 players, and only 2 sides are defined?
Thanks for the working version, really appreciate it!
Melvin

Edit: I saved my map again and when I used that version, the game crashed. When I created a map consisting of only grass and 3 castles/keeps, the map works. Does that mean there is an issue with a certain type of terrain?
Anonymissimus
Inactive Developer
Posts: 2461
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: Unknown Scenario Error

Post by Anonymissimus »

MightyMelvin wrote:Could it be that the map needs 3 players, and only 2 sides are defined?
A map file does never need any number of defined sides, but the opposite might be the case - a scenario file can require a map to have certain starting positions to be set.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
MightyMelvin
Posts: 7
Joined: September 25th, 2009, 12:21 pm

Re: Unknown Scenario Error

Post by MightyMelvin »

Well, it's almost certainly a problem with a terrain type. I'm gonna redraw the map step by step to find out what it is. And gonna check the bugs section for any bugs related to this.
User avatar
Vladcara
Posts: 143
Joined: March 15th, 2010, 11:16 pm
Location: Farnborough, England

Re: Unknown Scenario Error

Post by Vladcara »

I'm having the same problem as Mighty Melvin. Can anyone help?

_main.cfg

##|| Public Binary Path
[binary_path]
path=~data/campaigns/The_Warpworld/public
[/binary_path]


##|| Campaign
[campaign]
##:: Identify Campaign
id=The_Warpworld #needed to connect savefiles with their campaign
name=_ "The Warpworld" #displayed to the user
abbrev=_"TW" #used in savefiles
define=THE_WARPWORLD #this symbol gets its meaning once the user has chosen the difficulty

##:: Set Difficulty
difficulties=EASY,NORMAL,HARD #which various difficulties the campaign shall have
difficulty_descriptions=_"~campaigns/The_Warpworld/images/units/vampires/fledgeling.png=Easy;*"~campaigns/The_Warpworld/images/units/vampires/noble.png=Medium;=_"~campaigns/The_Warpworld/images/units/vampires/sire.png=Difficult" #sets up the difficulties selection menu

##:: Set Up Interface
icon=scenery/whirlpool.png #image in the campaign list
image=portraits/humans/dark_adept.png #campaign image right of the campaign list when selected
description=_ "The Vampires have ravaged the land of Wesnoth for an Age, but now the defenders of the Great Continent have massed together an army and thrown them back. The Vampires' only hope now is to escape to the dubious safety of their former home-The Warpworld"#campaign description right of the campaign list when selected

##:: First Scenario
first_scenario=01_Escape_From_Wesnoth #Scenario that gets chosen first from the scenario list. It looks for the id, not the filename.
[/campaign]


##|| Campaign ifdef
#Enter this code block only if the player has chosen to play the campaign, thus preventing overwrite conflicts and speeding wesnoth up during start.
#ifdef THE_WARPWORLD

##:: Binary Path
#Makes images available as subpaths of the .../The_Warpworld/images/ directory.
[binary_path]
path=~data/campaigns/The_Warpworld
[/binary_path]

##:: Various Includes
#{filepath} loads files from filepath
#~ tells to look in the userdata directory, otherwise the wesnoth engine would look in the main data directory
#the order of these commands is important - e.g. custom units are needed when the scenario is loaded
{~add-ons/The_Warpworld/macros}

#+units: perform this command in that [units] tag where it was read for the last time - a tag in the wesnoth main data directory (I suppose...) and thus add custom units to the known units
[+units]
{~data/campaigns/The_Warpworld/units}
[/units]
{~data/campaigns/The_Warpworld/scenarios}

#endif






01_Escape_From_Wesnoth.cfg

##|| Dialogue
## story
#The following #define ... #enddef is a macro. Its contents get inserted at that point where it is called using {01_STORY}. It needs to be placed/defined/read by the engine before (above where) it is called. Macros are different from functions that you may have seen in other programming languages. The most important difference for you is that functions can be defined below the position where they are used (in the same file). Doing this with a macro will just cause it to not be found (not work). This thing depends on the "inclusion order" - to find out more about it read the preprocessor reference in the wml reference.
#define 01_STORY
[story]
[part]
story= _ "Count Valen, a young noble d one of the last Vampires to retreat from the war with the Wesnothians is travelling towards the nearest Warpgate. On the way, his scouts are assaulted by orc brigands. Furious, he orders his coven to destroy the foul creatures."
[/part]
[part]
background=maps/wesnoth.png
show_title=yes
#Inserted a few "travel dots" here. The map didn't show up immidiately if without.
{OLD_REST 617 189}
{NEW_JOURNEY 592 205}
{NEW_BATTLE 575 209}
[/part]
[/story]
#enddef


[scenario]
##|| Opening Information ||##
##:: Identify Scenario
id=01_Escape_From_Wesnoth #looked for by the engine
name=_"Escape from Wesnoth" #displayed
next_scenario=null #no following scenario

##:: Link To Map
#insert the content of the file pointed to at this position
map_data="{~data/campaigns/The_Warpworld/maps/template.map}"

##:: Set Turn Count
turns=25

##:: Music
{SCENARIO_MUSIC breaking_the_chains.ogg}

##:: Story
{01_STORY}

##:: Use Default Victory Condition
victory_when_enemies_defeated=yes

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



##|| Flow Of Time ||##
#automatically cycled through by the engine
{DAWN}
{MORNING}
{AFTERNOON}
{DUSK}
{FIRST_WATCH}
{SECOND_WATCH}



##|| Determine Side Conditions ||##
##|| Player Side
[side]
##:: Side Info
side=1
controller=human
team_name=1 #used to determine which side is enemy or allied
#The following line is a command for wmllint (a developer tool)
# wmllint: local spelling foo
user_team_name= _ "Count Valen's Coven" #visible to the user

##:: Leader Info
type=EOM_Noble
id=Count_Valen
name=_"Count Valen"
gender=male
canrecruit=yes
unrenamable=true
#@OSJ: commented these since it caused problems
# x=5 # doesn't work without these. irrelevant, though
# y=5

##:: Recruit List
recruit=Thug,Poacher,Footpad

##:: Gold && Income
{GOLD 100 75 50}
{INCOME 10 5 3}
[/side]

##|| Enemy
[side]
##:: Side Info
side=2
controller=ai
team_name=2
user_team_name= _ "Orcish Brigands"

##:: Leader Info
type=Orcish Warrior
id=K'Thraan
name=_"K'Thraan"
gender=male
canrecruit=yes
unrenamable=true
# x=5 # doesn't work without these. irrelevant, though
# y=5

##:: Recruit List
recruit=Orcish Warrior,Orcish Archer,Goblin Spearman

##:: Gold && Income
{GOLD 100 75 50}
{INCOME 3 5 10}
[/side]



##|| Events ||##

##|| Starting Stuff
[event]
name=start

##:: Objectives
[objectives]
[objective]
description= _ "Defeat the enemy leader"
condition=win
[/objective]
[objective]
description= _ "Death of Count Valen"
condition=lose
[/objective]
[objective]
description= _ "Turns run out"
condition=lose
[/objective]
[/objectives]
[/event]
[/scenario]


If anyone could help i'd be really greatful. Thanks
'Wow, Brazil's big!'
George Bush, when shown a map of the world
User avatar
Vladcara
Posts: 143
Joined: March 15th, 2010, 11:16 pm
Location: Farnborough, England

Re: Unknown Scenario Error

Post by Vladcara »

using the fix that skyone gave to melvin, ive managed to fix that particular bug. thanks Sky
'Wow, Brazil's big!'
George Bush, when shown a map of the world
User avatar
SkyOne
Posts: 1310
Joined: January 3rd, 2009, 7:23 pm

Re: Unknown Scenario Error

Post by SkyOne »

Vladcara wrote:using the fix that skyone gave to melvin, ive managed to fix that particular bug. thanks Sky
Ah, okay, you're welcome.
I actually used A Simple Campaign that has been created by OSJ, the author of Sceptre of Life, then Anonymissimus, the author of Dwarven Kingdom, updated it to correspond on BfW 1.7/1.8 in order to help new campaign creators. Recently, it is also one of my tools to help them.:smile:

That is also downloadable on the wiki: http://wiki.wesnoth.org/BuildingCampaignsTutorial
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
opensourcejunkie
Posts: 547
Joined: August 11th, 2008, 3:19 pm

Re: Unknown Scenario Error

Post by opensourcejunkie »

Wow; I'm glad ASC is getting some use :-)
--OSJ
what if the Bible's claims about Christ depicted accurate, verifiable history? given some research, you might be surprised at the evidence...
Post Reply