Getting scenarios to pass on

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

Post Reply
Circon
Posts: 1200
Joined: November 17th, 2003, 4:26 am
Location: Right behind Gwiti, coding

Getting scenarios to pass on

Post by Circon »

I've fiddled for half an hour with this. The first scenario reads as thus:

[scenario]
name="Brother Against Brother"
id="Brother Against Brother"
map=undmap1
turns=28

{SNIP TIMES}

next_scenario="Skull_Agarash"



The second thus:

[scenario]
name="The Skull of Agarash"
map=undmap1
turns=28

{SNIP TIMES}

id="Skull_Agarash"
next_scenario=null


But winning the first does not send me on to the second! How do I fix this???
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Winning the first should send you to the second, if this is what you have, and both files are in the scenarios directory.

If it still doesn't work, send the files to me, and I'll take a look at it.

David
Circon
Posts: 1200
Joined: November 17th, 2003, 4:26 am
Location: Right behind Gwiti, coding

Post by Circon »

I thought I had this fixed now. The Skull level had instructions to make a unit speak, when that unit did not exist yet. I changed the order of the events, so... It still doesn't work.

I've sent you the files for looking over.
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Circon wrote:I thought I had this fixed now. The Skull level had instructions to make a unit speak, when that unit did not exist yet. I changed the order of the events, so... It still doesn't work.

I've sent you the files for looking over.
You have some of the actions outside of any [event] tag. If you want actions to be executed all in a row, put them all inside the same [event] tag. Also if you want alot of actions of different types to be executed sequentially, then put each action inside its own [command] tag. Your code should be re-written:

Code: Select all

	[event]
	name=start
		[command]
			[message]
			id=und2_2_1
			speaker=narrator
			message="After Gwiti destroyed his brother, he was planning a march upon Wesnoth. But a Dark Spirit came to him, counselling him..."
			[/message] 
		[/command]

		[command]
			[move_unit_fake]
			type=Wraith
			x=1,2,3,4,5,6,7
			y=4,4,4,4,4,4,4
			[/move_unit_fake]
		[/command]

		[command]
			[unit]
			description=Dark Spirit
			type=Wraith
			x=7
			y=4
			side=1
			[/unit]
		[/command]

		[command]
			[message]
			id=und2_2_2
			description=Dark Spirit
			message="Gwiti... Gwiti!"
			[/message]
			[message]
			id=und2_2_3
			description=Gwiti Ha'atel
			message="A Dark Spirit? Surely this is my token of mastery of the undead!"
			[/message]
			[message]
			id=und2_2_4
			description=Dark Spirit
			message="Gwiti, do not yet march upon Wesnoth. First, you shall go south, against the orcs, and there find the Skull of Agarash."
			[/message]
			[message]
			id=und2_2_5
			description=Gwiti Ha'atel
			message="What is the Skull of Agarash? Tell me more."
			[/message]
			[message]
			id=und2_2_6
			description=Dark Spirit
			message="Do you see the three orc clans of this land? Their banners are topped with skulls, as is their custom. But one of these is the Skull of Agarash - which once was mine. Take it and your power will grow greater by far."
			[/message]
		[/command]
	[/event]
and it works fine.

Also, the scenario you sent me didn't load properly because the map file has spaces in it (at the end of lines). Once they are removed it works fine. When an error like a scenario failing to load occurs, if you look in the file stderr.txt in the directory Wesnoth is running in, there will generally be an error message (look near the bottom of the file).

David
jzaun
Posts: 45
Joined: October 24th, 2003, 7:06 pm
Location: Waikiki, HI
Contact:

Post by jzaun »

Just a comment on the fake unit movement... It is very fast, I recomment doubleing the units:
x=1,1,2,2,3,3,4,4,5,5,6,6
y=3,3,4,4,5,5,6,6,7,7,8,8

It slows the animation down :-)
Circon
Posts: 1200
Joined: November 17th, 2003, 4:26 am
Location: Right behind Gwiti, coding

Post by Circon »

*kicks self multiple times*
Mentally insert sound of Homer Simpson saying "D'OH!".

Space at the end of the map was my last bug too!!!


I am going to start a checklist for when I build scenarios.
Check for spaces in map file
Check that all commands are in <event> and <command> tags
...
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Don't worry about it too much. These kinds of mistakes are pretty natural. It's more important to know how to diagnose and fix a mistake than have a 'mental checklist' of mistakes.

I make mistakes all the time when doing scenario files. It's pretty normal.

Your biggest tool when a scenario doesn't load is looking in stderr.txt. There will likely be an error message which will hopefully give you a very good idea of what's going wrong.

David
Circon
Posts: 1200
Joined: November 17th, 2003, 4:26 am
Location: Right behind Gwiti, coding

Post by Circon »

Well, go look at my post in the release announcement... I had another big mistake.
Post Reply