Difference between revisions of "Template:HadezCharData/doc"

From BattleMaster Wiki
Jump to navigation Jump to search
m
m
Line 17: Line 17:
 
<b>format</b> - (required) - The format to display the output in (current options are 'prose' or 'plain').
 
<b>format</b> - (required) - The format to display the output in (current options are 'prose' or 'plain').
  
If invalid world or character parameters are entered (user errror or if a character has died or been deleted) nothing is shown at all.
+
If invalid world or character parameters are entered (user error or if a character has died or been deleted) nothing is shown at all.
  
 
===Examples===
 
===Examples===
Line 25: Line 25:
 
<nowiki>{{HadezCharData|world_id=6|char_name=Erisha|format=prose}}</nowiki>
 
<nowiki>{{HadezCharData|world_id=6|char_name=Erisha|format=prose}}</nowiki>
  
Erisha [[Da Hadez Family|Da Hadez]] is a [[warrior]]-[[hero]] in the realm of [[Oritolon]] on the [[Colonies]] continent. She is 57 years old, is [[Lord]] of [[Iglavik]] and has 173 honour and 45 prestige. Her liege is Cleatus  [[Maggot]], [[Duke]] of [[Oritolon]].  
+
<b>Erisha</b> [[Da Hadez Family|Da Hadez]] is a [[warrior]]-[[hero]] in the realm of [[Oritolon]] on the [[Colonies]] continent. She is 57 years old, is [[Lord]] of [[Iglavik]] and has 173 honour and 45 prestige. Her liege is Cleatus  Maggot, [[Duke]] of [[Oritolon]].  
  
 
====Plain Format====
 
====Plain Format====
 
<nowiki>{{HadezCharData|world_id=6|char_id=977|format=plain}}</nowiki>
 
<nowiki>{{HadezCharData|world_id=6|char_id=977|format=plain}}</nowiki>
  
Erisha [[Da Hadez Family|Da Hadez]]<br>
+
<b>Erisha</b> [[Da Hadez Family|Da Hadez]]<br>
 
Class: [[Warrior]] / [[Hero]]<br>
 
Class: [[Warrior]] / [[Hero]]<br>
 
Age: 57<br>
 
Age: 57<br>
Line 36: Line 36:
 
Prestige: 45<br>
 
Prestige: 45<br>
 
Positions: [[Lord]] of [[Iglavik]]<br>
 
Positions: [[Lord]] of [[Iglavik]]<br>
Region: Iglavik ( lord: Erisha [[Da Hadez Family|Da Hadez]] )<br>
+
Region: Iglavik ( lord: <b>Erisha</b> [[Da Hadez Family|Da Hadez]] )<br>
Duchy: [[Oritolon]] ( duke: Cleatus [[Maggot Family|Maggot]])<br>
+
Duchy: [[Oritolon]] ( duke: Cleatus Maggot)<br>
Realm: [[Oritolon]] ( ruler: Antonine [[Octavius Family|Octavius]] )<br>
+
Realm: [[Oritolon]] ( ruler: [[Octavius Family/Antonine|Antonine]] [[Octavius Family|Octavius]] )<br>
 
Continent: [[Colonies]]<br>
 
Continent: [[Colonies]]<br>
Liege: Cleatus [[Maggot Family|Maggot]]
+
Liege: Cleatus Maggot
  
 
===Semantic Tags===
 
===Semantic Tags===
Line 56: Line 56:
 
There is no way to discover from the game data API whether or not a character gets a tax share from their region and so whether they are a knight or simple noble. They are listed by this template simply as Nobles.
 
There is no way to discover from the game data API whether or not a character gets a tax share from their region and so whether they are a knight or simple noble. They are listed by this template simply as Nobles.
  
I don't know the exact distinction between the different types of non-duke local lords (Baron, Count, Viscount, Marques etc). I thought it was based on region type but have since found rural regions with Viscounts and Counts. If anyone knows let me know and I'll be able to provide more detail than just 'Lord of'.
+
Differentiating between the different types of non-duke local lords (Baron, Count, Viscount, Marques etc) is next to impossible so all are listed as 'Lord'.
 +
 
 +
Links to the page on which the template is used (which should always be a character page) are bolded to show there are links back to the same page.

Revision as of 05:09, 3 December 2009

Summary

This is a work in progress and my first attempt at serious wiki-fiddling so be gentle :)

It displays character details, updated in real-time, taken from the game.

It is to be used on character pages only as it sets some character-specific semantic tags.

There are currently two display formats, a 'prose' version suitable for use as an introduction at the top of a character's page and a 'plain' list of the character's details suitable for putting in a box or at the foot of the page. There will be a formatted infobox style format with colour and image options coming soon.

Author: Wraith0x29a

Parameters

world_id - (required) - The ID of the world the character exists in.
char_name or char_id - (required) - The first name or the ID of the character.
format - (required) - The format to display the output in (current options are 'prose' or 'plain').

If invalid world or character parameters are entered (user error or if a character has died or been deleted) nothing is shown at all.

Examples

(nb. To avoid tagging this page with semantic tags for the character involved the example output below is hard-coded on this page, not generated from the template)

Prose Format

{{HadezCharData|world_id=6|char_name=Erisha|format=prose}}

Erisha Da Hadez is a warrior-hero in the realm of Oritolon on the Colonies continent. She is 57 years old, is Lord of Iglavik and has 173 honour and 45 prestige. Her liege is Cleatus Maggot, Duke of Oritolon.

Plain Format

{{HadezCharData|world_id=6|char_id=977|format=plain}}

Erisha Da Hadez
Class: Warrior / Hero
Age: 57
Honour: 173
Prestige: 45
Positions: Lord of Iglavik
Region: Iglavik ( lord: Erisha Da Hadez )
Duchy: Oritolon ( duke: Cleatus Maggot)
Realm: Oritolon ( ruler: Antonine Octavius )
Continent: Colonies
Liege: Cleatus Maggot

Semantic Tags

The template adds 'member of:' semantic tags that mark the character as a member of their family and region.

Known Issues

As characters vary there may be cases where this template does not work as expected. Please report these in the discussion page for this template. Particularly I want to test that the feature that works out and displays a character's liege works correctly.

If using multiple instances of this template on a page be aware that errors in the parameters to an instance of the template may cause values from the previous instance of the template to be used. This can cause unexpected results. This appears to be an unavoidable consequence of the way the underlying system works. Thanks to Kag for helping discover this bug.

There is no way to discover from the game data API whether or not a character gets a tax share from their region and so whether they are a knight or simple noble. They are listed by this template simply as Nobles.

Differentiating between the different types of non-duke local lords (Baron, Count, Viscount, Marques etc) is next to impossible so all are listed as 'Lord'.

Links to the page on which the template is used (which should always be a character page) are bolded to show there are links back to the same page.