Problem with next_scenario (unknown scenario)

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.
Post Reply
maduro69
Posts: 2
Joined: September 3rd, 2015, 7:39 pm

Problem with next_scenario (unknown scenario)

Post by maduro69 »

Hello everyone,

I just recently started on a campaign, using "A Simple Campaign" as a base. My code is sort of messy, but everything works fine...

I have a problem, though.

The second scenario of my campaign is called Death, and it has "next_scenario=03_Meeting" clearly stated within the [scenario] tags. The third one, "Meeting", has id=03_Meeting almost completely at the top... yet for some reason, whenever the second scenario is finished I get an "unknown scenario" error; I already tried changing the third scenario's name several times, and rewriting it from scratch, but to no avail.

I think there's something I'm overlooking... I'll post both scenarios' config files here:

02_Death

Code: Select all

[scenario]
	id=02_Death
	next_scenario=03_Meeting
	name=_"Death" 
	map_data="{~add-ons/A_Simple_Campaign/maps/hallway.map}"
	snapshot=no
	turns=40

	{SCENARIO_MUSIC breaking_the_chains.ogg}
	victory_when_enemies_defeated=yes

	##|| Flow Of Time ||##
	# automatically cycled through by the engine
	{DAWN}
	{MORNING}
	{AFTERNOON}
	{DUSK}
	{FIRST_WATCH}
	{SECOND_WATCH}

	[side]
		side=1
		controller=human
		team_name=1 
		user_team_name= _ "Player" 
		type=General
		id=10
		name= _ "ASD"
		canrecruit=yes
		unrenamable=yes
[/side]
	[side]
		side=2
		controller=ai
		team_name=1
		user_team_name= _ "Loyalists" 
		type=General
		id=12
		name= _ "ASD"
		canrecruit=yes
		unrenamable=yes
	[/side]
[side]
		side=3
		controller=ai
		team_name=1
		user_team_name= _ "???" 
		type=General
		id=14
		name= _ "ASD"
		canrecruit=yes
		unrenamable=yes
	[/side]



	[event]
		name=start
[message]
			speaker=narrator
			message=_"Meanwhile, Prince Garrett was on his way to the council chamber, to fulfill his duty as heir to the throne."
		[/message]

		[unit]
			side=2
			type=Crown Prince 
			id=Garrett 
			name=Garrett  
			facing=se
			x=1
			y=1
            		unrenamable=yes
		[/unit]


[move_unit]
id=Garrett
to_x=10
to_y=5
force_scroll=yes
[/move_unit]
[delay] 
time=360 
[/delay]


[print]
text="*swish*"
size=28
duration=40
red, green, blue=255,255,255
[/print]

[unit]
			side=3
			type=Assassin 
			id=1 
			name=Catspaw  
facing=se
			x=26
			y=12
            		unrenamable=yes
		[/unit]
[unit]
			side=3
			type=Assassin 
			id=2 
			name=Catspaw  
facing=se
			x=24
			y=12
            		unrenamable=yes
		[/unit]
[unit]
			side=3
			type=Assassin 
			id=3 
			name=Catspaw  
facing=se
			x=1
			y=1
            		unrenamable=yes
		[/unit]
[message]
			speaker=Garrett
			message=_"Huh? What was that?"
		[/message]
[delay] 
time=200 
[/delay]

[move_unit]
id=1
to_x=12
to_y=5
[/move_unit]
[move_unit]
id=2
to_x=11
to_y=7
[/move_unit]
[move_unit]
id=3
to_x=8
to_y=4
[/move_unit]

[delay] 
time=300 
[/delay]
[message]
			speaker=Garrett
			message=_"What's going on?! Who are you people?!"
		[/message]
[delay] 
time=400 
[/delay]

[move_unit]
id=1
to_x=11
to_y=5
[/move_unit]
[move_unit]
id=2
to_x=10
to_y=6
[/move_unit]
[move_unit]
id=3
to_x=9
to_y=5
[/move_unit]

[message]
			speaker=Garrett
			message=_"How DARE you! I am the PRINCE of Wesnoth!"
		[/message]

[message]
			speaker=2
			message=_"Not for much longer, I fear. I'm deeply sorry, kid."
		[/message]


[delay] 
time=400 
[/delay]
[harm_unit]
[filter]
id=Garrett
[/filter]
[filter_second]
id=2
[/filter_second]
amount=20
animate=yes
[/harm_unit]
[message]
			speaker=Garrett
			message=_"You will NOT get away with this! GUARDS!"
		[/message]
[harm_unit]
[filter]
id=Garrett
[/filter]
[filter_second]
id=1
[/filter_second]
amount=20
animate=yes
[/harm_unit]
[harm_unit]
[filter]
id=Garrett
[/filter]
[filter_second]
id=3
[/filter_second]
amount=20
animate=yes
[/harm_unit]
[move_unit]
id=1
to_x=1
to_y=1
[/move_unit]
[kill]
id=1
animate=no
fire_event=no
[/kill]
[move_unit]
id=2
to_x=26
to_y=12
[/move_unit]
[kill]
id=2
animate=no
fire_event=no
[/kill]
[move_unit]
id=3
to_x=1
to_y=1
[/move_unit]
[kill]
id=3
animate=no
fire_event=no
[/kill]
      {ENDLEVEL_CONTINUE}
      {NO_REPLAY_SAVE}
[/event]
[/scenario]
03_Meeting

Code: Select all

#define STORY
	[story]
		[part]
title= _ "Emergency"
			story= _ "After the Crown Prince's assassinated corpse was found several hours later, a search was conducted, but the killers were nowhere to be found."
		[/part]
		[part]
			story= _ "The following morning, the Great Council of Generals convened for an emergency meeting."
		[/part]
	[/story]
#enddef
[scenario]
	id=03_Meeting
	next_scenario=null
	name=_"Meeting" # displayed scenario name
	map_data="{~add-ons/A_Simple_Campaign/maps/council.map}"
	snapshot=no
    	{FULLSCREEN_CUTSCENE_UI}
    	victory_when_enemies_defeated=no
	turns=-1

	{SCENARIO_MUSIC breaking_the_chains.ogg}
	victory_when_enemies_defeated=yes

	##|| Flow Of Time ||##
	# automatically cycled through by the engine
	{DAWN}
	{MORNING}
	{AFTERNOON}
	{DUSK}
	{FIRST_WATCH}
	{SECOND_WATCH}
{STORY}

[side]
		side=1
		controller=human
		team_name=1 
		user_team_name= _ "Loyalists" 
		type=General
		id=14
		name= _ "ASD"
		canrecruit=yes
		unrenamable=yes
[/side]
	[side]
		side=2
		controller=ai
		team_name=1
		user_team_name= _ "Loyalists" 
		type=General
		id=12
		name= _ "ASD"
		canrecruit=yes
		unrenamable=yes
		[unit]
			type=General 
			id=1 
			name=General Barrett  
			x=8
			y=4
profile="portraits/halberdier.png"
facing=se
            		unrenamable=yes
		[/unit]
		[unit]
			type=Grand Marshal 
			id=2 
			name=Grand Marshal Garth  
			x=7
profile="portraits/dommel.png"
facing=se
			y=6
            		unrenamable=yes
		[/unit]
		[unit]
			type=General 
			id=3 
			name=General Aldus  
			x=8
			y=7
facing=se
profile="portraits/mustache.png"
            		unrenamable=yes
		[/unit]
		[unit]
			type=General 
			id=4 
			name=General Dedric  
			x=11
			y=8
profile="portraits/royal-guard.png"
            		unrenamable=yes
		[/unit]
		[unit]
			type=General 
			id=5 
			name=General Rolaf  
			x=14
			y=7
facing=sw
            		unrenamable=yes
		[/unit]
		[unit]
			type=General 
			id=6 
			name=General Thormund  
			x=12
			y=5
profile="portraits/eldaric.png"

facing=sw
            		unrenamable=yes
		[/unit]
		[unit]
			type=General 
			id=7 
			name=General Janos  
facing=sw
			x=14
			y=4
            		unrenamable=yes
		[/unit]

[unit]
			side=2
			type=Pretender 
			id=Sagar 
			name=Sagar  
facing=ne
			x=11
			y=6
            		unrenamable=yes
		[/unit]
	[/side]



	[event]
		name=start
        [message]
            speaker=narrator
            image=wesnoth-icon.png
            message= _ "General Thormund insisted that Sagar be summoned for questioning."
        [/message]
		[message]
			speaker=6
			message=_"NOBODY is more accursed than the kinslayer, Sagar... and not only that, you have become a kingslayer besides! Was dishonoring your father's memory by attempting to usurp the crown not enough for you, boy?!"
		[/message]
		[message]
			speaker=2
			message=_"General Thormund! Restrain yourself."
		[/message]
		[message]
			speaker=6
			message=_"You vile, evil, filthy— I can hardly believe this!"
		[/message]
		[message]
			speaker=3
			message=_"Unhand him, Thormund. Now."
		[/message]
		[message]
			speaker=6
			message=_"Bah! Fine. I suppose we'll soon find out that I was right all along, won't we?"
		[/message]
[delay] 
time=80 
[/delay]
[move_unit]
id=Sagar
to_x=9
to_y=6
[/move_unit]
[delay] 
time=900 
[/delay]
[move_unit]
id=6
to_x=16
to_y=5
[/move_unit]
[move_unit]
id=6
to_x=15
to_y=6
[/move_unit]
[message]
			speaker=Sagar
			message=_"Thank you, Aldus. Thormund, you are a dreadful human being."
		[/message]
[message]
			speaker=6
			message=_"How—"
		[/message]
[move_unit]
id=Sagar
to_x=11
to_y=6
[/move_unit]
[message]
			speaker=Sagar
			message=_"So soon after the loss of my father, my younger brother is assassinated by forces of evil, and you insinuate I'm the culprit? Your vile accusations border on the insane! To think my father worshiped your achievements so fervently... I see now that he was blind to your true nature."
		[/message]

[delay] 
time=300 
[/delay]

[message]
			speaker=3
			message=_"It must be clear to you, Generals of the Great Council, that unless you act swiftly, the throne of Wesnoth will remain vacant. I know this, and I share your concern."
		[/message]
[message]
			speaker=Sagar
			message=_"My brother Garrett, the rightful Grand Emperor, was found dead— little more than a day after our father. I stand before you after having lost the last of my kin, and it pains me that I must discuss matters of state with you in my present condition. "
		[/message]


[message]
			speaker=2
			message=_"Thank you, Lord Sagar. Do you have any suggestions on how to proceed?"
		[/message]
[message]
			speaker=Sagar
			message=_"General Garth, I fear I have no choice but to urge the Council to reconsider the request I made yesterday. With both my father and my half-brother dead, I am the only person left on Irdya related by blood to the royal dynasty..."
		[/message]
[move_unit]
id=Sagar
to_x=9
to_y=6
[/move_unit]

[delay] 
time=400 
[/delay]

[message]
			speaker=Sagar
			message=_"What do you say, Generals?"
		[/message]
[delay] 
time=1000 
[/delay]
[message]
			speaker=2
			message=_"I must admit that regardless of my earlier objections, this may really be the only way to preserve Wesnoth's stability. You are the last heir of the Morrisene Dynasty, and a royal decree of legitimization would sweep all remaining problems out of the way..."
		[/message]
[message]
			speaker=6
			message=_"You can't be serious, my lord Garth! You mean to hand the Grand Empire of Wesnoth to this viper?"
		[/message] 

[message]
			speaker=Sagar
			message=_"My royal half-brother, yes. If Garrett were to ascend to the throne, he would be nothing but a puppet of this council, which would run contrary to the power balance my forefathers so carefully put in place. Why risk that, while a much more suitable candidate for the throne of Wesnoth is so readily available?"
		[/message]
[delay] 
time=700 
[/delay]
[message]
			speaker=6
			message=_"Mayhaps you have the right of it, Lord Sagar, and you would make a more suitable king than your half-brother Garrett. That is not for me and my fellow councilors to judge."
		[/message]
  {ENDLEVEL_CONTINUE}
  {NO_REPLAY_SAVE}
[/event]
    
        
[/scenario]

Also, all referenced macros actually do exist, and basically everything works as intended except for the transition from scenario 2 to 3.

However, if you have any other feedback, I'm happy to hear it!
Last edited by Iris on September 3rd, 2015, 8:00 pm, edited 1 time in total.
Reason: Spoiler tags break code block expansion.
User avatar
Iris
Site Administrator
Posts: 6798
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Problem with next_scenario (unknown scenario)

Post by Iris »

Are their files both in the same directory and have the .cfg extension?
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
maduro69
Posts: 2
Joined: September 3rd, 2015, 7:39 pm

Re: Problem with next_scenario (unknown scenario)

Post by maduro69 »

Ah!

The first two scenarios had the .cfg extension, but the third one was just called "03_Meeting"; I'm still getting used to Linux, and I figured that the extension didn't always show. But now I've fixed it!

Thank you.
Post Reply