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

Volcano Island(Coding help, please)

Post by Skizzaltix » January 12th, 2006, 10:59 pm

I decided to learn WML today, so I did. I am making a Merfolk/Naga centered campaign, and have written some of the storyline.
However, when I try to test it, after it asks me the difficulty, then waits, using up more and more of my CPU, swap space, memory, and load average.

the code itself

Code: Select all

[scenario]

	#textdomain=wesnoth-(Campaign_Name)

	id=the landing
	name=_"The Landing"

	{MAP ISLAND_BASH}

	{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=prestart
		[objectives]
			[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]
	[/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, Naga Hunter
	[/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]


	{STARTING VILLAGES 1 5}
	{STARTING VILLAGES 2 5}

	[event]
	name=start
		[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]

	[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]

and here is the campaign .cfg file:

[campaign]

Code: Select all

	#textdomain=wesnoth-data/campaigns/(Campaign_Name)/scenarios/The_Landing.cfg
	
	name= _ "Volcano Island"
	
	first_scenario=the landing
	
	#define=CAMPAIGN_VOLCANO_ISLAND
	
	diffuculties="EASY,MEDIUM,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 the sea-dwelling inhabitants of Volcano Island from pulling Human boats."
	
	icon=sea-hag.png
	image=portraits/core/Alex_Jarocha-Ernst/merman-hunter.png
[/campaign]

[binary_path]
path=data/campaigns/Volcano_Island/external_binary_data
[/binary_path]
[+units]
{@campaigns/Volcano_Island/units}
[/units]

#ifdef CAMPAIGN_VOLCANO_ISLAND
{@campaigns/Volcano_Island/scenarios}
#endif
I also noticed that when I try to test it, it no longer asks me the difficulty.
Last edited by Skizzaltix on January 17th, 2006, 2:47 pm, edited 11 times in total.

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

Post by Ranger M » January 12th, 2006, 11:08 pm

If you want Naga mage units then I made some for my campaign.

There are two lines, and all have both male and female images, and some have defencive ones.

I have also included the stats I made for them, and all of the naga units that I know of which I don't think are in the mainline.

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

Post by Sapient » January 13th, 2006, 12:07 am

I noticed you included some of the images from the Depthstalker, but there is a complete set of basic images now (and updated stats from the balance gurus). This file contains the latest. And, I look forward to seeing your campaign. I hope a Naga Depthstalker or two makes it in. 8)

As far as the error goes, could you post the exact error message? Also, take a look into stderr.txt after you exit Wesnoth; there may be additional information about the error.

Naga Depthstalker (latest files)
Last edited by Sapient on February 21st, 2006, 3:22 am, edited 1 time in total.
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 13th, 2006, 1:10 am

Sapient wrote:As far as the error goes, could you post the exact error message? Also, take a look into stderr.txt after you exit Wesnoth; there may be additional information about the error.
THank you for the unit files!
Actually, I had never heard of a depthstalker... I did make the Nagini Shaman just now, aactually... The chain goes Nagini Shaman, Nagini Witch, Deep Magus.
She has a peirce-trident for the first two levels, and for all three she has a magical ranged impact attack, and a slowing ranged cold attack, and at lv3 her trident turns into a cold attack.

The error message reads:
ERROR:
Unknown scenario: 'Herald'
'Herald' being the id, cuz he dies.
And I can't figure out why not... Have you seen something like this before? :?

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

Post by Ranger M » January 13th, 2006, 1:16 am

just post the code, and then we can see any problems.

and yes this is the most common campaign error, it means that there is an error in you're code.

ps are you going to use the naga mage line?

EDIT: also post the exact error message

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

Post by Skizzaltix » January 13th, 2006, 1:19 am

Ranger M wrote:If you want Naga mage units then I made some for my campaign.

There are two lines, and all have both male and female images, and some have defencive ones.

I have also included the stats I made for them, and all of the naga units that I know of which I don't think are in the mainline.
Wow thanks! I already had the Naga, But the Hunter and Guardian and mage are all going in!
I'm afraid I didn't find the stats for the Depthstalker there, though... found the stats for 'Reth' instead.

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

Post by Skizzaltix » January 13th, 2006, 1:22 am

Ranger M wrote:just post the code, and then we can see any problems.
I did it in the (Campaign_Name).01 thingie, just so you know.

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

Post by Ranger M » January 13th, 2006, 1:23 am

A, yeah, soz about that, that is my backup main character for my camapign, It was stored in their along with the rest of my unit files, I must have forgotten to take it out. if any of them don't start naga-somthing then they aren't relevent.

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

Post by Skizzaltix » January 13th, 2006, 1:39 am

Sapient wrote:As far as the error goes, could you post the exact error message? Also, take a look into stderr.txt after you exit Wesnoth; there may be additional information about the error.
THanks for the advice!
Ummm... My computer dousn't understand .zip files. Would you mind putting it into .tar, if you can..?

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

Post by Ranger M » January 13th, 2006, 1:50 am

I had a look through the scenario file (BTW when you do post these, get rid of the # bits, makes an easier read) and nothing seems wrong, although I would suggest making a copy (in a different folder) and then trying it without some of the thing which aren't entierly neccisary (e.g the starting village macro, the story part, etc) and see if it works, one of the errors could be in there, and that will narrow it down.

Also post your .cfg file for your campaign which is in the campaign folder.

(example attached below)

ps, don't attach it as I cannot download things from this site at the moment. Put it in on the page like you did with the scenario code.

Anyar
Posts: 191
Joined: July 25th, 2005, 9:18 pm
Location: MI

Post by Anyar » January 13th, 2006, 1:53 am

Skizzaltix wrote: ERROR:
Unknown scenario: 'Herald'
'Herald' being the id, cuz he dies.
And I can't figure out why not... Have you seen something like this before? :?
Do you have the scenario file ending in .cfg? I've noticed that it can cause errors like that if you dont.
Ummm... My computer dousn't understand .zip files. Would you mind putting it into .tar, if you can..?
Try this.
Even as the fingers of the two hands are equal, so are human beings equal to one another. No one has any right, nor any preference to claim over another. You are brothers. - Muhammed

scott
Posts: 5242
Joined: May 12th, 2004, 12:35 am
Location: Alexandria, VA

Post by scott » January 13th, 2006, 1:59 am

textdomain needs a # symbol in front of it.

# normally indicates a comment, but it also strangely indicates a preprocessor instruction like #ifdef, #define, #textdomain, #endif, and #enddef.

The way objectives are defined has recently changed. The way you did it should still work (maybe), but you should change it. The correct way is described in http://wesnoth.org/wiki/InterfaceActionsWML and you can look at any scenario for an example.

Good luck learning WML.

There are some new naga units in "Under the Burning Suns"
Hope springs eternal.
Wesnoth acronym guide.

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

Post by Ranger M » January 13th, 2006, 2:03 am

They were in my attachment. (just thought that I'd save you the bother of looking) :D

ILikeProgramming
Posts: 837
Joined: April 14th, 2005, 4:17 am

Post by ILikeProgramming » January 13th, 2006, 2:06 am

I know this error! The code:

Code: Select all

#ifdef EASY 
type=Noble Fighter 
#else 
type=Noble Commander 
#endif 
description
doesn't work.
Last edited by ILikeProgramming on January 13th, 2006, 2:29 am, edited 1 time in total.

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

Post by Ranger M » January 13th, 2006, 2:25 am

I came across this in my campaign (don't know why I didn't spot it) you have to #ifdef EASY, MEDIUM and HARD, not just one with else.

try correcting that

Post Reply