Tiled extension to allow converting Tiled maps into maps recognized by the DataMaps MediaWiki extension, to the best of its ability. Currently in use on Undertale Wiki, Deltarune Wiki, and the Undertale Yellow Wiki.
On the wiki that you are editing, you need to have the DataMaps and OAuth extensions installed.
If cloning using Git, you need Git LFS installed in order to pull the map images.
This is how features of Tiled map to DataMaps:
- Every image layer on the map maps to a an image background in DataMaps.
- All points on the map are used as map markers in DataMaps.
- Rectangles, polylines and polygons are used as background overlays in DataMaps.
- Every object layer on the map is used as a marker group name.
- Every point in that object layer is treated as a marker with the group name set to the layer name.
- Every group layer on the map is used as a category name for markers within
that group.
- Every point in an object layer inside a group layer is treated as a marker with the group name set to the object layer name, and categories set to names of all parent group layers.
- Tile layers are not supported yet.
- Layer offsets are (mostly) supported.
Modifying certain aspects of DataMaps is only possible through custom properties in Tiled:
- Custom project properties are used to tell the script where to publish the
maps:
wiki
(string): Wiki URL- For example,
undertale.wiki
- For example,
scriptPath
(string): Wiki's script pathlanguageWiki
(string): URL to language wikis, with $1 left as the language code.- For example,
$1.undertale.wiki
- For example,
oauthClientId
(string): OAuth client ID for the application used to authenticate users to the wiki.- To obtain this, visit
Special:OAuthConsumerRegistration/propose
on the wiki you are editing, set the client to non-confidential, allow the application to "edit existing pages" and "create, edit and move pages", and as a callback URL you can usehttps://maps.undertale.wiki
, which displays the page you can find underauth/index.html
in this repository.
- To obtain this, visit
- Custom map properties are used for map-wide configuration:
disclaimer
(string): Disclaimer displayed below the legend in DataMapsinclude
(string): Newline-separated list of strings that describe which pages should be included as fragments- This is intended for including map fragments that define the groups and categories used in the map
popzoom
(float): Default map zoom level used when the map is embedded in a page and set to open a specific marker.
- Custom point properties are used for marker information:
description
(string): Description of the markerpage
(string): Where should the "Read more" link leadplain
(boolean): Whether the description should not be interpreted as wikitextmultiline
(boolean): Wraps the description in a<poem>
, to allow newlines to directly map to newlines in the rendered wikitext.
- Custom rectangle properties:
fill
(color): Rectangle fill colorborder
(color): Rectangle border color
- Custom polyline and polygon properties:
color
(color): Polyline colorthickness
(float): Polyline thickness
To convert the map, use File > Publish to wiki or use the keybind Ctrl+Shift+U. It will prompt you to log in for the first time, and after every hour of using the editor. Follow the prompts to log in.
Licensed under the MIT license. The file under extensions/wiki.svg
is borrowed
from Wikipedia and
licensed under GFDL and CC-BY-SA 3.0.