# HG changeset patch # User Wuzzy # Date 1572402237 -3600 # Node ID 0705b1d3ed65417a2ecd2dda8ada7bc7097c93b3 # Parent 7904665da6d7993a1b4cf2d741bc20cd7e245474 Add campaigns page diff -r 7904665da6d7 -r 0705b1d3ed65 Campaigns.wiki --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Campaigns.wiki Wed Oct 30 03:23:57 2019 +0100 @@ -0,0 +1,81 @@ +#summary How to create campaigns + += Campaigns = +== Introduction == +A campaign is a series of missions that tell a story. Campaigns are played in singleplayer mode only. + +== Campaign files == +Campaigns are stored in `Data/Missions/Campaign/`, with `` being the campaign name. + +In this directory, the following files are used: + + * `campaign.ini`: Campaign mission list + * `*.lua`: A bunch of Lua scripts for the missions + +=== `campaign.ini` === +This is a file in the INI format. This lists the available missions. + + * No section: + * `MissionNum`: Number of missions + * `ResetRetry`: Unused + * `[Mission X]`: Configuration for mission `X`, where X is the mission number. Mission 1 is the first mission. + * `Name`: Human-readable mission name in English + * `Script`: Name of Lua script file to load for this mission + +=== The mission's Lua scripts === +There's one Lua script per mission. They work like singleplayer missions, see [Missions]. + +=== Preview image === +The preview image is displayed in the menu when you have selected the mission. +It must be a PNG image of size 314px×260px. + +The file must be saved in `Data/Graphics/Campaigns/`. The file name must follow this pattern: + +`@2x.png` + +Where `` is name of the mission script without the file name suffix. + +For example, the preview image for the mission script `mission1.lua` must have the name `mission@2x.png`. + +=== Localization === +Campaign title, mission titles and mission descriptions menu must be edited in the missions files in `Data/Locale`. The file name is `campaigns_.txt`. There is one file per language. E.g. `campaigns_en.txt` for English. Note that these files are supposed to contain the titles and descriptions of *all* campaigns on your computer. This makes these files unsuitable for sharing or inclusion into [HWPFormat HWP files], for example. + +This is the syntax: + +{{{ +.name="" + +-.name="" +-.desc="" + +-.name="" +-.desc="" +}}} + +And so on. + + * `` is the directory name of the campaign. Replace spaces with underscores here. + * `` is the human-readable campaign name. + * `` is the file name of the script of mission _x_ without file name suffix + * `` is the human-readable name of mission _x_ + * `` is the description of mission _x_ + +If something is, the campaign menu will derive the title from the directory/file names instead and shows no description. + +For more information about translating Hedgewars, see [Translations]. + +==== Example ==== + +Excerpt from `campaigns_en.txt`: + +{{{ +A_Classic_Fairytale.name="A Classic Fairytale" + +A_Classic_Fairytale-first_blood.name="Mission 1: First Blood" +A_Classic_Fairytale-first_blood.desc="Help Leaks a Lot to complete his training and become a proper hedgehog warrior. You will be trained in the art of rope, parachute, shoryuken and desert eagle." +}}} + +== Campaign progress == +Initially, only mission 1 is unlocked. To unlock more missions and to mark missions and the campaign as completed, you must set campaign variables. + +Read [ConfigurationFiles] to learn how campaign variables work. diff -r 7904665da6d7 -r 0705b1d3ed65 TableOfContents.wiki --- a/TableOfContents.wiki Mon Oct 28 15:29:26 2019 +0000 +++ b/TableOfContents.wiki Wed Oct 30 03:23:57 2019 +0100 @@ -25,6 +25,7 @@ * Gameplay * [GameStyles] * [Missions] + * [Campaigns] * Maps * [PresetMaps Image maps and mission maps] * [DrawnMapFormat Hand-drawn maps]