How to deal with Clutter?

Since I discovered EE in January of this year I’ve been on a bit of a whirlwind learning spree, partly because the possibilities of this toolset genuinely excite me, partly because as some will know I’m helping to have a go at introducing it into a local school’s Computing Dept. and partly because I’m just the sorta guy who likes to begin his tennis learning with the topspin backhand !

However, a major issue is starting to insinuate itself. Stuff !

I am gathering a whole heap of resources, info and add-on programs and urgently need a way of organising these. Most of them are so good I’m reluctant to throw them away ! So, if anyone would be kind enough to share how they do this I’d be grateful. In particular :

  1. Haks. I’ve learned how to combine the contents of two haks through the 2da files and NWHak. I have also gleaned that NWN will only recognise the top hak. My question is, does that mean the top hak of two which contain say, tilesets ( ie similar content) or just the top hak in your hak folder?

  2. If the answer to above question is similar content only results in top being recognised, does this mean that, for example, you would combine all the tilesets you might use into one hak, all the skyboxes into another etc ?

  3. To try to make sense of some of the myriad of options an ethical question arising from the above. If I have say three Skybox haks and I like three or four of the skies within each, is it ok to combine them into a new hak, renaming some of them to make more sense as they appear in the game? ( Obviously if I created anything with them which was uploaded anywhere credit would be given. Not trying to cut corners with people’s work here). With regard to the renaming of the files, is altering filename and the entry in the 2da file enough to make it appear this in the game and work?

  4. What does your normal hak folder look like? Does it always contain a multitude of haks from which you select each time you begin a new module or is it super organised in some way?

  5. Do you have all the community large combo packs “installed” at all times? If so, in the toolset your menus must be huge. Is this what happens and does it cause you a performance hit or just as/when you use them?

Or do I just have to get used to working with hundreds of files, for half of which I’ve forgotten their use/ appearance ?

Thanks for any short thoughts on some or all of the above.

I think either you have misunderstood or you should have phrased that differently. Here is what happens when a module loads into NwN. First those assets that are part of NwN are loaded. Next anything in the override folder loads. If there is anything in the override folder that is also part of the normal assets of NwN, then those in the override folder will be used i.e. they override them. After that the hak files are loaded. Again any clash of assets is dealt with. In this case the hak contents override the contents of the override folder. There is one further wrinkle however. The list of haks that you see in the module properties is used to determine the order in which haks are loaded. You start at the bottom of the list and work your way upwards. Any clash of assets results in the “duplicated” contents of the highest hak in the list being used.

TR

1 Like

What I do is as follows. I use the Opera browser for a number of reasons. One of these is that it has the ability to convert web pages and save them as pdf files. Any project that I am really interested in I save its project page as a pdf file (but edit the file name to be more manageable).

Here’s a thought for you. If you think you’ve got loads of files now, just imagine you had to store all the individual files contained within the hak files instead.

TR

1 Like

Sorry, I meant to say that if you add two haks with similar content through “Custom Content” in module it would only pick up the first.

I knew about the override folder but not that after normal game assets haks prevail.

Colour me dense but, what? Are you saying that if I want to add haks I should start with the least important as any subsequent ones I add will be put above it and therefore take priority? :thinking:

The only haks your module loads are the ones you list in module properties under custom content.

You control the load order there. Haks are loaded from bottom to top of the list.

The order only matters if two haks contain a file with the same name. Most commonly, that will be a 2da file. You have to make a version of the 2da that combines both haks, placing it in a hak which is higher up the list than either. Often, the top hak is used, for safety.

More unusually, two haks might contain versions of, say, the same model, texture or whatever. If they are identical, no problem. Otherwise, as a rule of thumb, place the more recent hak higher in the list, so that the latest version loads.

You don’t need to merge haks, only the 2da files. So your module can have dozens without tears, as long as there are no conflicts between files of the same name.

Your hak folder might have hundreds of haks - that has no bearing on your module, which only considers the list in module properties.

Some authors do merge haks into one, so the players have to do just one download, with no risk that the hak author pulls the content from the Vault, rendering your module unplayable.

However, most players already have the more common haks, so the single hak approach wastes their bandwidth and disc space. Also, these days, there are only very isolated cases of haks being removed from the Vault.

A happy medium is to use the commonplace haks as is, but merge obscure stuff into a module-specific hak.

In all cases, haks should not be merged if the author’s terms of use forbid it.

1 Like

I have Q. Does 2da work if there is gradual order in lines, but numbers are not step by step? Wil it work with gaps of unnumered (reserved) lines? like 1-100 in order and than next line jump to 3000-7000 ect? Im trying to make the 2da merge and end result neat with as little lines as possible.

Row numbers in a 2DA mean nothing. In fact, they don’t even need to be numbers, this is a valid 2DA:

2DA V2.0

     Label    Value
0    AAA      10
0    BBB      20
X    CCC      30
100  ****     ****
1    DDD      40
AAA  AAA      AAAAAAAA

The engine will number 2DA rows in order they appear in, and it will ignore the first column (the one before Label) entirely. Whatever you put in there is purely for your own benefit. Typically, you want to add the actual row number so you can quickly read it.

What Sherincall says is right regarding the first column. It is really only for your use and ease of reading. Having those misnumbered is a path to madness though.

But… you cannot just remove the unused lines. The game looks at the literal number of rows to find things. If you take lines 1-100 and then put 3000-7000 next to make “as little lines as possible” then the line you have numbered 3000 will be 101 to the game engine. So any references to that in your module or blueprints or whatever will need to be changed to 101 not 3000.

@Skriatok Why do you want as few lines as possible? Are you trying to make your 2da as small as possible?

If so, why not do your editing with Yata. When you save using Yata it will remove as much wasted white-space as it can. The result will look an absolute mess if you look at the 2da file with almost anything else but it will be appreciably smaller.

If you just want to renumber your 2da file and you are not dealing with a 2da from CEP 2.x, you could give my pair of tools - Fix and Tidy 2da Files (assuming you are on windows 7+).

FWIW, the line numbers in a 2da file are there for your convenience only. These actual numbers have no effect on the working of NwN but the game does expect something to be in that position on the line.

TR

As @meaglyn implies, the problem is that unless your line numbers are sequential, you have no easy reference to the number the game is using internally. That matters as soon as you have to delve into game files using offline tools, or in game via json scripting.

Even worse if you insert or delete lines - objects you already created in the toolset will suddenly be corrupted, which is a mare to put right.

AFAIK serious builders invariably use sequential line numbers.

TIL I’m not a serious builder :stuck_out_tongue:
I would go as far as to say that all row numbers should be just # or something, just so you don’t fall into the trap of thinking they are correct, because often they won’t be due to human error.

Fix and Tidy 2da Files should fix that automatically.

TR

While we are promoting things, I have a perl utility that diffs 2das and can also fix numbering errors etc. More useful for linux folks. But I find it useful.

Keeping the numbers right is essential in my mind. Counting 10000 lines to know what number to put in somewhere in script or blueprint or whatever is way more prone to human error :slight_smile:

Also having them there and right before you edit makes it easier to keep from making mistakes and find when things aren’t working right …

1 Like

Tools to keep your 2DA sane work, but only if you have a strong process enforcing their use. As soon as it’s up to the human editing the 2DA to run the tool afterwards, there’s room for human error; especially with a larger team of builders. And, experience taught me that in those cases, you have an even bigger false sense of security as “the tool would have caught it if it was wrong”.

Pedantry aside, I do agree with others here that you should just use actual 2DA numbers, and then use the tools to regularly verify your 2DAs are numbered correctly - if a tool reports an issue, be sure to carefully investigate what the problem is and if it affected anything already.

(JFYI, what I do is generate 2DAs from a different format, and the “row number” column is just a symbolic name like FOO_BAR. Then if any other 2DA or other files write $FOO_BAR, the tooling replaces that with the 2DA row index. Jury is still out on whether that was a good idea, but regardless I really can’t recommend the approach for general use.)