[wesnoth-commits] [wesnoth/wesnoth] 3a8dc9: trackplacer3 a utility to export and import tmx fi...

Steve Cotton noreply at github.com
Thu Nov 14 12:49:05 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 3a8dc9c361d8f5f54a764147cff3a81fbf0e4aed
      https://github.com/wesnoth/wesnoth/commit/3a8dc9c361d8f5f54a764147cff3a81fbf0e4aed
  Author: Steve Cotton <steve at octalot.co.uk>
  Date:   2019-11-14 (Thu, 14 Nov 2019)

  Changed paths:
    M changelog.md
    A data/tools/tmx_trackplacer
    A data/tools/wesnoth/trackplacer3/__init__.py
    A data/tools/wesnoth/trackplacer3/cfgfileformat.py
    A data/tools/wesnoth/trackplacer3/datatypes.py
    A data/tools/wesnoth/trackplacer3/tmxfileformat.py

  Log Message:
  -----------
  trackplacer3 a utility to export and import tmx files (#4365)

The python2 trackplacer included both the handling of the file format, and the
GUI application. This trackplacer3 is a library for the file format, without
the GUI.

The new tmx_trackplacer is a command-line tool for exporting the data to
Tiled's .tmx format, and re-importing it back to .cfg files, so that the GUI of
Tiled can be used to avoid reimplementing the GUI of Trackplacer in Python 3.

The implementation uses Tiled's Object Layers (not Tile Layers).  This allows
additional journey markers to be added with the "Insert Tile" tool, and
additional journeys to be added as new layers.

It can also read in a .cfg and then re-export it to a new .cfg file, to see if
the data is preserved. The format is chosen by the output filename.

The old trackplacer2 isn't removed in this commit - before removing it, I think
trackplacer3 needs some way to preview the animation.

----- Comments on the mainline campaigns: -----

AToTB, DM, LoW, NR and THoT will work with this. But:

Northern Rebirth's bigmap.cfg has a track RECOVERY whose STAGE1 starts with
an OLD_REST - that isn't handled by trackplacer, it must have been hand-edited.
That OLD_REST will be lost when read by either trackplacer2 or trackplacer3,
similarly the OLD_BATTLE of LoW's SAURIANS track will be lost.

Delfador's Memoirs SEARCH_STAGE1 is omitted from all subsequent parts of
SEARCH. Also in DM, SEARCH_STAGE3 has a point which is then moved in STAGE4
onwards - I guess a hand edit. Both of this will be overwritten if the file
is edited with either this tool or with the python2 trackplacer.

SotA's journey_chapter*.cfg files and WoV's bigmap.cfg file have some of the
trackplacer comments removed, they won't be handled by this tool, at least not
until better error handling is added.





More information about the Commits mailing list