diff --git a/manual.html b/manual.html index f0095fb..812b62a 100644 --- a/manual.html +++ b/manual.html @@ -30,11 +30,12 @@

Omgifol manual

5 Editors
5.1 Map editor
+5.2 UDMF map editor

Installation

-
  1. Install Python 3, which can be downloaded from http://python.org +
    1. Install Python 3, which can be downloaded from https://python.org
    2. Use pip to install Omgifol: pip install omgifol
    3. Or, if pip is unavailable, extract the "omg" directory in the Omgifol package into pythondir/Lib/site-packages (replace pythondir with the directory where Python is installed).
    @@ -91,7 +92,7 @@

    Omgifol manual

    Accessing lumps

    -

    Lumps are stored in groups. Each WAD holds a number of groups, representing different categories of lumps. Each group is an ordered dictionary; that is, it works just like a Python dict (https://docs.python.org/3/tutorial/datastructures.html#dictionaries) object but remembers in which order lumps were inserted. +

    Lumps are stored in groups. Each WAD holds a number of groups, representing different categories of lumps. Each group is an ordered dictionary; that is, it works just like a Python collections.OrderedDict object.

    All lumps are instances of the Lump class; see below for its documentation.

    To retrieve the sprite called CYBR1A from the WAD object a, do: @@ -118,6 +119,7 @@

    Omgifol manual

    colormaps Boom colormaps (between C markers) ztextures ZDoom textures (between TX markers) maps Map data + udmfmaps Map data (UDMF) glmaps GL nodes map data music Music (all lumps named D_*) sounds Sound effects (all lumps named DS* or DP*) @@ -198,7 +200,7 @@

    Omgifol manual

    .to_Image Return the image converted to a PIL image .translate Translate to another palette -

    For the argument lists used by these functions, refer to the code and the inline documenation in lump.py. +

    For the argument lists used by these functions, refer to the code and the inline documentation in lump.py.

    Flat works similarly to Graphic, but handles format conversions slightly differently.

    Sound, used to represent Doom format sounds, provides the following settable attributes: @@ -227,6 +229,7 @@

    Omgifol manual

  2. Textures for TEXTURE1/TEXTURE2/PNAMES
  3. MapEditor for maps +
  4. UMapEditor for maps in UDMF format
  5. All editors provide the following methods:

    @@ -248,6 +251,18 @@

    Omgifol manual

    m.vertexes[103].x += 1 wad.maps["E1M1"] = m.to_lumps() + +

    UDMF map editor

    +

    UMapEditor works similarly to MapEditor, except the attributes of map data are named based on how they appear in the TEXTMAP lump itself. See the UDMF specification for examples. +

    +

    UMapEditor can also import non-UDMF maps, and line specials will automatically be translated to their UDMF equivalents when necessary: +

    +
     # Load and automatically convert a Doom-format map
    + m = UMapEditor(wad.maps["E1M1"])
    +
    + # Load a UDMF-format map
    + m = UMapEditor(wad.udmfmaps["MAP01"])
    +

    Refer to the source code for more information.