Template:Map spawn: Difference between revisions

From OpenSpell Wiki
Jump to navigationJump to search
Created page with "<noinclude> == Usage == Renders a "View on map" button that opens a popup map showing NPC spawn locations. The map loads lazily — only when the user clicks the button. <pre> {{Map spawn|label=Knight|cx=-286|cy=-1|level=1|markers=-286,-1,4;112,-182,5}} </pre> === Parameters === {| class="wikitable" ! Parameter !! Description |- | <code>label</code> || NPC/entity name shown in the map header |- | <code>cx</code> || Center X coordinate (game coords) |- | <code>cy</code>..."
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
== Usage ==
== Usage ==
Renders a "View on map" button that opens a popup map showing NPC spawn locations.
Displays a styled location box with a link to the interactive map.
The map loads lazily — only when the user clicks the button.


<pre>
<pre>
{{Map spawn|label=Knight|cx=-286|cy=-1|level=1|markers=-286,-1,4;112,-182,5}}
{{Map spawn|label=Knight|cx=-273|cy=-254|level=1|markers=x,y,r;x,y,r}}
</pre>
</pre>
 
[[Category:Infobox templates]]
=== Parameters ===
</noinclude>
{| class="wikitable"
<includeonly>
! Parameter !! Description
{| style="border:1px solid #a2a9b1; background:#f8f9fa; padding:4px 10px; margin:8px 0; font-size:13px;"
|-
|-
| <code>label</code> || NPC/entity name shown in the map header
| style="padding-right:12px; color:#54595d;" | 🗺️ '''Spawn locations'''
|-
| [https://highspellmap.com/embed?label={{{label|}}}&cx={{{cx|0}}}&cy={{{cy|0}}}&level={{{level|1}}}&markers={{{markers|}}} View on interactive map →]
| <code>cx</code> || Center X coordinate (game coords)
|-
| <code>cy</code> || Center Y coordinate (game coords)
|-
| <code>level</code> || Map level: <code>0</code>=underground, <code>1</code>=overworld (default: 1)
|-
| <code>markers</code> || Semicolon-separated spawn points: <code>x,y</code> or <code>x,y,wanderRadius</code>
|}
|}
Requires the [[MediaWiki:MapEmbed]] extension and [[MediaWiki:MapModal.js]] to be installed.
[[Category:Infobox templates]]
</noinclude><includeonly>{{#mapembed:label={{{label|}}}|cx={{{cx|0}}}|cy={{{cy|0}}}|level={{{level|1}}}|markers={{{markers|}}}}}
</includeonly>
</includeonly>

Latest revision as of 09:11, 28 February 2026

Usage

[edit]

Displays a styled location box with a link to the interactive map.

{{Map spawn|label=Knight|cx=-273|cy=-254|level=1|markers=x,y,r;x,y,r}}