Extra tools: Difference between revisions

m Reverted edits by Zwelf (talk) to last revision by ZwelfBot
Tag: Rollback
Prepared the page for translation
Line 1: Line 1:
<languages/>
<translate>
'''''Extra tools''''' are available for running some non-gaming-related tasks, like map optimization by mappers, or debugging and testing by developers. These tools must be run from command-line interface (e.g. Command Prompt on Windows or Terminal on Linux) either by adding their containing directory to the PATH variable or by running directly from the containing directory.
'''''Extra tools''''' are available for running some non-gaming-related tasks, like map optimization by mappers, or debugging and testing by developers. These tools must be run from command-line interface (e.g. Command Prompt on Windows or Terminal on Linux) either by adding their containing directory to the PATH variable or by running directly from the containing directory.


== Getting the extra tools ==
== Getting the extra tools ==
Line 6: Line 9:


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.
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.


== List of extra tools ==
== List of extra tools ==


See below the list and description of the tools.
See below the list and description of the tools.


=== config_retrieve ===
=== config_retrieve ===
Line 18: Line 23:


''Available since: DDNet 9.0''
''Available since: DDNet 9.0''


=== config_store ===
=== config_store ===
Line 28: Line 34:


''Available since: DDNet 9.0''
''Available since: DDNet 9.0''


=== crapnet ===
=== crapnet ===
Line 34: Line 41:


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.
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.


=== dilate ===
=== dilate ===
Line 42: Line 50:


Note this works only in RGBA image files (e.g. PNG files). So, it will fail in e.g. JPEG files.
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 ===
Line 48: Line 57:


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.
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.


=== fake_server ===
=== fake_server ===
Line 54: Line 64:


Creates a fake server for testing.
Creates a fake server for testing.


=== map_convert_07 ===
=== map_convert_07 ===
Line 69: Line 80:


''Available since: DDNet 12.9''
''Available since: DDNet 12.9''


=== map_diff ===
=== map_diff ===
Line 81: Line 93:


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


=== map_extract ===
=== map_extract ===
Line 87: Line 100:


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


=== map_optimize ===
=== map_optimize ===
Line 99: Line 113:


''Available since:'' DDNet 15.5.4
''Available since:'' DDNet 15.5.4


=== map_replace_image ===
=== map_replace_image ===
Line 109: Line 124:
* 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


=== map_resave ===
=== map_resave ===
Line 117: Line 133:


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.
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.


=== packetgen ===
=== packetgen ===
Line 123: Line 140:


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


=== unicode_confusables ===
=== unicode_confusables ===
Line 135: Line 153:


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


=== uuid ===
=== uuid ===
Line 147: Line 166:


''Available since: DDNet 10.6.1''
''Available since: DDNet 10.6.1''
</translate>