Template:LevelMap

From Ghost Master Complete Edition Wiki
Jump to navigation Jump to search
Template-info.svg Documentation Edit this documentation at Template:LevelMap/doc.

This is a formatting template to show the levels of an act in the game. It uses the Gadget LevelMap styling and javascript.

Usage

{{LevelMap|Act1}}


{{LevelMap|Act2}}


{{LevelMap|Act3}}


{{LevelMap|Epilogue}}


TemplateData

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Act1

The name of the act in which levels occur. Not case sensitive. Act1, act1, aCt1, ACT1, Act2, Act3, Epilogue

Example
Act2
Stringrequired

Changing or adding Acts or Levels

Acts

In the gadgets style sheet an act is defined by the following lines:

.levelmap--act1, 
.levelmap--act1 .levelmap--level--clickable { 
    background-image: url(/images/thumb/d/d5/Act_1-Background.jpg/1030px-Act_1-Background.jpg); 
}

.levelmap--epilogue, 
.levelmap--epilogue .levelmap--level--clickable { 
    background-image: url(/images/thumb/3/3d/Epilogue-Background.jpg/1030px-Epilogue-Background.jpg); 
}

The name of the act needs to be written in only lowercase letters, numbers and dashes. For the corresponding background image, a version that is 1030 pixels wide needs to be chosen. The hash cannot be guessed, so the easiest way to obtain it would be to display it once as [[File:actname-background.filetype|1030px]].

It can then be added in the Template as:

 | actname =
	<div class="levelmap--level levelmap--level--DarkSprite" data-link="The Dark Sprite"></div>
	<div class="levelmap--level levelmap--level--GhostdogMillionaire" data-link="Ghostdog Millionaire"></div>
	<div class="levelmap--level levelmap--level--HordeOfTheRings" data-link="The Horde of the Rings"></div>
	<div class="levelmap--level levelmap--level--OldWisps" data-link="No Crypt for Old Wisps"></div>

Levels

A level can be added by including a new line in the corresponding act with a unique class: levelmap--level--newLevelName and a data-link attribute for the link to the level on the wiki.

<div class="levelmap--level levelmap--level--OldWisps" data-link="No Crypt for Old Wisps"></div>

The image for the corresponding act needs to have the level included for it to be visible. The level's name and rotation needs to be placed manually once, and the level's outline be stored in a css variable. This variable will be used multiple times for better web compatibility. To create a proper outline, that image can be imported into an image manipulation tool which allows you to export a path. (Like GIMP) If no path has been created yet, it will default to a circle in the top left corner to avoid breaking. Unfortunately, if the set path is not viable, it will break regardless.

.levelmap--level--Haunting101 .levelmap--level--name {
    top:190px;
    left:300px;
    transform:rotate(-5deg)
}

.levelmap--level--Haunting101 {
    --path: path('M 336.11,238.77
           C 339.93,234.95 356.55,232.36 379.09,230.00
             401.64,227.64 429.37,227.82 437.38,230.38
             439.74,231.47 436.68,241.01 462.50,259.19
             465.95,264.01 456.28,267.04 452.19,273.31
             448.10,279.59 444.21,287.95 443.39,291.04
             452.52,292.91 459.55,298.18 459.45,301.09
             459.36,304.00 456.00,308.00 443.27,310.09
             443.27,310.09 443.31,314.56 443.31,314.56
             443.31,314.56 458.25,311.38 459.50,312.38
             460.75,313.38 461.25,318.00 460.19,320.69
             459.13,323.38 435.25,325.13 435.25,325.13
             435.25,325.13 443.75,330.94 449.88,339.44
             448.06,340.44 424.31,343.06 419.44,343.13
             418.89,343.13 418.51,341.85 419.44,341.38
             420.97,340.59 424.56,340.38 424.88,339.44
             425.69,333.44 422.06,330.75 421.56,326.94
             402.00,328.75 368.88,333.38 348.75,334.25
             351.31,339.94 352.38,344.00 352.44,348.31
             354.69,347.50 357.13,347.94 358.00,351.00
             358.26,351.91 357.94,353.27 356.25,354.06
             354.45,354.90 350.25,355.33 347.88,355.44
             344.96,355.57 343.80,355.34 343.44,353.94
             342.50,350.31 347.63,349.25 348.88,348.81
             347.06,340.88 345.75,338.75 343.50,335.25
             336.94,335.56 329.94,336.00 329.94,336.00
             329.94,336.00 328.13,328.81 328.13,328.81
             328.13,328.81 337.94,328.06 337.94,328.06
             334.13,320.38 329.35,317.30 327.78,316.17
             324.26,316.70 318.63,312.38 318.63,312.38
             318.63,312.38 313.75,311.13 313.75,311.13
             313.75,311.13 312.75,308.13 312.75,308.13
             312.75,308.13 312.19,300.19 312.19,300.19
             312.19,300.19 313.44,296.00 313.44,296.00
             313.44,296.00 327.94,296.13 327.94,296.13
             327.94,296.13 326.19,291.00 315.75,279.94
             309.13,275.88 306.53,274.75 305.81,270.31
             326.22,257.88 328.36,248.18 336.11,238.77 Z'); 
}