Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Contribution Scores
Random page
Help about MediaWiki
External Links
Homepage
Discord
Forum
Funding
DDraceNetwork
Search
Search
English
Create account
Log in
Personal tools
Create account
Log in
Export translations
Translate
English
Language statistics
Message group statistics
Export
Tools
Tools
move to sidebar
hide
Actions
Language statistics
Message group statistics
Export
General
Special pages
Printable version
Settings
Group
Aled
Android Tutorial for DDNet 9.3.1
Automapper
Binds
Block
Bomb
Catch16
Category:Templates
Collision
Common Terminology
DDRace
Death
Deepfly
Demos
Development
Drag Part
Dragger
Dummy
Dummy drag
Edge jump
Extra tools
FAQ
FNG
Foot
Freeze
Getting started
GFX Troubleshooting
Gores
Grenade
Hammer
Hammerfly
Hammerhit
Hook
Hookfly
How to contribute
Infection
Jetpack
Jump
KoG
LAN Server
Laser
Main Page
Map
Mapping
Monster
Movement
Ninja
Pistol
Pseudofly
Ranks and Points
Resources
Rocketfly
Settings and Commands
Shotgun
Shotgunfly
Skin Creation
Speedups
Stoppers
Switch layer
Teams
TeeSmash
TeeWare
Telegun
Teleporter
Teleportfly
Template:Infobox mod
Template:Infobox weapon
Template:MigrateTranslationText
Template:Note
Template:Stub
Template:Tip
Template:Todo
Template:Warning
Ticks
Tiles
Timeline
Touch controls
Troubleshooting
Tune zones
Vanilla
World
ZCatch
Language
aa - Afar
aae - Arbëresh
ab - Abkhazian
abs - Ambonese Malay
ace - Achinese
acm - Iraqi Arabic
ady - Adyghe
ady-cyrl - Adyghe (Cyrillic script)
aeb - Tunisian Arabic
aeb-arab - Tunisian Arabic (Arabic script)
aeb-latn - Tunisian Arabic (Latin script)
af - Afrikaans
aln - Gheg Albanian
alt - Southern Altai
am - Amharic
ami - Amis
an - Aragonese
ang - Old English
ann - Obolo
anp - Angika
ar - Arabic
arc - Aramaic
arn - Mapuche
arq - Algerian Arabic
ary - Moroccan Arabic
arz - Egyptian Arabic
as - Assamese
ase - American Sign Language
ast - Asturian
atj - Atikamekw
av - Avaric
avk - Kotava
awa - Awadhi
ay - Aymara
az - Azerbaijani
azb - South Azerbaijani
ba - Bashkir
ban - Balinese
ban-bali - Balinese (Balinese script)
bar - Bavarian
bbc - Batak Toba
bbc-latn - Batak Toba (Latin script)
bcc - Southern Balochi
bci - Baoulé
bcl - Central Bikol
bdr - West Coast Bajau
be - Belarusian
be-tarask - Belarusian (Taraškievica orthography)
bew - Betawi
bg - Bulgarian
bgn - Western Balochi
bh - Bhojpuri
bho - Bhojpuri
bi - Bislama
bjn - Banjar
blk - Pa'O
bm - Bambara
bn - Bangla
bo - Tibetan
bpy - Bishnupriya
bqi - Bakhtiari
br - Breton
brh - Brahui
bs - Bosnian
btm - Batak Mandailing
bto - Iriga Bicolano
bug - Buginese
bxr - Russia Buriat
ca - Catalan
cbk-zam - Chavacano
cdo - Mindong
ce - Chechen
ceb - Cebuano
ch - Chamorro
chn - Chinook Jargon
cho - Choctaw
chr - Cherokee
chy - Cheyenne
ckb - Central Kurdish
co - Corsican
cps - Capiznon
cpx - Pu–Xian Min
cpx-hans - Pu–Xian Min (Simplified Han script)
cpx-hant - Pu–Xian Min (Traditional Han script)
cpx-latn - Pu–Xian Min (Latin script)
cr - Cree
crh - Crimean Tatar
crh-cyrl - Crimean Tatar (Cyrillic script)
crh-latn - Crimean Tatar (Latin script)
crh-ro - Dobrujan Tatar
cs - Czech
csb - Kashubian
cu - Church Slavic
cv - Chuvash
cy - Welsh
da - Danish
dag - Dagbani
de - German
de-at - Austrian German
de-ch - Swiss High German
de-formal - German (formal address)
dga - Dagaare
din - Dinka
diq - Zazaki
dsb - Lower Sorbian
dtp - Central Dusun
dty - Doteli
dv - Divehi
dz - Dzongkha
ee - Ewe
efi - Efik
egl - Emilian
el - Greek
eml - Emiliano-Romagnolo
en - English
en-ca - Canadian English
en-gb - British English
eo - Esperanto
es - Spanish
es-419 - Latin American Spanish
es-formal - Spanish (formal address)
et - Estonian
eu - Basque
ext - Extremaduran
fa - Persian
fat - Fanti
ff - Fula
fi - Finnish
fit - Tornedalen Finnish
fj - Fijian
fo - Faroese
fon - Fon
fr - French
frc - Cajun French
frp - Arpitan
frr - Northern Frisian
fur - Friulian
fy - Western Frisian
ga - Irish
gaa - Ga
gag - Gagauz
gan - Gan
gan-hans - Gan (Simplified Han script)
gan-hant - Gan (Traditional Han script)
gcf - Guadeloupean Creole
gcr - Guianan Creole
gd - Scottish Gaelic
gl - Galician
gld - Nanai
glk - Gilaki
gn - Guarani
gom - Goan Konkani
gom-deva - Goan Konkani (Devanagari script)
gom-latn - Goan Konkani (Latin script)
gor - Gorontalo
got - Gothic
gpe - Ghanaian Pidgin
grc - Ancient Greek
gsw - Alemannic
gu - Gujarati
guc - Wayuu
gur - Frafra
guw - Gun
gv - Manx
ha - Hausa
hak - Hakka Chinese
haw - Hawaiian
he - Hebrew
hi - Hindi
hif - Fiji Hindi
hif-latn - Fiji Hindi (Latin script)
hil - Hiligaynon
hno - Northern Hindko
ho - Hiri Motu
hr - Croatian
hrx - Hunsrik
hsb - Upper Sorbian
hsn - Xiang
ht - Haitian Creole
hu - Hungarian
hu-formal - Hungarian (formal address)
hy - Armenian
hyw - Western Armenian
hz - Herero
ia - Interlingua
ibb - Ibibio
id - Indonesian
ie - Interlingue
ig - Igbo
igl - Igala
ii - Sichuan Yi
ik - Inupiaq
ike-cans - Eastern Canadian (Aboriginal syllabics)
ike-latn - Eastern Canadian (Latin script)
ilo - Iloko
inh - Ingush
io - Ido
is - Icelandic
it - Italian
iu - Inuktitut
ja - Japanese
jam - Jamaican Creole English
jbo - Lojban
jut - Jutish
jv - Javanese
ka - Georgian
kaa - Kara-Kalpak
kab - Kabyle
kai - Karekare
kbd - Kabardian
kbd-cyrl - Kabardian (Cyrillic script)
kbp - Kabiye
kcg - Tyap
kea - Kabuverdianu
kg - Kongo
kge - Komering
khw - Khowar
ki - Kikuyu
kiu - Kirmanjki
kj - Kuanyama
kjh - Khakas
kjp - Eastern Pwo
kk - Kazakh
kk-arab - Kazakh (Arabic script)
kk-cn - Kazakh (China)
kk-cyrl - Kazakh (Cyrillic script)
kk-kz - Kazakh (Kazakhstan)
kk-latn - Kazakh (Latin script)
kk-tr - Kazakh (Turkey)
kl - Kalaallisut
km - Khmer
kn - Kannada
ko - Korean
ko-kp - Korean (North Korea)
koi - Komi-Permyak
kr - Kanuri
krc - Karachay-Balkar
kri - Krio
krj - Kinaray-a
krl - Karelian
ks - Kashmiri
ks-arab - Kashmiri (Arabic script)
ks-deva - Kashmiri (Devanagari script)
ksh - Colognian
ksw - S'gaw Karen
ku - Kurdish
ku-arab - Kurdish (Arabic script)
ku-latn - Kurdish (Latin script)
kum - Kumyk
kus - Kʋsaal
kv - Komi
kw - Cornish
ky - Kyrgyz
la - Latin
lad - Ladino
lb - Luxembourgish
lbe - Lak
lez - Lezghian
lfn - Lingua Franca Nova
lg - Ganda
li - Limburgish
lij - Ligurian
liv - Livonian
lki - Laki
lld - Ladin
lmo - Lombard
ln - Lingala
lo - Lao
loz - Lozi
lrc - Northern Luri
lt - Lithuanian
ltg - Latgalian
lus - Mizo
luz - Southern Luri
lv - Latvian
lzh - Literary Chinese
lzz - Laz
mad - Madurese
mag - Magahi
mai - Maithili
map-bms - Basa Banyumasan
mdf - Moksha
mg - Malagasy
mh - Marshallese
mhr - Eastern Mari
mi - Māori
min - Minangkabau
mk - Macedonian
ml - Malayalam
mn - Mongolian
mnc - Manchu
mnc-latn - Manchu (Latin script)
mnc-mong - Manchu (Mongolian script)
mni - Manipuri
mnw - Mon
mo - Moldovan
mos - Mossi
mr - Marathi
mrh - Mara
mrj - Western Mari
ms - Malay
ms-arab - Malay (Jawi script)
mt - Maltese
mus - Muscogee
mwl - Mirandese
my - Burmese
myv - Erzya
mzn - Mazanderani
na - Nauru
nah - Nāhuatl
nan - Minnan
nap - Neapolitan
nb - Norwegian Bokmål
nds - Low German
nds-nl - Low Saxon
ne - Nepali
new - Newari
ng - Ndonga
nia - Nias
nit - కొలామి
niu - Niuean
nl - Dutch
nl-informal - Dutch (informal address)
nmz - Nawdm
nn - Norwegian Nynorsk
no - Norwegian
nod - Northern Thai
nog - Nogai
nov - Novial
nqo - N’Ko
nrm - Norman
nso - Northern Sotho
nv - Navajo
ny - Nyanja
nyn - Nyankole
nyo - Nyoro
nys - Nyungar
oc - Occitan
ojb - Northwestern Ojibwa
olo - Livvi-Karelian
om - Oromo
or - Odia
os - Ossetic
pa - Punjabi
pag - Pangasinan
pam - Pampanga
pap - Papiamento
pcd - Picard
pcm - Nigerian Pidgin
pdc - Pennsylvania German
pdt - Plautdietsch
pfl - Palatine German
pi - Pali
pih - Norfuk / Pitkern
pl - Polish
pms - Piedmontese
pnb - Western Punjabi
pnt - Pontic
prg - Prussian
ps - Pashto
pt - Portuguese
pt-br - Brazilian Portuguese
pwn - Paiwan
qqq - Message documentation
qu - Quechua
qug - Chimborazo Highland Quichua
rgn - Romagnol
rif - Riffian
rki - Arakanese
rm - Romansh
rmc - Carpathian Romani
rmy - Vlax Romani
rn - Rundi
ro - Romanian
roa-tara - Tarantino
rsk - Pannonian Rusyn
ru - Russian
rue - Rusyn
rup - Aromanian
ruq - Megleno-Romanian
ruq-cyrl - Megleno-Romanian (Cyrillic script)
ruq-latn - Megleno-Romanian (Latin script)
rut - Rutul
rw - Kinyarwanda
ryu - Okinawan
sa - Sanskrit
sah - Yakut
sat - Santali
sc - Sardinian
scn - Sicilian
sco - Scots
sd - Sindhi
sdc - Sassarese Sardinian
sdh - Southern Kurdish
se - Northern Sami
se-fi - Northern Sami (Finland)
se-no - Northern Sami (Norway)
se-se - Northern Sami (Sweden)
sei - Seri
ses - Koyraboro Senni
sg - Sango
sgs - Samogitian
sh - Serbo-Croatian
sh-cyrl - Serbo-Croatian (Cyrillic script)
sh-latn - Serbo-Croatian (Latin script)
shi - Tachelhit
shi-latn - Tachelhit (Latin script)
shi-tfng - Tachelhit (Tifinagh script)
shn - Shan
shy - Shawiya
shy-latn - Shawiya (Latin script)
si - Sinhala
simple - Simple English
sjd - Kildin Sami
sje - Pite Sami
sk - Slovak
skr - Saraiki
skr-arab - Saraiki (Arabic script)
sl - Slovenian
sli - Lower Silesian
sm - Samoan
sma - Southern Sami
smn - Inari Sami
sms - Skolt Sami
sn - Shona
so - Somali
sq - Albanian
sr - Serbian
sr-ec - Serbian (Cyrillic script)
sr-el - Serbian (Latin script)
srn - Sranan Tongo
sro - Campidanese Sardinian
ss - Swati
st - Southern Sotho
stq - Saterland Frisian
sty - Siberian Tatar
su - Sundanese
sv - Swedish
sw - Swahili
syl - Sylheti
szl - Silesian
szy - Sakizaya
ta - Tamil
tay - Tayal
tcy - Tulu
tdd - Tai Nuea
te - Telugu
tet - Tetum
tg - Tajik
tg-cyrl - Tajik (Cyrillic script)
tg-latn - Tajik (Latin script)
th - Thai
ti - Tigrinya
tk - Turkmen
tl - Tagalog
tly - Talysh
tly-cyrl - Talysh (Cyrillic script)
tn - Tswana
to - Tongan
tok - Toki Pona
tpi - Tok Pisin
tr - Turkish
tru - Turoyo
trv - Taroko
ts - Tsonga
tt - Tatar
tt-cyrl - Tatar (Cyrillic script)
tt-latn - Tatar (Latin script)
ttj - Tooro
tum - Tumbuka
tw - Twi
ty - Tahitian
tyv - Tuvinian
tzm - Central Atlas Tamazight
udm - Udmurt
ug - Uyghur
ug-arab - Uyghur (Arabic script)
ug-latn - Uyghur (Latin script)
uk - Ukrainian
ur - Urdu
uz - Uzbek
uz-cyrl - Uzbek (Cyrillic script)
uz-latn - Uzbek (Latin script)
ve - Venda
vec - Venetian
vep - Veps
vi - Vietnamese
vls - West Flemish
vmf - Main-Franconian
vmw - Makhuwa
vo - Volapük
vot - Votic
vro - Võro
wa - Walloon
wal - Wolaytta
war - Waray
wls - Wallisian
wo - Wolof
wuu - Wu
wuu-hans - Wu (Simplified Han script)
wuu-hant - Wu (Traditional Han script)
xal - Kalmyk
xh - Xhosa
xmf - Mingrelian
xsy - Saisiyat
yi - Yiddish
yo - Yoruba
yrl - Nheengatu
yue - Cantonese
yue-hans - Cantonese (Simplified Han script)
yue-hant - Cantonese (Traditional Han script)
za - Zhuang
zea - Zeelandic
zgh - Standard Moroccan Tamazight
zh - Chinese
zh-cn - Chinese (China)
zh-hans - Simplified Chinese
zh-hant - Traditional Chinese
zh-hk - Chinese (Hong Kong)
zh-mo - Chinese (Macau)
zh-my - Chinese (Malaysia)
zh-sg - Chinese (Singapore)
zh-tw - Chinese (Taiwan)
zu - Zulu
Format
Export for off-line translation
Export in native format
Export in CSV format
Fetch
{{MigrateTranslation}} <languages /> <div lang="en" dir="ltr" class="mw-content-ltr"> The '''Automapper''' is a tool to make mapping easier for mappers. Instead of placing the round edges of freeze by hand you could make a simple [[#Rules File|automapper rule]] that applies a few rules to an entire tile layer. Every automapper is made for a specific tileset and every tileset can have multiple automappers. All automapper rules are located in your teeworlds path at ''data/editor/automap/''<ref name="Automapper">[https://forum.ddnet.org/viewtopic.php?t=2428 Automapper Tutorial]</ref><ref name="ddnet-automapperfiles">[https://github.com/ddnet/ddnet/tree/master/data/editor/automap Automapper files]</ref>. </div> ==Rules File== <!--T:2--> There is a ''tileset.rules'' textfile for every tileset that has an automapper. Each ''tileset.rules'' file can contain multiple automappers. The rules file loosely follows the [https://en.wikipedia.org/wiki/INI_file INI-file-format]. Inside the file every automapper starts with the line <code>[automapper_name]</code>. For example in the file ''grass_main.rules'' there is an automapper called ''Grass'' which starts at the line <code>[Grass]</code> inside the file. To use it you have to create a tilelayer with the tileset ''grass_main'' in the mapeditor. Rightclick on the [https://wiki.ddnet.org/wiki/Mapping#Layers layer] and click on ''"Auto map"''. To start automapping click ''"Grass"''. The filename of the automapper '''has to''' follow the filename of the tileset. Grass automapper<ref name="Grass automapper">[https://github.com/ddnet/ddnet/blob/0abb32514b6e9643154dc6bcdc4a754defbf2321/data/editor/automap/grass_main.rules#L1 Grass automapper]</ref>: <pre> [Default] Index 1 #top Index 16 Pos 0 -1 EMPTY ... </pre> ==Processing== The automapper will read the rules file and scan each '''position''' of the layer. If every rule of a selected tile applies, the tile will be placed at the scanned position of the automapper. If multiple tiles and their rules match, only the latest rule will apply (because it will be overwritten). [[#Syntax|Unless deactivated]], the automapper will put it's changes into a buffer first and apply them afterwards. [[File:Indices.png|thumb|227x227px|Tileset indices overview]] ==Tile indices== Every tileset has 16 rows and 16 columns and each tile can be addressed by its index. The index of a tile is a direct result of it's position and can be calculated by <code>index = 16 * row + column</code>, where row and column is between 0 and 15. The tile at index 0 is always considered <code>EMPTY</code>. Usually this part doesn't contain textures in tilesets. Each other tile is always considered <code>FULL</code>, even if it doesn't contain any textures and is fully transparent. The index is used for the <code>INDEX</code> keyword of the automapper. ==Syntax== '''Naming your automapper-rule''': Similar to ini-files, you can create your own section for your automapper rule: <code>[your-automapper-rule]</code> Multiple index selections followed by rules can be part of a section. '''Writing a comment''': <code>#this is a comment</code> '''Selecting a tile you want to place''': <code>INDEX 42</code> This '''selects''' tile 42 (meaning the 3rd row and 11th column. Multiple indices can be selected by adding an <code>OR</code> between each index: <code>INDEX 42 OR 43</code> '''Modifying the tile''': <code>Index 42 XFLIP YFLIP ROTATE</code> <code>XFLIP</code> mirrors the tile vertically and <code>YFLIP</code> mirrors the tile horizontally. <code>ROTATE</code> rotates the tile a single time by 90°. IF you want to rotate a tile by 180°, you only need to set <code>XFLIP</code> and <code>YFLIP</code> '''but not''' <code>ROTATE</code>. If you want to rotate by 270°, you need to set <code>XFLIP</code>, <code>YFLIP</code> and <code>ROTATE</code>. Tile modifications are always in the same line as the selection. '''Rule for placing the tile''': The selected tile gets placed if '''all''' following rules apply. A rule for placing the tile always starts with coordinates followed by a rule: <code>POS 0 -1 FULL</code> This rule selects the tile with ''X'' coordinate 0 and ''Y'' coordinate -1 '''relative to the''' [[#Processing|scanning position]] of the automapper. If the tile '''above''' the scanning position is <code>FULL</code>, the '''selected tile''' will be placed (if all following rules apply). If it's <code>EMPTY</code>, it won't be placed. Instead of using <code>FULL</code> or <code>EMPTY</code>, you can select another tile with the <code>INDEX</code> keyword: <code>POS 0 -1 INDEX 12</code> If the tile above the [[#Processing|scanning position]] has index 12, it will be placed. Multiple indices can be selected by adding an <code>OR</code> between each index: <code>POS 0 -1 INDEX 12 OR 13</code> Similarly <code>NOTINDEX</code> can be used to exclude a tile. '''Random rule''': You can make a selected tile randomly apply to rules by adding a random rule: <code>RANDOM 20%</code> The random rule expects a value between 0% and 100%. This value represents the probability, that a tile is placed<ref name="RandomRule">[https://github.com/ddnet/ddnet/blob/0abb32514b6e9643154dc6bcdc4a754defbf2321/src/game/editor/auto_map.cpp#L312 Random rule implementation]</ref>. If you put a ''value'' into it '''without''' a <code>%</code> symbol, the probability will not be parsed in terms of percentages, but with this formula: <code>percentage = 1.0 / value</code> This allows for rarer tile placements with probabilities between 0% and 1% and a ''value'' > 100. For example <code>RANDOM 150</code> will have a probability of <code>1.0 / 150 ≈ 0.67</code> (percent). '''Default condition rule''': By default the game assumes, that you want to apply each rule to a full tile, meaning that the following rule is always implied: <code>POS 0 0 FULL</code> You can deactivate this by adding the following line '''under''' the tile selection: <code>NoDefaultRule</code> '''NewRun''': Adding <code>NewRun</code> in a section will make the section run an additional time for each time this keyword gets added to the section. This can be used to set some basic tiles in the first run, and more complex ones in the second. '''NoLayerCopy''': Adding <code>NoLayerCopy</code> in a section will cause it to run [https://en.wikipedia.org/wiki/In-place_algorithm in-place]. This can drastically improve performance, because the automapper doesn't copy it's changes into buffer memory before applying it. But it can cause unintended side effects! ==Tools== Some tools in order to create automapper rules exist: * [https://github.com/AssassinTee/SimpleDDNetAutomapper SimpleDDNetAutomapper] - a small UI application, which tries a more user friendly approach for very basic rules and tilesets. It does not support randomness, or <code>POS INDEX</code> rules, but <code>EMPTY</code> and <code>FULL</code>. * [https://github.com/k2d222/twwe Teeworlds Web Editor] - Automapper edit and live-preview<ref name="twwe">[https://github.com/k2d222/twwe/blob/main/README.md#unique-features Teeworlds web editor unique features]</ref>. * [https://github.com/Aerll/rpp rpp] - rules++ is a small experiment, aiming to make mappers utterly lazy, by unlocking the full potential of DDNet's rules. It is meant to be simple, readable and most importantly correct, everything else is irrelevant<ref name="rpp">[https://github.com/Aerll/rpp/blob/main/README.md#about rules++ about]</ref>. ==Resources== <references />
Toggle limited content width