Working Campaign Tutorial?

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
Marionette
Posts: 6
Joined: September 12th, 2008, 4:02 am

Working Campaign Tutorial?

Post by Marionette »

I apologize if this is in the wrong section, but as it deals primarily with the WML used in the campaigns, I have guessed this forum would be at least a safe bet.

That being said, is there any place where there exists a tutorial that details how to create a working campaign? I've been looking around the wiki for the better part of the day, and while there exists a large amount of information there, much of it is heavily scattered or appears to be incomplete.

The most common sections of the wiki I've seen linked to both in the forum, and on the wiki itself, show how to create snippets and smaller sections of a campaign, but they do not have anything that would actually work. Unfortunately, attempting to piece together the rest of the information found in the wiki with the existing tutorials is arduous, at best, and attempting to compare what I've read within the main-line and user-generated campaign data is quite difficult when one doesn't quite know what one is looking at.

I apologize if such exists and is easily located -- my searches have not yet revealed one -- and if there is, would anyone be willing to point me in the general direction of such a tutorial? Even a suggestion of search terms would be useful.

Thank you!
Marionette
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Working Campaign Tutorial?

Post by zookeeper »

No, there isn't one. What I usually recommend is to download Attack of the Undead from the add-on server (1.4.x), and start changing it to what you want. It's a really minimalistic campaign, almost like a campaign template. There's only one thing it does ackwardly, and that's how the side(s)/leaders are setup in the first scenario.
Marionette
Posts: 6
Joined: September 12th, 2008, 4:02 am

Re: Working Campaign Tutorial?

Post by Marionette »

I will look into that. Thank you for your reply!
opensourcejunkie
Posts: 547
Joined: August 11th, 2008, 3:19 pm

Re: Working Campaign Tutorial?

Post by opensourcejunkie »

I'm actually working on a campaign template myself as a side project. It isn't complete yet, but you're welcome to it, if you like. As it turns out, this type of problem is one of the most common problems I read about on this forum. Sadly, getting a campaign to work in the first place is one of the most difficult tasks for someone new to WML.

So again, it's not complete, but it will give you a basic, working campaign that you can tweak to your own needs.

P.S. When I do officially produce a version of it, check out the new version, as it will have some important, added instructions that are not currently in this version.
Attachments
A_Simple_Campaign.zip
(16.5 KiB) Downloaded 361 times
what if the Bible's claims about Christ depicted accurate, verifiable history? given some research, you might be surprised at the evidence...
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Working Campaign Tutorial?

Post by zookeeper »

opensourcejunkie wrote:I'm actually working on a campaign template myself as a side project. It isn't complete yet, but you're welcome to it, if you like. As it turns out, this type of problem is one of the most common problems I read about on this forum. Sadly, getting a campaign to work in the first place is one of the most difficult tasks for someone new to WML.

So again, it's not complete, but it will give you a basic, working campaign that you can tweak to your own needs.

P.S. When I do officially produce a version of it, check out the new version, as it will have some important, added instructions that are not currently in this version.
I can't but point out that the preprocessor hell of your _main.cfg is something I'd never want to expose any newbie to. Basic [campaign] WML is so simple in its raw form (except for difficulty_descriptions=) that I really see no need to try to hide its workings behind half a dozen custom macros the use of which will require just as much, if not more, learning.

Not to mention preprocessor stuff is something many people seem to have serious difficulties to understand, unlike basic expanded WML which is usually about as easy to understand as it gets.
Marionette
Posts: 6
Joined: September 12th, 2008, 4:02 am

Re: Working Campaign Tutorial?

Post by Marionette »

Well, I will attempt to use the template, none-the-less, as altering the Attack of the Undead files leads to the entire game crashing while the campaign is loading (just as it had done with the WML I had written previously).

Should worse be born to worst, I will be learning a little bit about macros, it will seem.

Thank you, OpenSourceJunkie.
opensourcejunkie
Posts: 547
Joined: August 11th, 2008, 3:19 pm

Re: Working Campaign Tutorial?

Post by opensourcejunkie »

I can't but point out that the preprocessor hell of your _main.cfg
hang on, dude - I said it wasn't finished. I was just using an old macro set of mine for ease of development purposes, sheesh.

The initial defines, however, I am keeping in. I find that the major problem that newbies run into occurs when they try to accomplish everything in one try. Separating it out into separate, distilled tasks will (hopefully) make it easier for them to dip into.

But, if it turns out more confusing than it should be, then I can certainly take it all out.

Edit:
Not to mention preprocessor stuff is something many people seem to have serious difficulties to understand, unlike basic expanded WML which is usually about as easy to understand as it gets.
Yeah, it's true. I wish that somehow campaign creation could be done without having to touch preprocessor stuff. But in the current state of affairs, we have (at a bare minimum), a campaign ifdef, a bunch of file inclusion madness (and it is a rare newbie who knows what an @ symbol is for, let alone knows to put one in), a bunch of wierd textdomain stuff, and a couple of defines that are actually created by WML itself instead of normal #define statements. I see a greater variety of preprocessor tricks in a simple _main.cfg than any other sort of file I've written in. It's a sad, steep learning curve for the newbie.

So, I'm able to mitigate some of the madness by using basic macros; I guess I figure that if a newbie can get that skill down, I can guide him/her through the rest with minimal pain. It's an experimental way of teaching WML, and I'll be interested to see if it succeeds, or flops.
Last edited by opensourcejunkie on September 12th, 2008, 5:27 pm, edited 2 times in total.
what if the Bible's claims about Christ depicted accurate, verifiable history? given some research, you might be surprised at the evidence...
opensourcejunkie
Posts: 547
Joined: August 11th, 2008, 3:19 pm

Re: Working Campaign Tutorial?

Post by opensourcejunkie »

@marionette: I worked some more on it over the last few hours, and I think I have it to a somewhat more bearable (*cough*, zookeeper ;-) format. Moreover, each define has an explanation accompanying it which delineates how to successfully alter it.

If it's any help, let me know. If it's terrible, let me know as well, as well as how to improve upon it. Or, if you already got your campaign working and are moving on, then feel free to ignore this updated version :)

hope this helps,
--OSJ
Attachments
A_Simple_Campaign_0_0_1.zip
(23.07 KiB) Downloaded 390 times
what if the Bible's claims about Christ depicted accurate, verifiable history? given some research, you might be surprised at the evidence...
Marionette
Posts: 6
Joined: September 12th, 2008, 4:02 am

Re: Working Campaign Tutorial?

Post by Marionette »

As it turns out, my crash issue has apparently been caused by the lack of starting positions defined within the actual game map. I had thought that they were supposed to be defined within the scenario .cfg file, though it would appear they are not.

The game no longer crashes, and the various templates and advice have been very helpful! It works well, now, and I am rather surprised at the sense of accomplishment (I am a poor programmer, though WML is not exactly a difficult language).

(My issue had turned out to be related to the lack of actual starting positions defined on the map itself, as I had been under the misunderstanding that the starting positions were set by the x and y keys within the scenario file. Thank you, OSJ, as the note of the coordinates being irrelevant on your own scenario file is what prompted me to compare maps.)

Thank you again, ZooKeeper and OpenSourceJunkie, for your advice with the templates and scenario research suggestions! They have been most helpful!
opensourcejunkie
Posts: 547
Joined: August 11th, 2008, 3:19 pm

Re: Working Campaign Tutorial?

Post by opensourcejunkie »

Hey, I'm glad things worked out! Hope the campaigning prgresses well for you :)

--OSJ
what if the Bible's claims about Christ depicted accurate, verifiable history? given some research, you might be surprised at the evidence...
Diaeresis
Posts: 2
Joined: October 25th, 2008, 3:18 am

Re: Working Campaign Tutorial?

Post by Diaeresis »

Thank you, opensourcejunkie. Your Simple_Campaign is exactly what I have been searching for!

After you complete it, the developers should make it official and place it somewhere easier to find than the forums.

It would be best if the mainline distribution had a campaign included called Make Your Own Campaign, a working template like yours, that new WML users could experiment on.
opensourcejunkie
Posts: 547
Joined: August 11th, 2008, 3:19 pm

Re: Working Campaign Tutorial?

Post by opensourcejunkie »

hey, I'm glad you like it! I'm actually working (in my off time) on a campaign creation tutorial on the wiki, focusing on editing A Simple Campaign. Did you have trouble with all of the macro business, or was it all right?
--OSJ
what if the Bible's claims about Christ depicted accurate, verifiable history? given some research, you might be surprised at the evidence...
Diaeresis
Posts: 2
Joined: October 25th, 2008, 3:18 am

Re: Working Campaign Tutorial?

Post by Diaeresis »

Macros? I don't think so. I just unzipped it to my userdata folder, and it appeared on the campaigns list.
I am now playing with events and filters.
opensourcejunkie
Posts: 547
Joined: August 11th, 2008, 3:19 pm

Re: Working Campaign Tutorial?

Post by opensourcejunkie »

you didn't even rename it? I can't think of too many people who want to name their campaign "A Simple Campaign", but hey, whatever works ;-). Glad it helped.

--OSJ
what if the Bible's claims about Christ depicted accurate, verifiable history? given some research, you might be surprised at the evidence...
Post Reply