1
Programming / openxcom mapblock new xml format for usage in tiled (modified for openxcom)
« on: May 24, 2014, 02:36:42 am »
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:
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:
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.0
The xml can look like this:
So the tileset file can looks like:
Please comment this proposal.
Link to tiled - https://mapeditor.org/
My verison with height levels will be provided soon.
Here's exported tileset from tiled:
Code: [Select]
<?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
Code: [Select]
<animation>
<tile id="0" />
<tile id="1" />
<tile id="1" />
<tile id="1" />
...
</animation>
- put this inside <tile> tagThe 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.0
The xml can look like this:
Code: [Select]
<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:
Code: [Select]
<?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 idsPlease comment this proposal.