Keep getting "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
Kepakiano
Posts: 2
Joined: May 24th, 2010, 12:01 pm

Keep getting "unknown scenario" error

Post by Kepakiano »

Hey guys,
I'm pretty new to creating campaigns for BfW, but I read through the wiki and compared my code to the code of existing campaigns, but none of that helped.

I have placed my campaign in the userdate/data/add-ons/ folder and here's the (very basic) code:
_main.cfg:

Code: Select all

[campaign]
	name = _ "Lily's Quest"
	icon = "data/add-ons/Lily/images/eloh-serene.png"
	define=LILY
	first_scenario="first"
	description = _"blablabla"
[/campaign]

#ifdef LILY
{@add-ons/Lily/scenarios/}
#endif
first.cfg:

Code: Select all

#textdomain lily
[scenario]
	id=first
	next_scenario = null
	name = _ "Lily's Quest 1"
	map_data = "{add-ons/Lily/maps/erste_karte.map"
	turns = -1
	
	{AFTERNOON}
	
	[event]
		name = prestart
			[objectives]
				side = 1
				[objective]
					description = _ "Finde die Hexe!"
				[/objective]
			[/objectives]
	[/event]

	[side]
		side = 1
		controller = human
		team_name =1
		user_team_name= _ "Lilys Suchtrupp"
		type = Commander
		id = Lily_unit
		canrecruit = no
	[/side]
[/scenario]
The game finds the icon alright, but not my first.cfg located in data/add-ons/Lily/scenarios/
I hope you can help me!
mich
Translator
Posts: 134
Joined: November 11th, 2008, 8:54 am
Location: Italy

Re: Keep getting "unknown scenario" error

Post by mich »

Replace "@" with "~" in this line

Code: Select all

{@add-ons/Lily/scenarios/}
User avatar
artisticdude
Moderator Emeritus
Posts: 2424
Joined: December 15th, 2009, 12:37 pm
Location: Somewhere in the middle of everything

Re: Keep getting "unknown scenario" error

Post by artisticdude »

There were a few syntax changes between 1.6 and 1.8. Use ~ if you're using 1.7 or 1.8, use @ if you're using 1.6.
"I'm never wrong. One time I thought I was wrong, but I was mistaken."
Kepakiano
Posts: 2
Joined: May 24th, 2010, 12:01 pm

Re: Keep getting "unknown scenario" error

Post by Kepakiano »

This solved the unknown scenario problem, thanks :D
But now the game tells me, that a map withouth head line (Kopfzeile) is not supported. Here's my map code:

Code: Select all

border_size=1
usage=map

Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gs^Fds      , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gs^Fp       , Gs^Fp       , Gs^Fp       , Uu^Uf       , Gg^Dr       , Uu^Uf       , Gs^Fp       , Uu^Uf       , Gs^Fp       , Hh          , Gg          , Mm          , Gg          , Mm          , Mm          , Mm          , Mm          , Mm^Xm       , Gg          
And so on. Not different from other maps, is it?

Edit: I'm using 1.8 :)

Okay, solved that, again ~ instead of @. Thanks for your help, I'll try on my own from here :D
Last edited by Kepakiano on May 24th, 2010, 12:36 pm, edited 1 time in total.
User avatar
artisticdude
Moderator Emeritus
Posts: 2424
Joined: December 15th, 2009, 12:37 pm
Location: Somewhere in the middle of everything

Re: Keep getting "unknown scenario" error

Post by artisticdude »

Are you sure you spelled the map file's name correctly in the scenario .cfg?
"I'm never wrong. One time I thought I was wrong, but I was mistaken."
mich
Translator
Posts: 134
Joined: November 11th, 2008, 8:54 am
Location: Italy

Re: Keep getting "unknown scenario" error

Post by mich »

Code: Select all

map_data = "{add-ons/Lily/maps/erste_karte.map"
must be

Code: Select all

map_data = "{~add-ons/Lily/maps/erste_karte.map}"
Post Reply