Pendant qu'un scénario peut être utilisé pour créer une bataille simple à jouer avec vos amis, une campagne est un groupe de scénarios, rassemblés pour raconter une histoire. Les scénarios dans une campagne décrivent habituellement un lieu spécifique dévoilant une partie de l'histoire, à opposé avec les "arènes" multijoueurs.
Cette page considère que vous avez paramétrer votre extension avec un fichier _main.cfg simple, comme décrit ici (en), et va vous guider dans l'utilisation du tag [campaign], tout en prodiguant quelques conseils sur la création d'une histoire.
Note : A Simple Campaign par Anonymissimus est une extension créée pour aider les créateurs débutant pour leur première campagne. Vous pouvez le télécharger à partir du serveur d'extension pour votre version du jeu.
Mettre en place la campagne
Technically, a campaign is simply a string of scenarios with next_scenario=id keys in toplevel (see BuildingScenarios), where the value of id is in the key of the same name in toplevel. This allows each one to load the next. But how to begin playing? By setting up a [campaign] tag in your _main.cfg.
The [campaign] tag is like the campaign's "cover". It will display your work in the campaign selection dialog with a description, an image (as shown on the right), as well as allowing the user to select a difficulty level before beginning to play.
- It should be placed in your _main.cfg outside any preprocessor conditionals
- For the #ifdef conditional, you should use the format #ifdef YOUR_DEFINE_HERE (you may define one in [campaign]).
The full syntax of the [campaign] tag is documented in CampaignWML, and an example of a fully featured _main.cfg with one in use can be found on the BuildingCampaignsTheCampaignFile page. If you run into errors while putting things together, DebuggingCampaigns has a few tips.
Note: By default, you will find your campaign in the singleplayer selection menu. If you intend to create a multiplayer campaign, see MultiplayerContent for the required syntax amendments.
Designing the campaign
What follows is a collection of advice to aspiring campaign designers extracted from the Wesnoth forums. For a more in-depth treatment including heuristics for scenario and campaign balancing, see the Campaign Design How-To.
Start with Something Manageable
If you set out to make an epic campaign spanning the whole history of Wesnoth, you'll likely (although not necessarily) become bored or frustrated along the way somewhere and give up. It's much easier to start with a small story and add elements to it than it is to cut an epic down to the length of a haiku.
- Shade (author of The Rise of Wesnoth) wrote:
- "I started TRoW last April, even after it was scenario complete it was still eating all of my free time (Time not spent sleeping, at school / work, or with loved ones / friends) until mid-November... Even now there is still bugfixing and a couple of things I'd like to add... and keeping it up to date with the game engine and any new happenings on the WML front... so there is still quite a lot to keep you busy after you are done... The forums are littered with half finished epics... Before you commit to an epic think long and hard. I don't want to discourage you too much... But it is a lot of 'work' (& fun)."
What separates a campaign from a single scenario is the ability to tell a story. Consequently, what keeps people coming back for more is a good, interesting story mixed with good, interesting game play. If you have a good idea of where the story of your campaign is going when you start, the little pieces will fall into place much more easily. After all, it worked for Pixar!
- Scott (author of Liberty) wrote
- "Here is how I wrote Liberty:
- Write a rough story and plot
- Decide how many scenarios you want to have
- Divide the story between the scenarios so you can decide what will happen in each scenario:
- Where are you?
- Who are you fighting and why?
- What do you have to do in this scenario?
- Where does the hero want to go next?
- Decide on the "hook" for each scenario. There are a lot of different possible setups for scenarios, and if you want to avoid the boring repetition of "Kill the 2 enemy leaders" you can list interesting combinations of enemies, allies, shroud/fog, day/night effects, recruiting and terrain situations, etc. and pick a good mix to keep the combat interesting and fun.
- All of this has happened without doing any WML, but now you have enough to start coding."
The Campaign Design How-To has much more to say about this storyboarding phase of the process.
Don't be shy to post whatever you've created for others to look at. We all had to learn too, and there are many people on the Scenario and Campaign Development forum who are eager to help people learn.
- Turin (author of Eastern Invasion) wrote:
- "I'm working on a loyalist campaign now. I already have the basic plot. I am wondering if anyone wants to playtest my completed levels (I am done with two). Thus I want to know if I should just post the new files as attachments, or what. There are two map files, two scenario files, an image file, a unit file, and you have to change the game file to access the campaign from the 'campaign menu. So tell me how I should make them accessible."
There are too many quotations to pick one for this maxim. The best way to learn how to do something is to copy it from someone else's campaign. It's polite to ask first, and most campaign designers are happy to see small bits of their WML living in other campaigns. It's generally poor form to copy whole scenarios, maps, and campaigns, though. And especially poor form to do so without permission.