Difference between revisions of "Template:HadezCharData/doc"

From BattleMaster Wiki
Jump to navigation Jump to search
m (..almost)
m (First docs draft)
Line 1: Line 1:
Right, this is pretty much my first day of serious wiki-fiddling, it's 4am and I'm onto my third bottle of wine so be gentle.
+
This is a work in progress and my first attempt at serious wiki-fiddling so be gentle :)
  
Mainly I'm doing this to learn what's what in the semantic wiki world and BM API and try and add something to BM in the process.
+
It shows character data gathered in real-time from the game and sets some semantic tags on the page.
  
It's a work in progress, it's 4am and I really don;t have the energy to try to work out how wiki formatting of dynamic semantic content works.
+
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.
  
Comments/testing welcome... tomorrow.
+
[[User:Wraith0x29a]]
  
param 1 is world ID, param 2 is char ID, param 3 (not yet implemented) is 'prose' or 'plain' (no quotes!), there will be option for name as param 2 and a default 'infobox formatted' option and likely lots of nice additional formatting options for that when/if I get some sleep.
+
===Parameters===
  
It doesn't work yet which is a bugger as it worked fine hard-coded on the page.
+
<b>world_id</b> - The ID of the world the character exists in.<br>
 +
<b>char_name</b> - The first name of the character. Do not include family name.<br>
 +
<b>char_id</b> - The ID of the character (preferred over char_name for performance reasons)<br>
  
OK, it's getting ridiculously early.
+
Only one of <b>char_name</b> or <b>char_id</b> is required.
  
It works fine hardcoded on the page for [[Da Hadez Family/Erisha]] but not as a template. If anyone can give me a hint as to what I'm doing wrong please let me know.
+
===Examples===
 +
<nowiki>{{HadezCharData|world_id=6|char_name=Erisha|format=prose}}</nowiki>
 +
{{HadezCharData|world_id=6|char_name=Erisha|format=prose}}
 +
 
 +
<nowiki>{{HadezCharData|world_id=6|char_id=977|format=plain}}</nowiki>
 +
{{HadezCharData|world_id=6|char_id=977|format=plain}}
 +
 
 +
===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.
 +
 
 +
The prose version needs tweaked for the case of rulers who have no liege.

Revision as of 20:42, 28 November 2009

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

It shows character data gathered in real-time from the game and sets some semantic tags on the page.

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.

User:Wraith0x29a

Parameters

world_id - The ID of the world the character exists in.
char_name - The first name of the character. Do not include family name.
char_id - The ID of the character (preferred over char_name for performance reasons)

Only one of char_name or char_id is required.

Examples

{{HadezCharData|world_id=6|char_name=Erisha|format=prose}} Error: No contents found at URL https://battlemaster.org/data/character.php?World=6&Name=Erisha.


{{HadezCharData|world_id=6|char_id=977|format=plain}} Error: No contents found at URL https://battlemaster.org/data/character.php?World=6&Name=%7B%7B%7Bchar_name%7D%7D%7D.


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.

The prose version needs tweaked for the case of rulers who have no liege.