Difference between revisions of "Template:HadezCharData/doc"

From BattleMaster Wiki
Jump to navigation Jump to search
m
m
Line 7: Line 7:
 
It is to be used on character pages only as it sets some character-specific semantic tags.
 
It is to be used on character pages only as it sets some character-specific semantic tags.
  
There are currently three display formats, an infobox style 'box' that sits at the right of the page, a 'plain' list of the character's details suitable for putting in a box or at the foot of the page and a 'prose' version suitable for use as an introduction at the top of a character's page.  
+
There are currently three display formats..
 +
* box -  traditional infobox that sits at the right of the page.
 +
* plain - basic list of the character's details suitable for putting in a box or at the foot of the page.
 +
* prose - describes the character details in sentences; suitable for use as a character page introduction.
 +
 
 +
Nice features include..
 +
 
 +
* Easy to use.
 +
* All details updated in real-time from game data.
 +
* Box, Plain and Prose formats.
 +
* Automatically sets some important semantic tags.
 +
* Automatically adds links to regions, families and characters pages if they exist.
 +
* Automatically works out character's liege.
 +
* Automatically works out character's positions in their realm.
 +
* Gender aware (correctly uses he/she,his/her,duke/duchess).
  
 
Author: [[User:Wraith0x29a|Wraith0x29a]]
 
Author: [[User:Wraith0x29a|Wraith0x29a]]

Revision as of 01:58, 4 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 three display formats..

  • box - traditional infobox that sits at the right of the page.
  • plain - basic list of the character's details suitable for putting in a box or at the foot of the page.
  • prose - describes the character details in sentences; suitable for use as a character page introduction.

Nice features include..

  • Easy to use.
  • All details updated in real-time from game data.
  • Box, Plain and Prose formats.
  • Automatically sets some important semantic tags.
  • Automatically adds links to regions, families and characters pages if they exist.
  • Automatically works out character's liege.
  • Automatically works out character's positions in their realm.
  • Gender aware (correctly uses he/she,his/her,duke/duchess).

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').
background - (optional) - The HTML color code to use for the box format background.
header - (optional) - The HTML color code to use for the box format header background.
list - (optional) - The HTML color code to use for the box format list background (left hand column).
value - (optional) - The HTML color code to use for the box format values background (right hand column).

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

HTML hexadecimal based color codes (eg. #AA0000 for mid red) should include the # prefix.
The default color-scheme of tasteful greys is used if the color parameters are omitted for the box format.

Examples

See the examples page.

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 one 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 wiki system works. Thanks to Kag for helping highlight 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'.