main.cgf can't find the scenario (but it's right THERE) v1.6

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.
Mkampbell
Posts: 9
Joined: October 13th, 2010, 1:36 pm
Location: England, North Yorkshire

main.cgf can't find the scenario (but it's right THERE) v1.6

Post by Mkampbell »

Hey, I'm new to coding Wesnoth (but not to playing it, played for a few years but now I want to create shiz)
and I've looked at the excellent HowTo guides on creating scenarios (copying then editing the sample campaign here: http://wiki.wesnoth.org/BuildingScenariosSimple ) for two scenarios and making the relevant maps.

Anyway, when I load up Wesnoth and try to access my campaign, it can't find my first scenario when I try playing it (on any difficulty - if that makes a difference???). The Error message reads:
Unknown scenario: Kith_And_Kin
(name of my first scenario)

Having tried solving it myself, I found that the name for the unknown scenario is related to the "first_scenario=01_Kith_And_Kin" part in the _main.cgf
I've looked at the directory in the main to see if it was correct, and it appeared so (I crossed referenced it with other usermade campaigns and their _main.cgf files) which is:

Code: Select all

#ifdef CAMPAIGN_THE_OTHER_SIDE
[binary_path]
    path=data/campaigns/The_Other_Side
[/binary_path]
{@campaigns/The_Other_Side/scenarios}
#endif
Any help please? and yes, the id for the first scenario is completely identical to the one in the _main.cgf

thank you in advance :)
Last edited by Mkampbell on October 18th, 2010, 1:47 pm, edited 1 time in total.
Ceres
Forum Regular
Posts: 620
Joined: September 18th, 2010, 7:56 pm
Location: Germany

Re: main.cgf can't find the scenario (but it's right THERE)

Post by Ceres »

You should remove the '@', I tried it and with it I got the same error in a campaign which worked before.
Mkampbell
Posts: 9
Joined: October 13th, 2010, 1:36 pm
Location: England, North Yorkshire

Re: main.cgf can't find the scenario (but it's right THERE)

Post by Mkampbell »

just tried it, but it didn't seem to work :/
thanks anyway :)

Oh and I'm using v1.6.5 with Linux
User avatar
Crendgrim
Moderator Emeritus
Posts: 1328
Joined: October 15th, 2010, 10:39 am
Location: Germany

Re: main.cgf can't find the scenario (but it's right THERE)

Post by Crendgrim »

First of all, what do you want with the [section]-tag there?
1. it's written
.. this has to produce an error, I think...
2. [section] is afaik for help topics.
Please don't bother me if this isn't true ...

Besides, why do you use 1.6.5 and not 1.8.5?


Crend
UMC Story Images — Story images for your campaign!
User avatar
Reepurr
Posts: 1088
Joined: August 29th, 2010, 5:38 pm

Re: main.cgf can't find the scenario (but it's right THERE)

Post by Reepurr »

Sheesh.
First of all, it's .cfg, not .cgf...
Secondly, the problem is obvious.
Kith_and_Kin is the scenario ID.
Thus the first_scenario= should also be Kith_and_Kin or it won't show up. :P
"What do you mean, "a dwarvish dragonguard with marksman is overpowered"?"

Story of a Drake Outcast | The Nonsense Era
Played HttT-Underground Channels? Thought it was rubbish? Help us develop it here!
Mkampbell
Posts: 9
Joined: October 13th, 2010, 1:36 pm
Location: England, North Yorkshire

Re: main.cgf can't find the scenario (but it's right THERE)

Post by Mkampbell »

Reepurr: lol for typo :P
and I've changed it now (I saw a similar thread and you gave the same answer to someone else yesterday), still has an issue though.

Crend: because I'm using Linux Mint and can't see support for it easily enough, but I'll update when I have time :)
Mkampbell
Posts: 9
Joined: October 13th, 2010, 1:36 pm
Location: England, North Yorkshire

Re: main.cgf can't find the scenario (but it's right THERE)

Post by Mkampbell »

cheers Reepurr XD my main.cfg was written correctly, my scenario's had .cgf
still refuses to work though, same error as before.
User avatar
Crendgrim
Moderator Emeritus
Posts: 1328
Joined: October 15th, 2010, 10:39 am
Location: Germany

Re: main.cgf can't find the scenario (but it's right THERE)

Post by Crendgrim »

What exactly did you change?
The knowledge of this would make helping much easier. ;)
Maybe you could post your current main.cgf?


Crend
UMC Story Images — Story images for your campaign!
Mkampbell
Posts: 9
Joined: October 13th, 2010, 1:36 pm
Location: England, North Yorkshire

Re: main.cgf can't find the scenario (but it's right THERE)

Post by Mkampbell »

Just changed the filename (but both are plain text format) and took out the 01_ in the first_scenario= part of the main.

whole main:

Code: Select all

[campaign]
  name= _ "The Other Side"
  abbrev= _ "TOS"
  icon="units/orcs/sovereign.png~RC(magenta>red)"
  first_scenario="Kith_And_Kin"
  define=CAMPAIGN_THE_OTHER_SIDE
  difficulties=EASY,NORMAL,HARD
  difficulty_descriptions={MENU_IMG_TXT2 "units/orcs/grunt.png~RC(magenta>red)" _"Grunt" _"(Easy)"} +
    ";*" + {MENU_IMG_TXT2 "units/orcs/warrior.png~RC(magenta>red)" _"Warrior" _"(Medium)"} +
    ";" + {MENU_IMG_TXT2 "units/orcs/warlord.png~RC(magenta>red)" _"Warlord" _"(Difficult)"}
    description=_ "Play as Droth'Gar, an orc trying to lead his tribe to safety during the Year 23

(Easy level, 4 scenarios)"
[/campaign]

#ifdef CAMPAIGN_THE_OTHER_SIDE
[binary_path]
    path=data/campaigns/The_Other_Side
[/binary_path]
{campaigns/The_Other_Side/scenarios}
#endif
Scenario 1 (the relevant part):

Code: Select all

[scenario]
  id="Kith_And_Kin"
  next_scenario="02_The_Heart_Mountains"
  name="Kith And Kin"
  map_data="{@campaigns/The_Other_Side/maps/Scenario_1}"
  turns=20
  music=wesnoth-1.ogg
Last edited by Mkampbell on October 18th, 2010, 1:47 pm, edited 1 time in total.
Mkampbell
Posts: 9
Joined: October 13th, 2010, 1:36 pm
Location: England, North Yorkshire

Re: main.cgf can't find the scenario (but it's right THERE)

Post by Mkampbell »

also, rage at [section]this[/section]

EDIT: and many people seem to be having the same problems:
http://forums.wesnoth.org/viewtopic.php?f=21&t=31918
http://forums.wesnoth.org/viewtopic.php?f=21&t=31333
User avatar
Crendgrim
Moderator Emeritus
Posts: 1328
Joined: October 15th, 2010, 10:39 am
Location: Germany

Re: main.cgf can't find the scenario (but it's right THERE)

Post by Crendgrim »

I don't know whether this causes your problem (I don't think so), but you didn't define an id for your campaign.
Maybe this isn't essential for a campaign file, but the most trivial things are often the hardest ones to find..


Crend
UMC Story Images — Story images for your campaign!
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: main.cgf can't find the scenario (but it's right THERE)

Post by zookeeper »

Mkampbell
Posts: 9
Joined: October 13th, 2010, 1:36 pm
Location: England, North Yorkshire

Re: main.cgf can't find the scenario (but it's right THERE)

Post by Mkampbell »

Zookeeper: yep :/ it's also an identical (apart from campaign name ofc) path for another usermade campaign (downloaded) so it's pointing to the right direction.
I don't know whether this causes your problem (I don't think so), but you didn't define an id for your campaign.
Maybe this isn't essential for a campaign file, but the most trivial things are often the hardest ones to find..
didn't I do it here though:

Code: Select all

define=CAMPAIGN_THE_OTHER_SIDE
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: main.cgf can't find the scenario (but it's right THERE)

Post by zookeeper »

Mkampbell wrote:Zookeeper: yep :/ it's also an identical (apart from campaign name ofc) path for another usermade campaign (downloaded) so it's pointing to the right direction.
Well, that's funny since downloaded add-ons don't go anywhere near the directory that path points to. Check again.
Mkampbell
Posts: 9
Joined: October 13th, 2010, 1:36 pm
Location: England, North Yorkshire

Re: main.cgf can't find the scenario (but it's right THERE)

Post by Mkampbell »

does for me :p

Example (Story of Wose):

Code: Select all

#ifdef STORY_OF_WOSE
[binary_path]
 path=data/campaigns/Story_of_Wose
[/binary_path]
{@campaigns/Story_of_Wose/utils.cfg}
[+units]
{@campaigns/Story_of_Wose/wtraits.cfg}
{@campaigns/Story_of_Wose/units}
[/units]
{@campaigns/Story_of_Wose/scenarios}
{@campaigns/Story_of_Wose/terrain.cfg}
#endif
please bear in mind I'm on Linux and using v1.6.5
Post Reply