Commit graph

100 commits

Author SHA1 Message Date
Subhraman Sarkar
ff81419ccf Update the help page entry for the Item tool
reflects the change that it is now possible to remove items.

(cherry-picked from commit 47642719bf)
2024-09-13 07:01:20 +05:30
Elvish_Hunter
98d0af2ca2 Silence several wmllint warnings 2024-08-31 23:11:47 +02:00
Pentarctagon
10997c39a3
Start giving the editor add-on level functionality. (#7719)
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.
2023-07-19 15:00:14 -05:00
Slayer95
36ed4641cd
wmlxgettext: Error out on unused #po, #po-override directives (#7573)
* 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.
2023-05-08 00:08:21 +02:00
doofus-01
381e95e6df
1.17 Terrain Help fixes (#7193)
* clean up SotA terrain aliases

* add help entry for terrain elevation in Map Editor topic
2022-12-26 05:13:55 -08:00
doofus-01
dc820341c5
1.17 raised terrain (#6975)
* floodfill high/low terrain

* stone and wooden transitions
2022-09-05 19:41:07 -07:00
Tommy
0418df9281 Modify most items in the map editor to submerge if placed on water
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.
2022-07-30 14:56:38 +12:00
Wedge009
8960e407e9 Editor: Add missing items and scenery (resolves #6719) 2022-05-27 10:11:45 +10:00
Steve Cotton
24f7d0d329 Fix a typo in the editor-help
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)
2022-05-07 20:18:51 +02:00
Steve Cotton
e359635bb2 Editor: document the magenta D and the special terrain overlays
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)
2022-01-25 12:32:33 +01:00
Elvish_Hunter
f14267db14 Silence a few wmlscope warnings 2022-01-07 10:59:07 +01:00
Steve Cotton
81ac9cc661 Scenario editor help: remove the warning about 1.14 bugs
The editor/help.cfg file was kept in sync between 1.14 and 1.16, it's now time
for 1.16-specific changes, starting with dropping this warning.
2021-05-19 06:36:29 +02:00
Steve Cotton
76036bba28 Editor help: make the named areas topic visible, make "to load ..." translatable
This corrects a pair of editing errors, thanks to Celerini for reporting them.

(cherry picked from commit e272e4824f)
2021-02-08 23:41:43 +01:00
Michal Žejdl
3c41e55c5b change User to Custom to unify the help with the game 2021-02-03 19:12:07 -06:00
Steve Cotton
a4711ebad9 Correct the editor help about loading editor-generated .cfg files
Somehow I forgot to test that it worked on 1.14.
2021-01-05 13:50:12 +01:00
Steve Cotton
56a8f7f773 Editor help: add some translation hints and a missing link 2020-12-30 15:01:47 +01:00
Steve Cotton
8aa4471d9a Add help topics for the Editor, as it stands in the 1.14 branch
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.
2020-12-30 13:39:07 +01:00
Charles Dang
24f3245cfe Why was [titlescreen_music] in editor/_main.cfg... 2020-12-14 06:47:08 +11:00
Pentarctagon
f39bd33899 Remove a few bits of never implemented editor features.
The sound source tool in particular, since showing a button to players whose only function is to tell them it's not implemented makes no sense.
2020-11-03 15:30:57 -06:00
Wedge009
e123956524 Minor prose corrections.
[ci skip]
2020-10-21 15:09:22 +11:00
Alexander van Gessel
e18ef37f1f
Fix typos and grammar. 2020-09-30 11:57:49 +02:00
gfgtdf
753643bf75
Update help.cfg 2020-07-19 23:38:51 +02:00
Severin Glöckner
e36889df7f wesnoth-editor: remove duplicated strings
[ci skip]
2020-01-03 01:22:24 +01:00
Steve Cotton
14284e88c3 Editor help: remove whitespace from ends of strings
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.
2019-10-18 10:22:58 +02:00
Steve Cotton
ed611f9438 Re-enable the editor help, and use it to document the keyboard modifiers (#4414)
... 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.
2019-10-08 19:22:34 +02:00
Iris Morelle
a6207f1642 Fix item names in the scenario editor not being localized
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]
2019-01-26 14:11:01 -03:00
Celtic Minstrel
703d0c3cf4 Fix erroneous/useless [event] in [titlescreen_music], [lobby_music], [editor_music]
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.
2018-10-23 22:38:19 -04:00
Severin Glöckner
2305281666 remove a duplicated space in a translatable string
...thiugh, in this case it has no effect.

[ci skip]

(cherry-picked from commit 4b7a6a98ec)
2018-10-07 03:22:13 +00:00
Celtic Minstrel
60d9bc27ae Fix #2894
(cherry-picked from commit 0f267d0ede)
2018-10-07 03:19:17 +00:00
Charles Dang
471c9e876a Addressed a large chunk of the whitespace issues from #2613
[ci skip]
2018-03-09 11:37:00 +11:00
Gregory A Lundberg
761f323f43 Fix editor help incomplete sentence.
Replace the sentence to make it clear the Starting Tool marks both the team leader, and named special, locations.

Closes #2085.

[ci skip]
2017-10-29 11:43:05 -05:00
Celtic Minstrel
308ad7de09 Improve editor groups interface
- 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
2017-05-11 21:51:42 -04:00
Celtic Minstrel
ddce21f9d0 The fill tool is not evil! 2017-03-06 20:32:06 -05:00
Hironori Fujimoto
168e514144 help(editor): fix duplication of text attribute 2017-03-04 16:58:20 +11:00
Charles Dang
dfabf72030 Revert "Remove multiplayer/ inclusion from editor"
This reverts commit 872444a28c.
2015-10-10 03:47:01 +11:00
Charles Dang
872444a28c Remove multiplayer/ inclusion from editor 2015-10-09 15:22:14 +11:00
Ignacio R. Morelle
9ca00bdac6 wmlindent pass 2015-04-07 21:07:30 -03:00
Charles Dang
9fb7a063fc Fixed a typo 2015-03-30 12:18:12 +11:00
Charles Dang
18932077ba Don't draw box around editor logo, and wrap text around it 2015-03-17 05:39:50 +11:00
Charles Dang
571999462f Corrected an incorrect brush name 2015-03-06 23:40:55 +11:00
Charles Dang
f4cf1c6ea6 'Map/Scenario Editor' -> 'Map and Scenario Editor' 2015-03-03 19:08:23 +11:00
Charles Dang
f8a2514763 Bunch of work on improving the editor help 2015-03-03 02:27:38 +11:00
Charles Dang
9e8645a068 Fixup b6b6bc12a6, additional cleanup 2015-03-01 13:50:05 +11:00
Charles Dang
b6b6bc12a6 Cleaned up editor help file a bit 2015-02-28 18:36:55 +11:00
Ignacio R. Morelle
e571ee9b7f Fix incorrectly-escaped WML quotes causing wmlxgettext to emit invalid pots 2015-01-23 16:21:27 -03:00
Charles Dang
fd63f49fe4 Some cleanup and formatting to the editor Overview topic. More TODO 2015-01-19 17:05:45 +11:00
Charles Dang
7a4b4fda82 Added extra newline before editor toplevel topic list for consistency 2015-01-19 16:07:53 +11:00
Charles Dang
e0bc25a701 Ran wmlindent on core 2015-01-18 03:25:49 +11:00
fendrin
ddfb600ffb Included two more icon images into the editor help section. 2014-10-19 09:47:13 +02:00
fendrin
302d53fca8 A rough framework for an editor help section.
Still contains a lot non-sense and stubs.
2014-10-16 03:11:00 +02:00