Topic: [TOOLS] Automapper rules update tool
Hi
I created simple tool to update automapper .rules files.
from this (Teeworlds 0.6):
[Default]
Index 1
#top
Index 16
Pos 0 -1 EMPTY
#right
Index 21
Pos 1 0 EMPTY
This tool make this (Teeworlds 0.7):
{"tileset": [
{"grass":
{
"basetile": 1,
"rules": [
{
"index": 16,
"condition": [
{"x": 0, "y": -1, "value": "empty"},
],
},
{
"index": 21,
"condition": [
{"x": 1, "y": 0, "value": "empty"},
],
}]
}
}]
}
Download
Download (require java 8 or newer):
https://github.com/Patrykas1000/Automap … tag/v0.1.1
Source code:
https://github.com/Patrykas1000/Automapper-Rules-Editor
Usage:
linux:
./rules_update_tool.sh file1.rules file2.rules file3.rules
windos:
./rules_update_tool.bat file1.rules file2.rules file3.rules
alt. linux and windows:
java -jar rules_update_tool.jar file1.rules file2.rules file3.rules
I tested this on very simple tile set (included in source code): ddnet_walls
About functions:
Works:
One tileset in file
Conditions x, y, value (only "EMPTY" and "FULL")
hflip, vflip
Comments (line start with "#")
Not tested:
Rotation
I need your help
In old .rules files i found this:
Pos -1 0 NOTINDEX -1
How to implement "NOTINDEX" in .json
From ddnet:
[DDNet]
Index 0
Pos 0 0 INDEX 33 OR 33 XFLIP OR 33 YFLIP OR 33 XFLIP YFLIP
NewRun
Index 1
Index 2
Pos 0 -1 EMPTY
Pos 0 1 FULL
Pos 1 0 EMPTY
Pos 1 -1 EMPTY
What is "NewRun" and how to implement it to .json
also what to do with "or"?
Maybe this functions are from ddnet editor. It will be great if anyone explain this ;)