Campaign Not Working

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
Mperies
Posts: 4
Joined: January 26th, 2014, 6:05 am

Campaign Not Working

Post by Mperies »

Hi everyone,
I'm trying to make a campaign and I can't seem to get anything to work ever :augh: Can someone please send me some simple starting code? I already read everthing on the website under creat and have been able to modify some other campaigns, but whenever I try to creat my own, I just get errors... Any help would be appreciated
User avatar
doofus-01
Art Director
Posts: 4122
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: Introduce yourself here!

Post by doofus-01 »

Mperies wrote:Hi everyone,
I'm trying to make a campaign and I can't seem to get anything to work ever :augh: Can someone please send me some simple starting code? I already read everthing on the website under creat and have been able to modify some other campaigns, but whenever I try to creat my own, I just get errors... Any help would be appreciated
Hi Mperies,
When you modify an add-on or campaign and get errors from Wesnoth engine, understand that the first error you get is the important one, and the "unknown scenario" message means nothing, except that things didn't work. If you need help, feel free to ask for help in the WML Workshop forum. It will be best if you post your failing WML there as well, since vague questions are difficult to answer.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
User avatar
Turuk
Sithslayer
Posts: 5283
Joined: February 28th, 2007, 8:58 pm
Contact:

Re: Campaign Not Working

Post by Turuk »

Welcome to the forums Mperies. I have split your posts off from the introductory topic to the WML Workshop so that you can post your campaign code here and get help from the community. As doofus-01 indicated, it's best if you include the actual code so people can look at the WML and help you troubleshoot.
Mainline Maintainer: AOI, DM, NR, TB and THoT.
UMC Maintainer: Forward They Cried, A Few Logs, A Few More Logs, Start of the War, and Battle Against Time
User avatar
HaChol
Posts: 50
Joined: September 27th, 2013, 12:48 am

Re: Campaign Not Working

Post by HaChol »

May he needs just a hint to a simple campaign to start with??

I would think, the "Start of the War" - campaign is rather simple in structure but has already some nice things in it and seems to be coded with structure and clean makeup...

Has anyone a better idea?? Lets us hear .. ^_^
The fruit of a righteous man is the tree of life, and the wise man acquires souls.
And I said, I will perish with my nest, and I will multiply days as the chol.
User avatar
Chief_Chasso
Posts: 132
Joined: December 15th, 2012, 2:36 am

Re: Campaign Not Working

Post by Chief_Chasso »

HaChol wrote:May he needs just a hint to a simple campaign to start with??
How about "A Simple Campaign". That's probably the best place to start.
SP Campaign: Rally For Roanic
JaMiT
Inactive Developer
Posts: 511
Joined: January 22nd, 2012, 12:38 am

Re: Campaign Not Working

Post by JaMiT »

Chief_Chasso wrote:How about "A Simple Campaign".
You mean the add-on described as "This is a stub of a campaign, intended to make life easier in creating a campaign"? That is a good suggestion, but when looking for it on the add-on server, if you sort by title, you should be looking under "C" for Campaign-How-To (A simple Campaign). (Or you can sort by author and look for Anonymissimus).

On the other hand, Mperies mentioned having read everything on the website under "Create". Was that an implication that things mentioned there need not be mentioned here? Because A Simple Campaign is mentioned in the opening section of BuildingCampaigns...
Mperies
Posts: 4
Joined: January 26th, 2014, 6:05 am

Re: Campaign Not Working

Post by Mperies »

Ok right now I'm just trying to start by modifying that campaign Start of the War to be from the Troll's view of the situation, but I can't even get to the first scenario without getting an error message. Basically the only thing I've changed is the main and just the beginning of the first scenario.
Attachments
1_First_Encounter.cfg
scenario
(6.54 KiB) Downloaded 83 times
_main.cfg
main
(1.3 KiB) Downloaded 72 times
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Campaign Not Working

Post by zookeeper »

So first it worked, then you changed something, and then it didn't work anymore? That means that whatever change you made was not correct. So what change did you make?
User avatar
Turuk
Sithslayer
Posts: 5283
Joined: February 28th, 2007, 8:58 pm
Contact:

Re: Campaign Not Working

Post by Turuk »

Mperies wrote:Ok right now I'm just trying to start by modifying that campaign Start of the War to be from the Troll's view of the situation, but I can't even get to the first scenario without getting an error message. Basically the only thing I've changed is the main and just the beginning of the first scenario.
So what error are you actually getting? Just the generic unknown scenario, or something else?

A quick glance at the downloaded files shows me that in 1_First_Encounter, you still have the map pointing to Start of the War:

Code: Select all

map_data="{~add-ons/Start_of_the_War/maps/1_First_Encounter.map}"
Mainline Maintainer: AOI, DM, NR, TB and THoT.
UMC Maintainer: Forward They Cried, A Few Logs, A Few More Logs, Start of the War, and Battle Against Time
Mperies
Posts: 4
Joined: January 26th, 2014, 6:05 am

Re: Campaign Not Working

Post by Mperies »

I'm just going to restart completely and do this using the Campaign-How-To. Thanks to everyone who helped. If I have any more problems I'll get back on this post.
User avatar
HaChol
Posts: 50
Joined: September 27th, 2013, 12:48 am

Re: Campaign Not Working

Post by HaChol »

The Tip about :

Campaign-How-To (A simple Campaign)

by Anonymissimus

was gorgeous !! Did mzself not come across so far.
Would'nt it be important information for a sticky note for campaing designers beginners ??
The fruit of a righteous man is the tree of life, and the wise man acquires souls.
And I said, I will perish with my nest, and I will multiply days as the chol.
User avatar
Turuk
Sithslayer
Posts: 5283
Joined: February 28th, 2007, 8:58 pm
Contact:

Re: Campaign Not Working

Post by Turuk »

HaChol wrote:Did mzself not come across so far.
Would'nt it be important information for a sticky note for campaing designers beginners ??
As mentioned, it's noted fairly prominently in the wiki, which most people would read if they didn't know where to start in making a campaign.
JaMiT wrote:On the other hand, Mperies mentioned having read everything on the website under "Create". Was that an implication that things mentioned there need not be mentioned here? Because A Simple Campaign is mentioned in the opening section of BuildingCampaigns...
Mainline Maintainer: AOI, DM, NR, TB and THoT.
UMC Maintainer: Forward They Cried, A Few Logs, A Few More Logs, Start of the War, and Battle Against Time
Mperies
Posts: 4
Joined: January 26th, 2014, 6:05 am

Re: Campaign Not Working

Post by Mperies »

Any time I try to run this code I get an error saying incorrect closing statement for scenario or that it can't find the first scenario which was working pefectly before I put a document with the following code in it in the scenario folder.

Code: Select all

#textdomain wesnoth-Edgeville

#define STORY
	[story]
		
		[part]
			background=maps/wesnoth.png
			show_title=yes
			{OLD_REST 525 290}
			{NEW_JOURNEY 507 286}
			{NEW_JOURNEY 488 284}
			{NEW_JOURNEY 467 281}
			{NEW_JOURNEY 447 281}
			{NEW_JOURNEY 428 279}
			{NEW_JOURNEY 407 278}
			{NEW_BATTLE 383 279}
		[/part]
	[/story]
#enddef

[scenario]
	id=02_Fleeing
	name=_"Fleeing" 
	next_scenario=03_The_Elves 
	map_data="{~add-ons/Edgeville/maps/02_Fleeing.map}"
	snapshot=no
	turns=40

	{SCENARIO_MUSIC breaking_the_chains.ogg}

	victory_when_enemies_defeated=no

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

	[side]

		side=1
		controller=human
		team_name=1 
		# wmllint: local spelling foo
		user_team_name= _ "Good" 

	
		type=Lieutenant
		id=Starloch 
		name=_"Starloch"
		gender=male
		canrecruit=yes
		unrenamable=true

		##:: Recruit List
				##:: Gold and Income
		{GOLD 100 75 50}
		{INCOME 10 5 3}
      [recall]
            id=Cassandra
	[/recall]
	[/side]

	##|| Events ||##

	##|| Starting Stuff


		##:: Objectives
		[objectives]
			side=1
			summary=_"final objectives:"
			[objective]
				description= _ "Escape deeper into the woods"
				condition=win
			[/objective]
			[objective]
				description= _ "Death of Starloch or Cassandra"
				condition=lose
			[/objective]
			{TURNS_RUN_OUT}
			[gold_carryover]
				bonus=yes
				carryover_percentage=40
			[/gold_carryover]
		[/objectives]
	[/event]

	[event]
		name=moveto
		[filter]
		x=30
		y=16
		id=Starloch
		[/filter]
		[endlevel]
		result=victory
		bonus=no
		{NEW_GOLD_CARRYOVER 40}
		[/endlevel]
	[/event]
	
[/scenario]
User avatar
James_The_Invisible
Posts: 534
Joined: October 28th, 2012, 1:58 pm
Location: Somewhere in the Northlands, fighting dark forces
Contact:

Re: Campaign Not Working

Post by James_The_Invisible »

You cannot use [recall] in [side]. Move it to a start or prestar event. And you miss opening [event] tag just after last [side].
User avatar
Turuk
Sithslayer
Posts: 5283
Joined: February 28th, 2007, 8:58 pm
Contact:

Re: Campaign Not Working

Post by Turuk »

Please put any WML you post within code tags (above the box when you're posting) as it compresses the code and makes it easier for people reading through the thread. I changed it for you this time.
Mainline Maintainer: AOI, DM, NR, TB and THoT.
UMC Maintainer: Forward They Cried, A Few Logs, A Few More Logs, Start of the War, and Battle Against Time
Post Reply