Okay, let's start to discuss new map format integration.
Link to tiled -
https://mapeditor.org/My verison with height levels will be provided soon.
Here's exported tileset from tiled:
<?xml version="1.0" encoding="UTF-8"?>
<tileset name="04" tilewidth="30" tileheight="24">
<image source="../Pictures/04.png" width="400" height="220"/>
<tile id="0">
<properties>
<property name="testprop" value="222"/>
</properties>
</tile>
</tileset>
Each tile assigned an id based on tile position in tileset image. This position is calculated based on tilewidth and tileheight attributes.
the properties value can be used to store unlimited number of properties. Usage obvious - tile params can be stored here.
Xml looks good at all, but i'm not enough familiar with openxcom code so please comment this.
The remaining questions is:
- how to store animated tiles
- how to store tile LOFTs
So for the first item idea is:
<animation>
<tile id="0" />
<tile id="1" />
<tile id="1" />
<tile id="1" />
...
</animation>
- put this inside <tile> tag
The tiled have to be expanded with animation creation tool. I see this like a window with editable list of tiles. (just like in mcedit)
As for the item 2:
We need additional window for editing LOFTs. The LOFT painter can look just like pixelart tool, provided in this topic
https://openxcom.org/forum/index.php?topic=1436.0The xml can look like this:
<LOFTs>
<LOFT id=0>
<data>0011111100111111</data>
<data>0011111100111111</data>
<data>0011111100111111</data>
<data>0011111100111111</data>
<data>0011111100111111</data>
<data>0011111100111111</data>
<data>0011111100111111</data>
<data>0011111100111111</data>
</LOFT>
...
</LOFTs>
For the item 2 - storing lofts.
So the tileset file can looks like:
<?xml version="1.0" encoding="UTF-8"?>
<tileset name="04" tilewidth="30" tileheight="24">
<image source="../Pictures/04.png" width="400" height="220"/>
<tile id="0">
<properties>
<property name="testprop" value="222"/>
</properties>
<animation>
<tile id="0" />
<tile id="1" />
<tile id="1" />
<tile id="1" />
...
</animation>
<LOFTs>
<LOFT id=0>
<data>0011111100111111</data>
<data>0011111100111111</data>
<data>0011111100111111</data>
<data>0011111100111111</data>
<data>0011111100111111</data>
<data>0011111100111111</data>
<data>0011111100111111</data>
<data>0011111100111111</data>
</LOFT>
...
</LOFTs>
</tile>
</tileset>
To save space LOFTs can be defined in document head, than referenced by ids
Please comment this proposal.