The key word of course being "start". This PR changes the editor by default to work at the add-on level instead of in its own separate scenarios and maps directories. The goal is to make the editor more useful generally, but also specifically to make it much easier for players to distribute content they create using the editor:
* When they click the Editor button on the main menu, they will first be prompted to choose an add-on (or mainline), or to create a new add-on.
* When saved, if the scenario cfg is in the format previously generated by the editor, it will be converted to the new format and to use the [multiplayer] tag, the map_file attribute, and have the map data saved to a separate .map file.
* Relatedly, the editor now knows how to handle scenarios with the map_file attribute at all (which yes, does mean that currently wesnoth's editor doesn't know how to load its own mainline scenarios from their cfg).
* When opening the file chooser dialog, it now defaults to their selected add-on's directory.
If they choose to create a new add-on, then the editor creates for them:
* a basic but functional _main.cfg.
* an empty achievements.cfg (at this point mostly just so they might see it at some point and realize achievements exist, but ideally an achievements editor dialog could be created eventually).
* an empty _server.pbl file.
* a proper add-on directory structure containing the standard set of folders (maps/, scenarios/, units/, utils/, images/, etc).
Additionally, as an initial proof of concept for actually using this new add-on level functionality, a new Add-ons dropdown has been added to the editor's top bar, with a pbl editor option. This allows populating the blank _server.pbl file as well as editing an existing _server.pbl. There is also an option to change the add-on's ID, which will update the add-on's folder name and _main.cfg.
Misc other changes:
* The ability to add a recruit list to a side has been added back as a text box on the edit side dialog. While admittedly this doesn't allow players to select units from within the editor itself, it does set the actual side's recruit list (rather than a specific unit's extra_recruits), will show the user what the current recruit list for the side is (which the previously removed implementation didn't show anywhere), and correctly sets the faction as Custom so that the recruit list is used.
* When saving an old-style editor scenario, everything that can be triggered via [event] is either moved to a start event with a specific id attribute. Exceptions to this are [time], [side], and [side][village]. This is done so that the editor can know (for the most part) what things are actually its own to safely replace. As such, aside from the three previously mentioned tags plus the start event, any other WML added to a scenario by a UMC author is preserved rather than being overwritten - the editor no longer replaces the entire contents of the scenario file.
* The editor no longer writes out cfg files missing the top level scenario tag. If it doesn't find one or this is the first save of a new scenario it defaults to [multiplayer], but otherwise it will properly handle finding [test] or [scenario] as well.
* Requires that map files have the .map extension and scenario files have the .cfg extension. Also it assumes that .map files do actually only have map data in them and the .cfg files do actually have valid WML in them. I understand that this is not a limitation it had previously, but I don't think this is an unreasonable thing to require.
* Addresses part of #7667 by just not using regex for figuring out the map_data attribute value.
Additionally, it is not possible to change the currently selected add-on without going back to the main menu, clicking the editor button, and choosing a different add-on. This is intentional - I don't want to deal with having multiple add-ons open at the same time. If someone feels really strongly otherwise, then they can implement that themselves later.
* wmlxgettext: Error out on unused #po, #po-override directives
* wmlxgettext: Ignore out of domain #po, #po-override comments
* wmlxgettext: Properly clear pending #po, #po-override on textdomain switch
* Fix misplaced #po comments in DiD, SoF, TSG, Editor
Some of these ugly relocations can be reverted in or after #7570.
Many items where the effect does not make sense (or looks especially
bad) were passed over and will appear on top of water as previously.
This could use more definition by using submerge values other than
0 and 1 (numbers from 0.0 to ~2.5 work as it multiplies the base
unit submerge value) however there is a bug with blitting transparent
textures so it will not appear correct for the submerged part.
po: in wesnoth-help's `<header>text='The files: .map and .cfg' ...`,
the change is just a spelling correction of "scenaro" to "scenario".
(cherry picked from commit b8a37cb8ca)
This adds help documentation for:
* The deprecated terrain marker
* XO and UO movement overlays
* Castle, keep and village overlays
* Fake Shroud
(cherry picked from commit bd9444ef06)
This commit is on the master branch. There have been no changes at all to the
editor documentation in the 1.14 branch, while there have been several updates
to the master branch that would be good to backport if the help is displayed in
the 1.14 branch - therefore my plan is to get this set of changes reviewed in
the master branch, and then simply pull the entire file into the 1.14 branch
along with enabling the editor documentation (a small change to
data/core/help.cfg, as done in commit
ed611f9438).
A couple of warnings about the scenario mode being buggy are added to the
user-visible text, find these by looking for <bold> tags within the text.
Note: this does not include a fix for #4484, that a double-quote in a _<< >>
delimited string causes a broken msgid. Wondering whether to remove that from
this text, but would prefer to add the feature to wmlxgettext.
Follows the comments in #4480, about how to handle whitespace at the beginning
and end of translatable strings.
This is text that was added after the last pot-update, so updating it
again now will hopefully be before the translators start on it. Some
text that was split into paragraphs is now combined in to one block,
other parts are still split but with non-translatable whitespace; the splits
will hopefully separate the scenario editor parts which are going to change
again before 1.16.0.
The wmlindent override is because the logic for multiline strings isn't working
for << >> delimited strings.
... with the idea that these pages will either be improved or hidden again
before 1.16.0. I think the terrain-editor part will be good enough to stay in
1.16, but the scenario editor part needs to be updated by someone familiar with
it.
This puts the two tips that are currently in https://wiki.wesnoth.org/MapEditor
in to the in-game text.
data/core/editor/items.cfg defines the names for the items. The file is
included by data/core/editor/_main.cfg, which has a #textdomain binding
to wesnoth-editor at the top. The strings end up bound to that
textdomain by the game, but wmlxgettext doesn’t have any way to see this
so it binds them to the default textdomain instead, which is wesnoth,
not wesnoth-editor. The game ends up looking for the strings in
wesnoth-editor instead.
The easiest solution right now is to explicitly bind items.cfg to the
wesnoth textdomain so as to not require moving catalogue entries in the
po files around to wesnoth-editor. It really should've been
wesnoth-editor in the first place but it's too late to fix that now
without giving translators a migraine. It's a pity either way given how
useless the scenario editor is in practice.
[ci skip]
The playlist macros set the music list twice, once before the
story screen and again in prestart, but the order of tracks is different.
This means that the track order at the titlescreen and in the lobby is now the same
as the track order in a scenario using the default playlist, which previously was not the case.
Similarly, the track order in the editor is now the same as the track order
in a scenario using the full playlist.
Whether that actually matters? I have no idea. I doubt it.
In any case, as of this commit, there are no schema validation errors
at the title screen, when entering the MP Create screen, or in the map editor.
- Load group icons from the binary path
This was already half supported due to moving to GUI2.
- [editor_group] deprecated in favour of [terrain_group]
- Don't force a prefix on the icon path (still forces a suffix though)
- [race]editor_icon allows setting the icons for race groups
- Mark the core [item_group]s as core