Help! Unknown Scenario error

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

Post Reply
wildcorn
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

[scenario]

	textdomain=wesnoth-mana-mountain
	id=Orc_Invasion
	name= _ "Orcish Invasion"

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

	{MAP Orc_Invasion_Map}
	{TURNS -1 80 40}


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

	next-scenario=null

	music_wesnoth-1.ogg

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

	victory_when_enemies_defeated=yes

	[side]
		side=1
		controller=ai
		team_name=west

		type=Commander
		description=Sir Ivan
		canrecruit=1

		recruit=Horseman
		{GOLD 500 100 40}
		{INCOME 20 10 4}
	[/side]

	[side]
		side=2
		controller=human
		team_name=west

		type=Youth
		description=Young William
		canrecruit=1

		recruit=Peasent

		{GOLD 300 100 25}
		{INCOME 16 9 6}
	[/side]

	[side]
		side=3
		controller=ai
		team_name=orc
	
		type=Orcish Leader
		description=Orcish Leader
		canrecruit=1

		recruit=Sea Orc
		{GOLD 100 200 400}
		{INCOME 6 9 15}
	[/side]

[/scenario]
The campaign cfg has this line (when using my module):

Code: Select all

	first_scenario=Orc_Invasion
and this line:

Code: Select all

	first_scenario=Born_To_The_Banner
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...
32
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
2523107254
showing title screen...
2523107257
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
2523121416
showing title screen...
2523121416
Loading tips of day
title screen returned result
quitting game...
closing audio...
final closing audio...
done closing audio...
exiting with code 0
scott
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.
wildcorn
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