Help! Unknown Scenario error

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

Post Reply
Posts: 10
Joined: June 11th, 2005, 3:58 am

Help! Unknown Scenario error

Post by wildcorn »

I've got this bizzare problem on the campain I'm trying to develop.

Whenever I try to run my own campain, with my own scenario (id=Orc_Invasion), Wesnoth 9.2 tells me Unknown Scenario 'Orc_Invasion'.

However if I copy the scenario 1.Born_To_The_Banner from The_South_Gaurd campaign, and change my campaign cfg to start with that id, it runs perfectly (well, the scenario is found, but it doesn't start because the unit graphics aren't available).

The configuration files are patterned off of the template campaign available for download.

I have no idea why the other scenario works and mine does not, I've been hacking away at this for hours now.

Attached is my short scenario code:

Code: Select all


	name= _ "Orcish Invasion"

		story = _ "'Willaim!', cries a voice from the darkness, 'William wake up!'. "
		story = _ "'Who is it, who is there?'"
		story = _ "'No time!, Sir Ivan needs you to assemble a regiment, Orcs have come!'"

	{MAP Orc_Invasion_Map}
	{TURNS -1 80 40}




objectives= _ "
@Defeat Orc Leader
Capture the Northern Ruin
#Death of William"



		description=Sir Ivan

		{GOLD 500 100 40}
		{INCOME 20 10 4}


		description=Young William


		{GOLD 300 100 25}
		{INCOME 16 9 6}

		type=Orcish Leader
		description=Orcish Leader

		recruit=Sea Orc
		{GOLD 100 200 400}
		{INCOME 6 9 15}

The campaign cfg has this line (when using my module):

Code: Select all

and this line:

Code: Select all

when I tried it with the scenario from The South Guard.

Here is the output from running Wesnoth

Code: Select all

Battle for Wesnoth v0.9.2
Started on Fri Jun 10 22:16:03 2005

started game: 1771866278
Checking video mode: 1024x768x16...
setting mode to 1024x768x32
locale could not be determined; defaulting to system locale
no valid cache found. Writing cache to '/home/warren/.wesnoth/cache/game.cfg-cache-v0.9.2-MEDIUM-NORMAL'
started music
showing title screen...
Loading tips of day
title screen returned result
no valid cache found. Writing cache to '/home/warren/.wesnoth/cache/game.cfg-cache-v0.9.2-CAMPAIGN_MANA_MOUNTAIN-MEDIUM-NORMAL'
error general: Unknown scenario: 'Orc_Invasion'
started music
showing title screen...
Loading tips of day
title screen returned result
quitting game...
closing audio...
final closing audio...
done closing audio...
exiting with code 0
Posts: 5242
Joined: May 12th, 2004, 12:35 am
Location: Alexandria, VA

Post by scott »

The next_scenario key and music key have typos. next_scenario needs and underscore and music needs and equals sign. Perhaps the typos invalidated the scenario somehow.
Hope springs eternal.
Wesnoth acronym guide.
Posts: 10
Joined: June 11th, 2005, 3:58 am

Post by wildcorn »

Thanks for pointing those out.

Unfortunately it didn't fix the problem.

I've commented out the bulk of my scenario now. So that the only remaining line says id=Orc_Invasion

However, that didn't fix it either. So I'm thinking that whats happening is that The South Gaurd map works because maybe Wesnoth loads up all the campains when it loads... That way the Born To the Banner scenario is already loaded, so my campaign can find it.

I no don't really think the problem lies in my scenario code anymore, I downloaded another campaign, Flight to Freedom, and it looks like it used this template as well, and it works.

So I'm going to start commenting out lines in my main configuration file, maybe something is preventing it from running all the way through (which would prevent the scenarios from loading)

--- Edit ---

I found my problem, and its entirely my own fault.

At sometime when I had been having troubles with my scenario I decided to go with the naming convention for the South Gaurd and label my scenarios 1.NAME, 2.NAME, 3.NAME

Unfortuantely, I forgot to append the .cfg to the filenames.

Anyhow, to make this post more useful:

Eight Things to check when your scenario doesn't load

1. Do the ID's match? Does the Caller script have the same case as the scenario's id?

2. Is the .cfg appended to the script?

3. Is the script in the right location (usually campaigns/YOUR_MODULE/scenarios)

4. Is it really a scenario load problem? Maybe the main cfg file isn't being loaded correctly.

5. All all the linking tags spelt correctly ("first-scenario=???", "next_scenario=???", "id=???")

6. If your using the template, did you remember to change the script in the utils directory to load your module? Otherwise you might get a recursion error that may prevent your scenarios from loading (remember, scenarios are loaded last)

7. Is a downloaded module breaking you version of the game?

8. Do you have read permissions on your scripts
Post Reply