How to: Making kit mods for the Enhanced Editions!
First, you'll need to a little about WeiDU and have some skills in using NearInfinity (or DLTCEP), I am not going to give an introduction to any of this things, I assume you do know how to make custom spells (.spl), items (.itm) and tinkering with effect (.eff) files and tables (.2da). (Also, I refer all the time to using NearInfinity, but if you use DLTCEP it's the same. It is just that I use NearInfinity and wrote it that way because I'm dumb.)
Second, be sure you register your own modding signature
here, so none of your files clash with other mod's. Skip this if you have done so already.
Third, to make a kit mod, you need to have some things done by your own, they are:
- The spells for the abilities of the kit, both the innate abilities and the passive abilities are coded as spells (mind the permanent duration effect on the latter).
- The CLAB*.2DA, this is the file that applies and gives the spells at level up.
- The LU*.2DA table, needed for High Level Abilities, works like the CLAB*.2DA but has a different way of listing the entries.
- (optional) The HP*.2DA table, if you want, you can determine your kit's hit point gain rate with this table.
- (optional) new icons for the new Innate abilities/spells.
For the spells, I recommend making the with NearInfity, unless you are good enough with WeiDU to edit them on-the-run. When working on spells to be applied to the character and treated as Passive Abilities (like a Kensai's AC bonus at level one), be sure to put the Timing to instant/permanent (9).
When you are creating the CLAB*.2DA, I recommend making it 50 columns long (up to level 50), since BG2Tweaks has a component to extend the levels up to that point, and it avoids possible bugs with other mods that read the CLAB table. A CLAB*.2DA file should look like this (this one was cut because of its length):
2DA V1.0
****
1 2 3 4 5 6 7
ABILITY1 GA_SPCL213 GA_SPCL212 GA_SPCL212 GA_SPCL212 GA_SPCL212 GA_SPCL212 GA_SPCL212
ABILITY2 GA_SPCL212 GA_SPCL213 GA_SPCL213 GA_SPCL213 GA_SPCL213 GA_SPCL213 GA_SPCL213
ABILITY3 GA_SPCL212 **** **** **** **** **** ****
ABILITY4 GA_SPCL212 **** **** **** **** **** ****
ABILITY5 GA_SPCL212 **** **** **** **** **** ****
ABILITY6 AP_SPCL241 **** **** **** **** **** ****
ABILITY7 AP_SPCL242 **** **** **** **** **** ****
This is a Paladin CLAB (the Inquisitor's I think). Each GA_SPELLNAME gives the mentioned spell to the creature just once (this is used for things like the Kensai's Kai ability), while AP_SPELLNAME applies the spell to the creature once, with a permanent timing. This is used for Passive Abilities like the Kensai's damage and AC bonus.
If you need more rows, just add them manually with NearInfinity (or with your favourite text editor) with an ABILITY8 (and then 9, 10, etc) name on column 1 (up to column 50).
For the LU*.2DA, you can just give WeiDU the name of the vanilla LU*.2DA file you want to use, or create your own.
Here's an example of a LU*.2DA:
2DA V1.0
*
ABILITY ICON STRREF MIN_LEV MAX_LEVEL NUM_ALLOWED PREREQUISITE EXCLUDED_BY ALIGN_REST
1 GA_SPPR721 * * 16 99 1 * * *
2 GA_SPPR722 * * 16 99 1 * * *
3 GA_SPPR723 * * 16 99 1 * * *
4 GA_SPPR725 * * 16 99 1 * * *
5 GA_SPPR726 * * 16 99 1 * GA_SPPR727 ALL_EVIL
6 GA_SPPR727 * * 16 99 1 * GA_SPPR726 ALL_GOOD
7 GA_SPPR728 * * 16 99 1 * * *
8 GA_SPPR729 * * 16 99 1 * * *
9 GA_SPPR730 * * 16 99 1 * * *
10 AP_SPCL928 * * 1 99 1 * * *
11 AP_SPCL929 * * 1 99 1 AP_SPCL928 * *
12 AP_SPCL930 * * 1 99 1 AP_SPCL929 * *
13 GA_SPWI920 * * 32 99 1 * * *
14 GA_SPWI921 * * 32 99 1 * * *
15 GA_SPWI922 * * 32 99 1 * * *
16 GA_SPWI923 * * 32 99 1 * GA_SPWI924 ALL_EVIL
17 GA_SPWI924 * * 32 99 1 * GA_SPWI923 ALL_GOOD
18 GA_SPWI925 * * 32 99 1 * * *
19 * * * * * * * * *
20 * * * * * * * * *
21 * * * * * * * * *
22 * * * * * * * * *
23 * * * * * * * * *
24 * * * * * * * * *
The GA_ and AP_ stuff from CLAB*.2DA files is the same here.
The MIN_LEV is the level the character has to be in order to pick the High Level Ability, and MAX_LEVEL is the level where you cannot choose this HLA anymore (don't use this unless it's necessary, just put 99 or preferably 127).
ALL_EVIL and ALL_GOOD are exclusion flags (ALL_NEUTRAL also works), here they are used for the Planetar/Deva summoning spells (since this one is a Cleric/Mage's LU files).
PREREQUISITE is the HLA you must have selected before so you can choose, for example, the "Extra level 7 Slot" requires the player to have chooses "Extra level 6 Slot" before.
EXCLUDED_BY is also used for the Planetar/Deva summoning spells, but this one does something different, if the ability denoted under EXCLUDED_BY was chosen, the player won't be able to pick the spell marked on EXCLUDED_BY later.
In the EE, the table can be 25 rows long, while in the original BG2 the maximum is still 24. If you want to add the 25th row on EE games only, IMO the best is to add this to your WeiDU code (before copying the 2da to the game):
APPEND_OUTER "path/to/your.2da" "25th line of the LU* file"
The HP*.2DA tables are much more simpler and shorter. They hold the information for the HP that has to be given to the creature on each level. Here's an example of the Rogue's:
2DA V1.0
0
SIDES ROLLS MODIFIER
1 6 0 6
2 6 0 6
3 6 0 6
4 6 0 6
5 6 0 6
6 6 0 6
7 6 0 6
8 6 0 6
9 6 0 6
10 6 0 6
11 6 0 2
12 6 0 2
13 6 0 2
14 6 0 2
15 6 0 2
16 6 0 2
17 6 0 2
18 6 0 2
19 6 0 2
20 6 0 2
21 6 0 2
22 6 0 2
23 6 0 2
24 6 0 2
25 6 0 2
26 6 0 2
27 6 0 2
28 6 0 2
29 6 0 2
30 6 0 2
31 6 0 2
32 6 0 2
33 6 0 2
34 6 0 2
35 6 0 2
36 6 0 2
37 6 0 2
38 6 0 2
39 6 0 2
40 6 0 2
It's pretty easy, from levels 1 to 10 (in the case of Warriors and Priests, it should be form levels 1 to 9, and 1 to 10 in the case of Wizards, too) the rouge is given 1d6 hit points, past that level, the Rouge will gain 2 HP every level up. It is recommended to make this table up to level 50 too. This table is completely optional and only needed if you want to change the Kit's HP/level.
Fourth, you're going to need something to install the mod, and WeiDU is the best one when doing this! If you are copy/pasting this, replace all of the "7C#KIT" with your kit's internal name and the directories, version and author fields with the according information.
BACKUP "example/backup"
AUTHOR CrevsDaak
VERSION "v2.3.67.3"
These are basic WeiDU instructions to provide information for debugging/reporting bugs and re-installing the mod. The VERSION field is not required but it's recommended to be used.
This'll be the component's name shown to the user. If you append to the style presented here it is very likely that people won't get confused with what they're installing.
BEGIN "[enter kit name here] kit for [enter the kit's base class name here in plural form]"
This command includes the .tpa with the code that does the real work to install the kit.
INCLUDE "example/library/fl#add_kit_ee.tpa"
This is your kit's internal name, it should be prefixed with your own modding signature and not too long.
ADD_KIT ~7C#KIT~
These are the BG1 proficiency restrictions, they don't serve any purpose so it's a waste to edit them.
~7C#KIT 1 1 1 1 1 1 1 1~
These are the BG2 proficiencies, you should use the 2DA table "WEAPPROF" as a reference while working on this.
~7C#KIT 0 1 0 0 1 0 0 1 0 1 1 0 0 1 1 1 0 1 0 0 0 0 1 1 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0~
Minimum stats for the kit. Use low values, otherwise getting high rolls will be too easy.
~7C#KIT 0 9 0 0 0 0~
These are the stat modifiers at character creation. Both positive an negative values are accepted.
7C#KIT 0 0 0 0 0 0~
Stats requirement to dual-class TO this kit, not really necessary.
~7C#KIT 0 17 0 0 0 0~
Stats requirement to dual-class from this kit to another class.
~7C#KIT 0 15 0 0 0 0~
Alignments that can be chosen at character generation time with this kit selected.
// LG LN LE NG TN NE CG CN CE
~7C#KIT 0 1 1 1 1 1 1 1 1~
This next entry rules over which classes your kit will be able to dual-class, or if the kit would be able to dual-class at all (eg vanilla Wild Mage can't dual-class, neither the Barbarian, which is coded as a Fighter kit).
// F C M T D R
~7C#KIT 1 1 1 0 0 0~
This is the path of your kit's own clab*.2da.
~example/7C#KIT.2da~
This are the races that can choose this particular kit. It is noted as it follows K_[initial of the class the kit belongs to]_[race able to select this kit], for example, K_T_H means a Human Thief can pick it and K_SH_HL means a Halfling Shaman can pick it. Just include the ones you'd like the kit to be usable by.
~K_T_H K_T_D K_T_G K_T_E K_T_HE K_T_HL K_T_HO~
// this is the usability flag for the class followed by the class number
// (see the table KITLIST.2DA for more information)
~0x00080000 4~
// this is the name of the LU7C#K.2DA file, needed for HLAs and appended to LUABBR.2DA.
~7C#K~
// this are the item this kit is going to get at the start of ToB, appended column-wise to 25STWEAP.2DA.
// check with NearInfinity, EEKeeper or DLTCEP which items you want since you'll need their code name.
~* * * BAG28 * * * BOOT01 AMUL17 * * AROW11,80 * * * * * DAGG12 SW1H28 *~
SAY ~batman~ // this is the all-lower case version of the kit-name, TRA'ified strings are also accepted.
SAY ~Batman~ // this is the capitalized name of the kit.
SAY ~BATMAN: he is kewl~ // this is the description of the kit
// (please don't make it as silly as this one, use the vanilla ones as example)
LAF fl#add_kit_ee // launch_action_function start
INT_VAR
biography = 29492 // This is the biography, you can browse the dialog.tlk
// (with NearInfinity or DLTCEP) for the string you desire or just add your own.
briefdesc = RESOLVE_STR_REF ~short description of the kit goes here, TRA'ified strings also accepted, just remove the tildes around this string.~
// this is a bool check, if it's set to 1, the Kit can get Fallen, like a Paladin
// if it's set to 0 it does nothing in the game. It's default value is 0.
fallen = 0
// if you set fallen = 1, you might want to add a custom string for when the Kit's user becomes Fallen.
fallen_notice = RESOLVE_STR_REF (~this is the string which will be displayed when the Kit's user becomes fallen~)
STR_VAR
// this is the internal name of your kit. #This_is_a_must (unless you want to crash the installation).
// all the other stuff in this listing is optional, if it's there, it will be used
// and if it isn't, the class default value will be used instead. Remove the whole "example = ~3 8 1 92~" line.
kit_name = ~7C#KIT~
// this is the backstab progressions rate (one number/level, 40 levels), only for kits that need backstab
backstab = ~1 2 3 4 5 6 7 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9~
// this file (CLSWPBON.2DA) contains three different fields of information, the first one is for the WPSTACK
// (the bonus APR from Specialization and higher and from levels 7 and 13 that fighters gain)
// if the number is 1, then it'll be enabled, if it's set to 0, it won't, enabled on Warrior classes by default.
// the second one is turned by default over Monks, seems like it gives them their custom fists.
// the third and last value is the amount of penalty given to the character's
// THAC0 when using a weapon they aren't proficient with.
clswpbon = ~1 0 3~
// the number of weapon slot that are displayed in the inventory
numwslot = ~2~
// 1st value is the amount of Thieving skills point gained at level one and the 2nd is the amount gained in the following levels.
thiefskl = ~40 20~
// maximum amount of traps this kit can set (this is optional and only for Thief and Bard kits)
traplimt = 6
// this is appended column-wise to CLASCOLR.2DA, the colors are listed here in this order:
// METAL (metallic parts of the character's equipment), MINOR_CLOTH (same as Minor Color in the inventory screen),
// MAIN_CLOTH (same as Major Color in the Inventory Screen), LEATHER (the leather parts of the character's armor),
// ARMOR (this one is for the other parts of the armor that aren't METAL nor LETHER).
clascolr = ~35 67 67 25 80~
// this is the minimum thieving skills given at level 1.
// if the normal is more than the value set here, the value here'll be ignored.
// (NOT SURE ABOUT THIS)
// appended column-wise to CLASISKL.2DA
// note that they are 7 values, Pick Pockets, Open Locks, Find Traps
// Move Silently, Hide in Shadows, Detect Illusion and Set Traps
clasiskl = ~10 10 10 10 10 10 10~
// this is appended column-wise to THIEFSCL.2DA, 100 determines that the player can spent Thieving Points
// in that thieving ability, and 0 means that they can't.
// Seems like it has something to do with percentages, but it's not confirmed yet.
thiefscl = ~100 100 100 100 100 100 100 100~
// the HP*.2DA table's full name (not including the extension).
hpclass = ~HP7C#K~
// appended to CLSRCREQ.2DA, determines which race can select the kit at character creation,
// values are either 1 (true/yes) and 0 (false/no), the races go like this:
// HUMAN, ELF, HALF_ELF, DWARF, HALFLING, GNOME and HALFORC.
clsrcreq = ~1 1 1 1 1 1 1~
// this is a bonus to the base THAC0 that is given at level 1 and it's permanent.
clasthac = ~0~
// this is the Sneak Attack entry, only for IWD:EE.
// it's like the backstab.2da, but with a function.
sneakatt = ~1 2 3 4 5 6 7 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9~
// this is the Crippling Strike entry, only for IWD:EE
// it's also like the backstab.2da
![:) :)]()
crippstr = ~1 2 3 4 5 6 7 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9~
END // end of the LAF (launch_action_function) block.
COPY "example/spl/your1.spl" "override"
SAY 0xC ~this is the spell's name~
SAY 0x50 ~this is the spell's description~
COPY "example/spl/your2.spl" "override"
SAY 0xC
#-1 // this spell is going to be used as a Passive Ability applier, so give it a string-name of -1.
COPY "example/tables/HP7C#K.2DA" "override" // copy this one since the other action does not do this for you.
"example/tables/LU7C#K.2DA" "override" // copy the LU*.2DA table too
Here's the clean, complete code without comments:
BACKUP "example/backup"
AUTHOR CrevsDaak
VERSION "v2.3.67.3"
BEGIN "Food for Elephants" // rly boi
INCLUDE "example/library/fl#add_kit_ee.tpa"
ADD_KIT ~7C#KIT~
~7C#KIT 1 1 1 1 1 1 1 1~
~7C#KIT 0 1 0 0 1 0 0 1 0 1 1 0 0 1 1 1 0 1 0 0 0 0 1 1 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0~
~7C#KIT 0 9 0 0 0 0~
~7C#KIT 0 0 0 0 0 0~
~7C#KIT 0 15 0 0 0 0~
~7C#KIT 0 17 0 0 0 0~
~7C#KIT 0 1 1 1 1 1 1 1 1~
~7C#KIT 1 1 1 0 0 0~
~example/7C#KIT.2da~
~K_T_H K_T_D K_T_G K_T_E K_T_HE K_T_HL K_T_HO~
~0x00080000 4~
~7C#K~
~* * * BAG28 * * * BOOT01 AMUL17 * * AROW11,80 * * * * * DAGG12 SW1H28 *~
SAY ~batman~
SAY ~Batman~
SAY ~BATMAN: he is mothafreakgngin awesum~
LAF fl#add_kit_ee
INT_VAR
biography = 29492
briefdesc = RESOLVE_STR_REF ~short description of the kit goes here.~
fallen = 0
fallen_notice = RESOLVE_STR_REF (~You have failed ur ppl.~)
STR_VAR
kit_name = ~7C#KIT~
backstab = ~1 2 3 4 5 6 7 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9~
clswpbon = ~1 0 3~
numwslot = ~2~
thiefskl = ~40 20~
traplimt = 6
clascolr = ~35 67 67 25 80~
clasiskl = ~10 10 10 10 10 10 10~
thiefscl = ~100 100 100 100 100 100 100 100~
hpclass = ~HP7C#K~
clsrcreq = ~1 1 1 1 1 1 1~
clasthac = ~0~
sneakatt = ~1 2 3 4 5 6 7 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9~
crippstr = ~1 2 3 4 5 6 7 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9~
END
COPY "example/spl/your1.spl" override
SAY 0xC ~this is the spell's name~
SAY 0x50 ~this is the spell's description~
COPY "example/spl/your2.spl" override
SAY 0xC #-1
COPY "example/tables/HP7C#K.2DA" override
"example/tables/LU7C#K.2DA" override
Helpful links: