Difference between revisions of "Template:UO Image"

m
m
Line 11: Line 11:
  
 
START COORDINATE CONVERSION CODE -->
 
START COORDINATE CONVERSION CODE -->
{{#arraydefine:split|{{{4}}}}}
+
{{#arraydefine:split|{{{4}}} }}
{{#vardefine: y1|{{#arrayindex:split|0}}}}
+
{{#vardefine: y1|{{#arrayindex:split|0}} }}
{{#vardefine: y2|{{#arrayindex:split|1}}}}
+
{{#vardefine: y2|{{#arrayindex:split|1}} }}
{{#vardefine: y3|{{{5}}}}}
+
{{#vardefine: y3|{{{5}}} }}
{{#arraydefine:split|{{{6}}}}}
+
{{#arraydefine:split|{{{6}}} }}
{{#vardefine: x1|{{#arrayindex:split|0}}}}
+
{{#vardefine: x1|{{#arrayindex:split|0}} }}
{{#vardefine: x2|{{#arrayindex:split|1}}}
+
{{#vardefine: x2|{{#arrayindex:split|1}} }}
{{#vardefine: x3|{{{7}}}}}
+
{{#vardefine: x3|{{{7}}} }}
{{#vardefine:map|{{{3}}}}}
+
{{#vardefine:map|{{{3}}} }}
 
{{#vardefine: height|{{#switch: {{#var:map}}
 
{{#vardefine: height|{{#switch: {{#var:map}}
 
| 1 = 4096
 
| 1 = 4096
Line 52: Line 52:
 
{{#vardefine: x|{{#expr:{{#var:centerX}}+{{#var:x}}}}}}
 
{{#vardefine: x|{{#expr:{{#var:centerX}}+{{#var:x}}}}}}
 
{{#vardefine: x|{{#expr:{{#var:x}} mod {{#var:width}}}}}}
 
{{#vardefine: x|{{#expr:{{#var:x}} mod {{#var:width}}}}}}
 +
<!-- END COORDINATE CONVERSION CODE  -->
  
<!-- END COORDINATE CONVERSION CODE  -->
+
{{#vardefine: pixels|{{{8|175}}} }}
}}{{UO_Image|map|{{{1}}}|{{#var:x}}|{{#var:y}}{{{8|}}}|{{{9|}}}}}|
+
{{#vardefine: showcoords|{{{9|}}} }}
<div style="display:inline-block;"><div style="position: relative;width:{{#expr:{{{5|175}}}*2}}px;height:{{#expr:{{{5|175}}}*2}}px;overflow: hidden;display:inline-block;"><div style="-webkit-clip-path: circle({{{5|175}}}px at {{{3}}}px {{{4}}}px); clip-path: circle({{{5|175}}}px at {{{3}}}px {{{4}}}px); transform: translate({{#expr: {{{5|175}}}-{{{3}}} }}px,{{#expr: {{{5|175}}}-{{{4}}} }}px);">[[File:MAP{{#switch: {{lc:{{{2|}}} }}
+
}}|{{#if: true|
|felucca=0
+
{{#vardefine: x|{{{3}}} }}
 +
{{#vardefine: y|{{{4}}} }}
 +
{{#vardefine: pixels|{{{5|175}}} }}
 +
{{#vardefine: showcoords|{{{6|}}} }}
 +
}} }}
 +
<div style="display:inline-block;"><div style="position: relative;width:{{#expr:{{#var:pixels}}*2}}px;height:{{#expr:{{#var:pixels}}*2}}px;overflow: hidden;display:inline-block;"><div style="-webkit-clip-path: circle({{#var:pixels}}px at {{#var:x}}px {{#var:y}}px); clip-path: circle({{#var:pixels}}px at {{#var:x}}px {{#var:y}}px); transform: translate({{#expr: {{#var:pixels}}-{{#var:x}} }}px,{{#expr: {{#var:pixels}}-{{#var:y}} }}px);">[[File:MAP{{#switch: {{lc:{{{2|}}} }}|felucca=0
 
|trammel=1
 
|trammel=1
 
|ilshenar=2
 
|ilshenar=2
Line 63: Line 69:
 
|ter mur=5
 
|ter mur=5
 
|eodon=5
 
|eodon=5
}}-1.png|link=]] </div></div>{{#ifeq:{{{6|}}}|yes|<br>Coordinates: {{{3}}} x {{{4}}} }}</div>}} }}</includeonly><noinclude>
+
}}-1.png|link=]] </div></div>{{#ifeq:{{#var:showcoords}}|yes|<br><center>Coordinates: {{#var:x}} x {{#var:y}}</center> }}</div>}}</includeonly><noinclude>
 
== Maps ==
 
== Maps ==
 
  <nowiki>{{UO_Image|map|facet|x|y|w|b}}
 
  <nowiki>{{UO_Image|map|facet|x|y|w|b}}

Revision as of 17:03, 4 September 2016


MAP0-1v2.png

Coordinates: 3982 x 223


Maps

{{UO_Image|map|facet|x|y|w|b}}
Where:
facet = felucca, trammel, ilshenar, tokuno, ter mur, or eodon
x and y = coords of the center of the circle
w = the radius of the circle to draw (in pixels)
b = optional, set to 'yes' to also show the coordinates of the center of the circle

Examples:
Vesper {{UO_Image|map|felucca|2926|842|215}}
Kotl City {{UO_Image|map|eodon|577|2371|153}}
Sea Market {{UO_Image|map|trammel|4550|2355|75|yes}}

Result:


MAP0-1v2.png
MAP5-1v2.png
MAP1-1v2.png

Coordinates: 4550 x 2355

Shard Shields

{{UO_Image|shard|name|size}}
Where:
name = the name of the shard
link = optional, the name of the page you want linked to from the image.
size = optional, size in pixels.  By default it is 60px.

Examples:
Baekdu: {{UO_Image|shard|Baekdu}}
Chesapeake: {{UO_Image|shard|Chesapeake}}
Formosa: {{UO_Image|shard|Formosa}}
Yamato: {{UO_Image|shard|Yamato|60}}

Result:


UO-image-shard-Baekdu.png

UO-image-shard-Chesapeake.png

UO-image-shard-Formosa.png

UO-image-shard-Yamato.png


Icons

{{UO_Image|icon|name|size}}
Where:
name = the name of the icon
size = optional, size in pixels.  By default it is 40px.
 

Valid icons:

UO-image-icon-Caution.png Caution