Skip to content

How to alter 2da tables?

Hello! I recently installed NWN EE and installed the PRC 1.7.1 and Tony K AI.
Everything is perfect, except that i play with a Paladin, and want to change the 2da file cls_feat_pal.2da in the prc_2da.hak, to give smite evil in the 1st level, lay on hands on 2nd level, turn undead at 4th level, etc.

In the GoG version this works, in the EE not... Why? How can I modify the 2da tables so they have a effect in the game, like i do in the GoG version?

Comments

  • ProlericProleric Member Posts: 1,281
    2da files work the same way in both versions.
  • MarciusVetrackMarciusVetrack Member Posts: 12
    but i modify the 2da tables and it not change in the game
  • CalgacusCalgacus Member Posts: 273
    edited March 2019
    Are you putting them in an override folder or a hak pak? I have so many versions of NWN on my drive I'm not sure which override folder to use anymore so I put everything in a hak pak and it works from there.

    I've been obsessing over 2da file editing today and came up with this workflow:
    First on a windows 10 machine get git-bash installed, then in ~/.bash_aliases have these two lines:
    alias ecl='function _ecl(){ cat "$1" | tr " " "\t" | clip;}; _ecl'
    alias pcl='function _pcl(){ cat /dev/clipboard | tr "\t" " " | tr -s " " > "$1";}; _pcl'

    Open a git-bash shell to the location of your 2da files.
    run the command for the 2da of interest :
    ecl baseitems.2da
    then open new sheet in Google Sheets (or some other spreadsheet app) and select the top-left corner cel of the sheet and then right-click "paste-special->paste values only". Now edit the data in the sheet. When done reselect the top-leftmost cel and right-click copy.

    Now go back to the same git-bash shell and issue the command:
    pcl baseitems.2da
    Now you can import your edited 2da into your hak pak.

    Seems to work for me so far but have not tested yet with all 2das, some of which have spaces inside of quotes which might break this trick.

    Does anyone have a simpler 2da edit workflow? I find navigating around a 2da in text editors very slow and error prone and I'd rather not have to install any large spreadsheet app on my small drive.

    I wonder if the NWN2daTool Excel Spreadsheet script can be adapted for use in google sheets.


    PS: It would be nice if I could call those bash commands from the windows-explorer popup-menu by right-clicking on the 2da file, but I'm not sure how to rig that up.

    PPS: and after all that I discover 2da/tlk/gff Editor which seems like it might be better as it handles 2da, tlk and uit files all at once.
    Post edited by Calgacus on
  • FreshLemonBunFreshLemonBun Member Posts: 909
    Check your loading order, I believe hak is loaded last which probably prevents cheating, so you will have to place it inside the hak.
  • MarciusVetrackMarciusVetrack Member Posts: 12
    Calgacus wrote: »
    Are you putting them in an override folder or a hak pak? I have so many versions of NWN on my drive I'm not sure which override folder to use anymore so I put everything in a hak pak and it works from there.

    I do not put in the override the hak file is in the Hak folder in documents folder because it is part of the PRC module, i want to alter the hak that belongs to the PRC Custom Content
    Calgacus wrote: »

    Does anyone have a simpler 2da edit workflow? I find navigating around a 2da in text editors very slow and error prone and I'd rather not have to install any large spreadsheet app on my small drive.

    Yes, i use notepad++ to edit the 2da, it is a simple edit no need to scroll over thousands lines...

    I dont know how to use the Git Bash program that you talk, sorry i'm not an advanced programmer
    Calgacus wrote: »
    I wonder if the NWN2daTool Excel Spreadsheet script can be adapted for use in google sheets.

    i dont know maybe yes
    Calgacus wrote: »
    PPS: and after all that I discover 2da/tlk/gff Editor which seems like it might be better as it handles 2da, tlk and uit files all at once.

    that program do not open my 2da files and i not know why.
    Check your loading order, I believe hak is loaded last which probably prevents cheating, so you will have to place it inside the hak.

    I opened the modules in the toolset and checked the order, the prc_2da.hak is the first in the load order, and the PRC Custom Content is the only "Mod" installed in my NWN...

    I dont know how to make the alterations in the 2da files reflect in the game, in the 2da files, it remains altered, but not shows the diferences in the game.

    I use the NWHak program to export the 2da file to my desktop, edit with notepad, and import the 2da into the hak, save the Hak, but it makes no diference in the game... in the GoG version it works. I dont know what to do!
  • FreshLemonBunFreshLemonBun Member Posts: 909
    If you are updating the hak properly with the new 2da and without conflicting resources it should work.

    You mentioned that you can't open your 2da with a 2da editor so maybe there is an error in your 2da. Does the editor give a message?
  • CalgacusCalgacus Member Posts: 273
    @MarciusVetrack Which 2da file are you trying to update? what do you want to change in the game?
  • FreshLemonBunFreshLemonBun Member Posts: 909
    change the 2da file cls_feat_pal.2da in the prc_2da.hak, to give smite evil in the 1st level, lay on hands on 2nd level, turn undead at 4th level, etc.

  • MarciusVetrackMarciusVetrack Member Posts: 12
    edited March 2019
    Calgacus wrote: »
    PPS: and after all that I discover 2da/tlk/gff Editor which seems like it might be better as it handles 2da, tlk and uit files all at once.
    You mentioned that you can't open your 2da with a 2da editor so maybe there is an error in your 2da. Does the editor give a message?

    I use notepad++ or windows notepad to edit, This program that Calgacus spoke, i tried but it not open, i click file>open>select the 2da file and noting happens, the program window keeps empty no warnings or nothing.
    If you are updating the hak properly with the new 2da and without conflicting resources it should work.

    But it not, it works only in the CD Retail Version Diamond Edition, and in the GoG version, in the Steam version, it not work. I cannot upadate the Hak file, the 2da file in it is updated though, but no visible changes in the game.

    I'm just altering the Colum #GrantedOnLevel it is a list of feats, with their number in the Feat.2da, the #GrantedOnLvl and the #OnMenu; Just that, it could not be so simple;

  • CalgacusCalgacus Member Posts: 273
    Do you have multiple Neverwinter Nights home directories (one for diamond version , one for GoG, one for EE)? If so are you putting the updated hak and mod files under the right one?
  • FreshLemonBunFreshLemonBun Member Posts: 909
    Right, but it does work or the prc and other mods would not be able to exist, if we reduce the logic completely we see this is true. Haks can make those alterations, therefore it must work.

    Something along the way is going wrong.

    I regularly switch between multiple versions and have had no issues for what it's worth. For Diamond the old folders are used, for EE the user documents folders are used.

    If the rest of the prc hak is working then just try some trouble shooting. You can try exporting the contents of the top top hak for 2das to your /documents/nwn/override/ folder and deleting the hak file. Then try making a new hak with the same name and with all the contents you just exported. If it's still not working try deleting the 2da and without opening or editing inside make a copy of another class 2da and rename it to the paladin 2da, then you should see when making a new character that it gives feats for the other class. If that works but the other steps didn't then the 2da was possibly broken with incorrect formatting.
  • MarciusVetrackMarciusVetrack Member Posts: 12
    I Joined the PRC Discord, and talked to Stratovarius, the Founder of PRC, and he said that the Steam Workshop Subscription, is overriding my changes to the hak, every time i entered the game.
    So he recomended that i unsubscribed from the PRC in the Steam Workshop, and download the PRC from Vault, and installed that.
    I do this, and it worked like a charm, my changes to the 2da files are now visible in the game.

    Thanks for your help!
    Cheers! :)
  • FreshLemonBunFreshLemonBun Member Posts: 909
    Well, there you go, don't use Steam lol... I thought it was a bit weird because what you were doing should have worked. Good luck with your modding!
  • StratovariusStratovarius Member Posts: 30
    Glad it all worked out for you!

    In terms of what we use to edit both scripts and 2das, it's Textpad, Excel, and some home built java tools to clean things up or do common tasks. Worked fairly well over the years.

    And yes, Steam will fight with multiple versions in multiple places. It's not well designed for conflict resolution.
Sign In or Register to comment.