Template:RealmBox: Difference between revisions
mNo edit summary |
No edit summary |
||
(27 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#get_web_data:url= | <includeonly>{{#get_web_data:url=https://battlemaster.org/data/realm/{{{World|{{{1}}}}}}/{{{RealmID|{{{2}}}}}} | ||
|format=XML | |||
|use xpath | |||
|data= | |data= | ||
Island=continent, | Island=realmdata/continent, | ||
TitleBackColor=colour, | TitleBackColor=realmdata/colour, | ||
Realm=name, | Realm=realmdata/name, | ||
Capital=capital, | Capital=realmdata/capital, | ||
FullName=fullname, | FullName=realmdata/fullname, | ||
Government=system, | Government=realmdata/system, | ||
Duchies=duchycount, | Duchies=realmdata/duchycount, | ||
RulerTitle=rulertitle, | RulerTitle=realmdata/rulertitle, | ||
RulerName=rulername, | RulerName=realmdata/rulername, | ||
GeneralTitle=generaltitle, | GeneralTitle=realmdata/generaltitle, | ||
GeneralName=generalname, | GeneralName=realmdata/generalname, | ||
JudgeTitle=judgetitle, | JudgeTitle=realmdata/judgetitle, | ||
JudgeName=judgename, | JudgeName=realmdata/judgename, | ||
BankerTitle=bankertitle, | BankerTitle=realmdata/bankertitle, | ||
BankerName=bankername | BankerName=realmdata/bankername, | ||
Regions=realmdata/regioncount, | |||
Population=realmdata/population, | |||
Gold=realmdata/gold, | |||
Food=realmdata/food, | |||
Nobles=realmdata/nobles, | |||
}} | }} | ||
{{RBTop}}{{RBTitle|TextColor = {{{TitleTextColor|{{{3|Black}}}}}}|BackColor = {{{TitleColor|{{{4|{{#external_value:TitleBackColor}}}}}}}}|Text = | {{RBTop}} | ||
{{RBTitle | |||
|TextColor = {{{TitleTextColor|{{{3|Black}}}}}} | |||
|BackColor = {{{TitleColor|{{{4|{{#external_value:TitleBackColor}}}}}}}} | |||
|Text = {{#external_value:FullName}} | |||
{{#if: {{{Flag|}}}|<br>[[File:{{{Flag}}}|{{{FlagSize|blank caption}}}]] | |||
{{#if: {{{FlagCaption|}}} | <br><div style="text-align: center; font-size: 75%; color: {{{TitleTextColor | |||
|Black}}}; font-weight:normal; font-style: oblique;">{{{FlagCaption}}}</div>|}}|}}<br><img src="https://battlemaster.org/experimental/RealmMap.php?shownames=regions&onlyRealm=yes&World={{{World|{{{1}}}}}}&Realm={{{RealmID|{{{2}}}}}}" height="{{{MapHeight|237}}}" width="{{{MapWidth|313}}}"> |}} | |||
{{RBTitle | |||
|TextColor = {{{TitleTextColor|{{{3|Black}}}}}} | |||
|BackColor = {{{TitleColor|{{{4|{{#external_value:TitleBackColor}}}}}}}} | |||
|Text = Overview}} | |||
{{RBDouble | {{RBDouble | ||
| | |LeftTextWeight = bold | ||
|BorderBottomStyle = hidden | |||
|Left = Island | |||
|Right = [[Located on::{{#external_value:Island}}]] | |||
|Right = | |||
[[Located on::{{#external_value:Island}}]] | |||
}} | }} | ||
{{RBTitle|TextColor = {{{TitleTextColor|{{{3|Black}}}}}}|BackColor = {{{TitleColor|{{{4|{{#external_value:TitleBackColor}}}}}}}}|Text = Council}} | {{RBDouble | ||
{{RBDouble|BackColor = #CCCCCC|LeftTextWeight = bold|Left = {{#external_value:RulerTitle}}|Right = [[has ruler::{{#external_value:RulerName}}| ]] {{FamilyLink|{{{World|{{{1}}}}}}|{{#external_value:RulerName}}}} }} | |LeftTextWeight = bold | ||
{{RBDouble|LeftTextWeight = bold | |BorderBottomStyle = hidden | ||
|Left = | |Left = Capital | ||
{{#external_value:GeneralTitle}} | |Right = [[{{#external_value:Capital}}]] | ||
{{#external_value: | }} | ||
{{RBDouble | |||
|LeftTextWeight = bold | |||
{{FamilyLink|{{{World|{{{1}}}}}}|{{#external_value:JudgeName}}}} {{#set: has judge | |BorderBottomStyle = hidden | ||
|Left = Largest City | |||
|Right = {{#ask: [[part of::{{#external_value:Realm}}]] [[is regiontype::Stronghold||City]] | limit = 1 | sort = population | order = desc | searchlabel= | default=Unknown}} | |||
}} | |||
{{RBDouble | |||
|LeftTextWeight = bold | |||
|BorderBottomStyle = hidden | |||
|Left = Government | |||
|Right = [[government type is::{{#external_value:Government}}]] | |||
}} | |||
{{#if: {{{StateReligion|}}} | {{RBDouble | |||
|LeftTextWeight = bold | |||
|BorderBottomStyle = hidden | |||
|Left = State Religion | |||
|Right = [[has state religion::{{{StateReligion}}}]] | |||
}}}} | |||
{{RBDouble | |||
|LeftTextWeight = bold | |||
|BorderBottomStyle = hidden | |||
|Left = Duchies | |||
|Right = {{#external_value:Duchies}} | |||
}} | |||
{{RBDouble | |||
|LeftTextWeight = bold | |||
|BorderBottomStyle = hidden | |||
|Left = Regions | |||
|Right = {{#ask: [[part of::{{#external_value:Realm}}]] [[is regiontype::+]] | format = count | default=Unknown}} | |||
}} | |||
{{RBDouble | |||
|LeftTextWeight = bold | |||
|BorderBottomStyle = hidden | |||
|Left = Population | |||
|Right = [[population::{{#ask: [[part of::{{#external_value:Realm}}]] | ?population | format = sum | default = 0}}]] | |||
}} | |||
{{RBDouble | |||
|LeftTextWeight = bold | |||
|BorderBottomStyle = hidden | |||
|Left = Gold | |||
|Right = [[gold::{{#external_value:Gold}}]] | |||
}} | |||
{{RBDouble | |||
|LeftTextWeight = bold | |||
|BorderBottomStyle = hidden | |||
|Left = Food | |||
|Right = [[food::{{#external_value:Food}}]] | |||
}} | |||
{{RBDouble | |||
|LeftTextWeight = bold | |||
|Left = Nobles | |||
|Right = [[nobles::{{#external_value:Nobles}}]] | |||
}} | |||
{{RBTitle | |||
|TextColor = {{{TitleTextColor|{{{3|Black}}}}}} | |||
|BackColor = {{{TitleColor|{{{4|{{#external_value:TitleBackColor}}}}}}}} | |||
|Text = Council}} | |||
{{RBDouble | |||
|BackColor = #CCCCCC | |||
|LeftTextWeight = bold | |||
|Left = {{#external_value:RulerTitle}} | |||
|Right = [[has ruler::{{FamilyName|{{{World|{{{1}}}}}}|{{#external_value:RulerName}}}}| ]] {{FamilyLink|{{{World|{{{1}}}}}}|{{#external_value:RulerName}}}} }} | |||
{{RBDouble | |||
|LeftTextWeight = bold | |||
|BorderBottomStyle = hidden | |||
|Left = {{#external_value:GeneralTitle}} | |||
|Right = {{FamilyLink|{{{World|{{{1}}}}}}|{{#external_value:GeneralName}}}} {{#set: has general={{FamilyName|{{{World|{{{1}}}}}}|{{#external_value:GeneralName}}}} }} | |||
}} | |||
{{RBDouble | |||
|LeftTextWeight = bold | |||
|BorderBottomStyle = hidden | |||
|Left = {{#external_value:JudgeTitle}} | |||
|Right = {{FamilyLink|{{{World|{{{1}}}}}}|{{#external_value:JudgeName}}}} {{#set: has judge={{FamilyName|{{{World|{{{1}}}}}}|{{#external_value:JudgeName}}}} }} | |||
}} | |||
{{RBDouble | |||
|LeftTextWeight = bold | |||
|Left = {{#external_value:BankerTitle}} | |||
|Right = {{FamilyLink|{{{World|{{{1}}}}}}|{{#external_value:BankerName}}}} {{#set: has banker={{FamilyName|{{{World|{{{1}}}}}}|{{#external_value:BankerName}}}} }} | |||
}} | }} | ||
{{RBTitle |BackColor = {{{TitleColor|{{{4|{{#external_value:TitleBackColor}}}}}}}} |TextColor = {{{TitleTextColor|{{{3|Black}}}}}} |Text = Regions }} | {{RBTitle |BackColor = {{{TitleColor|{{{4|{{#external_value:TitleBackColor}}}}}}}} |TextColor = {{{TitleTextColor|{{{3|Black}}}}}} |Text = Regions }} | ||
{{RBSingle|CellAlign=center|BackColor=#DDDDDD|Text = <table style="margin: 0px; border-collapse:collapse; width:95%; border: hidden;"><tr style="padding: 1px 0.5em; text-align: left; font-size: 100%; color: black; font-weight:normal; border-bottom: 1px solid #FFFFFF; background: #DDDDDD; width: 50%;"><td>'''Region'''</td><td>'''Lord'''</td></tr>{{#ask: [[part of::{{#external_value:Realm}}]] | mainlabel=region | ?has lord=Lord | format = template | template = RegionListFormat | headers = hide | default=Unknown}}</table>}} | {{RBSingle|CellAlign=center|BackColor=#DDDDDD|Text = <table style="margin: 0px; border-collapse:collapse; width:95%; border: hidden;"><tr style="padding: 1px 0.5em; text-align: left; font-size: 100%; color: black; font-weight:normal; border-bottom: 1px solid #FFFFFF; background: #DDDDDD; width: 50%;"><td>'''Region'''</td><td>'''Lord'''</td></tr>{{#ask: [[part of::{{#external_value:Realm}}]] | mainlabel=region | ?has lord=Lord | format = template | template = RegionListFormat | headers = hide | default=Unknown}}</table>}} | ||
{{RBBottom}} | {{RBBottom}} | ||
[[Category:Realms]][[Category:{{#external_value:Island}}]][[Category:{{#external_value:Realm}}]]</includeonly><noinclude>{{SemanticCodes}}{{Documentation}}[[Category:RealmBox]]</noinclude> | [[Category:Realms]][[Category:{{#external_value:Island}}]][[Category:{{#external_value:Realm}}]]</includeonly> | ||
<noinclude>{{SemanticCodes}}{{Documentation}}[[Category:RealmBox]]</noinclude> |
Latest revision as of 23:29, 26 January 2022
Semantic Coded Template |
This template contains semantic coding. Do not use this template for anything other than its intended purpose. |
Template Documentation |
This documentation is transcluded from Template:RealmBox/doc. |
IntroThis 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.
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 TemplateCopy one of the blank templates provided at the bottom of this page. Special Considerations
ParametersThis section lists all the available parameters for use with the template. It is split into two sections; "Required" and "Optional". RequiredThis is a listing of the required parameters.
Optional
TemplateYou can copy/paste the following guide into your page, then add the values. Minimal RealmBoxThis provides the minimum parameters needed to add a RealmBox to your realm page. {{RealmBox |World = |RealmID = }} Full RealmBoxThis 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 MethodRealmBox 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
|