Basic Basic Basic Campaign

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

Post Reply
Johs
Posts: 12
Joined: September 29th, 2008, 7:45 pm

Basic Basic Basic Campaign

Post by Johs »

I'm following the FAQ's and help files on this page to make the most BASIC campaign possible. Literally, if it opens, I'll 'yay' and move on to the next step, but so far nothing will load.

I've even used someones advice of taking another person's Campaign and copying it to save time, and change the variables as I go. When I take a Campaign out of \userdata\data\campaigns and copy it. I then rename the folder "Blah", and begin picking at what directories need to change. Even if I change every directory reference to the new folder, and delete the old folder, it wont load the scenario file. This should be SO simple, but something is not correct. Plz help, the tutorials are all written from 2 versions ago and it feels like things have changed since then. The custom Campaigns I look through for examples are very different, and every part of the campaign .cfg's make sence, but I cannot seem to replicate them.

When I start a new folder from scratch, create a _main, a scenario folder with a scenario, and a map folder with a map, and have them reference each other, my Campaign wont appear on the campaign list.
User avatar
Akkarin345
Posts: 429
Joined: January 19th, 2008, 6:16 pm
Location: England

Re: Basic Basic Basic Campaign

Post by Akkarin345 »

Could you put your files up so we can see them please. :)
Johs
Posts: 12
Joined: September 29th, 2008, 7:45 pm

Re: Basic Basic Basic Campaign

Post by Johs »

Ok, here comes the code. Now, I made a new folder named 'trial' and cut everything down to the bare minimums and it DIDDDDDD work! I was excited, I renamed my folder what I want the folder to really be. And... everything else is pretty much the same with the paths renamed. And now its back to "Unknown Scenario". So, is it possible I'm also having a cashing problem?

_main reads:
#textdomain wesnoth-Warsong
[textdomain]
name="wesnoth-Warsong"
path="data/campaigns/Warsong/translations"
[/textdomain]

[campaign]
id="Warsong"
name= _ "Warsong"
abbrev=WS
define=CAMPAIGN_WARSONG
first_scenario=01_Trial
rank=1
difficulties=EASY,NORMAL,HARD
difficulty_descriptions={MENU_IMG_TXT2 "units/human-peasants/peasant.png~RC(magenta>red)" _"Peasant" _"(Easy)"} + ";" + {MENU_IMG_TXT2 "units/human-outlaws/outlaw.png~RC(magenta>red)" _"Outlaw" _"(Normal)"} + ";" + {MENU_IMG_TXT2 "units/human-outlaws/fugitive.png~RC(magenta>red)" _"Fugitive" _"(Difficult)"}
image=../data/campaigns/Warsong/images/campaign_image.jpg
description= _ "Warsong"
icon="fast.png"
[/campaign]

[binary_path]
path=data/campaigns/Trial/
[/binary_path]

#ifdef CAMPAIGN_TRIAL
[+units]
{@campaigns/Warsong/units/}
[/units]

{@campaigns/Warsong/scenarios/utils/}
{@campaigns/Warsong/scenarios}
#endif


/scenarios/01_Trial.cfg reads:
#textdomain wesnoth-Warsong

[scenario]
id="01_Trial"
next_scenario="02_To_Sulras"

name=Trial
map_data="{@campaigns/Warsong/maps/01_Trial.map}"
turns=20
music=wesnoth-1.ogg
[event]
name=prestart
[objectives]
side=1
[objective]
condition=win
description=_ "Escape the Trolls"
[/objective]
[objective]
condition=lose
description=_ "Time Runs Out"
[/objective]
[/objectives]
[/event]

[side]
type=Elvish Champion
description=Dude
side=1
canrecruit=yes
controller=human
recruit=Elvish Fighter
{GOLD 120 100 80}
team_name=good
[/side]
[/scenario]



And then the map is just a blank grass field, so no problems there.
Johs
Posts: 12
Joined: September 29th, 2008, 7:45 pm

Re: Basic Basic Basic Campaign

Post by Johs »

Error is - Unknown Scenario: "01_Trial"
User avatar
A Guy
Posts: 790
Joined: May 24th, 2008, 1:55 am

Re: Basic Basic Basic Campaign

Post by A Guy »

Uh, #textdomain needs to be inside the [campaign] tag.
I'm just... a guy...
I'm back for now, I might get started on some work again.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Basic Basic Basic Campaign

Post by zookeeper »

A Guy wrote:Uh, #textdomain needs to be inside the [campaign] tag.
No it doesn't. :roll:
User avatar
A Guy
Posts: 790
Joined: May 24th, 2008, 1:55 am

Re: Basic Basic Basic Campaign

Post by A Guy »

Well, at least that's what I see in most UMCs.

Meh... guess I'll always find a way to make myself look stupid.
I'm just... a guy...
I'm back for now, I might get started on some work again.
Jodwin
Posts: 82
Joined: April 26th, 2005, 2:04 am
Location: Suomi Finland Perkele

Re: Basic Basic Basic Campaign

Post by Jodwin »

Johs wrote:[campaign]
id="Warsong"
name= _ "Warsong"
abbrev=WS
define=CAMPAIGN_WARSONG
first_scenario=01_Trial
rank=1
difficulties=EASY,NORMAL,HARD
difficulty_descriptions={MENU_IMG_TXT2 "units/human-peasants/peasant.png~RC(magenta>red)" _"Peasant" _"(Easy)"} + ";" + {MENU_IMG_TXT2 "units/human-outlaws/outlaw.png~RC(magenta>red)" _"Outlaw" _"(Normal)"} + ";" + {MENU_IMG_TXT2 "units/human-outlaws/fugitive.png~RC(magenta>red)" _"Fugitive" _"(Difficult)"}
image=../data/campaigns/Warsong/images/campaign_image.jpg
description= _ "Warsong"
icon="fast.png"
[/campaign]

[binary_path]
path=data/campaigns/Trial/
[/binary_path]

#ifdef CAMPAIGN_TRIAL
[+units]
{@campaigns/Warsong/units/}
[/units]

{@campaigns/Warsong/scenarios/utils/}
{@campaigns/Warsong/scenarios}
#endif
See the bold parts.
Yes I use windows, too.
Yes I too am aware of what that means.
Yes I'm still gonna use windows too.
User avatar
A Guy
Posts: 790
Joined: May 24th, 2008, 1:55 am

Re: Basic Basic Basic Campaign

Post by A Guy »

I hate it when I spend so much time trying out all the complex solutions to a problem when you could have it solved by doing something so simple...
I'm just... a guy...
I'm back for now, I might get started on some work again.
User avatar
Quietus
Art Contributor
Posts: 474
Joined: January 15th, 2008, 3:37 pm
Location: Worthing, UK

Re: Basic Basic Basic Campaign

Post by Quietus »

Heh, also shouldnt the

Code: Select all

first_scenario=01_Trial
be instead

Code: Select all

first_scenario="01_Trial"
Jodwin
Posts: 82
Joined: April 26th, 2005, 2:04 am
Location: Suomi Finland Perkele

Re: Basic Basic Basic Campaign

Post by Jodwin »

A Guy wrote:I hate it when I spend so much time trying out all the complex solutions to a problem when you could have it solved by doing something so simple...
Well, it's usually just a matter of how you approach debugging things. In this case since the problem was with the game not finding the scenario, you'll first want to check that the tags (ids) actually match, and once you are sure they do you'll want to check whether the scenario file is introduced properly (the "{@campaigns/Warsong/scenarios}"). If it is, then you check if the introduction is run (which it isn't) etc. etc. Of course the problem could be something more complicated, but those cases are the exceptions, not the rules. Trying to fix things by blindly guessing where the problem might be will very, very rarely get you anywhere. :) I'm telling this with the (limited) experience of having ironed out bugs from an unnamed commercial computer game's completely undocumented AI code...boy was that a real PITA. :augh:

@Quietus: I admit I don't really know much about WML, but he said that after throwing the scenario files to the same folder as the campaign cfg it did work (no surprise since the campaign folder was already introduced and the game knew to search there for files). Also since the game was able to name the scenario it was looking for it had to know the scenario id. :)
Yes I use windows, too.
Yes I too am aware of what that means.
Yes I'm still gonna use windows too.
Post Reply