Problems with my scenario!

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

User avatar
BlackJack25
Posts: 78
Joined: July 26th, 2011, 10:50 am
Location: Italy

Problems with my scenario!

Post by BlackJack25 »

Hey, I'm having some problems with a scenario which I created. Naturally I put the scenario in a campaign folder in userdata, following the tutorial, but when I start the campaign in the game, an error appears:"Unknown Scenario". I'm pretty sure that all the id are the same, so I don't know why I have this error. Here is the scenario:

Code: Select all

[scenario]
    id=First_Night
    name= _ "First Night"
    next_scenario=null
    victory_when_enemies_defeated=yes
    map_data="{~add-ons\Battles_and_Wizards_I\maps\2p_The_Freelands.map}"
    turns=60
   
{DAWN}
{MORNING}
{AFTERNOON}
{DUSK}
{FIRST_WATCH}
{SECOND_WATCH}
  
    music=wesnoth-1.ogg
  
    [event]
        name=prestart
        [objectives]
            side=1
            [objective]
                description= _ "Sconfiggi Sauron"
                condition=win
            [/objective]
            [objective]
                description= _ "Morte di Kaltan"
                condition=lose
            [/objective]

            {TURNS_RUN_OUT}

            [gold_carryover]
                bonus=yes
                carryover_percentage=40
            [/gold_carryover]
        [/objectives]
    [/event]

    [side]
      side=1
      controller=human
      team_name=good guys
      user_team_name= _ "Guardiani"
      type=Silver Mage
      id=Kaltan
      name= _ "Kaltan"
      canrecruit=yes
      recruit=Mage,Bowman,Spearman,Horseman,Fighter,Elvish Archer,Elvish Shaman,Elvish Scout
    
      {GOLD 100 50 0}
      {INCOME 10 5 0}
    [/side]

    [side]
      side=2
      controller=ai
      team_name=bad guys
      user_team_name= _ "Orchi delle montagne"
      type=Orcish Warlord
      id=Sauron
      name= _ "Sauron"
      canrecruit=yes

      #ifdef EASY
       recruit=Orcish Archer,Orcish Grunt,Wolf Rider,Orcish Assassin,Goblin Spearman
      #endif
   
      {GOLD 100 50 0}
      {INCOME 10 5 0}
    [/side] 
[/scenario]
As you can see, it's very simple, like a skirmish match, but I'm at the beginning. Thank you ^^
Sorry for some english errors, but I'm Italian ;-)
Velensk
Multiplayer Contributor
Posts: 4005
Joined: January 24th, 2007, 12:56 am

Re: Problems with my scenario!

Post by Velensk »

I'm not sure what tutorial you're following but in general I find the best way to get scenarios to work is to start with one that already does and modify it slowly until it is what you want.

I don't see anything wrong here, it might be somewhere in the rest of the infrastructure.

On a second note, you might want to make it so that the enemy force does not get smaller as the difficulty increases.
"There are two kinds of old men in the world. The kind who didn't go to war and who say that they should have lived fast died young and left a handsome corpse and the old men who did go to war and who say that there is no such thing as a handsome corpse."
User avatar
BlackJack25
Posts: 78
Joined: July 26th, 2011, 10:50 am
Location: Italy

Re: Problems with my scenario!

Post by BlackJack25 »

I used the tutorial of the wiki. Maybe, since it is outdated, there are some errors. Anyone else?
Sorry for some english errors, but I'm Italian ;-)
Velensk
Multiplayer Contributor
Posts: 4005
Joined: January 24th, 2007, 12:56 am

Re: Problems with my scenario!

Post by Velensk »

The errors are most likely not due to the wiki being outdated (they really ought to remove those tags).

Maybe if you attach the whole project (rather than just the one scenario file) it would be more possible to help you.
"There are two kinds of old men in the world. The kind who didn't go to war and who say that they should have lived fast died young and left a handsome corpse and the old men who did go to war and who say that there is no such thing as a handsome corpse."
Max
Posts: 1449
Joined: April 13th, 2008, 12:41 am

Re: Problems with my scenario!

Post by Max »

you probably messed up with your main.cfg and failed to include your scenarios.
As Velensk said: zip your campaing and attach it...
User avatar
Crendgrim
Moderator Emeritus
Posts: 1328
Joined: October 15th, 2010, 10:39 am
Location: Germany

Re: Problems with my scenario!

Post by Crendgrim »

Just a quick note: On difficulties other than EASY the orcish warlord won't recruit anything.
Also, be sure not to use copyrighted names ("Sauron"), because else you won't be able to publish this.


Crend
UMC Story Images — Story images for your campaign!
User avatar
BlackJack25
Posts: 78
Joined: July 26th, 2011, 10:50 am
Location: Italy

Re: Problems with my scenario!

Post by BlackJack25 »

This is the campaign. It is a little confused but I will fix it later. Tell me just why I can't start the first scenario. Thank you ^^

Code: Select all

http://www.megaupload.com/?d=1NGFW1NJ
@Crendgrim: Don't worry about the name of the Warlord, it is temporary. I will fix later the difficulties, too.
Sorry for some english errors, but I'm Italian ;-)
Max
Posts: 1449
Joined: April 13th, 2008, 12:41 am

Re: Problems with my scenario!

Post by Max »

Code: Select all

[campaign]
name= _ "Battles and Wizards I"
first_scenario=First_Night
difficulties=EASY,NORMAL,HARD
 
difficulty_descriptions= _ "&elvish-fighter.png=Easy;&elvish-hero.png=Medium;&elvish-champion.png=Hard"
icon=elvish-fighter.png
[/campaign]
you didn't include your scenarios at all...
User avatar
BlackJack25
Posts: 78
Joined: July 26th, 2011, 10:50 am
Location: Italy

Re: Problems with my scenario!

Post by BlackJack25 »

What it means? O.o
Sorry for some english errors, but I'm Italian ;-)
User avatar
LightWarrior
Posts: 5
Joined: February 15th, 2011, 6:06 pm
Location: Moscow, Russia

Re: Problems with my scenario!

Post by LightWarrior »

You must write path to folder (or what is right word? oh, my bad english...) with scenarios cfg files. Also you must write path to folders with images, units, etc. Look other campaign's _main.cfg.
Sorry for my bad English.
User avatar
BlackJack25
Posts: 78
Joined: July 26th, 2011, 10:50 am
Location: Italy

Re: Problems with my scenario!

Post by BlackJack25 »

I followed other campaigns' _main.cfg and I correct mine:

Code: Select all

[campaign]
    id=Battles_and_Wizards_I
    name= _ "Battles and Wizards I"
    abbrev= _ "BaWI"
    define=CAMPAIGN_BATTLES_AND_WIZARDS_I
    first_scenario=01_First_Night
    difficulties=EASY,NORMAL,HARD
    difficulty_descriptions= _ "&elvish-fighter.png=Easy;&elvish-hero.png=Medium;&elvish-champion.png=Hard"
    icon="data\add-ons\Battles_and_Wizards_I\images\units\human-magi\silver-mage.png"
    description= _ "Porta alla vittoria la gilda dei Guardiani capitanati da Kaltan contro gli Orchi delle Montagne.

" + _"(Livello Novizio, x scenari.)"
[/campaign]

#ifdef CAMPAIGN_BATTLES_AND_WIZARDS_I
[binary_path]
    path=data\add-ons\Battles_and_Wizards_I
[/binary_path]

{data\add-ons\Battles_and_Wizards_I\utils}
{data\add-ons\Battles_and_Wizards_I\scenarios}
[+units]
    {data\add-ons\Battles_and_Wizards_I\units}
[/units]

#endif
But now it give me another error: Macro/file 'data\add-ons\Battles_and_Wizards_I\utils is missing at ~add-ons\Battles_and_Wizards_I\_main.cfg:20
How can I fix that?
Sorry for some english errors, but I'm Italian ;-)
monochromatic
Posts: 1549
Joined: June 18th, 2009, 1:45 am

Re: Problems with my scenario!

Post by monochromatic »

First of all, change your \'s to /'s. Not everyone has a PC.
Also, it looks like you copied from a mainline cfg. Download A Simple Campaign from the add-on server and edit that. It's a much better tutorial and anything else.
User avatar
BlackJack25
Posts: 78
Joined: July 26th, 2011, 10:50 am
Location: Italy

Re: Problems with my scenario!

Post by BlackJack25 »

@monochromatic: Thank's for the tip. But I can't understand what you mean with "change your \'s to /'s O.o
Sorry for some english errors, but I'm Italian ;-)
User avatar
Crendgrim
Moderator Emeritus
Posts: 1328
Joined: October 15th, 2010, 10:39 am
Location: Germany

Re: Problems with my scenario!

Post by Crendgrim »

You're using the bad, bad, bad Windows-like backslashes \ in your path names, instead of the slashs / used in most other OSs.

Please read your PMs! Useful hint concerning colors in signatures!


Crend
UMC Story Images — Story images for your campaign!
User avatar
BlackJack25
Posts: 78
Joined: July 26th, 2011, 10:50 am
Location: Italy

Re: Problems with my scenario!

Post by BlackJack25 »

The simple campaign add-on works, thank's to everyone ;)
Sorry for some english errors, but I'm Italian ;-)
Post Reply