How to write scenarios
The easiest way to start is to copy one of the existing scenarios (be it clash or coop) and edit it. However, there is a set of predefined templates you can use as a fresh start.
Common guidelines
-
New scenarios are contributed to the Draft Book (in the
draft-scenarios/
directory). -
Each scenario type has its own root directory where it belongs:
coops
,clash
,campaigns
. Apart from adding the scenario itself, you have to register it in the directory'smain.tex
. -
Every scenario needs an image (the one to the left of the title), map images generated by the map editor, and map files exported as a backup from the same tool. See below for details.
Best practices
-
Try to contain your PRs to a single scenario at a time. If you have multiple scenarios to add, create a PR for each of them.
-
Always add screenshots of your scenario to the PR. You can use the screenshot script to generate them.
-
If you're updating an existing scenario, create comparison images using the compare pages script.
-
To compile your scenario quickly, use
-s
option with the build script. For instance, if your scenario is called "Dances with Dwarves", you can runtools/build.sh -s 'dances with'
to build only your scenario instead of the whole book.
Solo Campaign
Your first scenario should start with the following line that adds a record to the table of contents:
\cleardoublepage\phantomsection\addcontentsline{toc}{section}{\protect\numberline{} {} {} {} {}<Campaign Name Here>}
The \addscenariosection
has to set its default parameter to subsection
to appear correctly in table of contents. Other game types (Clash, Alliance, Cooperative) don't need the extra parameter.
Maps
-
Use the map generator to create your maps.
-
Always export the final map from the map generator and store it in a new file in
assets/map-files
. -
Crop your map file to content.