Jump to content

BG2 Kit Creation: Game Files Involved

Recommended Posts

As promised, part two of the ongoing BG2 kit creation series. This section is going to cover the various files involved with kit creation, what they do, and how to avoid common pitfalls. To view these files, use an editor such as Near Infinity, DLTCEP, or Infinity Explorer. Don't worry too much abot modifying these files--the next part of the tutorial will discuss how to use WeiDU to do this for you.

Game Files

2da files are text files that contain tables of data used to define rules and parameters for the game. Kits rely on data specificaly in many of these tables:

KITLIST.2da - The master list of kits in the game. The kits are referred to by their "internal name" in the first column. Most should be easy to recognize save the FERALAN--this was a ranger kit that was cut and replaced by the archer ranger kit. It's internal name was never changed though. The LOWER, MIXED, and HELP columns contain the string references from dialog.tlk that provide the name and description of the kit that you see in the game. [Dialog.tlk is a collection of every line of text in the game--be it dialogue, item descriptions, names, etc.--indexed by a number. Spells, items, creatures, etc. do not actually contain their description in the file itself, instead they carry a string reference (STRREF for short) that points to the correct entry in dialog.tlk.] The ABILITIES column points to a CLAB****.2da file that contains the abilities that are gained by the kit on leveling up. The PROFICIENCY column determines which column in WEAPPROF.2da is associated with the kit. UNUSABLE is a hex value that matches the kit to the proper unusable flag in item files. Item files have a series of flags that determine which classes and kits can use them. One value not listed is 0x00004000, which will give the kit the exact same restrictions as its parent class, i.e. a fighter kit will use the same restrictions as a vanilla fighter. One other note of interest is that these values can be added (use a hexadecimal calulator if you're not familiar with hex numbers) to combine restrictions. If you want a kit that has the item restrictions of a Cavalier and a Shapeshifter (lord knows why!) you would add their respective unusable values: 0x00000008 + 0x10000000 = 0x10000008. The final column, CLASS, refers to the parent class of the kit--i.e. Assassins, Bounty Hunters, and Swashbucklers would have the value for thief in this column. Valid values are 1 (Mage), 2 (Fighter), 3 (Cleric), 4 (Thief), 5 (Bard), 6 (Paladin), 11 (Druid), and 12 (Ranger). The missing values are for the various multi-class and unkittable single-class characters.

ABCLASRQ.2da - This file controls the minimum stat scores or the various kits and classes. The first column lists the classes and kits and the other six correspond to the minimum allowed value in the six attributes: Strength, Dexterity, Constitution, Inteligence, Wisdom, and Charisma.

ABCLSMOD.2da - This file contains the modifiers to stat scores for the various classes and kits, i.e. bonus or penalty to strength. Of the default BG2 kits, only Beast Masters have an adustment to their stats.

ABDCDSRQ.2da - This file contains the minimum stat requirements to dual-class TO the kit/class in question. This is rather pointless for kits, as they can not be the second class of a dual-classed charater, but this file does need to be updated.

ABDCSCRQ.2da - This file contains the minimum stat requirements to dual-class FROM the kit/class in question. This is the 'must have 15 in prime requisite stats to dual-class' rule; allowed dual-classes are handled by another file.

ALIGNMNT.2da - This file controls allowed alignments for a kit. A "1" indicates that the alignment is allowed for the kit while "0" indicates a disalowed alignment.

CLABFI01.2da et al - This file controls what spells and bonuses are applied to te kit at level-up. Each kit and vanilla character class has a unique CLAB file, set by the KITLIST.2da file in the ABILITIES column. The columns correspond to the level at which the kit receives the ability and the rows list the abilities gained. Rows can be added indefinitely. There are three types of entries for the abilities: **** (nothing), AP_spellname (applied) or GA_spellname (gained). Spells that are applied are for permanent abilities such as a Wizard Slayer's inherent magic resistance or a barbarian's speed increase. Gained abilities are for once (or more) per day abilities, such as a Kensai's kai or snares for thieves. The CLAB file will probably be the most important file for creating your kit.

CLASWEAP.2da - This file controls the type of allowed weapons by general class. The kit names run down the first column and the various columns refer to the weapon types. An entry of "1" indicates the weapon type is usable and a "0" indicates unusable.

DUALCLAS.2da - This file controls the allowed dual-class possibilities for a kit. A "1" indicates a valid dual-class, while a "0" indicates the dual-class is not possible. Due to hard-coded limitations, kits of classes that can not dual-class (such as bard and paladin kits) will crash the game if dual-classed, regardless of the settings in this file.

K_C_H.2da et al - These files controls what kits are available to the player on character creation. The secod and third entry correspond to the class and race of the character--K_C_H determines what files are available to a cleric who is human. KITTABLE.2da has a full table that can help you in determining which K_*_*.2da file corresponds to which race and class. In the file itself is a column of descending numbers on the left and a column of numbers on the right that correspond to entries in KITLIST.2da. Please note that the K_*_* files do not override hardcoded limitations--listing a druid kit in K_D_E (druid kits for elves) will not allow elves to become druids, as there is a hardcoded race limitation to the druid class.

LUABBR.2da (ToB only) - This file is an index that matches kits to a table of High Level Abilities (HLAs). The left column lists the kits and classes and the right column corresponds to the HLA index. The index name must be 3 charactes in length; the file for the HLA table is always LUXXX.2da where XXX is the entry in this table.

LUFI0.2da et al (ToB only) - The LUXXX files contain a table of HLAs for a given kit or class. The spell files are listed in the ABILITIES column with the same style GA_ and AP_ prefixes from the CLAB file. The ICON and STRREF columns appear to be unusued, MIN_LEVEL is the first level where the ability becomes available to the player (note that the player must still gain 3 million XP before HLAs are available), MAX_LEVEL is presumably the level at which the ability is no longer offered, NUM_ALLOWED is the number of times the player can select a given HLA before it becomes unavailable, PREREQUISITE determines if another HLA is required before the current one can be selected (greater whirlwind has whirlwind as a prerequisite for example), EXCLUDED_BY is used to make HLAs mutually exclusive (think of Deva/Fallen Deva) and ALIGNMENT_RESTRICT determines if certain alignments can select an ability.

WEAPPROF.2da - This file determines the maximum number of stars that a kit or class can put in a specific weapon proficiency. Note that allowing a kit to place stars in a certain weapon will not grant them the ability to use the weapon--i.e. allowing a cleric kit a proficiency in spears--will not allow the kit to use them. The first column lists the weapons and the various columns match the clases and kits in the game. The CLUB proficiency in spells and items is also referred to as EXTRA1. The other EXTRA proficiencies do not have any function in game.

Keep in mind that any spells that are going to be gained or applied also need to be created and added. How to create spells is beyond the scope of this tutorial; there are many tutorials and tools that cover spell creation. It is a fairly long set of files to modify and not easily digested at first glance. However, the next tutorial will show how WeiDU's ADD_KIT command will do all the work for you.

Please post discussion and comments to the kit creation series discussion thread here at The Gibberlings Three and we will do our best to answer your questions.

Complete Series

Edited by CamDawg
Link to comment
This topic is now closed to further replies.
  • Create New...