Volcano Island(Coding help, please)

Discussion and development of scenarios and campaigns for the game.

Moderators: Forum Moderators, Developers

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

Post by Skizzaltix » January 25th, 2006, 3:16 pm

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]

User avatar
Ranger M
Art Contributor
Posts: 1965
Joined: December 8th, 2005, 9:13 pm
Location: England

Post by Ranger M » January 25th, 2006, 4:15 pm

Im fine with you using my scenario (It's what I did to begin with)

does it work?

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

Post by Skizzaltix » January 25th, 2006, 4:49 pm

It still gives me the unknown scenario error.
Here is the .cfg file(modeled on your .cfg file as well, becuase IoA works and I know it :wink:)

Code: Select all

   [textdomain]
         name="wesnoth-(Campaign_Name)"
         path="data/campaigns/(Campaign_Name)/translations"
    [/textdomain]
   #textdomain wesnoth-(Campaign_Name)
[campaign]


	id=Volcano_Island
	icon=sea-hag.png
	name= _ "Volcano Island"
	define=CAMPAIGN_(CAMPAIGN_NAME)
	first_scenario="the landing"
	difficulties=EASY,NORMAL,HARD
	difficulty_descriptions={MENU_IMG_TXT2 naga-fighter.png _"Fighter" _"(easiest)"} +
	 ";*" + {MENU_IMG_TXT naga-warrior.png _"Warrior"} + ";" +
	 {MENU_IMG_TXT2 naga-myrmidon.png _"Myrmidon" _"(hardest)"}
	description= _ "Save yourself and the rest of Volcano Island from serving as slaves in the Human army."
	image=portraits/Alex_Jarocha-Ernst/merman-hunter.png
[/campaign]

#ifdef CAMPAIGN_VOLCANO

[+units]
   {@campaigns/(Campaign_Name)/units/}
[/units]

[+images]
{@campaigns/(Campaign_Name)/images}
[/images]

{@campaigns/(Campaign_Name)/units}

{@campaigns/(Campaign_Name)/images}

{@campaigns/(Campaign_Name)/}

{@campaigns/(Campaign_Name)/scenarios}

#endif


[binary_path] 
path=data/campaigns/(Campaign_Name)/ 
[/binary_path]

User avatar
Ranger M
Art Contributor
Posts: 1965
Joined: December 8th, 2005, 9:13 pm
Location: England

Post by Ranger M » January 25th, 2006, 4:55 pm

unless your folder with your campaign in is called "(Campaign_Name)" then this won't work.

raplace all instances of this with your campaign name, (eg Volcano-Island) and then give both the folder and the .cfg file the same name,(but keep the .cfg on the end of the .cfg file)

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

Post by Skizzaltix » January 25th, 2006, 5:07 pm

It is called "(Campaign_Name)". I was to lazy to rename it.

User avatar
Ranger M
Art Contributor
Posts: 1965
Joined: December 8th, 2005, 9:13 pm
Location: England

Post by Ranger M » January 25th, 2006, 5:13 pm

and is the .cfg file called that too?

I would reccomend renaming it (I found that it solved my problem when I first made IoA)

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

Post by Skizzaltix » January 25th, 2006, 5:14 pm

Okay. I juat renamed them both.

Code: Select all

   [textdomain]
         name="wesnoth-Volcano_Island"
         path="data/campaigns/Volcano_Island/translations"
    [/textdomain]
   #textdomain wesnoth-Volcano_Island
[campaign]


	id=Volcano_Island
	icon=sea-hag.png
	name= _ "Volcano Island"
	define=CAMPAIGN_VOLCANO_ISLAND
	first_scenario="the landing"
	difficulties=EASY,NORMAL,HARD
	difficulty_descriptions={MENU_IMG_TXT2 naga-fighter.png _"Fighter" _"(easiest)"} +
	 ";*" + {MENU_IMG_TXT naga-warrior.png _"Warrior"} + ";" +
	 {MENU_IMG_TXT2 naga-myrmidon.png _"Myrmidon" _"(hardest)"}
	description= _ "Save yourself and the rest of Volcano Island from serving as slaves in the Human army."
image=portraits/Alex_Jarocha-Ernst/merman-hunter.png
[/campaign]

#ifdef CAMPAIGN_VOLCANO

[+units]
   {@campaigns/Volcano_Island/units}
[/units]

[+images]
{@campaigns/Volcano_Island/images}
[/images]

{@campaigns/Volcano_Island/units}

{@campaigns/Volcano_Island/images}

{@campaigns/Volcano_Island}

{@campaigns/Volcano_Island/scenarios}

#endif


[binary_path] 
path=data/campaigns/Volcano_Island/ 
[/binary_path]
It still does the same thing, but now my codes make more sense.

User avatar
Ranger M
Art Contributor
Posts: 1965
Joined: December 8th, 2005, 9:13 pm
Location: England

Post by Ranger M » January 25th, 2006, 5:19 pm

problem:
define=CAMPAIGN_VOLCANO_ISLAND
#ifdef CAMPAIGN_VOLCANO
they need to be the same, the game isn't looking in the right folders because the #ifdef is not fufiled (as the campaign isn't defined as CAMPAIGN_VOLCANO)

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

Post by Skizzaltix » January 25th, 2006, 5:34 pm

It gives me a whole block of missing closing tags, etc(I think I can fix it myself), and then the unknown scenaior.

Maybe something will happen if I fix the errors!

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

Post by Skizzaltix » January 25th, 2006, 6:01 pm

Okay, the errors have me stumped.

Here is the exact error message:

The following add-on campaign(s) had errors and could not be loaded: ~/.wesnoth/data/campaigns//Volcano_Island.cfg
ERROR DETAILS:
Missing closing tag for tag side at ~/.wesnoth/data/campaigns/Volcano_Island/scenarios//the_landing.cfg:99 included
from
~/.wesnoth/data/campaigns//Volcano_Island.cfg:38 at
~/.wesnoth/data/campaigns/Volcano_Island/scenarios//the_landing.cfg:210 included from
~/.wesnoth/data/campaigns//Volcano_Island.cfg:38

line 99 of the_landing.cfg is the opening tag for Herald's side, but I see no missing closing tag there

line 38 of the .cfg file is the last {@campaigns etc etc} thing inside the #endif(the scenarios one)

line 210 of the_landing.cfg is the opening tag for Jakini's message if you kill Victor

I can find nothing wrong with any of these

claus
Posts: 186
Joined: April 4th, 2005, 5:51 am

Post by claus » January 25th, 2006, 6:14 pm

You use to many spaces, for example
Skizzaltix wrote:

Code: Select all

recruit=Naga, Naga Fighter
should be

Code: Select all

recruit=Naga,Naga Fighter
and
Skizzaltix wrote:

Code: Select all

recruitment_pattern=fighter, mixed fighter, fighter
should be

Code: Select all

recruitment_pattern=fighter,mixed fighter,fighter
The user_description of sir herald has a missing ", which can cause all kinds of errors for example adding the [/side] to his user_description.

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

Post by Skizzaltix » January 25th, 2006, 6:33 pm

Thanks, cluas!

I had noticed the missing ", and fixed it(it works now) but thanks anyway. I'll go fix the spaces too.

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

Post by Skizzaltix » January 25th, 2006, 7:04 pm

OOOOOOOOOOOOOOOOOOOOOH YEEEEEEEEEEAAAAAAAAAAAAAAAAH IT WORKS!!!!

Thanks for all the help, guys!

I'll be back to bug you about the second scenario soon =]

User avatar
Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact:

Post by Sapient » January 26th, 2006, 5:04 pm

Congrats! I eagerly await the finished campaign. Nice new avatar, BTW.
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 » January 26th, 2006, 6:42 pm

Thanks!

Here is the full campaign(6 scenarios)
The story is worked out to it's fullest, but I want to make scenario #5 a little harder

The whole thing needs balancing
Attachments
Volcano_Island.tar
The campaign is complete, but needs balancing.
I stopped halfway through scen.#6, so if you kill the yellow player and you don't win/the epilogue doesn't work, please tell me.
I only played it on easy. If it is too hard/too easy on the other difficulties
(150 KiB) Downloaded 110 times

Post Reply