Jump to content

Extra tools/de: Difference between revisions

From DDraceNetwork
Created page with "== Beschaffen der zusätzlichen Werkzeuge =="
FuzzyBot (talk | contribs)
Updating to match new version of source page
 
(19 intermediate revisions by one other user not shown)
Line 1: Line 1:
<languages/>
<languages />
 
'''''Zusätzliche Werkzeuge''''' sind für nicht-spiel-relevante Aufgaben wie Kartenoptimierungen von Mappern oder zur Fehlersuche und Testzwecken von Entwicklern. Diese Werkzeuge müssen über eine Kommandozeile (z.B Cmd auf Windows oder im Terminal auf Linux) entweder durch hinzufügen in die Umgebungspfad-variable oder durch direktes ausführen vom Verzeichnis ausgeführt werden.
'''''Zusätzliche Werkzeuge''''' sind für nicht-spiel-relevante Aufgaben wie Kartenoptimierungen von Mappern oder zur Fehlersuche und Testzwecken von Entwicklern. Diese Werkzeuge müssen über eine Kommandozeile (z.B Cmd auf Windows oder im Terminal auf Linux) entweder durch hinzufügen in die Umgebungspfad-variable oder durch direktes ausführen vom Verzeichnis ausgeführt werden.


<span id="Getting_the_extra_tools"></span>
<span id="Getting_the_extra_tools"></span>
<div class="mw-translate-fuzzy">
== Beschaffen der zusätzlichen Werkzeuge ==
== Beschaffen der zusätzlichen Werkzeuge ==
</div>
Diese Werkzeuge sind '''nicht''' im DDNet Grundspiel auf der [https://ddnet.org/downloads/ Downloadseite] enthalten. Abgesehen davon können zusätzliche Tools, die mit dem Mapping zusammenhängen, für verschiedene Plattformen auf der Download-Seite unter dem Namen „Graphics Tools“ heruntergeladen werden.


<div lang="en" dir="ltr" class="mw-content-ltr">
Diese und andere zusätzliche Werkzeuge (unten aufgelistet) finden Sie im [https://github.com/ddnet/ddnet DDNet Quellcode] unter [https://github.com/ddnet/ddnet/tree/master/src/tools src/tools].
These tools are '''not''' provided in the binary DDNet game in the [https://ddnet.org/downloads/ Downloads page]. Having that said, extra tools mapping-related can be download for different platforms in the Downloads page, under the name "Graphics Tools".
 
<span id="List_of_extra_tools"></span>
<div class="mw-translate-fuzzy">
== Liste der zusätzlichen Werkzeuge ==
</div>
 
Siehe unten die Liste und Beschreibung der Werkzeuge.
 
<span id="config_retrieve"></span>
<div class="mw-translate-fuzzy">
=== config_retrieve ====
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
config_retrieve ''map_datei''
These and other extra tools (listed below) can be found on the [https://github.com/ddnet/ddnet DDNet source code] under [https://github.com/ddnet/ddnet/tree/master/src/tools src/tools] directory.
 
Ruft die in einer DDNet-Kartendatei ''map_datei'' eingebettete Konfiguration ab und speichert sie in einer DDNet-Kartenkonfigurationsdatei mit demselben Dateinamen (z. B. „Kobra 4.map“ ergibt „Kobra 4.cfg“)
 
''seit DDNet 9.0 Verfügbar:''
 
<span id="config_store"></span>
<div class="mw-translate-fuzzy">
=== config_store ===
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
config_store ''map_datei''
== List of extra tools ==
 
Speichert die Konfiguration aus der Konfigurationsdatei einer Karte in der ''map_datei''.  Sowohl die Konfigurations- als auch die Kartendatei müssen denselben Dateinamen haben und im selben Verzeichnis liegen, andernfalls scheitert der Vorgang.
 
Wenn es keinen Unterschied zwischen der zu speichernden Konfiguration und der in der Karte eingebetteten Konfiguration gibt, wird der Vorgang mit der Meldung <code>configs coincide, not updating map</code> abgebrochen.
 
''seit DDNet 9.0 Verfügbar:''
 
<span id="crapnet"></span>
<div class="mw-translate-fuzzy">
=== crapnet ===
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
crapnet
See below the list and description of the tools.
 
Testet die Verbindung, indem eine Client-Server-Verbindung lokal festgelegt und ein ping zwischen ihnen ausgeführt wird. Meldet verworfene Pakete mit <code>dropped packet</code> und Erfolge mit <code>cfg = ''nummer'',</code> wobei ''nummer'' von 0 bis 2 variiert.
 
<span id="demo_extract_chat"></span>
<div class="mw-translate-fuzzy">
=== dilate ===
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div class="mw-translate-fuzzy">
=== config_retrieve ===
dilate ''bild_datei1'' [''bild_datei2'' ... ]
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div class="mw-translate-fuzzy">
config_retrieve ''map_file''
Es ist ein grafisches Werkzeug, vor allem nützlich für Mapper. es verhindert transparente Bereiche, um schwarze/weiße Umrisse um Ihre Bilder im Spiel zu verhindern und somit Überblendungs- und Mipmap-Probleme zu vermeiden. Siehe [http://wiki.polycount.com/wiki/Edge_padding Edge padding] für weitere Informationen.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div class="mw-translate-fuzzy">
Retrieves configuration embedded in a DDNet map file ''map_file'' and stores it in a DDNet map configuration file with same filename (e.g. "Kobra 4.map" returns "Kobra 4.cfg")
Beachte, dass dies nur in RGBA-Bilddateien (also PNG Dateien) funktioniert. Es wird also bei z.B JPEG Dateien fehlschlagen.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
''Available since: DDNet 9.0''
''Available since: DDNet 17.4''
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== config_store ===
===dilate===
</div>
</div>


  <div lang="en" dir="ltr" class="mw-content-ltr">
  <div lang="en" dir="ltr" class="mw-content-ltr">
config_store ''map_file''
dilate ''image_file1'' [''image_file2'' ... ]
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Stores configuration from a map's configuration file into the ''map_file''. Both configuration and map files must have the same filename in the same directory, otherwise the operation will fail.
It is a graphics tool, mainly useful for mappers. It takes care of transparent areas to prevent black/white outlines around your images ingame, therefore avoiding blending and mipmap issues. See [http://wiki.polycount.com/wiki/Edge_padding Edge padding] for more info.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
If there is no difference between the configuration to stored and the configuration embedded in the map, then operation will be canceled with message <code>configs coincide, not updating map</code>.
Note this works only in RGBA image files (e.g. PNG files). So, it will fail in e.g. JPEG files.
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
''Available since: DDNet 9.0''
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== crapnet ===
===dummy_map===
</div>
</div>


  <div lang="en" dir="ltr" class="mw-content-ltr">
  <div lang="en" dir="ltr" class="mw-content-ltr">
crapnet
dummy_map
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Tests connection by setting a client–server connection locally and running ping between them. Reports dropped packets with message <code>dropped packet</code> and successes with <code>cfg = ''number''</code>, where ''number'' varies from 0 to 2.
Creates a dummy, small empty map used for vanilla antispoof (<code>sv_vanilla_antispoof</code>). See [https://github.com/ddnet/ddnet/blob/a66379918832e5ad93332bbe0475394b156b5c24/src/engine/shared/network_server.cpp#L371] for more info.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== dilate ===
===map_convert_07===
</div>
</div>


  <div lang="en" dir="ltr" class="mw-content-ltr">
  <div lang="en" dir="ltr" class="mw-content-ltr">
dilate ''image_file1'' [''image_file2'' ... ]
map_convert_07 ''src_map_file'' ''dest_map_file''
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
It is a graphics tool, mainly useful for mappers. It takes care of transparent areas to prevent black/white outlines around your images ingame, therefore avoiding blending and mipmap issues. See [http://wiki.polycount.com/wiki/Edge_padding Edge padding] for more info.
Makes <code>''dest_map_file''</code> compatible with Teeworlds version 7.x that otherwise it would be compatible '''only''' with Teeworlds version 6.x. If successfully, it creates a valid 07-compatible destination map; otherwise, it returns one of the following:
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Note this works only in RGBA image files (e.g. PNG files). So, it will fail in e.g. JPEG files.
*an usage message if incorrect arguments are provided
*<code>failed to open source map</code> if an error happens when opening the source map
*<code>failed to open destination map</code> if an error happens when opening the destination map
*<code>error loading storage</code> if failed to open storage for some reason
*<code>failed to open image file</code> if error happens on opening PNG image
*<code>invalid image format</code> if incorrectly formatted PNG.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== dummy_map ===
''Available since: DDNet 12.9''
</div>
</div>


  <div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
dummy_map
===map_create_pixelart===
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Creates a dummy, small empty map to be used to start a server. See [https://github.com/ddnet/ddnet/blob/a66379918832e5ad93332bbe0475394b156b5c24/src/engine/shared/network_server.cpp#L371] for more info.
map_create_pixelart <image.png> <img_pixelsize> <input_map> <layergroup_id> <layer_id> <pos_x> <pos_y> <quad_pixelsize> <output_map> [optimize=0|1] [centralize=0|1]
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== fake_server ===
Creates a map with quad-based pixelart from an image.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
fake_server
Note: use destination layer tiles as a reference for positions and pixels for sizes.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Creates a fake server for testing.
Note: set img_pixelsize to 0 to consider the largest possible size.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== map_convert_07 ===
Note: set quad_pixelsize to 0 to consider the same value of img_pixelsize.
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
map_convert_07 ''src_map_file'' ''dest_map_file''
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Makes <code>''dest_map_file''</code> compatible with Teeworlds version 7.x that otherwise it would be compatible '''only''' with Teeworlds version 6.x. If successfully, it creates a valid 07-compatible destination map; otherwise, it returns one of the following:
Note: if image.png has not a perfect pixelart grid, result might be unexpected, manually fix img_pixelsize to get it better.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
* an usage message if incorrect arguments are provided
Options: optimize tries to reduce the total number of quads (default: 1).
* <code>failed to open source map</code> if an error happens when opening the source map
* <code>failed to open destination map</code> if an error happens when opening the destination map
* <code>error loading storage</code> if failed to open storage for some reason
* <code>failed to open image file</code> if error happens on opening PNG image
* <code>invalid image format</code> if incorrectly formatted PNG.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
''Available since: DDNet 12.9''
Options: centralize places all pivots at the same position (default: 0).
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== map_diff ===
===map_diff===
</div>
</div>


Line 145: Line 172:
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Compares two map files, reporting one of the follow:
Compares two map files, reporting one of the follow:
* no diff output, meaning the maps are the same
*no diff output, meaning the maps are the same
* <code>different layer numbers</code>, if one map has more layers than another
*<code>different layer numbers</code>, if one map has more layers than another
* <code>different tile layers</code>, if the number of layers is the same, but at least one layer is different
*<code>different tile layers</code>, if the number of layers is the same, but at least one layer is different
* lastly, the index and flags positions that differ.
*lastly, the index and flags positions that differ.
</div>
</div>


Line 156: Line 183:


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== map_extract ===
===map_extract===
</div>
</div>


Line 168: Line 195:


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== map_optimize ===
===map_find_env===
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
map_find_env <input_map> <env_number>
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
Finds quads using a specific envelope and prints their index and position to the console.
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
Note: returned quads positions are relative to their layers.
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
===map_optimize===
</div>
</div>


Line 192: Line 235:


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== map_replace_image ===
===map_replace_area===
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
map_replace_area <from_map> <from_x> <from_y> <to_map> <to_x> <to_y> <width> <height> <output_map>
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
Replaces an area of one map with an area from another map.
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
Note: use game layer tiles as a reference for both coordinates and sizes.
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
===map_replace_image===
</div>
</div>


Line 205: Line 264:
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Please note:
Please note:
* Both map filenames must be relative to user default DDNet folder
*Both map filenames must be relative to user default DDNet folder
* New image filepath can be absolute, or relative to the current directory
*New image filepath can be absolute, or relative to the current directory
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== map_resave ===
===map_resave===
</div>
</div>


  <div lang="en" dir="ltr" class="mw-content-ltr">
  <div lang="en" dir="ltr" class="mw-content-ltr">
map_resave ''map_file'' ''image_file''
map_resave ''source_map.map'' ''destination_map.map''
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
Reads the map ''source_map.map'' and writes it back to ''destination_map.map'' using the latest map format.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Updates the map file ''map_file.map'' with the provided file ''image_file''.
===packetgen===
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
packetgen
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
The error status 255 is returned if 1) a number of arguments different from 2 is provided, 2) if the ''map_file.map'' is not valid, or 3) if ''image_file'' is not a valid image file (e.g. it is a text file); otherwise, return 0.
Generates and sends network packets to 127.0.0.1:8303 (localhost, in default server port) to test communication with a local server instance.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== packetgen ===
===stun===
</div>
</div>


  <div lang="en" dir="ltr" class="mw-content-ltr">
  <div lang="en" dir="ltr" class="mw-content-ltr">
packetgen
stun ''address''
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
Sends [[wikipedia:STUN|STUN]] request to server and checks response.
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
===twping===
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
twping ''server''[:''port'']
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Generates and sends network packets to 127.0.0.1:8303 (localhost, in default server port) to test communication with a local server instance.
Measures ping to a teeworlds server by requesting the server information. ''port'' defaults to 8303.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== unicode_confusables ===
===unicode_confusables===
</div>
</div>


Line 254: Line 333:


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
''Available since: DDNet version 10.3.5''
''Available since: DDNet 10.3.5''
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
''New in DDNet version 12.9:'' Unicode 12.0 support and the tool name was renamed from ''confusables'' to ''unicode_confusables''.
''New in DDNet 12.9:'' Unicode 12.0 support and the tool name was renamed from ''confusables'' to ''unicode_confusables''.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== uuid ===
===uuid===
</div>
</div>



Latest revision as of 10:18, 8 January 2025

Zusätzliche Werkzeuge sind für nicht-spiel-relevante Aufgaben wie Kartenoptimierungen von Mappern oder zur Fehlersuche und Testzwecken von Entwicklern. Diese Werkzeuge müssen über eine Kommandozeile (z.B Cmd auf Windows oder im Terminal auf Linux) entweder durch hinzufügen in die Umgebungspfad-variable oder durch direktes ausführen vom Verzeichnis ausgeführt werden.

Beschaffen der zusätzlichen Werkzeuge

Diese Werkzeuge sind nicht im DDNet Grundspiel auf der Downloadseite enthalten. Abgesehen davon können zusätzliche Tools, die mit dem Mapping zusammenhängen, für verschiedene Plattformen auf der Download-Seite unter dem Namen „Graphics Tools“ heruntergeladen werden.

Diese und andere zusätzliche Werkzeuge (unten aufgelistet) finden Sie im DDNet Quellcode unter src/tools.

Liste der zusätzlichen Werkzeuge

Siehe unten die Liste und Beschreibung der Werkzeuge.

config_retrieve =

config_retrieve map_datei

Ruft die in einer DDNet-Kartendatei map_datei eingebettete Konfiguration ab und speichert sie in einer DDNet-Kartenkonfigurationsdatei mit demselben Dateinamen (z. B. „Kobra 4.map“ ergibt „Kobra 4.cfg“)

seit DDNet 9.0 Verfügbar:

config_store

config_store map_datei

Speichert die Konfiguration aus der Konfigurationsdatei einer Karte in der map_datei. Sowohl die Konfigurations- als auch die Kartendatei müssen denselben Dateinamen haben und im selben Verzeichnis liegen, andernfalls scheitert der Vorgang.

Wenn es keinen Unterschied zwischen der zu speichernden Konfiguration und der in der Karte eingebetteten Konfiguration gibt, wird der Vorgang mit der Meldung configs coincide, not updating map abgebrochen.

seit DDNet 9.0 Verfügbar:

crapnet

crapnet

Testet die Verbindung, indem eine Client-Server-Verbindung lokal festgelegt und ein ping zwischen ihnen ausgeführt wird. Meldet verworfene Pakete mit dropped packet und Erfolge mit cfg = nummer, wobei nummer von 0 bis 2 variiert.

dilate

dilate bild_datei1 [bild_datei2 ... ]

Es ist ein grafisches Werkzeug, vor allem nützlich für Mapper. es verhindert transparente Bereiche, um schwarze/weiße Umrisse um Ihre Bilder im Spiel zu verhindern und somit Überblendungs- und Mipmap-Probleme zu vermeiden. Siehe Edge padding für weitere Informationen.

Beachte, dass dies nur in RGBA-Bilddateien (also PNG Dateien) funktioniert. Es wird also bei z.B JPEG Dateien fehlschlagen.

Available since: DDNet 17.4

dilate

dilate image_file1 [image_file2 ... ]

It is a graphics tool, mainly useful for mappers. It takes care of transparent areas to prevent black/white outlines around your images ingame, therefore avoiding blending and mipmap issues. See Edge padding for more info.

Note this works only in RGBA image files (e.g. PNG files). So, it will fail in e.g. JPEG files.

dummy_map

dummy_map

Creates a dummy, small empty map used for vanilla antispoof (sv_vanilla_antispoof). See [1] for more info.

map_convert_07

map_convert_07 src_map_file dest_map_file

Makes dest_map_file compatible with Teeworlds version 7.x that otherwise it would be compatible only with Teeworlds version 6.x. If successfully, it creates a valid 07-compatible destination map; otherwise, it returns one of the following:

  • an usage message if incorrect arguments are provided
  • failed to open source map if an error happens when opening the source map
  • failed to open destination map if an error happens when opening the destination map
  • error loading storage if failed to open storage for some reason
  • failed to open image file if error happens on opening PNG image
  • invalid image format if incorrectly formatted PNG.

Available since: DDNet 12.9

map_create_pixelart

map_create_pixelart <image.png> <img_pixelsize> <input_map> <layergroup_id> <layer_id> <pos_x> <pos_y> <quad_pixelsize> <output_map> [optimize=0|1] [centralize=0|1]

Creates a map with quad-based pixelart from an image.

Note: use destination layer tiles as a reference for positions and pixels for sizes.

Note: set img_pixelsize to 0 to consider the largest possible size.

Note: set quad_pixelsize to 0 to consider the same value of img_pixelsize.

Note: if image.png has not a perfect pixelart grid, result might be unexpected, manually fix img_pixelsize to get it better.

Options: optimize tries to reduce the total number of quads (default: 1).

Options: centralize places all pivots at the same position (default: 0).

map_diff

map_diff map_file1 map_file2

Compares two map files, reporting one of the follow:

  • no diff output, meaning the maps are the same
  • different layer numbers, if one map has more layers than another
  • different tile layers, if the number of layers is the same, but at least one layer is different
  • lastly, the index and flags positions that differ.

If there is no difference between maps, returns 0; otherwise, returns 1.

map_extract

map_extract map_file [directory]

Extracts contents from map_file into the directory. If optional argument directory is not provided, extracts to the current directory.

map_find_env

map_find_env <input_map> <env_number>

Finds quads using a specific envelope and prints their index and position to the console.

Note: returned quads positions are relative to their layers.

map_optimize

map_optimize source_map_filepath [dest_map_filepath]

Optimizes the map file in the source_map_filepath given (see how it works) and stores the output in the given dest_map_filepath; if dest_map_filepath is unset, output path defaults to out/source_map_filename.map, stripping the path and the extension of the source file.

Note the name of the embedded images optimized is changed from originalname to originalname_cut_newSHA256 (where newSHA256 is the new sha256 of the embedded optimized image). It is renamed is to make clear it was optimized because this tool will make changes in the mapres used by the map file.

If failed to open source or target file, returns -1.

Available since: DDNet 15.5.4

map_replace_area

map_replace_area <from_map> <from_x> <from_y> <to_map> <to_x> <to_y> <width> <height> <output_map>

Replaces an area of one map with an area from another map.

Note: use game layer tiles as a reference for both coordinates and sizes.

map_replace_image

map_replace_image map_file1 map_file2 imagename image_file

Replaces the image imagename currently inside the map filename map_file1 with the image filepath image_file, and save into the map filename map_file2.map.

Please note:

  • Both map filenames must be relative to user default DDNet folder
  • New image filepath can be absolute, or relative to the current directory

map_resave

map_resave source_map.map destination_map.map

Reads the map source_map.map and writes it back to destination_map.map using the latest map format.

packetgen

packetgen

Generates and sends network packets to 127.0.0.1:8303 (localhost, in default server port) to test communication with a local server instance.

stun

stun address

Sends STUN request to server and checks response.

twping

twping server[:port]

Measures ping to a teeworlds server by requesting the server information. port defaults to 8303.

unicode_confusables

unicode_confusables string1 string2

Compares string1 with string2 and report if they are "confusable", i.e. if the characters are "equal" and could cause confusion. For this to work, the characters with accents or other things around them are considered the "confusable" with the base character. Therefore, aa and are confusable (á was considered as a), while aa and ab are not.

If they are confusable, it returns not_confusable=0, otherwise, returns not_confusable=1.

Available since: DDNet 10.3.5

New in DDNet 12.9: Unicode 12.0 support and the tool name was renamed from confusables to unicode_confusables.

uuid

uuid name

Prints uuid for the provided name.

The uuid system was implemented to be easily extended by independent authors without collisions, something that the old system – with increasing integers – did not allow. This works for engine and game messages, snapshot items and events.

Exits with error status 255 if name is not provided.

Available since: DDNet 10.6.1