Template:Location Card/doc: Difference between revisions

From CrossCode Wiki
Jump to navigation Jump to search
No edit summary
(Added TemplateData)
Line 1: Line 1:
{{doc/start}}
{{doc/start}}
{{Location_Card|name=Type the name here
{{Location Card
|color=#004F80
| name = Name Goes Here
|image=File:Autumn's Rise.png
| color = {{Loc color|orange}}
|description=Type the description here.
| image = File:Autumn's Rise.png
|room_count=16
| description = Description goes here.
|treasure_default=1
| room_count = 16
|treasure_key=0
| trader_count = 10
|treasure_masterkey=0
| quest_count =  
|treasure_bronze=1
| treasure_default = 4
|treasure_silver=0
| treasure_bronze = 7
|treasure_gold=2
| treasure_silver = 0
|trader_count=10}}
| treasure_gold = 2
}}
This template is for use at the top of every [[location]] article to provide basic stats and info, as well as a location navbox.


This template is for use on every page that is a [[Location]]. Here's how you can use it:
==Usage==
Here is the basic code for the template which can be copied into the editor:
<pre>{{Location Card
| name =
| color = {{Loc color|???}}
| image = File:???.png
| description =
| room_count =
| trader_count =
| quest_count =
| treasure_default =
| treasure_bronze =
| treasure_silver =
| treasure_gold =
| treasure_key =
| treasure_masterkey =
}}</pre>


<pre>{{Location_Card|name=Type the name here
Below is the code for the location card seen on this page:
|color=#004F80
<pre>{{Location Card
|image=File:Autumn's Rise.png
| name = Name Goes Here
|description=Type the description here.
| color = {{Loc color|orange}}
|room_count=16
| image = File:Autumn's Rise.png
|treasure_default=1
| description = Description goes here.
|treasure_key=0
| room_count = 16
|treasure_masterkey=0
| trader_count = 10
|treasure_bronze=1
| quest_count =  
|treasure_silver=0
| treasure_default = 4
|treasure_gold=2
| treasure_bronze = 7
|trader_count=10}}</pre>
| treasure_silver = 0
| treasure_gold = 2
}}</pre>


The above produces the location card you see to the right. Note that the real code behind this template is hidden from view until it is included. Also note that if you leave off any of the room_count, treasure_count, or trader_count parameters, then they will be filled with a question mark. Feel free to change this yourself, or leave a message on the talk page and I will take a look.
==TemplateData==
 
{{TemplateData
This table lists the RGB values used for the background colors:
| {{TemplateData/entry
{| class="wikitable"
    | name = Name
|+ Background colors
    | param = name
|-
    | desc = Name of the location
| style="background:#004F80" | #004F80 || style="background:#BF5900" | #BF5900
    | def = NULL
| style="background:#5D6466" | #5D6466 || style="background:#8C7438" | #8C7438
    | type = String
| style="background:#00734F" | #00734F || style="background:#403380" | #403380
    | status = Required}}
| style="background:#801B47" | #801B47
{{TemplateData/entry
|}
    | name = Color
    | param = color
    | desc = value of the background color for the header. Can be done using either {{tl|Loc color}} or HTML syntax.
    | def = NULL
    | example = <code>#00FF00</code>, <code><nowiki>{{Loc color|green}}</nowiki></code>
    | type = String
    | status = Required
}}
{{TemplateData/entry
    | name = Image
    | param = image
    | desc = Filename of a representative image of the location.
    | def = NULL
    | example = File:Autumn's Rise.png
    | type = String
    | status = Required
}}
{{TemplateData/entry
    | name = Description
    | param = description
    | desc = Description of the location shown on the in-game world map.
    | def = NULL
    | type = String
    | status = Required
}}
{{TemplateData/entry
    | name = Room count
    | param = room_count
    | desc = Number of rooms in the location.
    | def = ???
    | type = Number
    | status = Recommended
}}
{{TemplateData/entry
    | name = Trader count
    | param = trader_count
    | desc = Number of traders in the location. Hidden if no value is assigned.
    | def = NULL
    | type = Number
    | status = Optional
}}
{{TemplateData/entry
    | name = Quest count
    | param = quest_count
    | desc = Number of quests that are started in the location. Hidden if no value is assigned.
    | def = NULL
    | type = Number
    | status = Optional
}}
{{TemplateData/entry
    | name = Normal chest count
    | param = treasure_default
    | desc = Number of regular chests in the location. Hidden if no value is assigned.
    | def = NULL
    | type = Number
    | status = Optional
}}
{{TemplateData/entry
    | name = Bronze chest count
    | param = treasure_bronze
    | desc = Number of bronze chests in the location. Hidden if no value is assigned.
    | def = NULL
    | type = Number
    | status = Optional
}}
{{TemplateData/entry
    | name = Silver chest count
    | param = treasure_silver
    | desc = Number of silver chests in the location. Hidden if no value is assigned.
    | def = NULL
    | type = Number
    | status = Optional
}}
{{TemplateData/entry
    | name = Gold chest count
    | param = treasure_gold
    | desc = Number of gold chests in the location. Hidden if no value is assigned.
    | def = NULL
    | type = Number
    | status = Optional
}}
{{TemplateData/entry
    | name = Key chest count
    | param = treasure_key
    | desc = Number of Key chests in the location. Hidden if no value is assigned.
    | def = NULL
    | type = Number
    | status = Optional
}}
{{TemplateData/entry
    | name = Master Key chest count
    | param = treasure_masterkey
    | desc = Number of Master Key chests in the location. Hidden if no value is assigned.
    | def = NULL
    | type = Number
    | status = Optional
}}
}}


{{doc/end}}
{{doc/end}}

Revision as of 21:06, 9 September 2019

File:Template-info.svg Template Documentation

This template is for use at the top of every location article to provide basic stats and info, as well as a location navbox.

Usage

Here is the basic code for the template which can be copied into the editor:

{{Location Card
| name =
| color = {{Loc color|???}}
| image = File:???.png
| description = 
| room_count =
| trader_count =
| quest_count =
| treasure_default =
| treasure_bronze =
| treasure_silver =
| treasure_gold =
| treasure_key =
| treasure_masterkey =
}}

Below is the code for the location card seen on this page:

{{Location Card
| name = Name Goes Here
| color = {{Loc color|orange}}
| image = File:Autumn's Rise.png
| description = Description goes here.
| room_count = 16
| trader_count = 10
| quest_count = 
| treasure_default = 4
| treasure_bronze = 7
| treasure_silver = 0
| treasure_gold = 2
}}

TemplateData

Do not use named parameter for 1 ... x. The first Parameter will be automatically marked as 1, the second as 2 and so on.

Parameter Description Type Status
Name name

Name of the location

Default:
NULL
Example:
no example
String Required
Color color

value of the background color for the header. Can be done using either {{Loc color}} or HTML syntax.

Default:
NULL
Example:
#00FF00, {{Loc color|green}}
String Required
Image image

Filename of a representative image of the location.

Default:
NULL
Example:
File:Autumn's Rise.png
String Required
Description description

Description of the location shown on the in-game world map.

Default:
NULL
Example:
no example
String Required
Room count room_count

Number of rooms in the location.

Default:
???
Example:
no example
Number Recommended
Trader count trader_count

Number of traders in the location. Hidden if no value is assigned.

Default:
NULL
Example:
no example
Number Optional
Quest count quest_count

Number of quests that are started in the location. Hidden if no value is assigned.

Default:
NULL
Example:
no example
Number Optional
Normal chest count treasure_default

Number of regular chests in the location. Hidden if no value is assigned.

Default:
NULL
Example:
no example
Number Optional
Bronze chest count treasure_bronze

Number of bronze chests in the location. Hidden if no value is assigned.

Default:
NULL
Example:
no example
Number Optional
Silver chest count treasure_silver

Number of silver chests in the location. Hidden if no value is assigned.

Default:
NULL
Example:
no example
Number Optional
Gold chest count treasure_gold

Number of gold chests in the location. Hidden if no value is assigned.

Default:
NULL
Example:
no example
Number Optional
Key chest count treasure_key

Number of Key chests in the location. Hidden if no value is assigned.

Default:
NULL
Example:
no example
Number Optional
Master Key chest count treasure_masterkey

Number of Master Key chests in the location. Hidden if no value is assigned.

Default:
NULL
Example:
no example
Number Optional

See Template:TemplateData and Template:TemplateData/entry for more information about the parameter list and DDNCode for more information about types and the DDN Notation

Test of raw TemplateData output:

No description.

Template parameters

ParameterDescriptionTypeStatus
Namename

Name of the location

Stringrequired
Colorcolor

value of the background color for the header. Can be done using either <code>{{[[Template:Loc color|Loc color]]}}</code> or HTML syntax.

Example
<code>#00FF00</code>, <code>{{Loc color|green}}</code>
Stringrequired
Imageimage

Filename of a representative image of the location.

Example
File:Autumn's Rise.png
Stringrequired
Descriptiondescription

Description of the location shown on the in-game world map.

Stringrequired
Room countroom_count

Number of rooms in the location.

Default
???
Numbersuggested
Trader counttrader_count

Number of traders in the location. Hidden if no value is assigned.

Numberoptional
Quest countquest_count

Number of quests that are started in the location. Hidden if no value is assigned.

Numberoptional
Normal chest counttreasure_default

Number of regular chests in the location. Hidden if no value is assigned.

Numberoptional
Bronze chest counttreasure_bronze

Number of bronze chests in the location. Hidden if no value is assigned.

Numberoptional
Silver chest counttreasure_silver

Number of silver chests in the location. Hidden if no value is assigned.

Numberoptional
Gold chest counttreasure_gold

Number of gold chests in the location. Hidden if no value is assigned.

Numberoptional
Key chest counttreasure_key

Number of Key chests in the location. Hidden if no value is assigned.

Numberoptional
Master Key chest counttreasure_masterkey

Number of Master Key chests in the location. Hidden if no value is assigned.

Numberoptional