Paradise 14 Wiki:Maintaining specific pages: Difference between revisions
imported>Aliser getting a file link from a direct image link |
imported>Aliser mapserver link formation |
||
| Line 16: | Line 16: | ||
=== Full size images === | === Full size images === | ||
3 links at the start of each section | There are 3 links at the start of each section: | ||
# map.spacestation14.com - an interactive map. | # map.spacestation14.com - an interactive map. | ||
# this wiki - for storing full scale map images here on the wiki. | # this wiki - for storing full scale map images here on the wiki. | ||
# mapserver.spacestation14.com - the source for the full scale images. Should be up to date with new updates <ref>https://discord.com/channels/310555209753690112/771041304108072961/1111422441940586517</ref> | # mapserver.spacestation14.com - the source for the full scale images. Should be up to date with new updates <ref>https://discord.com/channels/310555209753690112/771041304108072961/1111422441940586517</ref> once an issue <ref>https://discord.com/channels/310555209753690112/942862442688548884/1337749145032855614</ref> is resolved. | ||
==== Updating map image on wiki ==== | |||
For the wiki image, use a direct link to the image ''file'' instead of the file ''page''. File pages contain previous versions and can degrade performance significantly. To get a direct link, click the image file or the "original file" link. | For the wiki image, use a direct link to the image ''file'' instead of the file ''page''. File pages contain previous versions and can degrade performance significantly. To get a direct link, click the image file or the "original file" link. | ||
| Line 28: | Line 28: | ||
and put it at the end of this link: <br> | and put it at the end of this link: <br> | ||
{{c|<nowiki>https://wiki.spacestation14.com/wiki/File:</nowiki>}} | {{c|<nowiki>https://wiki.spacestation14.com/wiki/File:</nowiki>}} | ||
<references /> | |||
==== Working with Mapserver ==== | |||
Mapserver links look like this: | |||
https://mapserver.spacestation14.com/api/Image/grid/box/master/1588 | |||
They are assembled with this format:<syntaxhighlight lang="text"> | |||
<mapserver url>/api/Image/grid/:mapId/:gitRef/:gridId | |||
</syntaxhighlight> | |||
* {{C|<mapserver url>}} is [https://mapserver.spacestation14.com/api/Image/grid/box/master/1588 https://mapserver.spacestation14.com/] | |||
* {{C|:mapId}} is a map ID, eg {{C|fland}}. | |||
* {{C|:gitRef}} is the name of a branch on ss14 repo, usually {{C|master}} | |||
* {{C|:gridId}} is a grid ID within the map. To see the grids for a particular map, go to {{C|<nowiki>https://mapserver.spacestation14.com/api/Map/:mapId/:gitRef</nowiki>}} | |||
For Box (map), the link would look like: https://mapserver.spacestation14.com/api/Map/box/master | |||
Use your browser search to find {{C|gridId}}fields. Use links in {{C|url}} fields to see how a grid looks like. If a grid looks like a whole station, then it's a right grid. | |||
Revision as of 11:55, 8 February 2025
Maps
Page: Maps
Thumb images
Map images are shown as thumbnail images (small images) to prevent slow load and performance issues.
Thumb images should be in webp format, 300px wide (the maximum allowed thumbnail size in user preferences). Height doesn't matter.
Changing the format and resizing can be done with an online tool or locally. Author recommends using Template:C — the official webp CLI utility, although that requires some console commands knowledge.
If using Template:C, to convert from another image format to webp and resize, use:<syntaxhighlight lang="bash"> cwebp map_image.png -o map_image.webp -resize 300 0 -q 100 </syntaxhighlight>where Template:C is the input filename, and Template:C is the output filename.
Full size images
There are 3 links at the start of each section:
- map.spacestation14.com - an interactive map.
- this wiki - for storing full scale map images here on the wiki.
- mapserver.spacestation14.com - the source for the full scale images. Should be up to date with new updates <ref>https://discord.com/channels/310555209753690112/771041304108072961/1111422441940586517</ref> once an issue <ref>https://discord.com/channels/310555209753690112/942862442688548884/1337749145032855614</ref> is resolved.
Updating map image on wiki
For the wiki image, use a direct link to the image file instead of the file page. File pages contain previous versions and can degrade performance significantly. To get a direct link, click the image file or the "original file" link.
To get a file page link from a direct image link, take the filename from the end of a link, for instance:
Template:C from Template:C
and put it at the end of this link:
Template:C
<references />
Working with Mapserver
Mapserver links look like this:
https://mapserver.spacestation14.com/api/Image/grid/box/master/1588
They are assembled with this format:<syntaxhighlight lang="text"> <mapserver url>/api/Image/grid/:mapId/:gitRef/:gridId </syntaxhighlight>
- Template:C is https://mapserver.spacestation14.com/
- Template:C is a map ID, eg Template:C.
- Template:C is the name of a branch on ss14 repo, usually Template:C
- Template:C is a grid ID within the map. To see the grids for a particular map, go to Template:C
For Box (map), the link would look like: https://mapserver.spacestation14.com/api/Map/box/master
Use your browser search to find Template:Cfields. Use links in Template:C fields to see how a grid looks like. If a grid looks like a whole station, then it's a right grid.