Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

[How to] Making kit mods for the EE!

CrevsDaakCrevsDaak Member Posts: 7,148
edited June 2019 in General Modding

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 and undispellability on the latter).
  • The CLAB*.2DA, this is the file that applies and gives the spells at level up.
  • (optional) 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 Undead Hunter's). 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 of time 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, which is impossible, so you should be using this to meme.
~7C#KIT               69      666      0       0       7      42~
Stats requirement to dual-class FROM this kit to another class. No memes here.
~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~
These are the kit's usability flag (it determines which items the kit is going to be able to use) and the class the kit belongs to number's. Refer to kitlist.2da for more information.
~0x00080000	4~
This is the name of the HLA file, which should always be prefixed with LU. Here, LU7C#K.2DA is noted with no extension and without the LU prefix.
~7C#K~
These are the items the kit is going to get at the start of ToB. You can put a comma and the desired number for the item as well, but only if the item can be stacked (like Arrows and Gems). Please, refer to 25stweap.2da while working on these, because each column is a different inventory slot, and you can't put and ring on your neck nor a shield in your head (actually, don't worry, because nothing bad happens actually, only misplaced items. v1.3 used to crash on this though), so watch out.
~* * * BAG28 * * * BOOT01 AMUL17 * * AROW11,80 * * * * * DAGG12 SW1H28 *~
This is the lowercase name of the kit, you can use a .tra reference as well if you like.
SAY ~batman~
First uppercase, the rest lower case.
SAY ~Batman~
The description for the kit (character generation and Record screen). Use the vanilla ones as examples, or if you prefer, Kit Revisions' or RR's.
SAY ~BATMAN: I heard he's cool, didn't test tho.~
Before we continue with the EE extensions to kits, I'd like to add a few things. First, only one of the parameters (kit_name) for this function are mandatory, you don't have to provide the other ones if you do not intend in changing the kit's stats from the base class' stats.
LAF fl#add_kit_ee
This is the character's biography, you can leave it empty (I think) and you'll get the default one for the class. You can browse dialog.tlk for more interesting ones or add your own.
biography = 29492
This is a short description of the kit's strengths and weaknesses that is shown in the "pick a .chr" screen during character selection. As of v2.3, it might be used elsewhere, but I am not aware of any other use for this.
briefdesc = RESOLVE_STR_REF (~FIGHTER/CLERIC: This character can use the abilities of a Fighter and a Cleric, though weapons are restricted to only those allowed by the Cleric's ethos. They may Specialize in, but not Master, any weapon they can use.~)
Zero means the class cannot Fall, and one means the class can Fall like a Ranger or a Paladin do if their reputation drops low enough.
fallen = 0
This is the string that is displayed when you Fall and lose your class. You don't need to provide anything if the class can't become Fallen.
fallen_notice = RESOLVE_STR_REF (~Lost Class: Defender of Gotham City.~)
The kit's internal code name. You HAVE to provide the function with these, otherwise it won't know for which kit it needs to add all the other stuff. Also, let me leave something perfectly clear: this is the only argument you NEED to provide for a kit to work in the EE, the rest are all OPTIONAL.
kit_name = ~7C#KIT~
This is the backstab the character get per level, you can refer to backstab.2da to understand this better in case you find the example to be unclear. Only for Thief classes. If the kit you have in mind for thieves doesn't have backstab, don't worry, just write 40 1s separated by spaces.
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 is the information that rules several bonuses related to weapons. In the first entry we have a 1, that states that WPSTACK access will be enabled for this kit (this means that, the kit will receive the extra half APR Fighters get at levels 7 and 13 besides gaining APR from Specialisation and up. If you'd like to disable this, just drop in a zero instead.

The second entry, gives an extra half-APR every [NUMBER] levels while attacking unarmed. It is used for Monks, which receive it every 3 levels.

The third entry is the amount of THAC0 the character using this kit will receive when wielding a weapon they're not proficient with.
clswpbon = ~1 0 3~
This is the number of weapon slots shown in the inventory screen, you can't change the number of those found in the game screen.
numwslot = ~2~
This is the amount of Thieving Points the character gets to spend at level one, followed by the amount the can spend every level thereafter.
thiefskl = ~40 20~
This is the maximum amount of Thief traps the kit can set per area.
traplimt = 6
Each one of these numbers represent different palettes, so to choose the colours you'd like to use, you'll have to browse the palettes somehow (pick any item with opcode 7, for example, a splint mail, open it with NearInfinity, scroll down on the Edit tab, double click on the Effects using opcode 7, and click on the field that says Color index ## and pick whichever colour you please.

Now, the location of the colours in question is simple, the first one are the tiny bits of metal you have on yourself (for example, the human female mage animation has a coin-like thing on her belt which has it's colour ruled by this number), the second one is your character's Minor colour, the third one's your Major colour, the fourth's the colour of the leather the character wears (boots, straps and stuff like that as well) and the fifth is your armour's colour.
clascolr = ~35 67 67 25 80~
This is the bonus to thieving skills you get at level one. Check the file clasiskl.2da for their ordering.
clasiskl = ~10 10 10 10 10 10 10~
This one's a bit tricky. 100 means the character can spend thieving points normally on a certain thieving skill. 0 means they can't spend any points at all on that skill, and values in between zero and one hundred represent the reduction the kit receives to that certain thieving skill (please refer to thiefscl.2da for the ordering of the thieving skills). I am not sure about what happens if a Thief kit has less than 100 but more than 0 (because this is mostly used in the vanilla games to disable Shadowdancers from spending points on Set Traps, and reducing certain bard kits' pick pockets score), nor what happens if you set it at something like 200 or 150.
thiefscl = ~100 100 100 100 100 100 100 0~
This is the kit's HP*.2DA table, just as discussed before. Full name without extension.
hpclass = ~HP7C#K~
This determines which race can pick this kit at chargen. 1 means that race is able to, 0 that they aren't. The order is Humans, Elves, Half-Elves, Dwarves, Halflings, Gnomes and Half-Orcs.
clsrcreq = ~1 1 1 1 1 1 1~
This is a permanent bonus to THAC0 given at level one. Nothing in vanilla uses it I think.
clasthac = ~0~
These two lines are the one responsible for how Sneak Attack/Crippling Strike work. Please, just refer to the IwD:EE ones (I have no clue at all how this works, except that to nullify them (for example, for a kit that doesn't backstab), you have to use all 1s on sneakatt and all 0s on crippstr).
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~
This END closes out the LAF action started before.
END // nothin' to see 'ere
Copying spells and giving them their names... WeiDU nonsense this tutorial isn't about, classic "blah blah insert a picture of a cat here blah blah illustrative code blah blah" type of thing (I don't know what I'm talking about anymore).
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 we "clear" it of it's possible name by dropping in a -1 (which has no strings assigned to).

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

/* THAT'S ALL FOLKS! (What? I'm not Khalid!) */
Here's the clean, complete code without comments:
BACKUP "example/backup"
AUTHOR CrevsDaak
VERSION "v2.3.67.3"


BEGIN "Example kit mod"
INCLUDE "example/lib/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~
~* * * * * * * * * * minhp1 * * * * * * * * godbow killsw1~
SAY ~batman~
SAY ~Batman~
SAY ~BATMAN: he is mothafreakgngin awesum~

LAF fl#add_kit_ee
INT_VAR
biography = 29492
briefdesc = RESOLVE_STR_REF ~short desc 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 0~
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:

Have fun modding!

Post edited by CrevsDaak on
Kamigoroshiargent77elminsterronaldoDungeonnoobmlnevesebooinyoureyesTroodon80ICNJuliusBorisovErgXavioriaPibaroSCARY_WIZARDrufus_hobartjscohenlolienkensaijackjackGodKaiserHellTressetRuneksGrammarsaladreivisionRavenslightGoturalButtercheeseAdulAbelbrusFina92mashedtatersZansoancientclownNoobaccasemiticgodRaduzielArctodusjunyangchejoshua15502StummvonBordwehrlnstructor_
«13456714

Comments

Sign In or Register to comment.