Skip to content

How to create a custom Races and Classes

With Patch 1.75 new races could be added to a list in the same way new classes could be added. This is great news allowing people like me to start building the game I want. For the past few hours I have been searching on the forums for the How-to-guide of doing this. Sadly I haven’t even found the patch notes.

One of my professors taught me there are many right ways to code things. So I am asking for the community to add to my knowledge in helping me (and others like me) in creating a simple to follow guide for adding new classes and races.

In another post a kind user provided the PDF which showed what was in the 2DA. I would request that such is taken a step further. For example:

1) Download X from _______.

2) Open up the 2da which default location is X.

From there explain the terms, show a sample class, mention if creating new spells list (such as merging arcane and spell caster or adding a new domain) is possible. Finally how to add it to a module.
Yes this would be some work and if I knew how to do it I would. I don’t so I ask one of you who are more knowledgeable to create such a guide for me and others such as myself who would love to be able to do such.

Comments

  • pscythepscythe Member Posts: 116
    edited June 2018
    Hi @Caomh

    I think you're in a perfect position to create such a guide learning as you go. I can give you a broad overall approach to get you started. I suggest you start it easy by trying to make a clone of an existing "simple" class such as Fighter before trying caster classes or racialtypes.

    You'll need to add entries to classes.2da, packages.2da, racialtypes.2da, appearances.2da at a minimum. These files should go into your top hak file for your module or you can put them in override to make development and testing easier. If you don't know where to get the these .2das files, the quickest is to download them from @Zeroark on the Vault https://neverwintervault.org/project/nwn1/other/neverwinter-nights-enhanced-edition-base-2das

    Check the NWN Wiki to understand what the different columns in the .2da means

    http://nwn.wikia.com/wiki/Racialtypes.2da
    http://nwn.wikia.com/wiki/Appearance.2da
    http://nwn.wikia.com/wiki/Classes.2da
    http://nwn.wikia.com/wiki/Packages.2da


    You can edit these .2das as simple text files using editors such as Notepad++. If you need to read up on what .2das are in general http://nwn.wikia.com/wiki/.2da

    You will also need a .tlk editor. See here to see what .tlk files are about http://nwn.wikia.com/wiki/.tlk
    and here for a pretty good .tlk editor https://neverwintervault.org/project/nwn1/other/tool/axe-murderers-killer-tlk-editor

    Post edited by pscythe on
    ZeroarkdTd
  • TressetTresset Member, Moderator Posts: 8,262
    edited June 2018
    @pscythe your comment here got caught in the forum's spam filter. I have returned it and verified you so that this should not happen again.
    pscythe
  • pscythepscythe Member Posts: 116
    Tresset said:

    @pscythe your comment here got caught in the forum'[s spam filter. I have returned it and verified you so that this should not happen again.

    Thank you. I was wondering where it went. :smile: Must be all the links. LOL
    Tresset
  • CaomhCaomh Member Posts: 40
    edited June 2018
    @pscythe I am afraid your post was not very helpful for this topic. I do thank you for your response yet it seems the response you gave to me was the same you received when asking for help on this same topic. (Did you find the solution on getting your class to load properly?)


    My goal is to learn how to do the very thing you requested help with. In the future I may create some guides, however I will need to know how what I am doing. Here are three guides I created for an adventure kit I made in Unity as an example.

    1. Player Setup


    2. Player Movement


    3. Player Script

    In the first guide I set up how to create a new player. The second guide shows how to add animations. The third guide was for editing the script itself. It defined what everything is and how it works. In addition to those notes being in the script itself.

    All three combined allowed for users to easily create an player character and if an error happened they could easily look back and see what they did wrong. As a benefit I can still use this code over a year later and know what everything does as I have a nice cheat sheet.

    Another saying my professor had was weeks of coding can save hours of planning. What this means is if you know what you are doing by planning it can save you a lot of time of fixing any errors. In this case if I learn how to properly add a class then add a class. It will save me (and others) the time spent looking for what went wrong and fix it.

    Note: I fully documented every script too!
  • pscythepscythe Member Posts: 116
    edited June 2018
    Caomh said:



    ... yet it seems the response you gave to me was the same you received when asking for help on this same topic. (Did you find the solution on getting your class to load properly?)

    Not sure what you meant, but the responses I got have been helpful. Yes that class is working as expected.
    Caomh said:



    Another saying my professor had was weeks of coding can save hours of planning. What this means is if you know what you are doing by planning it can save you a lot of time of fixing any errors. In this case if I learn how to properly add a class then add a class. It will save me (and others) the time spent looking for what went wrong and fix it.

    That all sounds fine in theory but in practice you often don't know enough to plan properly, and often the only way to know is to do. A lot of it is just trial and error. You just have to experiment, tinker or even reverse engineer. Such is often the case when it comes to messing with .2das. You learn how to create a new class by actually creating a new class (through a process of experimentation).

  • pscythepscythe Member Posts: 116
    edited June 2018
    @Caomh Found a guide on creating Prestige Classes that should be useful for your needs. It is a bit dated, but will give you a good idea on what is involved. The links are broken, but the tools can all be found on the new vault https://neverwintervault.org/. It skims over packages.2da but since v1.74 every class requires their own entry in packages.2da, but that is easy to do, see the links in my first comment above.

    CODI New Prestige Classes Tutorial Beta by Papermonk

    https://neverwintervault.org/sites/all/modules/pubdlcnt/pubdlcnt.php?file=https://neverwintervault.org/sites/neverwintervault.org/files/project/1463/files/codi_new_prestige_class_tutorial.7z&nid=1463


    See also Custom Content Guide v3.0 by Eligio_Sacateca, it has a chapter on creating custom races.

    https://neverwintervault.org/sites/all/modules/pubdlcnt/pubdlcnt.php?file=https://neverwintervault.org/sites/neverwintervault.org/files/project/1463/files/custom_content_v3_0.7z&nid=1463
  • Sylvus_MoonbowSylvus_Moonbow Member Posts: 1,085
    Page 133 of the Custom Content Creation Tutorial has detailed information on creating a custom race.

    https://neverwintervault.org/project/nwn1/other/nwn-university-document-help-pdf-reference-guide-tutorial-xls-collection

    Download Custom Content Guide v3.0 by Eligo_Sacateca
    pscytheCaomh
  • CaomhCaomh Member Posts: 40
    @Sylvus_Moonbow

    This is exactly the sort of guide I was looking for. It does have one issue that I have ran into. It was written in 2003 before the ee version. I need to begin with finding the 2da files. In NWN 1.69 this was an easy find. So far I failed to find it in the EE version.




    Any help finding the 2DA will be appreciated.
  • Sylvus_MoonbowSylvus_Moonbow Member Posts: 1,085
    You can get the most up-to-date 2da files from the neverwinter vault. Someone uploaded all the EE 2das in a neat little package so you do not have to export them yourself.

    https://neverwintervault.org/project/nwn1/other/neverwinter-nights-enhanced-edition-base-2das
    Caomh
  • CaomhCaomh Member Posts: 40

    You can get the most up-to-date 2da files from the neverwinter vault. Someone uploaded all the EE 2das in a neat little package so you do not have to export them yourself.

    https://neverwintervault.org/project/nwn1/other/neverwinter-nights-enhanced-edition-base-2das

    Thank you so much. Now if I wanted to grab the base ones myself I could use something like NWN Explorer or is there a better tool? I did notice two tools in the utilities folder of NWN:EE, however I am not sure what they do. The reason why I am inquiring about how to do this is I am anticipating future 2DA updates in which case I could make edits on day one.
  • T0R0T0R0 Member Posts: 86
    Yes, use NWNExplorer to manually open base key in your data folder. That's the only way I can get NWNExplorer working for now. It's being worked on I think.
    You can use the gffeditor for 2da's and nwhak is to bundle the files together in a hak file for distribution.
  • CaomhCaomh Member Posts: 40
    Following the Custom Class Packages it turns out I need the following 2DA files not included in the link above: FeatPref2DA, SpellPref2DA, Equip2DA & SkillPref2DA

    I made a quick edit of the Sorcerer class in package turning it into a WIS based class in both the classes2da as well as the packages2DA. The results are the following:

    When choosing the class the name displays as Sorcerer (I didn’t edit the dialog.tlk so this is expected).
    The starting gold is not the 800 gold. (I believe I will need to edit the Equip2DA to fix this).
    The character is unable to take any spells (CHA and WIS are the proper level unsure why).
    Familiar is not selectable, yet shows one is available.

    Note: Special thanks to @T0R0 for posting how to find the 2DA files.
  • CaomhCaomh Member Posts: 40
    Next up I have attempted to create a new race using the guide that @Sylvus_Moonbow provided.
    I downloaded the TlkEdit from the vault.

    I copied the Elf Race to a new row, and changed the name. It loaded properly. I created a new feat list and directed the racial types to look at that. That too worked properly. I went in using the tlk editor. The new race name is not displaying properly.

    Is there a different tlk editor for NWN:EE that anyone has used for NWN:EE that has worked.
  • JBobbJBobb Member Posts: 29
    edited June 2018
    Caomh said:

    I went in using the tlk editor. The new race name is not displaying properly.

    When creating new custom text for the game you have to add the line number from your new text to 16777216 and place that new number in your 2da for the text location.

    Don't forget to associate your altered tlk file to the module in module properties in the toolset.
    Caomh
  • CaomhCaomh Member Posts: 40
    Hi JBobb.

    Thank you for your answer. I would like to thank all of you for providing insight on how to sort things out. I appreciate all of you for taking out the time to provide some trouble shooting on this task.
    JBobb
  • XzanosXzanos Member Posts: 11
    Ok so I hate to necro this thread but there seems to be some good information here.

    Firstly I have been able to download the 2da files from the NWN Vault and been able to edit them
    However as @Caomh stated im trying to figure out how to extract these from the game itself.

    Hopefully @T0R0 can help out here because I feel like I must be doing something wrong.
    When I use NWNexplorer it seems to be opening an old GOG NWN that has some of my old modules in it.

    When I use NWNexplorer and target the steam files for the game it wont accept the path.
    rkr0amruasoy.png

    The only way i can find something similar to the downloaded 2das is when I open this file but they all have nondescript names.
    c5ky584070bu.png

    If I understand the general idea here its just to edit and have a secondary copy of any of the 2das and tlk files you will need for you module.
    Im just getting back into NWN after a long while and am really excited to try and create a custom class any help would be greatly appreciated.


  • CaomhCaomh Member Posts: 40
    edited November 2019
    @Xzanos . I had problems with classes as well in my tlk thread there is a link to many of the tools needed to edit the files. It will have step by step of the actions I took with aid on how to fix it.

    Link to Thread: TLK Files [Solved]

  • jay12jay12 Member Posts: 7
    If you are adding a custom race to a module that uses CEP, do you edit the cep260 tlk, and then for the 2da use the line from the tlk + 16777216 for the reference?
  • 789zxc789zxc Member Posts: 1
    Hi I have began playing NWN 2 again after being forced to stop for seven years. I am trying to make a Cleric of Auril for a lizardfolk companion. The story is that he found a battle-axe that was used to killed a white dragon, trapping some of the warrior's and dragon's sour inside. I have try looking on online for help but can only find where they say to copy a class, rename it, then move the file to the override folder. That dose not work. Any help would be gratefully.

    Thank you for your time.
  • XzanosXzanos Member Posts: 11
    Caomh wrote: »
    @Xzanos . I had problems with classes as well in my tlk thread there is a link to many of the tools needed to edit the files. It will have step by step of the actions I took with aid on how to fix it.

    Link to Thread: TLK Files [Solved]

    And a year later I return! It seems the link you posted is dead. Might you be able to link some of the tools your referring to?
  • CaomhCaomh Member Posts: 40
    Sorry for the late response:
    TLK Files Solved
  • BelgarBelgar Member Posts: 2
    Hi everyone.
    i read through here and i got a question or two if thats ok with you.

    in the 2nd post of this thread, pscythe wrote a wonderful post with much help for creating a custom class. But:

    i am planning to create a class which fits into the prc. And i have to include a new spellbook or two.
    The idea is: there is one new category of spells: unique spells, which will have new spells (10 of them).

    the 2nd shall be similar to divine spells, with the exception that i just wanna take a few spells of the levels 0-9. for example level 0 shall have 4 spells and the other ones arent even listed to be selected so that i can try to balance out things.

    the 3rd and last category is similar to arcane spells and just like with divine spells, i wanna take only 4 spells out of lv. 0 and only those are availabe so that only those 4 are selectable and visible and usable. the class shall not know the other spells.

    of course i did take a look at pscythes post and the nwn wikia is incredibly helpful, but

    1. it only explains the base nwn things if i read correctly. because in the prc.2da hak file there is a classes.2da file which has other colums not explained in the wikia. And thats exactly problem number 1. if there would be a wikia which describes the prc versions and the new / unknown colums, there would be no problem at all because all i would have to do is read and learn without having to write these posts and depending on others to help me. i like it more of course to do my thing without others having to help me. plus, i wanna do this new class for everyone , too aside from myself naturally. so is there a homepage which describes everything from the prc files so that i know how to handle a 2da file and its values, colums and even if i can add colums without the game causing bluescreens and without the pc having to go boom ? =)

    2. problem number 2 would be: i did take a look at the column "PreReqTable" in the classes.2da of the prc_2das hak file. and i read the entry "CLS_PRES_DRU" for example. (no problem so far, because it is obvious what it means and the file is present in the prc_2das hak file) then i did take a look at the file by opening it with the standard editor and i read, that it is handled by a script variable which should be a seperate nss file named "PRC_AllowDruid", right? but i cannot find this file anywhere in the prc_scripts hak file. so i dont know where to find the neccessary files to continue working on the class.

    can someone please help me out here ? i am very sure i could handle a class which uses spells , even if i am a beginner, as long as I have enough resources to learn from which give me 100% accurate information on all steps and problems so that everything is only a matter of learning and doing.





  • StratovariusStratovarius Member Posts: 30
    Your best for a series of complicated questions like this is to drop by our discord and hop into the #academy channel. Some of what you're asking could prove to be very difficult, even with all of the extra tools we've built over the years.
Sign In or Register to comment.