wesnoth/data/tools/README

145 lines
4.2 KiB
Plaintext
Raw Normal View History

Tools for hacking or generating WML, maps, images, and sounds belong here.
2011-03-24 20:52:22 +00:00
Tools for sanity-checking the mainline campaigns and associated data
also belong here. Other utils are in utils/.
2008-02-09 00:18:30 +00:00
== Scripts ==
=== journeylifter ===
A program for converting campaigns to use trackplacer-format journey files.
All mainline campaigns have already been converted; this is for lifting UMC.
=== rmtrans ===
Remove nearly transparent pixels from images using GIMP. It currently affects
only one image at a time. Batch processing is available within GIMP, but it
would be useful to expand this to skip files where the pixels did not change.
2008-10-14 05:27:44 +00:00
=== trackplacer ===
2008-10-14 05:29:27 +00:00
A visual editor for journey tracks, the icon sequences that appear on
2008-10-14 05:27:44 +00:00
Wesnoth story screens.
=== wesnoth_addon_manager ===
Command-line client for uploading WML content to and downloading from
the add-on server.
2009-03-30 09:14:06 +00:00
=== wmlflip ===
Experimental tool that can hack a .cfg referring to a mapfile so that
all macros with X,Y coordinate pair arguments get their calls transformed
2011-03-24 20:52:22 +00:00
in a specified way. Now supports only flipping the map around the Y
2009-03-30 09:14:06 +00:00
axis, but provides a framework that should make other transformations
easy.
2008-02-09 00:24:18 +00:00
=== wmllint ===
This tool lifts WML from older dialects to current and performs sanity checks.
See the header comment of wmllint for a description and invocation options.
2009-03-30 09:14:06 +00:00
=== wmllint_gui ===
A simple GUI interface for wmllint, to aid WML developers frightened of
the command line.
2008-02-09 00:24:18 +00:00
=== wmlscope ===
A WML cross-reference checker. Normally you'll use this to list
unresolved symbols, if any. See the header comment of wmlscope for a
2008-02-09 00:24:18 +00:00
description and invocation options.
=== wmlmove ===
Use this tool to generate commands that will move a unit between
namespaces; campaign to core, core to campaign, or campaign to
campaign. See the header comment of wmlmove for a description and
invocation options.
=== wmlunits ===
List names of all units in mainline, either as a mediawiki table or
as HTML.
=== TeamColorizer ===
Map the magenta team-color patches in the input image to red in the
output image, copy the result to output. (This script lives under
unit_tree).
2008-03-21 09:31:43 +00:00
=== extractbindings ===
Extract and format a list of keystroke bindings from a theme file.
Presently this generates a table suitable for wiki inclusion.
=== terrain2wiki.py ===
2009-03-30 09:14:06 +00:00
A script to create the "Terrain Table" on the TerrainCodeTableWML wiki page.
Run this and splice the output into the wiki whenever you add a new
2009-03-30 09:14:06 +00:00
terrain type to mainline.
=== campaign2wiki.py ===
A script that generates general information about mainline campaigns and
outputs wiki-ready output
== Python API ==
=== wmltools.py ===
2011-03-24 20:52:22 +00:00
The main facility in this module is a cross-referencer class.
It also contains utility methods for working with the data tree.
2010-12-20 20:31:15 +00:00
See the header comment of wmltools.py for details
=== wmliterator.py ===
A WML codewalker class. Not a full parser, but that's useful because
2010-12-20 20:31:15 +00:00
it doesn't get confused by unbalanced macros; instead it lets you
walk through lines in a text file parsing out tags and elements
=== wmlparser.py ===
This python module contains code originally developed for CampGen - it contains
a general WML Parser written in Python, just like the Perl one. So if you want
to develop tools in Python instead of Perl and need a WML parser, it may save
some time.
The API currently is very sparsely documented, but I plan to extend this. In
general, wmlparser.py contains the WML Parser, which is used like:
parser = wmlparser.Parser(datapath)
Then:
parser.parse_file(filename)
or
parser.parse_stream(file)
or
parser.parse_text(string)
to set what to parse, and finally:
wmldata = parser.parse()
to read everything into a Python representation of the parsed data.
=== wmldata.py ===
This file has several utility methods defined to access and manipulate
WML data. Most of them will not be generally useful. An example:
for unit in wmldata.get_all("unit"):
print unit.get_text_val("id")
== Standalone use ==
2007-11-28 07:34:37 +00:00
=== wmlparser ===
If called standalone, wmlparser.py will parse whatever you give it and
dump back to stdout. For example:
python wmlparser.py -e {game.cfg} > game.dump
Should produce a nice several 100000 lines file of the complete configuration
with all included files and macros expanded to a single file.