Prestige Classes:Demo
From NWN1 Custom Content Guide
Contents |
[edit] Prestige Class Demo
This page is intended to provide a demonstration of the creation of a prestige class, in the hopes of making it easier for beginners to understand the process. Because of this, the class itself will be brief, and involve minimal scripting. However, the general method laid out here will work on any class, from the simplest to the most complicated. Because of my affiliation, this class will use several script functions from the Player Resource Consortium, but is still broadly applicable.
[edit] Terms
The following is a list of the terms that will be used frequently throughout the article.
| PRC | Player Resource Consortium, the group I run. |
| PrC | Prestige Class |
| "*" | The "*" symbol will appear in file names, such as cls_bfeat_*.2da. This just means it should be replaced with the name of the file you are working on. For this demo, the file is cls_bfeat_havocm.2da, for example. |
| 2da | A 2 Dimensional Array file. This is where NWN stores most of its data. |
| *.nss | A script file. These are the files that actually do things, from spells to feats to various other applications. Here, we are mostly concerned with them in regards to spells and feats. |
| const | This is a constant, a value that does not change. We use this to define various things, like classes. |
| var | This is a variable, a value that does change. We will use this to pass information and to check things, etc. |
[edit] First Steps
The very first step in any creation of a prestige class is the class itself. The class can come from any source, be it official D&D material, d20 sourcebooks, community designed, or elsewhere. For the purposes of this demo, the class will be the Havoc Mage. This class comes from the Miniatures Handbook, published by Wizards of the Coast, and can be found on page 20. It is a 5 level class that combines wizardy and melee combat, with a minimum of scripting required. When choosing a class, it is best to start building with one that is simple, allowing the builder to become accustomed to working with the material required.
[edit] Tools of the Trade
The following is a list of utility programs that are quite handy for making PrC's. There are more out there, but these are the ones which I have the most experience with. In general, pick what you feel most comfortable using. It will reduce frustration levels during class creation, always a good thing.
| NotePad | A basic text editor... .2da and .nss files are both plain text files, making a plain text editor a definite must. |
| TextPad | Another text editor. Can be found at http://www.textpad.com/ This text editor can mass replace text in many files rather quickly. Excellent when making mass replaces. You can also use C++ language highlighting and it is much like using the NwN Toolset when scripting. My tool of choice for scripting and 2da editing. |
| NwN Toolset | Occasionally the toolset is useful. Especially, if you are making summonable critters or dialogues. |
| CCCH | The CODI Custom Content Helper. Has a .tlk editor as well as some pretty decent 2da editing capabilities. Some use it, some do not. Definitely worth mentioning though. It can be found here. My TLK editor. |
| NWN TLK Editor 1.1 | Another TLK Editor that people find useful. It can be found here. |
| NwN Explorer | A good tool to look through all the standard files of the game. Great for checking out the games icon when you want to modify them to create new ones. It can be found here |
| PRC Script Compiler | What we at the PRC use for compiling our scripts. If working with the PRC files, this is required. Otherwise, the toolset compiler should suit your needs. Find it here |
[edit] Class Creation Step 1: Classes.2da
If you do not have a copy of this file yet, open NWExplorer. On the left will be a folder tree much like Windows Explorer. Select HoTU Main Data, then data\xp2.bif, then Game Data, and right click classes.2da and select export. Then save the file to where you are working. Open this file in your editor of choice. You'll be presented with a list of classes. Select an empty row above 50 (Bioware has reserved all lines from 50 to 0). You may need to pad rows out to meet this number. To do so, just copy blank lines until you hit the row number you desire. In this case the line will be 214. For filling out the line, please refer to the table:
| Column | About the Column |
|---|---|
| ID Number | The value that the CLASS_TYPE_* constant should equal. |
| Label | Arbitrary column for naming the class. Useful for those looking at the 2da |
| Name | The tlk entry # containing the name of the class. For example, custom tlk #50000 = 16827216 |
| Plural | The tlk entry # containing the plural name of a class. |
| Lower | The tlk entry # containing the class name in lower case. |
| Description | The tlk entry # containing the class description. This includes information such as the level up table and such. |
| Icon | The name of the icon file. File name should not be longer than 16 characters. |
| HitDie | The die rolled when the class levels up to determine Hit Points gained. (Ex: 4, 6, 8, 10, 12) |
| AttackBonusTable | The name of the attack bonus table used by the class. This is usually one of the following: CLS_ATTACK_1 - Fighter BAB, max pre-epic +20. CLS_ATTACK_4 - A file added by the PRC, gives +0 BAB. |
| FeatsTable | CLS_FEAT_**** file. The feats your class gets, each class has its own file. You have to make one for your class. |
| SavingThrowTable | CLS_SAVTHR_**** file. You can make your own, though most classes use very similar saving throw tables. You will likely be able to use the same one as another class. |
| SkillsTable | CLS_SKILL_**** file. The file that lists class skills for this class. You have to make one for your class. |
| BonusFeatsTable | CLS_BFEAT_**** file. This file lists any "bonus" feats a class can select (like fighter, wizard, or rogue) at certain levels. You have to make one for your class. |
| SkillPointBase | The base skills per level of the class. |
| * SpellGainTable | |
| * SpellKnownTable | |
| PlayerClass | 1, unless you don't want people to play it. |
| SpellCaster | Can class cast spells? 1 = True, 0 = false. This is always 0 because bioware has hardcoded spellcasting. |
| Str, Dex, Con, Wis, Int Cha |
The classes ideal ability scores, used for recomended and auto-level. |
| PrimaryAbil | The classes primary ability score. Again, used for that recommended button. |
| AlignRestrict | Possible Values:
|
| AlignRstrctType | Possible Values:
|
| InvertRestrict | Invert the alignment restriction? True = 1, False = 0. |
| Constant | CLASS_TYPE_*. This is not actually used by the game, you'll need to define the real constant in a script. |
| EffCRLvl01 - EffCRLvl20 | 1 to 20 respectively... never seen it as anything else. |
| PreReqTable | CLS_PRES_**** file. The prerequisite file for the class. You have to make one for your class. |
| MaxLevel | The classes maximum level possible. Still subject to the overall level 40 cap |
| XPPenalty | Will this class cause an XP penalty? True = 1, False = 0. For PrC's this should always be 0. |
| * ArcSpellLvlMod | Arcane spell level modifier. This determines when a character gets new spells in the class. 1 is every level, 2 is every other level, 3 is every third level. Think of it as 1 / the number you entered. |
| * DivSpellLvlMod | Divine spell level modifier. This determines when a character gets new spells in the class. 1 is every level, 2 is every other level, 3 is every third level. Think of it as 1 / the number you entered. |
| EpicLevel | At what level does the class start being epic. |
| Package | The line number in Packages.2da. This refers to what the class starts with. |
[edit] Example Classes.2da Row
Below is a table of what the row for the Havoc Mage will look like when its completed.
| Column | About the Column |
|---|---|
| ID Number | This is the Row #, so, 214. |
| Label | The name of the class, HavocMage (no spaces are allowed, they will destroy the 2da file). |
| Name | The tlk entry # containing the name of the class. We will come back and fill this in later. |
| Plural | The tlk entry # containing the plural name of a class. We will come back and fill this in later. |
| Lower | The tlk entry # containing the class name in lower case. We will come back and fill this in later. |
| Description | The tlk entry # containing the class description. This includes information such as the level up table and such. We will come back and fill this in later. |
| Icon | ir_havocmage |
| HitDie | 8 |
| AttackBonusTable | CLS_ATK_2 (This is 3/4 BAB, same as a cleric) |
| FeatsTable | CLS_FEAT_HAVOCM. This file tells the game what feats our class has |
| SavingThrowTable | As there is a limited number of possible saving throw tables, almost every class will use a pre-existing one. In this case, we use CLS_SAVTHR_CLER (Strong Fortitude and Will, Weak Reflex |
| SkillsTable | CLS_SKILL_HAVOCM. This lists the characters class skills. |
| BonusFeatsTable | CLS_BFEAT_HAVOCM. This file lists any "bonus" feats a class may have. |
| SkillPointBase | 2. The Havoc Mage gets 2 + Intelligence skill points a level. |
| * SpellGainTable | Always Empty. |
| * SpellKnownTable | Always Empty |
| PlayerClass | 1, unless you don't want people to play it. |
| SpellCaster | Leave it Blank |
| Str, Dex, Con, Wis, Int Cha |
The classes ideal ability scores, used for recomended and auto-level. For a prestige class, they don't matter because you never start as it. |
| PrimaryAbil | The classes primary ability score. Again, used for that recommended button. In our case, this is INT (We are playing a mage here). |
| AlignRestrict | 0x00, no restrictions on Havoc Mage. |
| AlignRstrctType | 0x0, no restrictions on Havoc Mage. |
| InvertRestrict | 0, no restrictions after all. |
| Constant | CLASS_TYPE_HAVOC_MAGE. This is our class constant. |
| EffCRLvl01 - EffCRLvl20 | 1 to 20 respectively... never seen it as anything else. |
| PreReqTable | CLS_PRES_HAVOCM. This defines the prerequisites for the class. |
| MaxLevel | 5, can't have any more Havoc Mage levels |
| XPPenalty | 0. No PrC counts for an XP penalty. |
| * ArcSpellLvlMod | 2. This determines when a character gets new spells in the class. 1 is every level, 2 is every other level, 3 is every third level. Think of it as 1 / the number you entered. |
| * DivSpellLvlMod | 0, not a divine caster. |
| EpicLevel | 5, he has no epic levels. |
| Package | 10, this is the line for a wizard. |
[edit] Class Creation Step 2: cls_bfeat_*.2da, cls_skill_*.2da, and cls_pres_*.2da
cls_bfeat_*.2da: This is where you give your class bonus feats. Ours is named cls_bfeat_havocm.2da, and it looks like this:
| Row # | Bonus Feat |
|---|---|
| 0 | 0 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0 |
| 4 | 0 |
Our class has no bonus feats, which makes this rather easy.
cls_skill_*.2da: This is where you determine what is a class skill and what isn't. In general, it is easiest to open a class close to the one you are building and edit it rather than make a new one from scratch. To set a skill as a class skill, place a 1 in the column, otherwise place a 0. Our file looks like this:
| Row # | SkillLabel (the skill name) | SkillIndex (the row number of the skill in skills.2da) | ClassSkill (1 yes, 0 no) |
|---|---|---|---|
| 0 | Concentration | 1 | 1 |
| 1 | Disabletrap | 2 | 0 |
| 2 | Discipline | 3 | 1 |
| 3 | Heal | 4 | 0 |
| 4 | Hide | 5 | 0 |
| 5 | Listen | 6 | 0 |
| 6 | Lore | 7 | 1 |
| 7 | MoveSilently | 8 | 0 |
| 8 | OpenLock | 9 | 0 |
| 9 | Parry | 10 | 0 |
| 10 | Perform | 11 | 0 |
| 11 | Persuade | 12 | 0 |
| 12 | Pickpocket | 13 | 0 |
| 13 | Search | 14 | 0 |
| 14 | SetTrap | 15 | 0 |
| 15 | Spellcraft | 16 | 1 |
| 16 | Spot | 17 | 0 |
| 17 | Taunt | 18 | 0 |
| 18 | Appraise | 20 | 0 |
| 19 | Tumble | 21 | 0 |
| 20 | CraftTrap | 22 | 1 |
| 21 | Bluff | 23 | 0 |
| 22 | Intimidate | 24 | 1 |
| 23 | CraftArmour | 25 | 1 |
| 24 | CraftWeapon | 26 | 1 |
cls_pres_*.2da: This is where you place the class requirements. The Havoc Mage requires Base Attack Bonus 4, Lore 5, and the ability to cast level 2 arcane spells. Our filled out table will look like this:
| Row # | Label | ReqType (What type of requirement is it) | ReqParam1 (Requirement Parameter) | ReqParam2 (Requirement Parameter) |
|---|---|---|---|---|
| 0 | ScriptVar | VAR | PRC_ArcSpell2 | 0 |
| 1 | ScriptVar | VAR | PRC_AllowHavocM | 0 |
| 2 | Base_Attack | BAB | 4 | **** |
| 3 | Lore | SKILL | 7 | 5 |
[edit] Class Creation Step 3: Feat.2da
There is only one feat for the Havoc Mage, and that is battlecast. Its granted at level 1, and the ability it uses can scale, which we will do in the script. So, now we just need to make the feat. First, open feat.2da and find a spare line that you can use, so that we can begin. In this case, the line was 3339 in Feat.2da.
For guidelines on feat.2da, please look at Feats and Feat.2da on the website.
Here is the Feat.2da line used for Battlecast.
| <featID> | 3339 |
| LABEL | HavocMageBattleCast |
| FEAT | The TLK number, we'll fill this in later when we do the TLK. |
| DESCRIPTION | The TLK number, we'll fill this in later when we do the TLK. |
| ICON | ife_attackbon, which I chose cause it felt appropriate. It is also possible to make a custom one |
| MINATTACKBONUS | ****, No requirements for the feat |
| MINSTR MINDEX MININT MINWIS MINCON MINCHA | **** for all the columns |
| MINSPELLLVL | ****, No requirements for the feat |
| PREREQFEAT1 PREREQFEAT2 | ****, No requirements for the feat |
| GAINMULTIPLE | **** |
| EFFECTSSTACK | **** |
| ALLCLASSESCANUSE | ****, class specific |
| CATEGORY | ****, its not usable by AI. |
| MAXCR | ****, does not affect CR, its part of a class ability. |
| SPELLID | We will fi |
