Difference between revisions of "Template:RealmBox/doc"

From BattleMaster Wiki
Jump to navigation Jump to search
m
m
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<noinclude>{{DocSubpage}}</noinclude>
 
<noinclude>{{DocSubpage}}</noinclude>
 
== Intro ==
 
== Intro ==
This template is part of the [[RealmBox Project]]. It is enabled for semantic coding of the included data. This template uses all available [[Semantic Wiki|semantic coding]] at the realm level, with the exception of the realm founding date and realm founder.
+
This template is part of the [[RealmBox Project]]. It is enabled for importing of the game's external data feed, and for semantic coding of the included data. This template uses all available [[Semantic Wiki|semantic coding]] at the realm level, with the exception of the realm founding date and realm founder.
  
 
* There are a few parameters that are required to be included. These are identified in the parameter list below.
 
* There are a few parameters that are required to be included. These are identified in the parameter list below.
* Several pieces of information will be automatically determined and added to the page. This includes the number of duchies, number of regions, region names, region lords, etc. You ''cannot'' manually specify this information. If it is not correct here, then go fix the appropriate region pages.
+
* Nearly all data in this infobox is pulled directly from the game. You ''cannot'' manually specify this information.
  
'''NOTE:''' The template includes [[:Category:Realms]]. If you use this template, you do not need to manually add this category to your page.
+
'''NOTE:''' The template includes the realm category, [[:Category:Realms]], and the appropriate island category. If you use this template, you do not need to manually add these categories to your page.
  
 
== Using the Template ==
 
== Using the Template ==
There are three ways to use this template.
+
Copy one of the blank templates provided at the bottom of this page.
# The first, and easiest, way is to just copy the "Minimal RealmBox" template shown below. This will give you a basic RealmBox with a minimum of information.
 
# The second way, requiring only a little more effort, is to copy the "Suggested RealmBox" template provided below. This allows you to specify additional information, such as food and gold values, and provide background and text colors for your RealmBox.
 
# If you really want to get fancy, the go ahead and mix and match individual pieces of information you want to see on your RealmBox. Check the list below for a description of available pieces. If you specify it, RealmBox will show it.
 
  
 
=== Special Considerations ===
 
=== Special Considerations ===
* If your realm is named after a city, such as Perdan or Sirion, then your realm page is named like this: [[Perdan (Realm)]]. This means that the pagename is ''not'' your true realm name. In order for the semantic wiki to find the regions that belong to your realm, you will need to give it the true realm name. Make sure the parameter "Realm = " is included. If you specify it when it's  not needed, it won't hurt anything.
+
* If you want a map in your RealmBox, then you will need to specify a "MapName = " parameter. Due to the way the wiki handles off-site image links, the spaces in the realm map names will cause problems. If your realm name has spaces in it you need to encode them as "%20". This will allow the wiki to show the map. For example, if you are putting a map in the RealmBox for "Pian en Luries", you need to include the parameter "MapName = Pian%20en%20Luries".
* If you want a map in your RealmBox, then you will need to specify a "MapName = " parameter. Due to the way the wiki handles off-site image links, the spaces in the realm map names will cause problems. If your realm name has spaces in it (and possibly other special characters, too), you need to encode them. This will allow the wiki to show the map. For example, if you are putting a map in the RealmBox for Pian en Luries, you need to include the parameter "MapName = Pian%20en%20Luries".
 
  
 
== Parameters ==
 
== Parameters ==
This section lists all the available parameters for use with the template. It is split into two sections; "Required/Suggested" and "Optional".
+
This section lists all the available parameters for use with the template. It is split into two sections; "Required" and "Optional".
  
=== Required/Suggested ===
+
=== Required ===
This is a listing of all the required, and highly suggested parameters. You don't ''need' to specify a RulerTitle, for example, but you probably should.
+
This is a listing of the required parameters.
* Island - ''{{C|red|(Required)}}'' The name of the island on which the realm is located.
+
*World = {{c|Red|Required}}. The world number the realm is on. EC=1, AT=2, BT=4, Col=6, FEI=7, DW=8.
* Government - ''{{C|red|(Required)}}'' The government type: Monarchy, Theocracy, etc.
+
*RealmID = {{c|Red|Required}}. The ID number of the realm. You can get this from the island realm list. The URL of the "Details" link provides this number. ''Examples: "<nowiki>https://battlemaster.org/testing/RealmDetails.php?ID=12</nowiki>" shows 12 as the RealmID for Astrum on Dwilight.''
* RulerTitle - Ruler's custom title. Defaults to "Ruler".
 
* RulerName - ''{{C|red|(Required)}}'' Ruler's name.
 
* GeneralTitle - General's custom title. Defaults to "General".
 
* GeneralName - ''{{C|red|(Required)}}'' General's name.
 
* JudgeTitle - Judge's custom title. Defaults to "Judge".
 
* JudgeName - ''{{C|red|(Required)}}'' Judge's name.
 
* BankerTitle - Banker's custom title. Defaults to "Banker".
 
* BankerName - ''{{C|red|(Required)}}'' Banker's name.
 
 
 
=== Special ===
 
The following two parameters require special handling. Read carefully:
 
* Realm - If your realm is named after a region (like Perdan or Sirion) then you should enter your realm name here, without the "(Realm)" tag. That will let them Semantic Tagging work properly.
 
* MapName - If you want a map in your RealmBox, then enter the realm name here. You must replace all spaces with "%20", This is because of the way the wiki handles off-site image links. For example, to include a map for "Pian en Luries", you would enter "Pian%20en%20Luries". If your realm is very wide, this will make your RealmBox very wide, too.
 
  
 
=== Optional ===
 
=== Optional ===
* TitleBackColor - The color code for the title bar backgrounds. Defaults to a light blue/gray color. ''(#aabbcc)''
 
 
* TitleTextColor - The color code of the title bar text. Defaults to black. ''(#000000)''
 
* TitleTextColor - The color code of the title bar text. Defaults to black. ''(#000000)''
 +
* TitleColor - The color code of the background of the title bars. Defaults to the realm color set by the realm's ruler. This is the color used for the realm of the diplomacy chart and stats graphs.
 
* Flag - The name of the image file to use at the top of the RealmBox. Must be an image uploaded to the wiki. Do not include the "Image:" part of the name. Leave blank if you don't want a flag displayed.
 
* Flag - The name of the image file to use at the top of the RealmBox. Must be an image uploaded to the wiki. Do not include the "Image:" part of the name. Leave blank if you don't want a flag displayed.
* FlagCaption - An optional caption to go under the flag image. Ignored if '''Flag''' is is not specified.
+
* FlagSize - An image format or size parameter.
 +
* FlagCaption - A caption to go under the flag image. Ignored if '''Flag''' is is not specified.
 +
* MapName - If you want a map in your RealmBox, then enter the realm name here. You must replace all spaces with "%20", This is because of the way the wiki handles off-site image links. For example, to include a map for "Pian en Luries", you would enter "Pian%20en%20Luries". If your realm is very wide, this will make your RealmBox very wide, too.
 +
* MapHeight - Height of map. Numbers only.
 +
* MapWidth - Width of map. Numbers only.
 
* StateReligion - The official state religion of the realm.
 
* StateReligion - The official state religion of the realm.
 
* Nobles - The number of nobles in the realm.
 
* Nobles - The number of nobles in the realm.
Line 55: Line 42:
 
This provides the minimum parameters needed to add a RealmBox to your realm page.
 
This provides the minimum parameters needed to add a RealmBox to your realm page.
 
<pre>{{RealmBox
 
<pre>{{RealmBox
|Island =  
+
|World =  
|Government =
+
|RealmID =  
|RulerTitle =
 
|RulerName =
 
|GeneralTitle =
 
|GeneralName =
 
|JudgeTitle =
 
|JudgeName =
 
|BankerTitle =
 
|BankerName =  
 
 
}}</pre>
 
}}</pre>
  
=== Suggested RealmBox ===
+
=== Full RealmBox ===
This provides the suggested parameters you can use with RealmBox to show more information, and to customize it with your realm's colors.
+
This provides the complete list of parameters that can be used with RealmBox. You can pick and choose which one you want, so long as you provide the two required parameters.
 +
 
 
<pre>{{RealmBox
 
<pre>{{RealmBox
|TitleBackColor =  
+
|World =
 +
|RealmID =
 +
|TitleColor =  
 
|TitleTextColor =  
 
|TitleTextColor =  
|Island =
 
|Realm =
 
 
|MapName =  
 
|MapName =  
|Government =  
+
|Flag =  
|RulerTitle =
+
|FlagCaption =  
|RulerName =
 
|GeneralTitle =
 
|GeneralName =
 
|JudgeTitle =
 
|JudgeName =
 
|BankerTitle =
 
|BankerName =  
 
 
|Nobles =  
 
|Nobles =  
 
|Food =  
 
|Food =  
 
|Gold =  
 
|Gold =  
 
}}</pre>
 
}}</pre>
 +
 +
===Alternate Method===
 +
RealmBox supports inline parameters for basic usage, like this:
 +
<pre>{{RealmBox|(World)|(RealmID)|(TitleColor)|(TitleTextColor)}}</pre>
 +
Just replace the items in parentheses with the actual values. For example, the RealmBox for [[Astrum]] could be specified as:
 +
<pre>{{RealmBox|8|12|Blue|White}}</pre>
 +
Note that with this method, you can only provide the Four listed parameters.
  
 
== Known Issues ==
 
== Known Issues ==
 
* The SUM output format for semantic queries inserts a line break before the value. This seems the be a ''{{T|bug|"feature"}}'' of the semantic output formats extension. The means the Population figure is about a half-line below where it should be. I don't know how to force it back to where it should be. Maybe some HTML/CSS guru can fix it.
 
* The SUM output format for semantic queries inserts a line break before the value. This seems the be a ''{{T|bug|"feature"}}'' of the semantic output formats extension. The means the Population figure is about a half-line below where it should be. I don't know how to force it back to where it should be. Maybe some HTML/CSS guru can fix it.

Latest revision as of 09:14, 7 February 2021

Gtk-dialog-info.svg Page Information
This is a documentation subpage for the RealmBox template.
It contains usage information, categories and other content that is not part of the original template page.

Intro

This template is part of the RealmBox Project. It is enabled for importing of the game's external data feed, and for semantic coding of the included data. This template uses all available semantic coding at the realm level, with the exception of the realm founding date and realm founder.

  • There are a few parameters that are required to be included. These are identified in the parameter list below.
  • Nearly all data in this infobox is pulled directly from the game. You cannot manually specify this information.

NOTE: The template includes the realm category, Category:Realms, and the appropriate island category. If you use this template, you do not need to manually add these categories to your page.

Using the Template

Copy one of the blank templates provided at the bottom of this page.

Special Considerations

  • If you want a map in your RealmBox, then you will need to specify a "MapName = " parameter. Due to the way the wiki handles off-site image links, the spaces in the realm map names will cause problems. If your realm name has spaces in it you need to encode them as "%20". This will allow the wiki to show the map. For example, if you are putting a map in the RealmBox for "Pian en Luries", you need to include the parameter "MapName = Pian%20en%20Luries".

Parameters

This section lists all the available parameters for use with the template. It is split into two sections; "Required" and "Optional".

Required

This is a listing of the required parameters.

  • World = Required. The world number the realm is on. EC=1, AT=2, BT=4, Col=6, FEI=7, DW=8.
  • RealmID = Required. The ID number of the realm. You can get this from the island realm list. The URL of the "Details" link provides this number. Examples: "https://battlemaster.org/testing/RealmDetails.php?ID=12" shows 12 as the RealmID for Astrum on Dwilight.

Optional

  • TitleTextColor - The color code of the title bar text. Defaults to black. (#000000)
  • TitleColor - The color code of the background of the title bars. Defaults to the realm color set by the realm's ruler. This is the color used for the realm of the diplomacy chart and stats graphs.
  • Flag - The name of the image file to use at the top of the RealmBox. Must be an image uploaded to the wiki. Do not include the "Image:" part of the name. Leave blank if you don't want a flag displayed.
  • FlagSize - An image format or size parameter.
  • FlagCaption - A caption to go under the flag image. Ignored if Flag is is not specified.
  • MapName - If you want a map in your RealmBox, then enter the realm name here. You must replace all spaces with "%20", This is because of the way the wiki handles off-site image links. For example, to include a map for "Pian en Luries", you would enter "Pian%20en%20Luries". If your realm is very wide, this will make your RealmBox very wide, too.
  • MapHeight - Height of map. Numbers only.
  • MapWidth - Width of map. Numbers only.
  • StateReligion - The official state religion of the realm.
  • Nobles - The number of nobles in the realm.
  • Food - The approximate food production of the realm.
  • Gold - Gold production of the realm.

Template

You can copy/paste the following guide into your page, then add the values.

Minimal RealmBox

This provides the minimum parameters needed to add a RealmBox to your realm page.

{{RealmBox
|World = 
|RealmID = 
}}

Full RealmBox

This provides the complete list of parameters that can be used with RealmBox. You can pick and choose which one you want, so long as you provide the two required parameters.

{{RealmBox
|World = 
|RealmID = 
|TitleColor = 
|TitleTextColor = 
|MapName = 
|Flag = 
|FlagCaption = 
|Nobles = 
|Food = 
|Gold = 
}}

Alternate Method

RealmBox supports inline parameters for basic usage, like this:

{{RealmBox|(World)|(RealmID)|(TitleColor)|(TitleTextColor)}}

Just replace the items in parentheses with the actual values. For example, the RealmBox for Astrum could be specified as:

{{RealmBox|8|12|Blue|White}}

Note that with this method, you can only provide the Four listed parameters.

Known Issues

  • The SUM output format for semantic queries inserts a line break before the value. This seems the be a "feature" of the semantic output formats extension. The means the Population figure is about a half-line below where it should be. I don't know how to force it back to where it should be. Maybe some HTML/CSS guru can fix it.