Line 5: | Line 5: | ||
-->{{#vardefine: campaign | {{{campaign|M_NUL}}} }}<!-- | -->{{#vardefine: campaign | {{{campaign|M_NUL}}} }}<!-- | ||
-->{{#vardefine: key | {{anchorencode:{{PAGENAME}}}} }}<!-- | -->{{#vardefine: key | {{anchorencode:{{PAGENAME}}}} }}<!-- | ||
− | -->{{#vardefine: map | {{#if:{{ | + | -->{{#vardefine: map page | {{#ask:[[is a::campaign map]][[campaign::{{#var:campaign}}]]}} }}<!-- |
+ | -->{{#vardefine: map | {{#if:{{#var:map page}}|{{#var:map page}}#{{#var:key}}}} }}<!-- | ||
+ | -->{{#vardefine: is mapped}}<!-- | ||
-->{{#set: | -->{{#set: | ||
Line 27: | Line 29: | ||
-->{{#arrayprint: facearray | | @@@@ | {{#set: face = @@@@ }} }}<!-- | -->{{#arrayprint: facearray | | @@@@ | {{#set: face = @@@@ }} }}<!-- | ||
-->}}<!-- | -->}}<!-- | ||
− | -->{{#if:{{{address|}}} | {{#set: address = {{{address}}} }} }}<!-- | + | -->{{#if:{{{address|}}} | <!-- |
+ | -->{{#set: address = {{{address}}} }}<!-- | ||
+ | -->{{#vardefine: is mapped | 1}} <!-- | ||
+ | -->}}<!-- | ||
-->{{#ifeq:{{{lat|}}}|||{{#ifeq:{{{lng|}}}|||<!-- | -->{{#ifeq:{{{lat|}}}|||{{#ifeq:{{{lng|}}}|||<!-- | ||
-->{{#set: | -->{{#set: | ||
Line 34: | Line 39: | ||
| latlng = {{{lat}}}, {{{lng}}} | | latlng = {{{lat}}}, {{{lng}}} | ||
}}<!-- | }}<!-- | ||
+ | -->{{#vardefine: is mapped | 1}}<!-- | ||
-->}}}}<!-- | -->}}}}<!-- | ||
-->{{#if:{{{corners|}}} | {{#set: corners = {{{corners}}} }} }}<!-- | -->{{#if:{{{corners|}}} | {{#set: corners = {{{corners}}} }} }}<!-- | ||
− | -->{{#if:{{#var: | + | -->{{#if:{{#var:is mapped}} | {{#set: map = {{#var:map}} }} }}<!-- |
Lay out the location page. | Lay out the location page. | ||
Line 54: | Line 60: | ||
{{{ps}}} }}<!-- | {{{ps}}} }}<!-- | ||
− | -->{{#if:{{#var:map}}| <nowiki /> | + | If the map page is defined, we provide a link to it. If, in addition, |
+ | this location has coordinate information, we link to this location's | ||
+ | page anchor. | ||
+ | -->{{#if: {{#var: is mapped}}<!-- | ||
+ | -->| {{#if:{{#var:map}}| <nowiki /> | ||
[[{{#var:map}}|Show in map]] }}<!-- | [[{{#var:map}}|Show in map]] }}<!-- | ||
+ | -->| {{#if:{{#var:map page}}| <nowiki /> | ||
+ | |||
+ | [[{{#var:map page}}|View campaign map]] }}<!-- | ||
+ | -->}}<!-- | ||
− | |||
-->[[Category: Locations in {{#var:campaign}}]]<!-- | -->[[Category: Locations in {{#var:campaign}}]]<!-- | ||
-->{{#switch: {{{threshold}}} | -->{{#switch: {{{threshold}}} |
Revision as of 17:17, 26 May 2011
Use this template for locations in FATE games.
Usage[edit]
{{#set: | is in campaign = Steel Town | is a = location | key = Location }}{{#set:has aspect=Location aspect}}{{#set: description = Location description }}{{#set: ps = Optional secondary description }}{{#set: idea = Idea }}{{#set: has face = Face Name }}{{#set: address = Address including postal code }}{{#set: map = {{#ask:is a::campaign mapcampaign::Steel Town|link=none}}#Location }}{{#set: altmap = {{#ask:is a::campaign mapcampaign::Steel Town|link=none}}/Location }}is a::campaign mapcampaign::Steel Town|link=none}}#Location">Aspects: Location aspect
Face: Face Name
Location description
Optional secondary description
[[{{#ask:is a::campaign mapcampaign::Steel Town|link=none}}#Location|Show in map]]
{{Steel Town location | idea = Idea | aspect = Location aspect | face = Face Name | address = Address including postal code | lat = | lng = | threshold = strong, weak or none | description = Location description | ps = Optional secondary description }}
The above documentation is transcluded from Template:Location/doc. (edit | history) Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |