Template:HadezFamilyData: Difference between revisions
Wraith0x29a (talk | contribs) m (testing) |
mNo edit summary |
||
(15 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{# | <includeonly>{{#get_web_data:url=https://battlemaster.org/data/family.php?{{#if:{{{family_name}}}|Name={{urlencode:{{{family_name}}}}}|ID={{{family_id}}} }}|format=XML | ||
|id=id | |data=id=id,name=name,fame=fame,wealth=wealth,error=error}} | ||
}} | |||
{{#if: {{#external_value:name}}| | {{#if: {{#external_value:name}}| | ||
{{#ifeq: {{{format}}} | prose | The {{{family_prefix}}}{{#external_value:name}}{{{family_suffix| family}}} has a [[fame]] of {{#external_value:fame}} and {{#external_value:wealth}} gold family wealth. | {{#ifeq: {{{format}}} | prose | The {{{family_prefix| }}} {{#external_value:name}} {{{family_suffix|family}}} has a [[fame]] of {{#external_value:fame}} and {{#external_value:wealth}} gold family wealth.| }} | ||
{{#ifeq: {{{format}}} | plain | | {{#ifeq: {{{format}}} | plain | | ||
<b>Name</b>: {{{family_prefix}}}{{#external_value:name}}{{{family_suffix| Family}}} <br> | <b>Name</b>: {{{family_prefix| }}} {{#external_value:name}} {{{family_suffix|Family}}} <br> | ||
<b>Fame</b>: {{#external_value:fame}}<br> | <b>Fame</b>: {{#external_value:fame}}<br> | ||
<b>Wealth</b>:{{#external_value:wealth}} gold | }} | <b>Wealth</b>: {{#external_value:wealth}} gold | }} | ||
{{#ifeq: {{{format}}} | box | <table style="float: right; font-size: 95%; text-align: left; border-collapse: collapse; margin-left: 1em; background: {{{background|#ddd}}};"> | {{#ifeq: {{{format}}} | box | <table style="float: right; font-size: 95%; text-align: left; border-collapse: collapse; margin-left: 1em; background: {{{background|#ddd}}};"> | ||
<tr> | <tr> | ||
<td colspan=2 style="background: {{{header|#cce}}}; text-align:center; font-weight:bold;">{{{family_prefix}}}{{#external_value:name}}{{{family_suffix| Family}}}</td> | <td colspan=2 style="background: {{{header|#cce}}}; padding: 5px; text-align:center; font-weight:bold;">{{{family_prefix| }}} {{#external_value:name}} {{{family_suffix|Family}}}</td> | ||
</tr><tr> | </tr><tr> | ||
<td align="left" valign="top" style="padding: 5px; background: {{{list|#ddf}}}; font-weight:bold;">Fame</td> | <td align="left" valign="top" style="padding: 5px; background: {{{list|#ddf}}}; font-weight:bold;">Fame</td> | ||
<td align="left" valign="top" style="padding: 5px; background: {{{value|#fff}}} | <td align="left" valign="top" style="padding: 5px; background: {{{value|#fff}}};">{{#external_value:fame}}</td> | ||
</tr><tr> | </tr><tr> | ||
<td align="left" valign="top" style="padding: 5px; background: {{{list|#ddf}}}; font-weight:bold;">Wealth</td> | <td align="left" valign="top" style="padding: 5px; background: {{{list|#ddf}}}; font-weight:bold;">Wealth</td> | ||
<td align="left" valign="top" style="padding: 5px; background: {{{value|#fff}}} | <td align="left" valign="top" style="padding: 5px; background: {{{value|#fff}}};">{{#external_value:wealth}} gold</td> | ||
</tr><tr> | </tr><tr> | ||
</table>| }} | </table>| }} | ||
| error in external data - {{#external_value:error}}<br> }} | | error in external data - {{#external_value:error}}<br> }} | ||
</includeonly> | |||
<noinclude>{{Documentation}}</noinclude> |
Latest revision as of 07:15, 7 February 2021
Template Documentation |
This documentation is transcluded from Template:HadezFamilyData/doc. |
SummaryThis template displays family details (fame and wealth), updated in real-time, taken from the game. There are currently three display formats..
Nice features include..
Author: Wraith0x29a Examples and UsageSee the examples page. Parameters
If invalid family_name or family_id are entered (user error or family has been removed from game) nothing is shown at all. To remove the default family_suffix of 'Family' set family_suffix to nothing, eg. HTML hexadecimal based color codes (eg. #AA0000 for mid red) should include the # prefix. Known IssuesThe background parameter does nothing at the moment. There may be an issue with some HTML colours set by parameters not displaying properly. |