Difference between revisions of "BuildingScenarios"

From The Battle for Wesnoth Wiki
(See Also)
Line 16: Line 16:
 
[[BuildingScenarios|Building Scenarios]]
 
[[BuildingScenarios|Building Scenarios]]
 
:* '''[[BuildingScenariosSimple|Simple]] - [[BuildingScenariosIntermediate|Intermediate]] - [[BuildingScenariosAdvanced|Advanced]]'''
 
:* '''[[BuildingScenariosSimple|Simple]] - [[BuildingScenariosIntermediate|Intermediate]] - [[BuildingScenariosAdvanced|Advanced]]'''
:* [[BuildingScenariosSamples|Sample Code]] - Basic sample code
 
:* [[BuildingScenariosShroudData|SHROUD_DATA Tutorial]] - A tutorial on shroud_data
 
 
:* [[BuildingScenariosBalancing|Balancing]] - How to balance your scenario
 
:* [[BuildingScenariosBalancing|Balancing]] - How to balance your scenario
 
</div class="navtemplate">
 
</div class="navtemplate">
Line 55: Line 53:
  
 
<b>NOTE: Scenario-specific content will not be saved unless you select the <i>File -> Save Scenario</i> option. Otherwise, you will simply get a map file.</b>
 
<b>NOTE: Scenario-specific content will not be saved unless you select the <i>File -> Save Scenario</i> option. Otherwise, you will simply get a map file.</b>
 +
 +
== Building your scenario ==
 +
 +
Creating a scenario is no simple task. Generally, you should have a premise mapped out for the scenario before you begin. Who will your protagonists face? What events will occur? How long will it be? You might decide to revise your plans as you code and test them. It will generally take many iterations of writing, coding, and playtesting until your scenario reaches a product you are satisfied with.
 +
 +
A discussion on tweaking and balancing your scenario to make it more fun is found on the [[BuildingScenariosBalancing|Balancing]] page. ESR has more handy tips in his [http://catb.org/~esr/wesnoth/campaign-design-howto.html Campaign Design How-To] article, and as mentioned before, don't hesitate to ask for help in the in the [http://forums.wesnoth.org/viewforum.php?f=23 WML Workshop].
 +
 +
A handy walkthrough of the code of a scenario, line-by-line, is available on these three pages:
 +
 +
{{BuildingScenariosNav}}
  
 
== See Also ==
 
== See Also ==

Revision as of 12:07, 21 February 2014

wesnoth-1.11.8-1-175.jpg

The Elves Besieged

Wesnoth scenarios are the individual levels within the game. Or they can be advanced multiplayer maps, with extra characters and items and such. Each scenario contains two files. First is the map itself, this is described in BuildingMaps. The second is the config file. This configuration file is used to describe everything about the scenario. Both of the files are ascii and can be edited in any standard text editor (vi, notepad, etc.) If you decide to use a wordprocessor, please make sure you remember to Save As text (preferably with a .cfg extension).

This document is split into several sections, starting with a basic tutorial and moving into more complex techniques. From the information contained within this document you should have all the knowledge to create Wesnoth scenarios.

Remember that you can use all of the standard scenario files for reference. Sometimes an example is what you really need anyways. Between the campaigns included with the distribution, probably a lot of the game engine features have been used.

If you still don't understand something or can't get it to work, you can ask for assistance in the WML Workshop.

The Wesnoth Markup Language

Scenarios are written in the Wesnoth Markup Language, a custom language written specially to work with the game. It sports a relatively simple tag/key-based syntax. A complete guide to the WML syntax can be found on the SyntaxWML page.

Quick Tag Index

Below follows an index of tags WML supports, with descriptions on their usage and individual tag keys.

Sample Code

A nice collection of simple beginner code to look at is documented on the Samples page

Scenarios and the Map Editor

wesnoth-1.11.8-5-175.jpg

Scenario Data

As of Wesnoth 1.12, the Map Editor has become more fully featured, and includes options to define more basic scenario-related content for your scenario, such as name, unit placement, graphical items, time of day schedules, etc, without having to manually write the code yourself. However, the editor cannot create more complex WML. Those interesting snippets still have to be written by hand. These functions are most useful for creating a simple scenario from a map, or streamlining your workflow in creating a more complicated scenario.

NOTE: Scenario-specific content will not be saved unless you select the File -> Save Scenario option. Otherwise, you will simply get a map file.

Building your scenario

Creating a scenario is no simple task. Generally, you should have a premise mapped out for the scenario before you begin. Who will your protagonists face? What events will occur? How long will it be? You might decide to revise your plans as you code and test them. It will generally take many iterations of writing, coding, and playtesting until your scenario reaches a product you are satisfied with.

A discussion on tweaking and balancing your scenario to make it more fun is found on the Balancing page. ESR has more handy tips in his Campaign Design How-To article, and as mentioned before, don't hesitate to ask for help in the in the WML Workshop.

A handy walkthrough of the code of a scenario, line-by-line, is available on these three pages:

See Also