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!
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
- The most important zone is the one between the <MAIN_PAGE> and </MAIN_PAGE> tags. That zone is MANDATORY, and will contain all the description of the result text.
- Inside that zone, there is another zone, between <LEVEL_LIST> and </LEVEL_LIST>. That zone is also MANDATORY, and MUST be present INSIDE the MAIN_PAGE zone. That zone will contain all the description of a single level, and will be automatically repeated by the Export engine for each level your character has got.
These two zones will be described more precisely later - let's see the other zones first.
- A MANDATORY zone is the <FEAT_ELEMENT> to </FEAT_ELEMENT> zone. It MUST be located OUTSIDE of the MAIN_PAGE zone, since it will not be displayed "as-is", but will be inserted in the appropriate locations in the FINAL_FEATS zone of the MAIN_PAGE zone and/or in the NEW_FEATS zone of the LEVEL_LIST zone.
That zone MUST contain a [%FEAT_NAME] tag: the Export engine will replace that tag by the appropriate feat name.
That zone will be used to create the appropriate list replacing the [%FINAL_FEATS_LIST] tag in the FINAL_FEATS zone of the MAIN_PAGE zone, and if no NEW_FEAT_ELEMENT zone is specified, the [%NEW_FEATS_LIST] tag in the NEW_FEATS zone of the LEVEL_LIST zone. More about that in the corresponding zones description.
- A FACULTATIVE zone is the <NEW_FEAT_ELEMENT> to </NEW_FEAT_ELEMENT> zone. If present, it MUST be located OUTSIDE of the MAIN_PAGE zone, since it will not be displayed "as-is", but will be inserted in the appropriate location in the NEW_FEATS zone of the LEVEL_LIST zone.
That zone MUST contain a [%FEAT_NAME] tag: the Export engine will replace that tag by the appropriate feat name.
That zone will be used to create the appropriate list replacing the [%NEW_FEATS_LIST] tag in the NEW_FEATS zone of the LEVEL_LIST zone. More about that in the corresponding zone description.
- A MANDATORY zone is the <SKILL_ELEMENT> to </SKILL_ELEMENT> zone. It MUST be located OUTSIDE of the MAIN_PAGE zone, since it will not be displayed "as-is", but will be inserted in the appropriate locations in the FINAL_SKILLS zone of the MAIN_PAGE zone and/or in the NEW_SKILLS zone of the LEVEL_LIST zone.
That zone MUST contain a [%SKILL_NAME] and a [%SKILL_VALUE] tag: the Export engine will replace these tags by the appropriate skill name and the number of skill points allocated in that skill.
That zone will be used to create the appropriate list replacing the [%FINAL_SKILL_LIST] tag in the FINAL_SKILLS zone of the MAIN_PAGE zone, and if no NEW_SKILL_ELEMENT zone is specified, the [%NEW_SKILL_LIST] tag in the NEW_SKILLS zone of the LEVEL_LIST zone. More about that in the corresponding zones description.
- A FACULTATIVE zone is the <NEW_SKILL_ELEMENT> to </NEW_SKILL_ELEMENT> zone. If present, it MUST be located OUTSIDE of the MAIN_PAGE zone, since it will not be displayed "as-is", but will be inserted in the appropriate location in the NEW_SKILLS zone of the LEVEL_LIST zone.
That zone MUST contain a [%SKILL_NAME] and a [%SKILL_VALUE] tag: the Export engine will replace these tags by the appropriate skill name and the number of skill points allocated in that skill.
That zone will be used to create the appropriate list replacing the [%NEW_SKILL_LIST] tag in the NEW_SKILLS zone of the LEVEL_LIST zone. More about that in the corresponding zone description.
- A MANDATORY zone is the <CLASS_ELEMENT> to </CLASS_ELEMENT> zone. It MUST be located OUTSIDE of the MAIN_PAGE zone, since it will not be displayed "as-is", but will be inserted in the appropriate locations in the MAIN_PAGE zone.
That zone MUST contain a [%CLASS_NAME] and a [%CLASS_LEVEL] tag: the Export engine will replace these tags by the appropriate class name and the level of the character in that class.
That zone will be used to create the appropriate list replacing the [%FINAL_CLASS_LIST] tag in the MAIN_PAGE zone. More about that in the corresponding zone description.
- A FACULTATIVE zone is the <CLERIC_CLASS_ELEMENT> to </CLERIC_CLASS_ELEMENT> zone. If present, it MUST be located OUTSIDE of the MAIN_PAGE zone, since it will not be displayed "as-is", but will be inserted in the appropriate location in the MAIN_PAGE zone.
That zone MUST contain the [%CLASS_NAME], [%CLASS_LEVEL], [%DOMAIN1] and [%DOMAIN2] tags: the Export engine will replace that tag by the appropriate class name and level of the character in the Cleric class, as well as the 2 cleric domains in which the character is specialized.
That zone will be used to create the appropriate list replacing the [%FINAL_CLASS_LIST] tag in the MAIN_PAGE zone. More about that in the corresponding zone description.
- A FACULTATIVE zone is the <WIZARD_CLASS_ELEMENT> to </WIZARD_CLASS_ELEMENT> zone. If present, it MUST be located OUTSIDE of the MAIN_PAGE zone, since it will not be displayed "as-is", but will be inserted in the appropriate location in the MAIN_PAGE zone.
That zone MUST contain the [%CLASS_NAME], [%CLASS_LEVEL], [%SCHOOL] tags: the Export engine will replace that tag by the appropriate class name and level of the character in the Wizard class, as well as the magic school in which the character is specialized.
That zone will be used to create the appropriate list replacing the [%FINAL_CLASS_LIST] tag in the MAIN_PAGE zone. More about that in the corresponding zone description.
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:
- A FACULTATIVE zone is the <FINAL_SKILLS> to </FINAL_SKILLS> zone. If present, it MUST be located INSIDE the MAIN_PAGE zone, and MUST contain a [%FINAL_SKILL_LIST] tag.
If NO skill point has been allocated for that character (yes it's a strange idea, but who knows...), that whole zone will be removed in the result text file.
But if AT LEAST ONE skill point has been allocated, the content of that zone will be displayed, and the [%FINAL_SKILL_LIST] tag will be replaced by the concatenation of the content of the SKILL_ELEMENT zones, one for each non-empty skill of your character, where the [%SKILL_NAME] and [%SKILL_VALUE] tags have been replaced by the appropriate skill name and values.
- A FACULTATIVE zone is the <NO_FINAL_SKILLS> to </NO_FINAL_SKILLS> zone. If present, it MUST be located INSIDE the MAIN_PAGE zone.
If AT LEAST ONE skill point has been allocated for that character, that whole zone will be removed in the result text file.
But if NO skill point has been allocated, everything in that zone will be displayed as-is.
- A FACULTATIVE zone is the <FINAL_UNUSED_SKILLS> to </FINAL_UNUSED_SKILLS> zone. If present, it MUST be located INSIDE the MAIN_PAGE zone, and MUST contain a [%FINAL_UNUSED_SKILL] tag.
If all the skill points have been allocated for your character, that whole zone will be removed in the result text file.
But if AT LEAST ONE skill point has not been allocated, the content of that zone will be displayed, and the [%FINAL_UNUSED_SKILL] tag will be replaced by the number of unallocated skill points.
Now, let's describe the whole MAIN_PAGE zone. All these fields are FACULTATIVE.
- The FACULTATIVE [%NAME] tag will be replaced by the concatenation of the Firstname and the Name of your character is present.
- The FACULTATIVE [%RACE], [%GENDER], [%AGE], [%DESCRIPTION], [%SUBRACE] and [%DEITY] tags will be replaced by the appropriate values if present.
- The FACULTATIVE [%FINAL_CLASS_LIST] tag will be replaced by the concatenation of the content of CLASS_ELEMENT zones, one for each class your character has leveled in, and in which the [%CLASS_NAME] and [%CLASS_LEVEL] tags will be replaced by the appropriate values. If you leveled in the Cleric class, the CLERIC_CLASS_ELEMENT zone, if present, will be used instead, and the [%DOMAIN1] and [%DOMAIN2] tags replaced appropriately. If you leveled in the Wizard class, the WIZARD_CLASS_ELEMENT zone, if present, will be used instead, and the [%SCHOOL] tag replaced appropriately.
- The FACULTATIVE [%FINAL_STR], [%FINAL_DEX], [%FINAL_CON], [%FINAL_INT], [%FINAL_WIS] and [%FINAL_CHA] tags will be replaced by the final attribute values if present.
- The FACULTATIVE [%FINAL_HPS], [%FINAL_AC], [%FINAL_WILLSAVE], [%FINAL_FORTSAVE] and [%FINAL_REFSAVE] tags will be replaced by the appropriate values if present.
- The FACULTATIVE [%FINAL_UNUSED_SKILL] tag will be replaced by the number of skill points you did not allocated. Note that if a FINAL_UNUSED_SKILLS zone is present, the presence of that tag is INVALID outside of that FINAL_UNUSED_SKILLS zone!
- The FACULTATIVE [%FINAL_FEAT_LIST] tag will be replaced by the concatenation of the content of FEAT_ELEMENT zones, one for each feat your character has, and in which the [%FEAT_NAME] tag will be replaced by the appropriate value.
- The FACULTATIVE [%STARTING_STR], [%STARTING_DEX], [%STARTING_CON], [%STARTING_INT], [%STARTING_WIS] and [%STARTING_CHA] tags will be replaced if present by the original attribute values (the attribute values you had at level 1).
- The FACULTATIVE [%STARTING_STR_BASE], [%STARTING_DEX_BASE], [%STARTING_CON_BASE], [%STARTING_INT_BASE], [%STARTING_WIS_BASE] and [%STARTING_CHA_BASE] tags will be replaced if present by the original attribute values (the attribute values you had at level 1) BEFORE you selected the attributes you spent points in.
- The FACULTATIVE [%STARTING_STR_ADDED], [%STARTING_DEX_ADDED], [%STARTING_CON_ADDED], [%STARTING_INT_ADDED], [%STARTING_WIS_ADDED] and [%STARTING_CHA_ADDED] tags will be replaced if present by the number of attribute points you spent for the corresponding ability from the base value to the original value. By definition, [%STARTING_STR_BASE] + [%STARTING_STR_ADDED] = [%STARTING_STR].
- The FACULTATIVE [%CREATED_BY] tag will be replaced by a "created by NWN Tool, <version> message".
Now, for each level your character has, the LEVEL_LIST zone will be appended. Let's describe its zones!
- A FACULTATIVE zone is the <NEW_SKILLS> to </NEW_SKILLS> zone. If present, it MUST be located INSIDE the LEVEL_LIST zone, and MUST contain a [%NEW_SKILL_LIST] tag.
If NO skill point has been allocated for that character at the given level, that whole zone will be removed in the result text file.
But if AT LEAST ONE skill point has been allocated, the content of that zone will be displayed, and the [%NEW_SKILL_LIST] tag will be replaced by the concatenation of the content of the NEW_SKILL_ELEMENT zones (or the SKILL_ELEMENT zone if no NEW_SKILL_ELEMENT zone was specified), one for each non-empty skill of your character, where the [%SKILL_NAME] and [%SKILL_VALUE] tags have been replaced by the appropriate skill name and values.
- A FACULTATIVE zone is the <NO_NEW_SKILLS> to </NO_NEW_SKILLS> zone. If present, it MUST be located INSIDE the LEVEL_LIST zone.
If AT LEAST ONE skill point has been allocated for that character at that level, that whole zone will be removed in the result text file.
But if NO skill point has been allocated, everything in that zone will be displayed as-is.
- A FACULTATIVE zone is the <FINAL_NEW_SKILLS> to </FINAL_NEW_SKILLS> zone. If present, it MUST be located INSIDE the LEVEL_LIST zone, and MUST contain a [%FINAL_UNUSED_SKILL] tag.
If all the skill points have been allocated for your character after that level, that whole zone will be removed in the result text file.
But if AT LEAST ONE skill point has not been allocated at that level, the content of that zone will be displayed, and the [%NEW_UNUSED_SKILL] tag will be replaced by the number of unallocated skill points.
- A FACULTATIVE zone is the <NEW_FEATS> to </NEW_FEATS> zone. If present, it MUST be located INSIDE the LEVEL_LIST zone, and MUST contain a [%NEW_FEATS_LIST] tag.
If NO feat has been selected for that character at the given level, that whole zone will be removed in the result text file.
But if AT LEAST ONE feat has been selected, the content of that zone will be displayed, and the [%NEW_FEATS_LIST] tag will be replaced by the concatenation of the content of the NEW_FEAT_ELEMENT zones (or the FEAT_ELEMENT zone if no NEW_FEAT_ELEMENT zone was specified), one for each feat selected by your character, where the [%FEAT_NAME] tag has been replaced by the appropriate feat name.
- A FACULTATIVE zone is the <NO_NEW_FEATS> to </NO_NEW_FEATS> zone. If present, it MUST be located INSIDE the LEVEL_LIST zone.
If AT LEAST ONE feat has been selected for that character at that level, that whole zone will be removed in the result text file.
But if NO feat has been selected, everything in that zone will be displayed as-is.
- A FACULTATIVE zone is the <NEW_ABILITY_INCREASE> to </NEW_ABILITY_INCREASE> zone. If present, it MUST be located INSIDE the LEVEL_LIST zone, and MUST contain a [%INCREASE_ABILITY] tag.
If NO ability point has been added for that character at the given level, that whole zone will be removed in the result text file.
But if an ability point has been added, the content of that zone will be displayed, and the [%INCREASE_ABILITY] tag will be replaced by the corresponding ability ("Str", "Con", etc...).
- A FACULTATIVE zone is the <NO_NEW_ABILITY_INCREASE> to </NO_NEW_ABILITY_INCREASE> zone. If present, it MUST be located INSIDE the LEVEL_LIST zone.
If an ability point has been added for that character at that level, that whole zone will be removed in the result text file.
But if NO ability point has been added, everything in that zone will be displayed as-is.
- A FACULTATIVE zone is the <NEW_RDD_ABILITY_INCREASE> to </NEW_RDD_ABILITY_INCREASE> zone. If present, it MUST be located INSIDE the LEVEL_LIST zone, and MUST contain a [%INCREASE_RDD_ABILITY] tag.
If NO ability point has been added for that character at the given level BECAUSE OF SPECIFIC RED DRAGON DISCIPLE LEVEL, that whole zone will be removed in the result text file.
But if ability points have been added BECAUSE OF SPECIFIC RED DRAGON DISCIPLE LEVEL, the content of that zone will be displayed, and the [%INCREASE_RDD_ABILITY] tag will be replaced by the corresponding ability ("+2 Str", "+2 Con", etc...).
Now, for each level your character has, the LEVEL_LIST zone will be appended. Let's describe it now! All these fields are FACULTATIVE.
- The FACULTATIVE [%NEW_LEVEL] tag will be replaced by the level we are speaking of.
- The FACULTATIVE [%NEW_CLASS] tag will be replaced by the class selected for that level.
- The FACULTATIVE [%NEW_HITPOINT_DICE] tag will be replaced by the result of the Hit Points dice you rolled for that level.
- The FACULTATIVE [%NEW_UNUSED_SKILL] tag will be replaced by the number of skill points you did not allocated. Note that if a NEW_UNUSED_SKILLS zone is present, the presence of that tag is INVALID outside of that NEW_UNUSED_SKILLS zone!
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.