Creating a campaign

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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.
User avatar
Posts: 53
Joined: November 22nd, 2015, 3:54 pm
Location: Romania,Bucharest

Re: Creating a campaign

Post by Daniel17022002 »

I've decided to take a little break from the coding part and better continue with the story till I finish most ( if not all of it). Hope everyone's gonna enjoy it when everything is finished.
Posts: 22
Joined: May 3rd, 2011, 1:02 am
Location: [classifyed]

Re: Creating a campaign

Post by Destructinator »

beetlenaut wrote:
March 27th, 2017, 7:01 pm
You should use an #ifdef, but it's actually only necessary for making the campaign play well with others. What you didn't do is tell the game where your scenario is. You need a line like this: {~add-ons/Sample/scenarios} pointing to the folder where you put the scenario .cfg. "~add-ons" is a code that specifies the normal add-ons folder, wherever that is on the system. The curly braces mean "put all this stuff here", which in the context of a _main.cfg basically means "load this". You will eventually need lines like that for other folders too like custom units and macros.
I hope op doesn't mind me hijacking this to get my own advice but I'm doing it anyway!

So I have been trying to make a one scenario campaign but whenever I try selecting it I get an error that I took a screenshot of and attached.

It looks to me like it's saying the fact that I have a file called "My Games" as part of the location isn't working because of the space in the name but all my games stuff goes there automatically and if I renamed it my computer would just make a new file called "My Games" and I wouldn't have any data from my games. So yeah, idk how I screwed up or how to fix it.
User avatar
Posts: 2491
Joined: December 8th, 2007, 3:21 am
Location: Washington State

Re: Creating a campaign

Post by beetlenaut »

You shouldn't be trying to load anything with the full path. One of the reasons ~add-ons exists is to avoid having to worry about this exact problem. Apparently you used it correctly in _main.cfg, so do the same thing in the scenario file as well. (It is possible to include spaces in a macro call, but it's not necessary this time.)
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
Post Reply