how do i change the sides around?

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.
User avatar
CountPenguin
Posts: 132
Joined: May 25th, 2007, 1:13 am
Location: USA

how do i change the sides around?

Post by CountPenguin »

I'm trying to make a campaign, and it shows up on my campaign list, and has the difficulties I gave it, but when I try to play the first scenario it has an error message:
Unknown scenario: '01_the_academy'
In the scenario's file I have:
[scenario]
id=01_the_academy
name=The Academy
etc....

In the _main.cfg file I have:
first_scenario=01_the_academy
[/campaign]

and

#ifdef CAMPAIGN_SIGE_OF_SORADOC

{@campaigns/Siege_of_Soradoc/maps}
{@campaigns/Siege_of_Soradoc/scenarios}
[+units]
{@campaigns/Siege_of_Soradoc/units}
[/units]

#endif

Is there something else I need to make it recognize my first scenario?
Last edited by CountPenguin on May 19th, 2009, 3:43 am, edited 3 times in total.
CountPenguin

Currently working on Siege of Soradoc. Except not anymore, but you can take over if you want!
User avatar
Turuk
Sithslayer
Posts: 5283
Joined: February 28th, 2007, 8:58 pm
Contact:

Re: cannot find scenario

Post by Turuk »

You have given the bare minimum, so it's hard to tell. Why not post up the full code of the _main.cfg and of the first scenario?

My initial guess though would have to do with the below:

#ifdef CAMPAIGN_SIGE_OF_SORADOC


Try spelling it with an E.
Mainline Maintainer: AOI, DM, NR, TB and THoT.
UMC Maintainer: Forward They Cried, A Few Logs, A Few More Logs, Start of the War, and Battle Against Time
User avatar
CountPenguin
Posts: 132
Joined: May 25th, 2007, 1:13 am
Location: USA

Re: cannot find scenario

Post by CountPenguin »

Yes I did notice the lack of an E, and I fixed it, but it still doesn't work.

Here's the complete _main.cfg file:


[textdomain]
name="wesnoth-Siege_of_Soradoc"
path="data/campaigns/Siege_of_Soradoc/translations"
[/textdomain]

[campaign]
#textdomain wesnoth-Siege_of_Soradoc
name= _ "Siege of Soradoc"
abbrev=SoS
define=CAMPAIGN_SIEGE_OF_SORADOC
icon=units/duelist-attack.png
image=story/landscape-castle.jpg
description= _ "A military academy is attacked as part of the greater scheme of an outlaw band's Siege of Soradoc!"
difficulties=EASY,NORMAL,HARD
difficulty_descriptions="&units/human-loyalists/fencer.png=Easy;
*&units/human-loyalists/duelist.png=Medium;
&units/human-loyalists/master-at-arms.png=Hard"
first_scenario=01_the_academy
[/campaign]

#ifdef CAMPAIGN_SIEGE_OF_SORADOC

[binary_path]

path=data/campaigns/Siege_of_Soradoc/

[/binary_path]
{@campaigns/Siege_of_Soradoc/maps}
{@campaigns/Siege_of_Soradoc/scenarios}
[+units]
{@campaigns/Siege_of_Soradoc/units}
[/units]

#endif


And here's the first scenario file:

##|| Dialogue
##
story
#define 01_STORY
[story]
[part]
story= _ "Near the town of Soradoc was a military academy training soldiers for Weldyn's army"
[/part]
[part]
story= _ "Before each graduating class was accepted into the army however, they went on a small mission to test their skills. As it was this time of year, Arenwyn, the academy master's son was left in charge of the remaining students"
[/part]
[part]
story= _ "Unfortunately for young Arenwyn, the outlaws knew about his father's absence, and took their oppurtunity for a strike at the academy!"
[/part]
[part]
background=maps/mainmenu.png
show_title=yes
[/part]
[/story]
#enddef

[scenario]
id=01_the_academy
name=The Academy
next_scenario=02_the_dungeons
##:: Link To Map
map_data="{~campaigns/A_Simple_Campaign/maps/academy.map}"
##:: Set Turn Count
turns=40
##:: Music
{SCENARIO_MUSIC breaking_the_chains.ogg}
##:: Story
{01_STORY}
##:: Use Default Victory Condition
victory_when_enemies_defeated=yes

##|| Flow Of Time ||##
{DAWN}
{MORNING}
{AFTERNOON}
{DUSK}
{FIRST_WATCH}
{SECOND_WATCH}

##|| Determine Side Conditions ||##
##|| Player Side
[side]
##:: Side Info
side=1
controller=human
team_name=1
user_team_name= _ "Academy"
##:: Leader Info
type=Fencer
description=Arenwyn
user_description=Arenwyn
gender=male
canrecruit=yes
unrenamable=true
x=5
# doesn't work without these. irrelevant, though
y=5
##:: Recruit List
recruit=Nobleman,Peasent,Squire
##:: Gold && Income
{GOLD 100 75 50}
{INCOME 10 5 3}
[/side]

##|| Enemy
[side]
##:: Side Info
side=2
controller=ai
team_name=2
user_team_name= _ "Outlaws"
##:: Leader Info
type=Footpad
description=Garadreas
user_description=Garadreas
gender=male
canrecruit=yes
unrenamable=true
x=5
# doesn't work without these. irrelevant, though
y=5
##:: Recruit List
recruit=Footpad,Thug,Poacher
##:: Gold && Income
{GOLD 90 70 50}
{INCOME 3 5 10}
[/side]

##|| Events ||##
##|| Starting Stuff
[event]
name=start
##:: Objectives
[objectives]
[objective]
description= _ "Defeat Garadreas"
condition=win
[/objective]
[objective]
description= _ "Death of Arenwyn"
condition=lose
[/objective]
[objective]
description= _ "Turns run out"
condition=lose
[/objective]
[/objectives]
[/event]
[/scenario]


Thanks for your help!
CountPenguin

Currently working on Siege of Soradoc. Except not anymore, but you can take over if you want!
User avatar
Dragonchampion
Posts: 758
Joined: November 6th, 2007, 7:46 pm
Location: North Carolina

Re: cannot find scenario

Post by Dragonchampion »

Ummm, no. Here's my first scenario, so you can see the difference:
Spoiler:
And the .cfg:
Spoiler:
I think your problem is that you just don't have enough on the top. See what I began mine with? # textdomain- wesnoth_Campaign_TWOT. That makes a big difference. I should know, I made that mistake too. :mrgreen:
Ehhhh... don't mind me, I'm just the annoying little modder who gets on peoples nerves. I'll just lurk till Someone says my name. :P

Oh, and also Creator of The War Of Terrador
User avatar
Turuk
Sithslayer
Posts: 5283
Joined: February 28th, 2007, 8:58 pm
Contact:

Re: cannot find scenario

Post by Turuk »

{~campaigns/A_Simple_Campaign/maps/academy.map}

Try changing that to read:

{~campaigns/Siege_of_Soradoc/maps/academy.map}



Textdomain only matters for translating the campaign. It has nothing to do with getting the campaign to run properly.
Mainline Maintainer: AOI, DM, NR, TB and THoT.
UMC Maintainer: Forward They Cried, A Few Logs, A Few More Logs, Start of the War, and Battle Against Time
User avatar
CountPenguin
Posts: 132
Joined: May 25th, 2007, 1:13 am
Location: USA

Re: cannot find scenario

Post by CountPenguin »

ok thanks for the help, but now it has a new error:

Unexpected characters after variable name (expected , or =), value '' at C:/Program Files/Battle for Wesnoth 1.6/userdata/data/campaigns/Siege_of_Soradoc/scenarios/01_the_academy.cfg:3 included from C:/Program Files/Battle for Wesnoth 1.6/userdata/data/campaigns/Siege_of_Soradoc/_main.cfg:29

I'm guessing the 3 and 29 are referring to lines of code?
The 29th line in the _main file is: {@campaigns/Siege_of_Soradoc/units}
I'm not sure if it counts the "notes" (##|| Dialogue ##) as part of the lines, so I don't know which is line 3 in the scenario file.
CountPenguin

Currently working on Siege of Soradoc. Except not anymore, but you can take over if you want!
User avatar
Dragonchampion
Posts: 758
Joined: November 6th, 2007, 7:46 pm
Location: North Carolina

Re: cannot find scenario

Post by Dragonchampion »

Just copy and edit my scenario. It will be easier in the long run. Trust me. :wink:
Ehhhh... don't mind me, I'm just the annoying little modder who gets on peoples nerves. I'll just lurk till Someone says my name. :P

Oh, and also Creator of The War Of Terrador
User avatar
SkyOne
Posts: 1310
Joined: January 3rd, 2009, 7:23 pm

Re: cannot find scenario

Post by SkyOne »

no "id" in the side tug?
Fate of a Princess/feedback thread: "What is in own heart that is the most important, not who you are."
Drake Campaign: Brave Wings/feedback thread, Naga Campaign: Return of the Monster, Saurian Campaign: Across the Ocean
Northern Forces - now on 1.12 server
User avatar
Mist
Inactive Developer
Posts: 753
Joined: February 15th, 2007, 8:44 am
Location: Milton Keynes, UK

Re: cannot find scenario

Post by Mist »

Yes it does count the comments, and yes this
##|| Dialogue
##
story
#define 01_STORY
Should deffinitely *not* be in there. Never leave stray uncommented nonWML lines in your files. In most cases they will blow stuff up.
Somewhere, between the sacred silence and sleep.
Disorder.
User avatar
CountPenguin
Posts: 132
Joined: May 25th, 2007, 1:13 am
Location: USA

Re: cannot find scenario

Post by CountPenguin »

ok thanks. i took it out and now there is no error about the scenario being missing, but there is one about the map (ugh):

The game could not be loaded: load_game_failed: Map not found

Here is the line that names the map:
map_data="{~campaigns/Siege_of_Soradoc/maps/academy.map}"
I made sure that the map was in the right place with the right name, and it is.

The beginning of the map file is:
border_size=1
usage=map
And then it continues with all of the terrain codes. Does something in that file need to be changed so it works with a campaign?
CountPenguin

Currently working on Siege of Soradoc. Except not anymore, but you can take over if you want!
User avatar
Mist
Inactive Developer
Posts: 753
Joined: February 15th, 2007, 8:44 am
Location: Milton Keynes, UK

Re: cannot find scenario

Post by Mist »

Does the map open in Map Editor?
If no -
Which text editor/character encoding combination do you use?

Regardless of above paste last couple of lines in stderr.txt after you get the error.
Somewhere, between the sacred silence and sleep.
Disorder.
User avatar
CountPenguin
Posts: 132
Joined: May 25th, 2007, 1:13 am
Location: USA

Re: cannot find scenario

Post by CountPenguin »

Well I resaved the map and put it in the folder and now it works! Yet there is still a problem. When I try to recruit, it doesn't know how to find the units. As you can see, I'm using non standard units (Nobleman, Squire), but I have their files in my units folder for the campaign. I'm pretty sure the problem isn't with the unit, as I copied the files from the Wesband campaign. Do I have to add something so the computer knows I'm using special units?
CountPenguin

Currently working on Siege of Soradoc. Except not anymore, but you can take over if you want!
User avatar
SkyOne
Posts: 1310
Joined: January 3rd, 2009, 7:23 pm

Re: cannot find scenario

Post by SkyOne »

CountPenguin wrote:Do I have to add something so the computer knows I'm using special units?
not really on your case to make it works as long as they have been installed as well.

You mean that images of Squire and Nobleman have never shown up?
In this case:
1. make sure your images folder that there are images of Squire and Nobleman.
2. check the code of images on unit.cfg. (since 1.5/1.6, we have sometimes had to add "unit" before names of era/race-folders.), like:

Code: Select all

image="units/lvl0s/Squire.png"
Edit: Wait a minute! Are you in 1.4.x or 1.5/1.6? 1.6, right?
Fate of a Princess/feedback thread: "What is in own heart that is the most important, not who you are."
Drake Campaign: Brave Wings/feedback thread, Naga Campaign: Return of the Monster, Saurian Campaign: Across the Ocean
Northern Forces - now on 1.12 server
User avatar
Turuk
Sithslayer
Posts: 5283
Joined: February 28th, 2007, 8:58 pm
Contact:

Re: cannot find scenario

Post by Turuk »

Not knowing exactly what your entire folder is setup like makes it hard to diagnose the exact problem.

However, if you copied the unit and folder setup exactly from Wesband, try including:

{@campaigns/Wesband/units/lvl0s}

Put it in:

Code: Select all

[+units]
{@campaigns/Siege_of_Soradoc/units}
{@campaigns/Wesband/units/lvl0s}
[/units]
Mainline Maintainer: AOI, DM, NR, TB and THoT.
UMC Maintainer: Forward They Cried, A Few Logs, A Few More Logs, Start of the War, and Battle Against Time
User avatar
CountPenguin
Posts: 132
Joined: May 25th, 2007, 1:13 am
Location: USA

Re: cannot find scenario

Post by CountPenguin »

Well I fixed it finally! There were two changes I made, so I'm not sure which (or both) was the problem.
The first was that it turns out Nobleman and Squire aren't the units ids, so I changed that, and I also didn't have the units' artwork in my folder.
It still can't find the peasant unit though, which I had initially spelled wrong, but I fixed it. Do I need to have the peasant in my units folder even though it's a mainline unit?
CountPenguin

Currently working on Siege of Soradoc. Except not anymore, but you can take over if you want!
Post Reply