Skip to content
Pyogenics edited this page Oct 2, 2024 · 3 revisions

Tanki Online XML map format.

Versions

Tanki Online has used multiple different XML formats for maps over time with many different and similar features. All maps start with the map root tag and usually have a version attribute:

<map version="myMapVersion">
    <!-- Version specific data -->
</map>

version 1.0

Exportable by AlternativaEditor.

<map version="1.0">
    <static-geometry></static-geometry>
    <collision-geometry></collision-geometry>
    <spawn-points></spawn-points>
    <bonus-regions></bonus-regions>
    <special-geometry></special-geometry>
    <dom-keypoints></dom-keypoints>
    <ctf-flags></ctf-flags>
</map>

static-geometry

Contains props.

<static-geometry>
  <prop library-name="Village Builds" group-name="default" name="Village House 1">
    <rotation>
      <z>0.000000</z>
    </rotation>
    <texture-name>OnDirt</texture-name>
    <position>
      <x>-3000.000</x>
      <y>3500.000</y>
      <z>0.000</z>
    </position>
  </prop>
</static-geometry>

collision-geometry

Map collision data; it stores triangles, planes and boxes.

<collision-geometry>
  <!-- triangle -->
  <collision-triangle id="0">
    <v0>
      <x>-174.167</x>
      <y>-100.000</y>
      <z>0.000</z>
    </v0>
    <v1>
      <x>125.833</x>
      <y>-100.000</y>
      <z>0.000</z>
    </v1>
    <v2>
      <x>48.333</x>
      <y>200.000</y>
      <z>0.000</z>
    </v2>
    <position>
      <x>-0.000</x>
      <y>-14225.833</y>
      <z>1300.000</z>
    </position>
    <rotation>
      <x>1.570796</x>
      <y>0.000000</y>
      <z>1.570796</z>
    </rotation>
  </collision-triangle>
  <!-- plane -->
  <collision-plane id="0">
    <width>500.000</width>
    <length>145.000</length>
    <position>
      <x>-250.000</x>
      <y>-14250.000</y>
      <z>1500.000</z>
    </position>
    <rotation>
      <x>0.000000</x>
      <y>0.000000</y>
      <z>-3.141592</z>
    </rotation>
  </collision-plane>
  <!-- box -->
  <collision-box id="0">
    <size>
      <x>1300.000</x>
      <y>800.000</y>
      <z>777.708</z>
    </size>
    <position>
      <x>-2749.997</x>
      <y>3499.998</y>
      <z>388.854</z>
    </position>
    <rotation>
      <x>0.000000</x>
      <y>0.000000</y>
      <z>0.000000</z>
    </rotation>
  </collision-box>
</collision-geometry>

spawn-points

Stores spawn points, supported types are: dm, blue, red, dom-blue, dom-red.

<spawn-points>
  <spawn-point type="dm">
    <rotation>
      <z>0.000</z>
    </rotation>
    <position>
      <x>-250.000</x>
      <y>3750.000</y>
      <z>0.000</z>
    </position>
  </spawn-point>
</spawn-points>

bonus-region

special-geometry

dom-keypoints

version 1.0.Light

Exportable by AlternativaEditor, exact same as 1.0 except it doesn't support special geometry objects.

version 2.0

Uses an index based system which defines objects once and then references them by index instead of having many copies; this version also supports lightmapping.

version 3.0

Similar to version 2.0 but without lightmaps, exportable by AlternativaEditor.

version 4.0

Used for some tutorial levels.