It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
I am trying to do this for NWN2.

Can anybody point me in the right direction? I would like to create my own custom races and/or classes. Any kind of detailed tutorial would be helpful. Also, how to modify current classes and races, including how to adjust the description given for them as well as add or subtract feats would be helpful. Thanx.
There where a few tutorials available but it seems they all have disappeared by now. Luckily both classes and races are fairly easy to create.
There still is: https://neverwintervault.org/project/nwn2/other/race-editor-v1120 but it’s very limited in what it can do, might be a good starting point though.

If you are serious about modding you’ll need to edit the files manually. I’ll give you short introduction below.

I recommend you start out with Kaedrins PRC Pack. It may already include what you have in mind and if not it's a great sample.

Here are the basics:
Classes are defined in classes.2da, races and subraces in racialtypes.2da and racialsubtypes.2da respectively.
The originals of these files are found in {NWN2directory}\Data\2DA_X2.zip, unpack them (and all other files you want to modify) into {NWN2directory}\Override.

You can edit these 2da in any editor you like (I recommend Notepad++). The third line contains the headers for the columns and most should be self-explanatory. Most columns are just references to other files.
Numbers usually mean a specific line is referenced. For example the column BaseRace in racialsubtypes.2da is a reference to the parent race in racialtypes.2da.
Text usually references a whole file. For example the column FeatsTable references a file with that exact name. Those files are basically just lists, each line containing a reference into feat.2da.
If you can’t find the referenced file in 2DA_X2.zip it was not changed in Storm of Zehir and therefore comes from 2DA_X1.zip or even 2DA.zip, just make sure you look in 2DA_X2 first.

Columns that reference text (Like Name, NamePlural, etc or Description) are a bit of a special case. These are references into the dialog.tlk file. A giant table of strings. In order to edit that you’ll need a special editor like https://neverwintervault.org/project/nwn2/other/tool/2datlkgff-editor-aka-tlkedit2

I hope this helps to get you started, if you have further questions let me know and I’ll try to help.
Thanx for the starting point. When I have questions, I will let you know. Thanx.

Also, I am already running Kaedrin's PrC pack. There are just a few tweaks I would like to do, as well a create a few classes based off of what he already did. Also, I want to add a feat or two to some of the classes he created. Since I already have Kaedrin's PrC pack, do I have to start with the unpacking of the 2DA.zip files, or had Kaedrin done that part for me?

Two things with Kaedrin: The Frost Mage has an error. It does not ask you what you previous spellcasting class was so you can continue to gain spellcasting levels. I have been able to get around that by adding it manually through the nwn2editor. How would I resolve that? UPDATE: It allows you to choose Sorcerer, if that was your class before, but it does not give you the opyion to select Wizard, if that was your original spellcasting class. Don't know about the other classes. Just trying to get the Wizard to work.
Second. How do I add feats that continue to level with the character, such as Animal Companion. For example, the Forest Master calls for Animal Companion as a prerequisite, but does not continue to increase the level of the Animal Companion as you level up. I always thought that was stupid. How would I do that?

If I am asking too much and you feel I may be too needy, which is possible, just say so and I will understand. I never got the chance to try my hand at modding.

I really appreciate any help you are willing to offer.

Thanx.
Post edited September 03, 2022 by temyankee
You can use Kaedrins files as a base.
Pro tip: You can have multiple files of the same name in your Override, NWN2 will use the last one it sees. So if you copy Kaedrins files into a folder named “zz_LoadLast” and modify those you can play around with the files and have a clean and easy way to revert if something goes wrong.

That’s odd. Frost Mage works fine for me (I tested a wizard). Both the selection for the progression-class and the progression itself. Altough I seem to have 1.42 installed and not the version 1.42.1 that is available on the vault nowadays.
Hard to diagnose what’s wrong. You can start by checking cls_featmap_frostmage.2da, for each eligible caster class a different feat is mapped. Wizard should be 3283 (which is FEAT_FROSTMAGE_SPELLCASTING_WIZARD). You can compare Frost Mage to Arcane Scholar and see if anything looks wrong.

I think the Animal Companion might actually be a limitation in NWN2. Both druid and ranger reference feat 199 (AnimalCompanion), which points to spell 317 (Summon_Animal_Companion), which calls the script NW_S2_AnimalCom, unfortunately that script just executes the builtin function SummonAnimalCompanion(). As far as I know there is no simple way to get the code for those. You could rewrite it from scratch, but getting the details right will be a lot of work. Additionally the fact that’s this is builtin in the first place makes me think there is something about the Animal Companion that can’t be handled by script.
It might be worth it to get a second opinion on this though. This goes beyond my current expertise.

You can download old Java versions from https://www.oracle.com/java/technologies/downloads/archive/#JavaSE
You want the runtime environment (not the development kit).
I created a new wizard, then used nwn2edit to give the correct prerequisits for Frost Mage. Then I used the console to give 1100 XP so I would advance to level 2. When I select Frost Mage, i get the Frost Armor feat automatically, but I don't get the Spellcaster Class feat. When I do the same for Sorcerer, I get the Spellcaster Class feat, no problem.

Is this what you did?

Haven't looked at the Animal Companion part yet.

How would I add feats or change them for a Class or a Race?

Maybe a short primer on how to create a race or class from scratch?

I really appreciate your help here. Once I get the basics down, I usually can pick up the rest fairly quickly.

Thank you again.

Got the Java problem resolved pretty quickly.
Post edited September 03, 2022 by temyankee
avatar
V0idhead: You can use Kaedrins files as a base.
Pro tip: You can have multiple files of the same name in your Override, NWN2 will use the last one it sees. So if you copy Kaedrins files into a folder named “zz_LoadLast” and modify those you can play around with the files and have a clean and easy way to revert if something goes wrong.

That’s odd. Frost Mage works fine for me (I tested a wizard). Both the selection for the progression-class and the progression itself. Altough I seem to have 1.42 installed and not the version 1.42.1 that is available on the vault nowadays.
Hard to diagnose what’s wrong. You can start by checking cls_featmap_frostmage.2da, for each eligible caster class a different feat is mapped. Wizard should be 3283 (which is FEAT_FROSTMAGE_SPELLCASTING_WIZARD). You can compare Frost Mage to Arcane Scholar and see if anything looks wrong.

I think the Animal Companion might actually be a limitation in NWN2. Both druid and ranger reference feat 199 (AnimalCompanion), which points to spell 317 (Summon_Animal_Companion), which calls the script NW_S2_AnimalCom, unfortunately that script just executes the builtin function SummonAnimalCompanion(). As far as I know there is no simple way to get the code for those. You could rewrite it from scratch, but getting the details right will be a lot of work. Additionally the fact that’s this is builtin in the first place makes me think there is something about the Animal Companion that can’t be handled by script.
It might be worth it to get a second opinion on this though. This goes beyond my current expertise.

You can download old Java versions from https://www.oracle.com/java/technologies/downloads/archive/#JavaSE
You want the runtime environment (not the development kit).
Omg you're amazing. I was doing basically what the OP did and even posted for help but it's that tiny little snippet of load order that I missed. Went into the zzz_merge folder and found racialsubtypes.2da there and changed things and it worked! Thanks so much even though you didn't even know my question existed!
avatar
KyrinFireheart: Thanks so much even though you didn't even know my question existed!
Glad I could help ^^ I had to figure that out the hard way too, I just had a decade long headstart ;)
avatar
temyankee: I created a new wizard, then used nwn2edit to give the correct prerequisits for Frost Mage. Then I used the console to give 1100 XP so I would advance to level 2. When I select Frost Mage, i get the Frost Armor feat automatically, but I don't get the Spellcaster Class feat. When I do the same for Sorcerer, I get the Spellcaster Class feat, no problem.
Ok, that’s a good starting point.
Do you see the wizard line in cls_featmap_frostmage.2da? Does it point to the correct feat in feat.2da? Compare the wizard and sorcerer lines in feat.2da and see if there is any difference.
Sidenote: Use https://neverwintervault.org/project/nwn2/module/vordans-hero-creator to easily create and test characters.
That’s what I used to test it, I leveled the wizard up to level 5 (minimum to take Frost mage based on the 8 points in lore requirement).
avatar
temyankee: How would I add feats or change them for a Class or a Race?

Maybe a short primer on how to create a race or class from scratch?
Alright let’s start with race.
Open racialtypes.2da. It’s easiest to edit one of the padding-lines, it already has the formatting set up. Just fill in how you want your class be set up.
Here is a short description of what each column means: https://nwn2.fandom.com/wiki/Racialtypes.2da
That site has documentation on all important files.
Of note are the Name-columns. You need to add new lines to dialog.tlk and put their numbers in here.
Do the same for racialsubtypes.2da and point the BaseRace-column to the line you used in racialtypes.2da
Now the interesting part: Choose a name for the FeatsTable you want to use and add it to both files. (If you later create a second subrace they can differ and the table referenced in the base race can hold the common feats).
Those feat tables are essentially just a list of feats found in feat.2da. Creating new passive or active abilities will also involve spells.2da and a script. I’m skipping this for now.

Classes.2da is similar.
Of note are
PreReqTable used for defining entry requirements for prestige classes.
Package is those predefined choices that level your character up automatically. Not relevant for us, just choose an existing value that kind of fits.
FeatsTable is similar to the one for race except that it contains a column for the level at which the feat is given (or available).
Got the Frost Mage thing resolved. There was a one digit difference in the feat table. Now, it works perfectly.

Let's try for something specific that I would like to add to a class.
I want to add the Spellcasting Progression to the Dragon Disciple. This will be Kaedrin's variant, meaning it will increase the spellcasting level and spells available for the following classes: Assassin, Avenger, Bard, Hexblade, and Sorcerer. I would like for the progression to occur at levels 1, 4, 7, and 10. Don't want the character becoming too much more powerful, but I feel that is spellcasting is a requirement to achieve the class desired, then spellcasting should still progress, even it at a slower pace.

As for races, how would I go about defining a different set of feats for a particular race/subrace? I know that I would have to refer to a different feat list, for instance, instead of RACE_FEAT_HALF I want to use a different list for RACE_FEAT_GHALF, to allow for some differences in the beginning feats for the Ghostwise Halfling. I already made the race available as a player race and changed the Stat Adjustments from -2 STR +2 DEX to +2 DEX +2 CON -2 CHA. Now, I want to change what feats they have granted at character creation. Do I just create a new 2DA file called RACE_FEAT_GHALF.2DA? If so, how? The TLKEDIT allows for TLK, ERF, or ERF (NWN2) under File/New menu. Or, do I just make a copy of the RACE_FEAT_HALF in a temporary directory, then change the name, then access it in the TLKEDIT and change the feats? I presume that I use the feat number in the FEATS.2DA.

How about creating a brand new feat? How would I accomplish that? Example: The Frost Mage has Piercing Cold, which allows certain cold spells to penetrate any cold resistance or immunity. I want to create a new feat called Burning Embers, which does the same thing, only fire spells and fire resistance/immunity affected.


I want you to know that your kindness in helping me to do this is immeasurable and I thank you so much for your assistance and knowledge.
.I’m a bit short on time at the moment. I’ll start answering your questions one at time, so you don’t have to wait a week until I compiled them all into a single post.

Spellcasting progression:
I actually stumbled upon a description written by none other than Kaedrin:
https://neverwintervault.org/forums/neverwinter-nights-2/nwn2-custom-content/faq-custom-classes-spells-and-feats
That covers the easy case for “real” spellcasters like Bards and Sorcerers.

The bad news is that this won’t cover the “fake” spellcasters like Hexblades and Blackguards.
To get around the limitations in the game Kaedrin implemented the Spellcasting for classes like those with feats.
Without having looked into the details I can already tell you this creates at least two problems:
You can’t grant new spell-levels since those are locked into the level at which the class grants the corresponding feat.
You can’t increase the caster level since that would need to be handled by the script that handles the spell. Unfortunately Keadrin didn’t include the sources for the scripts, only the compiled version.
Sucks about the Spellcasting progression, but okay.

UPDATE: Still having issues with Frost Mage by way of cheating using the nwn2edit. I give my Level 1 Wizard Spell Penetration as well as Lore 8. When I level up to Level 2, Frost Mage is available, then the Spellcasting Progression for Wizard, but when it takes me to selecting spells, it gives me 9 more 1st Level spells instead of the standard 2 for increasing a level. If I leave it alone and simply level correctly, it works perfectly. Don't quite understand this.

As for my previous questions, I await your response, patiently. Take your time. I apologize if I have been monopolizing your time. Was not intentional.
Feats for Races:
Exactly, you just create RACE_FEAT_GHALF.2DA and write RACE_FEAT_GHALF under FeatsTable in racialsubtypes.2da.
Since those are plaintext files it really does not matter how you create them. Personally I find it easiest to copy an existing file of the same type, this way the file already has the correct headers and nice column-spacing. Also takes care of the encoding and EOL-type, I don’t know off the top of my head if NWN2 cares about that, but using the same is the safe option.
Yes, the FeatIndex points to feat.2da

New feats, generally:
A feat in and of itself really does nothing. Feats can, through the spellId column, point to a line in spells.2da (which makes spells.2da a rather confusing name).
The spell in turn points to a script via the ImpactScript-column. That script applies the actual effect, damage or whatever else you want to do.

Piercing cold, specifically:
Bad news again, though not as bad as for the spellcasting progression.
Piercing cold contradicts the previous paragraph. It doesn’t point to a spell, the feat itself seems to do nothing.
But you’ll notice the number of spells effected by it is rather small. Furthermore each of those is present in Kaedrins script folder.
Again, Kaedrin didn’t include the sources, but I’m 99% certain the spell-scripts themselves check for Piercing Cold and modify their behavior accordingly.
It’s some work, especially since there are way more fire spells than cold spells, but it’s possible to modify the fire spells the same way.

Don’t worry about my time, helping others with this finally makes the time I spent tinkering around with the game worthwhile.
Okay. I was able to modify the feat list for Lightheart Halflings so that the Ghostwise Halfling can have its own set of feats to start with. Tested and works.

Now, for the real nitty gritty. Am I right in stating that all the 2DA files as well as the TLK files don't actually create anything new, they simply put together lists based on what already exists. In order to create something completely new, life a new feat or a new spell, there are other files we need to access, or create, in order to accomplish this feat, correct? Would those files be the ones with the NCS or NSS file extensions? If so, how can one access those files and either change them into something else, or create new ones?

Let's try an example for a new spell.
Back when I played AD&D 2nd Edition, the Forgotten Realms Campaign Setting manual had a list of spells native to the Forgotten Realms. One in particular was called Snilloc's Snowball. It was an Evocation spell, Range was 20 yards/level, Components were Verbal, Somatic, and Material, Duration was Instantaneous, Casting Time was 1, Area of effect was One target or creature, No Saving Throw. The effect would be that a snowball forms in your hand which you can throw at any one target. It will strike unerringly, similar to Magic Missile and is therefore only blocked in teh same manner that Magic Missile is blocked. It would cause 1d3 damage to the target, or 1d6 vs a fire-using or fire-dwelling opponent.

The attraction to this spell was the range ability, since it grows with the spellcaster's level.

Since it has some similarities to Magic Missile, except for the number of missiles, could we alter the Magic Missile spell script (if that is the correct term) to simply fire 1 missile, look cold/icy in nature instead of energy, and adjust the rest of the spell capabilities to work as Snilloc's Snowball?

Marinate on that and let me know what you think.

Also, how would one open an NCS or NSS file? - Already answered this. I can just use the NWN2 Toolset.
Post edited September 08, 2022 by temyankee
In the case of feats your description of the relation between the different file types is accurate.
But when it comes to, for example, races, you can (as you did) absolutely create something new by just editing 2da files.

NSS are sources for scripts.
NCS are compiled scripts. Only those really need to be in your Override.
As you discovered the Toolset includes a fairly competent compiler. The easiest way to learn is to look up a spell that interests you and see how it works.

Snilloc’s Snowball:
I’m afraid I’m going to disappoint you again.
Yes the easiest way to implement this spell would be to copy the spell.2da-row for Magic Missile (or Orb of Cold, which already has fitting values for graphical-columns like ProjSEF. And the script for Magica Missile (NW_S0_MagMiss).
Where you will run into trouble is a variable range. If you look through spell.2da and the available documentation (https://nwn2.fandom.com/wiki/Spells.2da) you will notice there are a lot of things about spells that are defined declarative there. Like the range, not only are you restricted to the 5 different values available, you also cannot make the range dependent on the caster level.
On top of that, as far as I know there is no way to reliably identify a fire-based creature.
So, it seems I am going to have to dust off my brain. Many moons ago, I went to school for computer programming. I was pretty good at it, 30 odd years ago. Ended up working anywhere but near a computer. Last job, before I went on disability, was as a chef.

Any kind of help in defining the commands as well as the syntax would be appreciated. I know that through the toolset you can open any of the script files. I just need to figure out how to first modify one, then second, and more importantly, create a whole new one, whether it be a feat or a spell.

Please let me know what kind of help/advice you can give as well as any link that may also prove helpful.

Thanx.
Well, good news for once, the scripting is actually quite simple.
The language is C-like, but memory-management is automated. Kind of like C#, so if you want to get reacquainted with the basics I recommend tutorials for C#.

A friend of mine reported success with https://www.codingame.com/
But a simpler, less gamified, Tutorial will teach you what you need to know faster. https://www.tutorialsteacher.com/csharp looks good to me. (no need for Visual Studio, the Online editor https://www.tutorialsteacher.com/codeeditor?cid=cs-KCF1Dg will be sufficient). Note that the first 6 lessons on the right side should be enough, the scripting language doesn’t have advanced features anyway.

To get started with the scripting I recommend looking at the code for Bears Endurance (nw_s0_bearendur) for how buffs work and Fireball (nw_s0_fireball) for damage-spells.
If you want to know what a specific function does double click the functionname or use the list to the right of the code-area, most provide good documentation. Additionally both spells contain comments that explain what each line does.