(Almost) all valid tags (tag names) are listed in alphabetical order in the right panel on all WML Reference pages, but keep in mind that most of them are only valid within a certain context.Important syntax information – omit at your own risk unless you read SyntaxWML or the other tutorial. In this case the tag name is campaign and it means that everything inside describes a single campaign. All tags must have both opening tag and closing tag, and the closing tag is always the same as opening tag but with / (slash) before the name. In the last line there's also a closing tag. However, it will show an error "Failed to load the scenario" if we try to start. You can now run the game and see the following entry in campaigns menu: It's just four lines that tell the campaign that there exists a campaign named WML Tutorial.
id = WML_Tutorial name = _"WML Tutorial" If using VS Code, it's advisable to open the whole add-on folder and use it as a workspace.
Windows notepad is theoretically sufficient, but the author strongly recommends Visual Studio Code with WML add-in, alternatively Notepad++, preferably with imported WML language definition. Now inside create a file _main.cfg (the filename has to be exactly like that), then open it with your preferred code editor. Important note: after making any changes in your add-on, save all modified files first, then reload Wesnoth either by closing and running it again or by clicking f5 in the main menu. Pick a folder name that refers to your add-ons's name, it's often the same as in id below. In this tutorial we'll create a folder named WML_Tutorial. It's customary that it starts with a capital letter and advisable that it has no spaces – use _ (underscores) or PascalCase instead. Following screenshot is for 1.16.0 version: