New map format
Moderator: Forum Moderators
- pyrophorus
- Posts: 533
- Joined: December 1st, 2010, 12:54 pm
New map format
Hello...
I read somewhere a new map format is planned, but I didn't found anything about it. Can someone tell me more ?
(BTW, I'm writing a map generator, that's why I'm interested in this particular topic).
Thanks in advance,
I read somewhere a new map format is planned, but I didn't found anything about it. Can someone tell me more ?
(BTW, I'm writing a map generator, that's why I'm interested in this particular topic).
Thanks in advance,
HowTos: WML filtering, WML variables
Re: New map format
The new format is:
Code: Select all
[map]
data=
border_size=
usage=
[/map]
Re: New map format
Does that mean that all maps will have to be redone when passing to 1.11?
Re: New map format
No, 1.11 can still read the old map format and thus 1.12 will be able to do so as well.
1.13.0 will be the first version that warns about the old syntax being deprecated,
followed by the removal with version 1.13.3.
1.13.0 will be the first version that warns about the old syntax being deprecated,
followed by the removal with version 1.13.3.
Re: New map format
However, if you edit maps in 1.11 and then save them, they will be saved in the new map format which cannot be read by 1.10. So be careful if you develop an add-on for both versions of Wesnoth.
UMC Story Images — Story images for your campaign!
- pyrophorus
- Posts: 533
- Joined: December 1st, 2010, 12:54 pm
Re: New map format
Thanks to you all,
If I understand correctly, it's only the map tag (or the header of the map file) which change, not the hex format in the data ?
(BTW, I fear I wasn't clear enough: my project creates map files like the editor. It's not a WML add-on.)
Friendly,
If I understand correctly, it's only the map tag (or the header of the map file) which change, not the hex format in the data ?
(BTW, I fear I wasn't clear enough: my project creates map files like the editor. It's not a WML add-on.)
Friendly,
HowTos: WML filtering, WML variables
Re: New map format
And what is the reason for this change?
Author of Antar, Son of Rheor ( SP Campaign) | Development Thread + Feedback Thread + Replays of ASoR
Re: New map format
Any idea where could I get wesnoth 1.11? Google points to nowhere.
Re: New map format
There are several reasons.
1) Consistency -- We had no other WML attribute lookalikes with sub-attributes in them.
2) Since Maps are concealed within the [map] tag it's possible to parse map files with the WML parser now.
This means that the map editor can be used to produce map files with additional WML content.
I use that for placing [label]s within the editor, more usage is going to come.
3) The map file loading code on the editor side has gone less complicated.
4) The [map] tag is easy to extend in the future.
For example could the starting position definition leave the terrain data string itself and be subtags of
[map] instead leading again to simplified code.
My key motivation was 2), the other points are only side effects and I wouldn't have touched it if it wasn't for that reason.
1) Consistency -- We had no other WML attribute lookalikes with sub-attributes in them.
2) Since Maps are concealed within the [map] tag it's possible to parse map files with the WML parser now.
This means that the map editor can be used to produce map files with additional WML content.
I use that for placing [label]s within the editor, more usage is going to come.
3) The map file loading code on the editor side has gone less complicated.
4) The [map] tag is easy to extend in the future.
For example could the starting position definition leave the terrain data string itself and be subtags of
[map] instead leading again to simplified code.
My key motivation was 2), the other points are only side effects and I wouldn't have touched it if it wasn't for that reason.
Re: New map format
There is no development release out yet (and IIUC, this will be the case for the next few months). The only way to get 1.11 now is to checkout SVN and compile Wesnoth yourself (see WesnothSVN).dugi wrote:Any idea where could I get wesnoth 1.11? Google points to nowhere.
UMC Story Images — Story images for your campaign!
-
- Inactive Developer
- Posts: 2461
- Joined: August 15th, 2008, 8:46 pm
- Location: Germany
Re: New map format
Yes.pyrophorus wrote:Thanks to you all,
If I understand correctly, it's only the map tag (or the header of the map file) which change, not the hex format in the data ?
usage= and border_size= become separated keys, that's all.
Some test:
Code: Select all
[scenario]
#ifver WESNOTH_VERSION >= 1.11.0-svn
[map]
{~add-ons/A_Simple_Campaign/maps/01_Template/header.cfg}
data="{~add-ons/A_Simple_Campaign/maps/01_Template/data.cfg}"
[/map]
#else
map_data="{~add-ons/A_Simple_Campaign/maps/01_Template/header.cfg}"+"{~add-ons/A_Simple_Campaign/maps/01_Template/data.cfg}"
#endif
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
-
- Posts: 427
- Joined: May 10th, 2011, 7:20 pm
Re: New map format
Are we talking, unit placement?fabi wrote:2) Since Maps are concealed within the [map] tag it's possible to parse map files with the WML parser now.
This means that the map editor can be used to produce map files with additional WML content.
I use that for placing [label]s within the editor, more usage is going to come.
Timshel
Re: New map format
[unit] is a subtag of [side] or either be used while an event is ongoing.uncleshelby wrote:Are we talking, unit placement?fabi wrote:2) Since Maps are concealed within the [map] tag it's possible to parse map files with the WML parser now.
This means that the map editor can be used to produce map files with additional WML content.
I use that for placing [label]s within the editor, more usage is going to come.
Thus, the editor would either need to support the event or the side tag.
My personal favourite is the side tage for the reason that it is rather static, at least compared to event tags which can gain to an unlimited degree of complexity.
Thus, suspect the unit placement feature to be part of an 1.12 release only at good luck.
Re: New map format
A simple way would be to interpret [unit] tags directly in the map section as if they were in a prestart [event], without supporting any of the other complex event stuff (ActionWML, conditions).fabi wrote:[unit] is a subtag of [side] or either be used while an event is ongoing.uncleshelby wrote:Are we talking, unit placement?
Thus, the editor would either need to support the event or the side tag.
My personal favourite is the side tage for the reason that it is rather static, at least compared to event tags which can gain to an unlimited degree of complexity.
Re: New map format
There are several reasons speaking for the [side] tag to support anyway.pauxlo wrote:A simple way would be to interpret [unit] tags directly in the map section as if they were in a prestart [event], without supporting any of the other complex event stuff (ActionWML, conditions).
1) The editor should be able to write working [multiplayer] scenarios at least.
Without support for defining [side]s in the editor this won't be doable.
2) Both, [unit] and [village] work inside [side] without any extra work already.
3) In order to render the unit inside of the map editor it makes sense to use the same codepath the game itself uses to display the units. This codepath expects units to be part of a side already.
4) I do not want to start supporting the definition of any [event] use-case in the editor whatsoever.
This will lead to the next feature request for supporting just a little bit more of what events are able to offer.
At the end the editor will end up being what the eclipse UMC tool is for.
Still it might make sense to introduce a [unit_group] tag which defines a set of units being referable in any handwritten event.