Skip to content

Access and Edit/Save 2da's in Toolset - Why?

TarotRedhandTarotRedhand Member Posts: 1,481
This is yet another one of those suggestions that I haven't seen properly discussed even though nearly 50 people have voted for it. For those that don't know 2da files are simply tables of data used for a variety of purposes by NwN. They are stored in plain text format in NwN unlike the Kotor games which had them compiled. In other words they can be edited and saved by any text editor, even notepad (I wouldn't advise this though). It is possible to create and use your own custom 2da files in NwN.

Given that unless you are using overrides with the toolset (why would you do that?) the toolset has no use for them.
Given that the normal place to put them is within a hak file so that they are gathered together and currently NwN EE has no facility for making hak files.
Given that you can easily edit and save them with any decent text editor.

Would someone please explain to me the sense (in a seemingly senseless suggestion) would you want to add this to the toolset.

TR
«1

Comments

  • raz651raz651 Member Posts: 175
    because all the files are unpaked and usable by the toolset. It just makes sense that it would be added.
  • TarotRedhandTarotRedhand Member Posts: 1,481
    Sorry but it makes no sense at all. All of the rest of the files unpacked from hak files can't be edited by the toolset, so why 2da files? The files that can be edited by the toolset are unpacked from the module file.

    TR
  • DerpCityDerpCity Member, Moderator Posts: 303
    From my admittedly limited perspective, it would obviously make it easier to access them. Unless I'm mistaken, you need external programs to access the game's 2DAs at the moment, and having them accessible in the Toolset would make that process easier and, to me, makes more sense considering Custom Content is a big part of what NWN is, and is a focus of NWNEE as well. On top of that, if they made 2das editable in the toolset that implies they're being saveable to the module. That would allow you to have 2das on a modular basis, foregoing the need for the creation of a module specific hak in some cases. I'm sure there are other reasons but those seem to be big boons in their own right.
  • TarotRedhandTarotRedhand Member Posts: 1,481
    Does one of these sound familiar - notepad, emacs, TextEdit. These are plain text editors for windows, linux and apple respectively. So why am I telling you this? Because that is all you need to edit a 2da file. Obviously, as we speak, of those three only notepad is significant because windows is the only OS that has a toolset to test any cc at present. (Also I would personally recommend you use something better such as notepad++ which at just 4.4 meg for the 64 bit installer is tiny) So yes you need an external program to edit a 2da, what's wrong with that? You need external programs to edit sounds, music, 3d models and textures too. Or are you proposing that those be incorporated into the toolset as well?

    As someone who makes custom content I can assure you it will not make it any easier. What's easier than using a text editor? Being plain text gives me the freedom to choose what I edit them in. If you incorporate them into a module you take away that freedom. As a matter of interest do you know how many 2da files are used by the game, just the official ones that is. For EE I am guessing that there are at least as many as for 1.69. For 1.69 I do know because I just looked. There are 585 2da files that 1.69 can use. But that is beside the point.
    foregoing the need for the creation of a module specific hak in some cases

    Very few unless they only use something like this which I created recently. Which is doubtful as I only created the hak for the demo module.

    TR
  • raz651raz651 Member Posts: 175
    You can script in a plain text editor also. Yet the toolset comes with a script editor. Why complain about what someone else would like to have as part of the toolset. No you are starting to sound like those agains FPC.
  • DerpCityDerpCity Member, Moderator Posts: 303
    edited March 2018
    I said access, not edit, though I suppose in hindsight I should have used extract. My bad. However, last I checked, the only way to extract the 2das from NWN is to use a program like NWNExplorer, which doesn't come with the game, to pull them out, which requires an external download.

    When I said "incorperate them into a module," I meant in the same vein as modifying the default Bioware scripts, to which they bake to the module upon editing them. I don't need to make a hak to make magic missile function like hellball in all ways except being able to target the ground. Also, are you suggesting that opening the toolset and loading up a 2da in the same way you edit a script is more tedious than finding an external program not everyone knows about and installing it, opening the game files, looking throughout the several expansions' files in order to find which expansion has the most up to date version of a specific 2da, considering the expansion files don't include a full list of past 2das when loading them in NWExplorer, then extracting that to a place you can actually access to open in Notepad? The former is what I'm suggesting. As you said, 2das are overglorified text documents, and considering that while typing this post I tested, and succeeded, in opening a script file in Notepad, so are scripts. Should I have to open scripts in Notepad, too? Considering we already have a text editor in the form of the Script Editor, I don't see why they couldn't just let us edit them in the Toolset.

    If I'm wrong and there is an easier way to extract 2da files, then I apologize. However, I would much rather edit them within the Toolset in the script editor. I am not a programmer, so I don't know any of the technical intricacies of modifying the Toolset other than the fact Beamdog is apparently terrified of touching it, but making it find and read the game's 2da files doesn't sound like a big thing to ask.*

    *EDIT: Unless even small adjustments to the 2das would require the toolset to restart. I imagine that if they added this feature they would make the toolset update 2da related fields when you saved the changes to the 2da, but if this is unavoidable then it kind of defeats the point of editing it in the Toolset.
  • TarotRedhandTarotRedhand Member Posts: 1,481
    @DerpCity for access, the community already did that for 1.69.

    But this brings me back to my first question in this thread. Why do you need to edit them in the first place? Unless you are a cc maker the only thing I can see you wanting to do this for is to try to hack the game to try to make it easier.

    TR
  • DerpCityDerpCity Member, Moderator Posts: 303
    edited March 2018
    Learn something new everyday. Thanks for the link.

    As for what I need to edit, I primarily go and remake the Animal Companions for my own personal use in the override folder in order to make the Animals less sporadic and accurate to their PnP stats (except the Bear, he gets downgraded to a Black Bear because 27 strength on a first level summon is absurd) while also giving them better AC in the higher levels so that they don't feel like they die instantly , and I still haven't decided whether or not they should have full HP per level (which is the setting I play with). In order for my new companions to show up in game, unless I use the same Blueprint ResRef as the default game Animals which I don't do out of consistency (I usually usually give them the blueprints them dcac_xxxxyy or simply ac_xxxxyy, with xxxx being the animal's name and yy being the level you'll have the animal), I'd need to edit the 2da to fill in the Tag column with the numberless version of the tag.

    However, something more pertinent to content/module creation would be making levelable henchmen for a module. While my module hasn't gotten very far so far, it'd be nice if I could modify the appropriate 2das to create a levelup package (feats, spells, skills taken 2das, packages.2da to actually put them in there, feats and skills 2das so I know what number to put with each feat, etc) and without needing to make a Hak to put it in the module just so that my Druid takes the appropriate spells and feats at the level I want them. Granted, figuring out how to make Henchmen work in general seems to be a bit of a chore, but that's a discussion for another day.

    I will admit that I did kind of cheat once by editing the Feats.2da to make Sap available to player characters under its old requirements. Perhaps it was because I was using a whip, but it didn't seem to make the game any easier than if I had just taken Knockdown - in fact, Knockdown was probably preferable.

    Anyway, I don't think that having 2das editable in the Toolset is a necessity. There are obviously already ways of accessing and editing them, and there may be technical reasons why it wouldn't be possible. This, to me, would simply be a quality of life improvement that, should they have extra time, Beamdog could add to make modding a bit easier, so I see no reason to have it off the table outside of the aforementioned technical reasons.
  • TarotRedhandTarotRedhand Member Posts: 1,481
    edited March 2018
    Sounds like you could do with the 2da reference sheet. An excel spreadsheet that details what the columns in the various 2da files are actually for. the download link is roughly in the middle of the downloads on that page. Of course that doesn't cover any custom made 2da files.

    TR
  • GrymlordeGrymlorde Member Posts: 121
    We also need to be mindful of feature bloat. BD has been saying that the toolset is fragile and that improving it it a non-trivial task. If we start adding features, we run the risk of introducing new bugs as well as distracting BD from improving performance and fixing existing bugs in the current toolset.

    As TR mentioned, we already have lots of tools to edit the 2da (and tlk) files. Given the state of the toolset, I would strongly prefer we don't have BD try and create a super toolset unless they're going to write an entirely new toolset from the ground up.
  • ProlericProleric Member Posts: 1,316
    As a rule-of-thumb, life is easier when games use standard formats that we can mod with universal tools, but harder when data is locked into proprietary tools.

    So I agree that editing 2da files in the toolset is unnecessary, possibly restrictive, and certainly not a priority.
  • JFKJFK Member Posts: 214
    I can see it being of benefit to edit them in the Toolset only if more functionality is provided: ie automatically combining several .2da files into a new one for use with resources provided. Wholly unnecessary as things are, and I'd not want this to take away from other things BD can/is doing. But to simply have them openable and editable in the Toolset instead of outside of it doesn't appeal to me.

    People who don't read or look for information on how to open a .txt file aren't likely candidates to successfully modify those files in any meaningful way, are they? Anyone who's going to modify them will have to have information on what they're about, and will undoubtedly know how to open them first.

    Also, nwhak.exe works to export assets just fine. Once the .2da is exported you can open it instantly with any text editor.

    It is very possible that I'm missing the point though, and I never want to be a guy shooting down someone else's idea or want. Just offering my own opinion on the matter.

    Cheers,

    -JFK

  • fkirenicusfkirenicus Member Posts: 331
    edited March 2018
    Because having one program that is made for this purpose that becomes the standard everyone uses greatly can reduce problems that such files undeniably create. Yes, you can edit 2da in Notepad, Notepad++, Textpad, Excel, 2DA Editor, TLKEdit, and a whole bunch of other 3rd party programs - but the problem is that more often than not creators and builders (yours sincerely among them!) make mistakes that renders some stuff unusable. With x options of programs to make such mistakes in the situation quickly gets even worse. I've even (back in the days ca. 2002-2006) experienced 2das that were so corrupt they didn't work in the toolset and game at all.
    I can open a file in one 3rd party 2da editor and get the message that the file cannot be opened, and in another it opens just fine. This is quite frustrating in the long run (I guess I can say that being among those who have followed Bioware since 1998).
    I would also very much welcome 2da editing in the toolset since 2da is a format that "belongs" to the Infinity, Aurora and Electron engines, and so one can debate if the file format isn't proprietary anyway.
  • TarotRedhandTarotRedhand Member Posts: 1,481
    edited March 2018
    Unless you take care, any plain text data file is easy to screw up. In fact it was fixing a true horror story of a beginner's effort that I ended up writing a pair of simple utilities that will find most such errors. After finding and fixing somewhere in the region of 40 to 50 errors (including one where ~90% of a line was enclosed in quotes!!!!), I was glad I did.

    I've been a player of their games since Shattered Steel (Bioware's first release) as if that means anything. Back to 2da files. This proposal just talks about accessing and ediit/save in the toolset. Trouble is you need to do more than that if you make cc. I see no mention of comparing 2 or more versions of the same 2da, nor merging of 2da files. Then there is the verifying of them to make sure that certain data values are within acceptable ranges... Otherwise this proposal becomes even more pointless than before. This is all beginning to add up to unnecessary work for BD. Time that could be spent elsewhere.

    As for one prgram to rule them all... The same argument could be made for adding mdl file editing and sound/music file editing "in house", so why just single out 2da files?

    TR
  • fkirenicusfkirenicus Member Posts: 331
    @TarotRedhand:
    I see no mention of comparing 2 or more versions of the same 2da, nor merging of 2da files.

    Absolutely. That's one major source for creating mistakes.

    As for one prgram to rule them all... The same argument could be made for adding mdl file editing and sound/music file editing "in house", so why just single out 2da files?

    That would be simply awesome, but it will never come to pass. Since the format isn't proprietary as such, and software companies that make such programs will be very upset if a freeware program were to subsitute their own gold mines. 2da on the other hand is limited to "our" world, if you know what I mean.
  • TarotRedhandTarotRedhand Member Posts: 1,481
    edited March 2018
    You can compare two 2da files (or any 2 plain text files for that matter) in notepad++ using one the many plugins available for it BTW.
    As for one prgram to rule them all... The same argument could be made for adding mdl file editing and sound/music file editing "in house", so why just single out 2da files?

    That would be simply awesome, but it will never come to pass. Since the format isn't proprietary as such, and software companies that make such programs will be very upset if a freeware program were to subsitute their own gold mines. 2da on the other hand is limited to "our" world, if you know what I mean.

    Since the toolset isn't freeware (it's part of the EE package you buy) while Blender and Audacity are I don't understand what you are trying to say here.

    TR
  • fkirenicusfkirenicus Member Posts: 331
    edited March 2018
    Since the toolset isn't freeware (it's part of the EE package you buy) while Blender and Audacity are I don't understand what you are trying to say here.

    I might be outdated severely on modelling programs. In my days 3DStudio Max and GMax were the ones we used - with most of using the latter, as we hardly could afford - or had the skills to justify using - the former. It may well be there are better alternatives now.

    I was a bit unclear about the toolset being "freeware" - what I meant was that it is freeware in the sense that if you buy NWN you get the toolset as well - it's a part of the game. If all those who had wasted money on 3DStudio Max found out that they could have bought a game at a fraction of the price, I suspect that the guys who make 3DStudio Max would be quite upset... :-)

    But, as I said, I would welcome the ability to edit and create new models in the toolset - the more complete the application, the better. Editing 2da files is a part of the NWN2 toolset, but it wasn't very well implemented.
    I think perhaps though we'll have to settle with agreeing to disagree on this matter.
    Post edited by fkirenicus on
  • virusmanvirusman Member, Developer Posts: 173
    The only thing Toolset does is editing .mod files, and does that well enough. There are dozens of custom content tools for editing CC that goes into haks, and integrating them into a tool that is not designed to work with anything but modules in pointless imo.
    NWN Explorer, on the other hand, is an integrated tool that is actually designed for CC, has a tabbed interface and previewers. If anything, this is the best candidate for CC editors.
  • FreshLemonBunFreshLemonBun Member Posts: 909
    Yeah the old tools still work but they look old and sometimes is nice to see something that looks more modern and welcoming. I don't know the status of the source code or anything but maybe someone could open up one of these old project and give them a brand new lick of paint, likewise adding a few minor usability features like row renumbering and intuitive auto row creation if it's not already in there.

    I think one of the more useable seeming tools is the TlkEdit/TlkEdit2 but it's written in java which is not so great, and then you have to install java on your pc.

    If I use a tool that looks like it was made 20 years ago or something I think it actually lowers my productivity.

    This is just my opinion and I know it sounds completely irrational but there you have it. I like tools that look warm and welcoming and are easy and intuitive to use, where I can just drag and drop files and quickly make edits and tab quickly between open files.
  • TarotRedhandTarotRedhand Member Posts: 1,481
    edited June 2018
    @FreshLemonBun As 2da files are just plain text you don't really need a specialised tool to edit them with. I personally use notepad++ to edit them. In order to catch any common errors I wrote a pair of tiny windows (not command line) utilities - Fix2da and Tidy2da. I originally wrote them for myself but decided to share. Amongst other things they realign the columns and renumber the lines in addition to their bug hunting duties. Just in the last 24 hours I have released a new version of them that fixes a small number of minor bugs (listed on the project page).

    As for row editing and creation I just create a keyboard macro in in notepad++ and then edit manually any differences that need to be there. As I usually make multiple placeables in one go I have found that the up to 3 minutes this takes to not be that onerous a task.

    TR
  • pscythepscythe Member Posts: 116
    Personally I use Libreoffice calc to view and edit the 2das like a spreadsheet, that have been tremendously helpful as I can use spreadsheet techniques on the 2das, like data filters and renumbering.
  • TarotRedhandTarotRedhand Member Posts: 1,481
    edited June 2018
    @pscythe Just curious. How do you get them in there? If it's by way of converting a 2da file into a csv file I would suggest a bit of caution here. I found that those 2da entries that are enclosed within double quotes do not have them reinstated once you export again.

    Here's a tip: Notepad++ can mass-add a new column to a 2da via Edit -> Column Editor. (or so I have recently been told)

    TR
  • pscythepscythe Member Posts: 116
    edited June 2018

    @pscythe Just curious. How do you get them in there? If it's by way of converting a 2da file into a csv file I would suggest a bit of caution here. I found that those 2da entries that are enclosed within double quotes do not have them reinstated once you export again.

    @TarotRedhand You just open it with LibreOffice Calc and it would detect that it is a space separated .csv file. There is no need for any conversion. It also have special options for handling quoted fields, but haven't had the need to use that yet. Which .2das has them?



    These options works for me.
  • TarotRedhandTarotRedhand Member Posts: 1,481
    @TarotRedhand You just open it with LibreOffice Calc and it would detect that it is a space separated .csv file. There is no need for any conversion. It also have special options for handling quoted fields, but haven't had the need to use that yet. Which .2das has them?


    Placeables 2da has loads of them, especially if you are using the CEP's as the base for your own so that your project is CEP compatible.

    TR
  • ProlericProleric Member Posts: 1,316
    True. Likewise appearance.2da amongst others. The excel tool on the Vault handles quotes now, though, IIRC.
  • FreshLemonBunFreshLemonBun Member Posts: 909
    I'm not suggesting you can't use readily available tools now or that 2da isn't just plain text. I'm just saying having prettier tools would be nice.
  • CalgacusCalgacus Member Posts: 273
    edited July 2018
    There is an atom plugin atom-tablr that works well enough for me so far today.

    First install the plugin and update the plugin settings to include 2da in the Supported Csv Extensions and a space char for Default Column Delimiter.

    Then, when you open a 2da you will then be given the option of opening it in the table editor or text editor. First open it in the text editor and do a regex "find/replace All" on spaces by using a spacechar followed by a + in the Find field and just a space char in the replace field. Save and then reopen the file and then choose the table editor, it supports editing and saving resizing columns, .

    I haven't tried it on all 2das, is some have space chars inside of fields then I guess it might not work as desired. Do any 2da files have such intra-field spaces?


    PS: and after atom updated the package seems broken. might be fixable in a fork though.

    PPS: WOW! Same day and someone just fixed that tablr plugin - see that link and pull it from his fork with the listed apm commands since the project main repo seems to be no longer maintained by the owner.
    Post edited by Calgacus on
  • VerilazicVerilazic Member Posts: 20
    While I could do with some level of improved organization around 2das, I don't think accessing them in Aurora is a valuable enough feature to support adding it. I'd rather BD improved the toolset in other ways.
  • dTddTd Member Posts: 182
    I just use vim, but I'm old school.
Sign In or Register to comment.