Volcano Island(Coding help, please)

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

Post Reply
Skizzaltix
Posts: 1114
Joined: December 9th, 2005, 2:38 am

Post by Skizzaltix »

It still does the same thing...
I went over the code and simplified it.

Code: Select all

[scenario]

	#textdomain=wesnoth-(Campaign_Name)

	id=the landing
	name=_"The Landing"

	map_data="JJJssssssnsssssssJJJ
JPJsssssn3nssssssJPJ
JJJsssssnnnsssssssJs
ssssssssLLLsssssssss
sssdddsmTRTmsdddssss
ssdsssdcmRmcdsssdsss
ssdssddccRccddssdsss
sddRcRdThchTdRcRddss
snLmRcTTTcTTTcRmLnss
n1nLmchcTDcchcmLn2ns
nnnmmchTccTThcmmnnns
sdLRRRTTTcTTTRRRLdss
ssdscddchRhcddcsdsss
ssdsssdccRccdsssdsss
ssddsddmmRmmddsddsss
ssssdsssTLTsssdsssss
ssssssssLnLsssssssss
sJssssssn4nssssssJJJ
JPJsssssnnnssssssJPJ
JJJssssssssssssssJJJ"


	{TURNS 30 25 20}

	[story]
		[part]
		background=campaigns/Heir_To_The_Throne/story/story5.png
		story= _ "The inhabitants of Volcano Island had lived relatively peacefully, sence the Humans had been driven out by plague and the their ancestors, but that was long a ago, and only those that had travelled the world knew what a Human was. But that was soon to end..."
		[/part]
	[/story]

	{DAWN}
	{MORNING}
	{AFTERNOON}
	{DUSK}
	{FIRST_WATCH}
	{SECOND_WATCH}


	next_scenario=Reef_Perils
	[event]
	name=start
		[objectives]
		side=1
			[objective]
				description= _ "Defeat enemy Leaders"
				condition=win
			[/objective]
			[objective]
				description= _ "Death of Jakini"
				condition=lose
			[/objective]
			[objective]
				description= _ "Death of Soran"
				condition=lose
			[/objective]
			[objective]
				description= _ "Turns Run Out"
				condition=lose
			[/objective]
		[/objectives]

		[message]
		description=Jakini
		message=_"Soran! What are these creatures? They walk so easily, and they have legs!"
		[/message]

		[message]
		description=Soran
		message=_"They are Humans, Jakini. I have seen them in my travels. I cannot think what they should want here!"
		[/message]

		[message]
		description=Sir Herald
		message=_"Typical! A creature like you cannot think at all! We want you to move our ships!"
		[\message]

		[message]
		description=Soran
		message=_"They meen to enslave us, Jakini! We must fight!"
		[/message]

		[message]
		description=Victor
		message=_"So be it! We will kill you and take the rest!"
		[/message]
	[/event]

	victory_when_enemies_defeated=yes

	[side]

	type=Naga
	description="Jakini"
	canrecruit=1

	side=1

	controller=human

	team_name=Seafolk

	gold=100

	recruit=Naga, Naga Fighter
	[/side]

	[side]
	type=Merman Spearman
	description="Soran"
	canrecruit=1

	side=2

	controller=ai

	team_name=Seafolk

	gold=100

	recruit=Merchild, Merman Hunter
	[/side]

	[side]
	type=Noble Fighter
	description="Sir Herald"
	canrecruit=1
	side=3

	recruit=Spearman, Bowman, Blood Bat

	team_name=Humans

	{GOLD 100 150 200}
		[ai]
		recruitment_pattern=scout, archer, scout, fighter
		[/ai]
	[/side]

	[side]
	type=Duelist
	description="Victor"
	canrecruit=1

	side=4

	recruit=Fencer, Blood Bat
	team_name=Humans

	{GOLD 100 150 200}
		[ai]
		recruitment_pattern=scout, fighter, scout
		[/ai]
	[/side]


	[event]
	name=victory
		[message]
		description=Jakini
		message=_"We did it! The Island is safe!"
		[/message]

		[message]
		description=Soran
		message=_"Not for long! See, one of them escapes!"
		[/message]

		[move_unit_fake]
		type=Duelist
		x=10, 10
		y=18, 20
		[/move_unit_fake]

		[message]
		description=Victor
		message=_"Stupid fish! I'll be back in force!"
		[/message]

		[hide_unit]
		x=10
		y=20
		[/hide_unit]
	[/event]

	[event]
	name=die
	[filter]
	description=Jakini
	[/filter]
		[message]
		description=Jakini
		message=_"Curse you and all your milk!... ilk!"
		[/message]
		[endlevel]
		result=defeat
		bonus=no
		[/endlevel]
	[/event]

	[event]
	name=die
	[filter]
	description=Soran
	[/filter]
		[message]
		description=Soran
		message=_"No! Without me, Jakini will never find her way!]
		[/message]
		[endlevel]
		result=defeat
		bonus=no
		[/endlevel]
	[/event]
[/scenario]
Did I miss somethiing?
User avatar
Ranger M
Art Contributor
Posts: 1965
Joined: December 8th, 2005, 9:13 pm
Location: England

Post by Ranger M »

map data must always be equal height and size, I once did a huge map, which I had to make without the editor, and I accidently deleted a terrain letter half way down, the problem was that it looked the right lenght, so I had to go through all of lines to find the problem.

so it should be:

Code: Select all

map_data="gggg
gggg
gggg"
not

Code: Select all

map_data="gggg
gg
ggg"
if there is meant to be nothing there then use an impassable terrain, like cave wall or void, etc
Skizzaltix
Posts: 1114
Joined: December 9th, 2005, 2:38 am

Post by Skizzaltix »

I'm sorry to keep asking stupid questions, but I just counted the height and lenthg of all the lines, and I haven't found the place you are talking about---which line is it?
User avatar
Ranger M
Art Contributor
Posts: 1965
Joined: December 8th, 2005, 9:13 pm
Location: England

Post by Ranger M »

Sorry, my mistake, (I had seen one, but it turns out that I mis-counted)

although I did notice that there seem to be spaces on the ends and beginnings of some of the lines. Are they in the .cfg file as well? If so then they could be the problem.[/quote]
User avatar
Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact:

Post by Sapient »

I spotted an error:

Code: Select all

      [message] 
      description=Sir Herald 
      message=_"Typical! A creature like you cannot think at all! We want you to move our ships!" 
      [\message] 
You have a backslash there instead of a forwardslash.
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
Skizzaltix
Posts: 1114
Joined: December 9th, 2005, 2:38 am

Post by Skizzaltix »

Code: Select all

[scenario]

	#textdomain=wesnoth-(Campaign_Name)

	id=the landing
	name=_"The Landing"

	map_data="sJJJsssssnnnsssssJJJs
sJPJsssssn3nsssssJPJs
sJJJsssssnnnsssssJJJs
sssssssssLLLsssssssss
ssssdddsmTRTmsdddssss
sssdsssdcmRmcdsssdsss
sssdssddccRccddssdsss
ssddRcRdThchTdRcRddss
snnLmRcTTlclTTcRmLnss
sn1nLmchclDcchcmLn2ns
snnnmmchlcclThcmmnnns
ssdLRRRTTTcTTTRRRLdss
sssdscddchRhcddcsdsss
sssdsssdccRccdsssdsss
sssddsddmmRmmddsddsss
sssssdsssTLTsssdsssss
sssssssssLnLsssssssss
sJJJsssssn4nsssssJJJs
sJPJsssssnnnsssssJPJs
sJJJsssssssssssssJJJs
sssssssssssssssssssss"


	{TURNS 30 25 20}

	[story]
		[part]
		background=campaigns/Heir_To_The_Throne/story/story5.png
		story= _ "The inhabitants of Volcano Island had lived relatively peacefully, sence the Humans had been driven out by plague and the their ancestors, but that was long a ago, and only those that had travelled the world knew what a Human was. But that was soon to end..."
		[/part]
	[/story]

	{DAWN}
	{MORNING}
	{AFTERNOON}
	{DUSK}
	{FIRST_WATCH}
	{SECOND_WATCH}


	next_scenario=Reef_Perils
	[event]
	name=start
		[objectives]
		side=1
			[objective]
				description= _ "Defeat enemy Leaders"
				condition=win
			[/objective]
			[objective]
				description= _ "Death of Jakini"
				condition=lose
			[/objective]
			[objective]
				description= _ "Death of Soran"
				condition=lose
			[/objective]
			[objective]
				description= _ "Turns Run Out"
				condition=lose
			[/objective]
		[/objectives]

		[message]
		description=Jakini
		message=_"Soran! What are these creatures? They walk so easily, and they have legs!"
		[/message]

		[message]
		description=Soran
		message=_"They are Humans, Jakini. I have seen them in my travels. I cannot think what they should want here!"
		[/message]

		[message]
		description=Sir Herald
		message=_"Typical! A creature like you cannot think at all! We want you to move our ships!"
		[/message]

		[message]
		description=Soran
		message=_"They meen to enslave us, Jakini! We must fight!"
		[/message]

		[message]
		description=Victor
		message=_"So be it! We will kill you and take the rest!"
		[/message]
	[/event]

	victory_when_enemies_defeated=yes

	[side]

	type=Nagini Shaman
	description="Jakini"
	canrecruit=1

	side=1

	controller=human

	team_name=Seafolk

	gold=100

	recruit=Naga, Naga Fighter
	[/side]

	[side]
	type=Merman Spearman
	description="Soran"
	canrecruit=1

	side=2

	controller=ai

	team_name=Seafolk

	gold=100

	recruit=Merchild, Merman Hunter
	[/side]

	[side]
	type=Noble Fighter
	description="Sir Herald"
	canrecruit=1
	side=3

	recruit=Spearman, Bowman, Blood Bat

	team_name=Humans

	{GOLD 100 150 200}
		[ai]
		recruitment_pattern=scout, archer, scout, fighter
		[/ai]
	[/side]

	[side]
	type=Duelist
	description="Victor"
	canrecruit=1

	side=4

	recruit=Fencer, Blood Bat
	team_name=Humans

	{GOLD 100 150 200}
		[ai]
		recruitment_pattern=scout, fighter, scout
		[/ai]
	[/side]


	[event]
	name=victory
		[message]
		description=Jakini
		message=_"We did it! The Island is safe!"
		[/message]

		[message]
		description=Soran
		message=_"Not for long! See, one of them escapes!"
		[/message]

		[move_unit_fake]
		type=Duelist
		x=10, 10
		y=18, 21
		[/move_unit_fake]

		[message]
		description=Victor
		message=_"Stupid fish! I'll be back in force!"
		[/message]

		[hide_unit]
		x=10
		y=21
		[/hide_unit]
	[/event]

	[event]
	name=die
	[filter]
	description=Jakini
	[/filter]
		[message]
		description=Jakini
		message=_"Curse you and all your milk!... ilk!"
		[/message]
		[endlevel]
		result=defeat
		bonus=no
		[/endlevel]
	[/event]

	[event]
	name=die
	[filter]
	description=Soran
	[/filter]
		[message]
		description=Soran
		message=_"No! Without me, Jakini will never find her way!]"
		[/message]
		[endlevel]
		result=defeat
		bonus=no
		[/endlevel]
	[/event]
[/scenario]

It still seems to do the same thing...
User avatar
appleide
Posts: 1003
Joined: November 8th, 2003, 10:03 pm
Location: Sydney,OZ

Post by appleide »

See the side parts, take the spaces after the commas away. I still am not sure if that makes a difference though

Code: Select all

  recruit=Spearman, Bowman, Blood Bat 

   team_name=Humans 

   {GOLD 100 150 200} 
      [ai] 
      recruitment_pattern=scout, archer, scout, fighter 
      [/ai] 
Why did the fish laugh? Because the sea weed.
Skizzaltix
Posts: 1114
Joined: December 9th, 2005, 2:38 am

Post by Skizzaltix »

No, that didn't help...
But thanks anyway.
User avatar
Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact:

Post by Sapient »

This is just a wild guess, but...

Code: Select all

   #textdomain=wesnoth-(Campaign_Name) 
Try removing that line and see what happens. Otherwise, I'm stumped.
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
User avatar
Ranger M
Art Contributor
Posts: 1965
Joined: December 8th, 2005, 9:13 pm
Location: England

Post by Ranger M »

when I get home I'll set it up on my laptop and try to get it working (BTW, which version are you using, 1.1 or 1.0.2? I have both, I just need to know which to test it on.
Skizzaltix
Posts: 1114
Joined: December 9th, 2005, 2:38 am

Post by Skizzaltix »

1.0.2.

I have tried it, and, I'm not sure if this is just my slow computer, but it seems to either freeze or foce quit Wesnoth when you try to test it, so make sure to save everything first.
User avatar
Ranger M
Art Contributor
Posts: 1965
Joined: December 8th, 2005, 9:13 pm
Location: England

Post by Ranger M »

Ok, I'll post my results and any corrections on friday. (when I get home, god damn it I hate boarding school)
Skizzaltix
Posts: 1114
Joined: December 9th, 2005, 2:38 am

Post by Skizzaltix »

I truly appreciate your effort!

Boardiing school? I pity you :(
User avatar
Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact:

Post by Sapient »

I'm not sure if you noticed this page on the wiki, but it might help: DebuggingCampaigns
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
Skizzaltix
Posts: 1114
Joined: December 9th, 2005, 2:38 am

Post by Skizzaltix »

The code.

Ranger M, I used 'Thrashan' as a template for this,I hope you don't mind :?

Code: Select all

[scenario]
	id="the landing"
	name="The Landing"
	map_data="sJJJsssssnnnsssssJJJs
sJPJsssssn3nsssssJPJs
sJJJsssssnnnsssssJJJs
sssssssssLLLsssssssss
ssssdddsmTRTmsdddssss
sssdsssdcmRmcdsssdsss
sssdssddccRccddssdsss
ssddRcRdThchTdRcRddss
snnLmRcTTlclTTcRmLnss
sn1nLmchclDcchcmLn2ns
snnnmmchlcclThcmmnnns
ssdLRRRTTTcTTTRRRLdss
sssdscddchRhcddcsdsss
sssdsssdccRccdsssdsss
sssddsddmmRmmddsddsss
sssssdsssTLTsssdsssss
sssssssssLnLsssssssss
sJJJsssssn4nsssssJJJs
sJPJsssssnnnsssssJPJs
sJJJsssssssssssssJJJs
sssssssssssssssssssss"
	{TURNS 30 25 20}

	{DUSK}
	{FIRST_WATCH}
	{SECOND_WATCH}
	{DAWN}
	{MORNING}
	{AFTERNOON}

next_scenario="reef perils"

	[story]
			[part]
			music=wesnoth-1.ogg
			story= _ "The inhabitants of Volcano Island had lived peacefully, sence the Human settlers had been driven out long ago."
			[/part]
			[part]
			music=wesnoth-1.ogg
			story= _ "Only the few that had travelled the world knew so much as what a Human was. But that was soon to change."
			[/part]
			[part]
			music=wesnoth-1.ogg
			story= _ "This story concerns Jakini, a young Nagini with unusual powers, and her quest to free her people."
			[/part]
	[/story]

	[event]
	name=prestart

		[objectives]
		side=1
			[objective]
				description= _ "Defeat Sir Herald."
				condition=win
			[/objective]
			[objective]
				description= _ "Death of Jakini or Soran."
				condition=lose
			[/objective]
		[/objectives]

	[/event]

	[side]
	type=Nagini Shaman
	description=Jakini
	user_description= _"Jakini"
	unrenamable=yes
	side=1
	canrecruit=1
	controller=human
	recruit=Naga, Naga Fighter
	{GOLD 150 100 75}
	{INCOME 6 4 2}
	team_name=Seafolk
	[/side]

	[side]
	type=Merman Spearman
	description=Soran
	user_description= _"Soran"
	unrenamable=yes
	side=2
	canrecruit=1
	controller=ai
	recruit=Merchild, Merman Hunter
	{GOLD 150 100 75}
	{INCOME 6 4 3}
		[ai]
		recruitment_pattern=fighter, mixed fighter, fighter
		[/ai]
	team_name=Seafolk
	[/side]

	[side]
	type=Sir Herald
	description=Sir Herald
	user_description= _"Sir Herald
	unrenamable=yes
	side=3
	canrecruit=1
	controller=ai
	recruit=Spearman, Bowman, Blood Bat
	{GOLD 150 150 150}
	{INCOME 5 6 7}
		[ai]
		recruitment_pattern=scout, fighter, scout, archer
		[/ai]
	team_name=Humans
	[/side]

	[side]
	type=Master at Arms
	description=Victor
	user_description= _"Victor "
	unrenamable=yes
	side=4
	canrecruit=1
	controller=ai
	recruit=Duelist, Blood Bat
	{GOLD 200 250 300}
	{INCOME 5 6 8}
		[ai]
		recruitment_pattern=scout, fighter, scout
		[/ai]
	team_name=Humans
	[/side]

	[event]
	name=start

		[message]
		description=Jakini
		message= _ "What are these creatures?"
		[/message]
		[message]
		description=Soran
		message= _ "They are Humans, and I cannot think what they should want here!"
		[/message]
		[message]
		description=Sir Herald
		message= _ "Typical! A fish like you cannot think at all! We want you to pull and defend our ships!"
		[/message]
		[message]
		description=Soran
		message= _ "They mean to enslave us! To arms!"
		[/message]
		[message]
		description=Victor
		message= _ "So be it. We kill you and take the rest!"
	[/event]

	[event]
	name=die
		[filter]
		description=Jakini
		[/filter]
		[message]
		speaker=unit
		message= _ "Curse you and all your milk! err, ilk!."
		[/message]
		[endlevel]
		result=defeat
		bonus=no
		[/endlevel]
	[/event]

	[event]
	name=die
		[filter]
		description=Soran
		[/filter]
		[message]
		speaker=unit
		message= _ "Jakini will never find her way without me."
		[/message]
		[endlevel]
		result=defeat
		bonus=no
		[/endlevel]
	[/event]

	[event]
	name=die
		[filter]
		description=Sir Herald
		[/filter]
		[message]
		speaker=unit
		message= _ "My master shall destroy you."
		[/message]
		[endlevel]
		result=victory
		bonus=yes
		[/endlevel]
	[/event]

	[event]
	name=die
		[filter]
		description=Victor
		[/filter]
		[message]
		speaker=unit
		message= _ "Gaah But I have to show up in the next whole bunch scenarios you've gone and ruined the game you've *urk*"
		[/message]
		[message]
		speaker=Jakini
		message= _ "???"
		[/message]
	[/event]

[/scenario]
Post Reply