NWN Tool - Export Character Template Description


New in 2.0.1, you now have the possibility to export a description of a .bic file to a text file - typically, to share with others the way you built your character.

NWN Tool is based on a template file to do that operation, and YOU have the possibility to provide such template, so that the result of the Export process will look as you want it to look!

That page will describe everything you need to know to realize such template file - don't hesitate to ask questions if there are points you did not understand (don't forget that my primary language is NOT english, and that I'm a technical guy, so it may be a bit hard to understand for "ordinary humans" (or elves, dwarves, etc...)).

To have YOUR template file being used instead of the built-in one, you need to put it in the same folder than your application, and rename it "exportcharacter_model.txt".


As an introduction, here is the full default template file (the built-in one); everything will be explained later!

<FEAT_ELEMENT> - [%FEAT_NAME]
</FEAT_ELEMENT>
<SKILL_ELEMENT> - [%SKILL_NAME]: [%SKILL_VALUE]
</SKILL_ELEMENT>
<CLASS_ELEMENT> - [%CLASS_NAME] ([%CLASS_LEVEL])
</CLASS_ELEMENT>
<CLERIC_CLASS_ELEMENT> - [%CLASS_NAME] ([%CLASS_LEVEL]), Domains: [%DOMAIN1], [%DOMAIN2]
</CLERIC_CLASS_ELEMENT>
<WIZARD_CLASS_ELEMENT> - [%CLASS_NAME] ([%CLASS_LEVEL]), School: [%SCHOOL]
</WIZARD_CLASS_ELEMENT>

<MAIN_PAGE>
-----------------------
IDENTITY
-----------------------

Name: [%NAME]
Race: [%RACE]
Gender: [%GENDER]
Age: [%AGE]
Description: [%DESCRIPTION]
Subrace: [%SUBRACE]
Deity: [%DEITY]

--------------------------
FINAL BUILD
--------------------------

CLASSES:
[%FINAL_CLASS_LIST]
ABILITIES:
Str: [%FINAL_STR]
Dex: [%FINAL_DEX]
Con: [%FINAL_CON]
Int: [%FINAL_INT]
Wis: [%FINAL_WIS]
Cha: [%FINAL_CHA]
STATISTICS:
Hit Points: [%FINAL_HPS]
AC: [%FINAL_AC]
Will Save: [%FINAL_WILLSAVE]
Fort. Save: [%FINAL_FORTSAVE]
Ref. Save: [%FINAL_REFSAVE]
<FINAL_SKILLS>SKILLS:
[%FINAL_SKILL_LIST]
</FINAL_SKILLS><NO_FINAL_SKILLS>SKILLS:
NONE
</NO_FINAL_SKILLS><FINAL_UNUSED_SKILLS>Unused Skill pts: [%FINAL_UNUSED_SKILL]
</FINAL_UNUSED_SKILLS>

------------------------------
BUILD DETAILS
------------------------------

STARTING ABILITIES:
Str: [%STARTING_STR] (base [%STARTING_STR_BASE]+[%STARTING_STR_ADDED])
Dex: [%STARTING_DEX] (base [%STARTING_DEX_BASE]+[%STARTING_DEX_ADDED])
Con: [%STARTING_CON] (base [%STARTING_CON_BASE]+[%STARTING_CON_ADDED])
Int: [%STARTING_INT] (base [%STARTING_INT_BASE]+[%STARTING_INT_ADDED])
Wis: [%STARTING_WIS] (base [%STARTING_WIS_BASE]+[%STARTING_WIS_ADDED])
Cha: [%STARTING_CHA] (base [%STARTING_CHA_BASE]+[%STARTING_CHA_ADDED])
<LEVEL_LIST>
------------------------------
Level [%NEW_LEVEL] - [%NEW_CLASS]
Hitpoint dice: [%NEW_HITPOINT_DICE]
<NEW_ABILITY_INCREASE>Ability: [%INCREASE_ABILITY]
</NEW_ABILITY_INCREASE><NEW_RDD_ABILITY_INCREASE>RDD Ability: [%INCREASE_RDD_ABILITY]
</NEW_RDD_ABILITY_INCREASE><NEW_SKILLS>Skills:
[%NEW_SKILL_LIST]
</NEW_SKILLS><NO_NEW_SKILLS>Skills:
None
</NO_NEW_SKILLS><NEW_UNUSED_SKILLS>Unused Skill pts: [%NEW_UNUSED_SKILL]
</NEW_UNUSED_SKILLS>
<NEW_FEATS>Feats:
[%NEW_FEATS_LIST]
</NEW_FEATS><NO_NEW_FEATS>Feats:
None
</NO_NEW_FEATS>
</LEVEL_LIST>

[%CREATED_BY]
</MAIN_PAGE>

As you noticed, the expected format is a mix between pseudo-html tags (<...></...>), used to create "zones" in the template file, dynamic values ([%...]) to specify locations for things which will be replaced by the Export engine, and static values (all the texts in black) which will be displayed "as-is".


The different zones

These two zones will be described more precisely later - let's see the other zones first.

The usage of all these zones will be described in the following sections. Now, let's describe the zones embedded in the MAIN_PAGE zone:

Now, let's describe the whole MAIN_PAGE zone. All these fields are FACULTATIVE.

Now, for each level your character has, the LEVEL_LIST zone will be appended. Let's describe its zones!

Now, for each level your character has, the LEVEL_LIST zone will be appended. Let's describe it now! All these fields are FACULTATIVE.

OK, that's a bit complicated, I know... Try to understand how the built-in template is constructed, and... Good luck!


As a sample, here is another template I built based on another "character exporter". The result will be an html page.

<CLASS_ELEMENT>
[%CLASS_NAME] ([%CLASS_LEVEL])<br>
</CLASS_ELEMENT>
<CLERIC_CLASS_ELEMENT>
[%CLASS_NAME] ([%CLASS_LEVEL]), Domains: [%DOMAIN1], [%DOMAIN2]<br>
</CLERIC_CLASS_ELEMENT>
<WIZARD_CLASS_ELEMENT>
[%CLASS_NAME] ([%CLASS_LEVEL]), School: [%SCHOOL]<br>
</WIZARD_CLASS_ELEMENT>
<SKILL_ELEMENT>
<tr>
<td>[%SKILL_NAME]</td>
<td>[%SKILL_VALUE]</td>
</tr>
</SKILL_ELEMENT>
<NEW_SKILL_ELEMENT>
[%SKILL_NAME] [%SKILL_VALUE]<br>
</NEW_SKILL_ELEMENT>
<FEAT_ELEMENT>
[%FEAT_NAME],
</FEAT_ELEMENT>
<NEW_FEAT_ELEMENT>
[%FEAT_NAME]<br>
</NEW_FEAT_ELEMENT>

<MAIN_PAGE>
<html>
<style>
p { font-family: "Verdana"; font-size: 8pt; color: white; }
label1 { color: red; }
td { font-family: "Verdana"; font-size: 8pt; color: white; border: 1pt solid rgb(50,50,50); }
table { border-collapse: collapse; }
.label1 { color: gray; }
.title1 { font-family: "Times New Roman"; font-size: 16pt;}
.title2 { background-color: rgb(50,50,50); }
.title3 { background-color: rgb(20,20,20); }
</style>
<body bgcolor=black>
<table cellpadding=5 cellspacing=0>
<tr>
<td class='title1' colspan=3>
[%NAME]
</td>
</tr>
<tr>
<td colspan=3>
[%RACE], [%GENDER]
</td>
</tr>
<tr>
<td colspan=3>
[%FINAL_CLASS_LIST]
</td>
</tr>
<tr>
<td valign=top align=center width=32%>
<table cellpadding=3 cellspacing=0>
<tr>
<td COLSPAN=2 nowrap class=title2>
Starting Stats
</td>
<td COLSPAN=2 nowrap class=title2>
Ending Stats
</td>
</tr>
<tr>
<td width=30%>STR</td>
<td width=10%>[%STARTING_STR]</td>
<td width=30%>STR</td>
<td width=10%>[%FINAL_STR]</td>
</tr>
<tr>
<td>DEX</td>
<td>[%STARTING_DEX]</td>
<td>DEX</td>
<td>[%FINAL_DEX]</td>
</tr>
<tr>
<td>CON</td>
<td>[%STARTING_CON]</td>
<td>CON</td>
<td>[%FINAL_CON]</td>
</tr>
<tr>
<td>INT</td>
<td>[%STARTING_INT]</td>
<td>INT</td>
<td>[%FINAL_INT]</td>
</tr>
<tr>
<td>WIS</td>
<td>[%STARTING_WIS]</td>
<td>WIS</td>
<td>[%FINAL_WIS]</td>
</tr>
<tr>
<td>CHA</td>
<td>[%STARTING_CHA]</td>
<td>CHA</td>
<td>[%FINAL_CHA]</td>
</tr>
<tr>
<td COLSPAN=4>
AC [%FINAL_AC]<br>
HP [%FINAL_HPS]
</td>
</tr>
<tr>
<td COLSPAN=4>
<span class='label1'>Fortitude:</span>[%FINAL_FORTSAVE]<br>
<span class='label1'>Reflex:</span>[%FINAL_REFSAVE]<br>
<span class='label1'>Will:</span>[%FINAL_WILLSAVE]<br>
</td>
</tr>
</table>
</td>
<td valign=top align=center width=15%>
<table cellpadding=3 cellspacing=0>
<tr>
<td nowrap class=title2>Skill Totals</td>
<td class=title2></td>
</tr>
<FINAL_SKILLS>
[%FINAL_SKILL_LIST]
</FINAL_SKILLS>
<NO_FINAL_SKILLS>
<tr><td COLSPAN=2>
<Center>No Skill Point Allocated!</Center>
</td></tr>
</NO_FINAL_SKILLS>
</table>
<FINAL_UNUSED_SKILLS>
[UNUSED: [%FINAL_UNUSED_SKILL]]
</FINAL_UNUSED_SKILLS>
</td>
<td valign=top align=center>
<table cellpadding=3 cellspacing=0>
<tr>
<td class=title2>Feats</td>
</tr>
<tr>
<td>
[%FINAL_FEAT_LIST]
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan=3>
<table cellpadding=3 cellspacing=0>
<tr class=title2>
<td>Lvl</td>
<td>Class</td>
<td>HP</td>
<td>Ability</td>
<td nowrap>Skills</td>
<td>Feats</td>
</tr>
<LEVEL_LIST>
<tr>
<td valign=top>[%NEW_LEVEL]</td>
<td nowrap valign=top>[%NEW_CLASS]</td>
<td valign=top>[%NEW_HITPOINT_DICE]</td>
<td valign=top center>
<NEW_ABILITY_INCREASE>[%INCREASE_ABILITY]</NEW_ABILITY_INCREASE>
<NO_NEW_ABILITY_INCREASE>&nbsp;</NO_NEW_ABILITY_INCREASE>
</td>
<td valign=top>
<NEW_UNUSED_SKILLS>[Unused: [%NEW_UNUSED_SKILL]]<br></NEW_UNUSED_SKILLS>
<NEW_SKILLS>[%NEW_SKILL_LIST]</NEW_SKILLS>
</td>
<td valign=top>
<NEW_FEATS>[%NEW_FEATS_LIST]</NEW_FEATS>
<NO_NEW_FEATS>&nbsp;</NO_NEW_FEATS>
</td>
</tr>
</LEVEL_LIST>
</table>
</td>
</tr>
</table>
<p>[%CREATED_BY]</p>
</body>
</html>
</MAIN_PAGE>