How to alter 2da tables?
MarciusVetrack
Member Posts: 12
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?
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?
0
Comments
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.
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
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
i dont know maybe yes
that program do not open my 2da files and i not know why.
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!
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.
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;
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.
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!
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.