WikiMap Help Custom Images

From TI3Wiki.org

Jump to: navigation, search
Main Adding WikiMap to your PBeM WikiMap Settings Tiles Spaceships Custom Images edit
Example Map Include Page Command Counters Planets Units Redirect Images
Version/FAQ Leaders Flags Tokens Tutorials Image URL Scheme




Contents

Non-standard Images

Usage

{{#mapImg:
Link=<link>
|Width=<image width>
|Height=<image height>
|Z=<Z stacking number>
|Planet=<planet name or code>
|Where=<0-12>
|X=#
|Y=#}}

Parameters

Link (Default)

Required. Specifies the URL of the image to display. The parameter LinkRoot is prepended to the Link parameter. Set LinkRoot if you are going to be displaying several images from with the same root URL. To automatically replace passed parameters in Link, use $<name> in the Link parameter.

To find a particular wikimap image, see WikiMap Image URL Scheme.


Examples:

http://www.ti3wiki.org/wikimap/0.25/Tile-Empty.gif

This will display the exact image only, no matter what the scale

http://www.ti3wiki.org/wikimap/$Scale/Tile-Empty.gif

This will display the same image as before but the URL will be modified by the scale so that the image will automatically be scaled when the Scale parameter is substituted for $Scale in link. Note: this works for wikimap images because all normal scales (0.25, 0.5 and 1) have been pre-generated.


Note: This parameter is default. Any unnamed parameter will be assigned to this value.

Example:
{{#mapImg:http://www.ti3wiki.org/wikimap/0.25/Tile-Empty.gif}} 
"http://www.ti3wiki.org/wikimap/0.25/Tile-Empty.gif" is assigned to default parameter Link.
Width

Optional. Defaults to 0. Specifies the unscaled (1.0) width of the image. If unset, image will not be properly centered at specified location.

Height

Optional. Defaults to 0. Specifies the unscaled (1.0) height of the image. If unset, image will not be properly centered at specified location.

Z

Optional. Defaults to 1. Specifies where the image should occur in Z stack order. If unset, image may be clipped by other images.


Default Z settings of other images types:

  • Tiles=0
  • CC=1
  • Flags=1
  • Tokens=1
  • Artifacts=1
  • DS=1
  • Full size race leader=1
  • Spaceships/Units=2
  • Mini sized leader=3
Planet

Optional. Defaults to unset (empty). If Planet is unset then Where is used to specify a clock position to render the leader in space. If Planet is set then Where is used to specify the location on the planet specified to render the leader. For valid values of Planet see Planetary Forces

Where

Optional. Defaults to 0. Specifies the clock face position (12 = 12 o'clock, 1 = 1 o'clock etc) or 0 for the center position to render the unit on the tile.

X

Optional. Defaults to 0. Specifies a pixel offset to add to the horizontal position. Can be negative.

Y

Optional. Defaults to 0. Specifies a pixel offset to add to the veritical position. Can be negative.

Examples

{{#mapSet:LinkRoot=http://www.ti3wiki.org/wikimap/$Scale/}}
{{#mapLink:Link=Leader-Norr-General1.gif|Where=3}}

Renders an automatically scaling image of the first Norr general at clock position 3. Note: since width and height are not specified the image is not centered correctly at clock position 3.

{{#mapLink:Link=http://www.ti3wiki.org/wikimap/$Scale/CC-Hacan|Width=120|Height=90|Planet=Saudor}}

Renders an automatically scaling image of the Hacan command counter in the center of the location of Saudor.

Personal tools