diff --git a/data/core/editor/help.cfg b/data/core/editor/help.cfg index eb785a1277c..3fa45dccfeb 100644 --- a/data/core/editor/help.cfg +++ b/data/core/editor/help.cfg @@ -303,18 +303,23 @@ Files created by the scenario editor omit the opening [scenario] and closing [/s One workflow is to create a separate WML file, also with the .cfg extension, which uses the WML preprocessor to include the editor-created file. This separate file contains both the [scenario] tag and any hand-edited WML such as events. With this workflow, the add-on’s file structure could look like this: -
text='If your add-on needs to support 1.14'
+
text='For Wesnoth 1.14'
• _main.cfg: ◦ use “{./scenarios}” to include the “scenarios” directory • maps/map_from_01.cfg ◦ this is the file created by the scenario editor -• scenarios/01_Forest.cfg - ◦ inside the [scenario] element, use “map_file="~add-ons/NAME_OF_ADD_ON/maps/map_from_01.cfg"” to load that file +• scenarios/01_Forest.cfg, instead of the opening [scenario] tag put in these four lines: + ◦ [scenario] + ◦ {~add-ons/NAME_OF_ADD_ON/maps/map_from_01.cfg} + ◦ [/scenario] + ◦ [+scenario] + +The first three of those lines insert the scenario-generated file inside a [scenario] tag. The ‘+’ sign on the fourth line means that two scenario tags will be combined, with attributes in the second one overriding attributes in the first one.
text='1.16 and later'
-If your add-on will only be used on 1.16 and later, there’s a new feature to avoid repeating the add-on’s name within the .cfg files: +If your add-on will only be used on 1.16 and later, there are new features to load .cfg files via map_file, and to avoid repeating the add-on’s name within the .cfg files. • _main.cfg: ◦ use “[binary_path]” to add add-on’s directories to the binary path, which makes “map_file” search the “maps” directory. @@ -322,7 +327,7 @@ If your add-on will only be used on 1.16 and later, there’s a new feature to a • maps/map_from_01.cfg ◦ this is the file created by the scenario editor • scenarios/01_Forest.cfg - ◦ inside the [scenario] element, use “map_file="~add-ons/NAME_OF_ADDON/maps/map_from_01.cfg"” to load that file>> + ◦ inside the [scenario] element, use “map_file="map_from_01.cfg"” to load that file>> [/topic] # wmllint: unbalanced-off # wmllint: markcheck on