Author Topic: CC behaviour in hak and override  (Read 1869 times)

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
CC behaviour in hak and override
« Reply #15 on: September 26, 2010, 02:42:50 pm »


               Just to correct ShaDoOow, 2da files in a hak attached to a module will overwrite the 2da files in a hak that is preloaded.

The engine loads resources in the following sequence: BIF, patch.ini, /override, then module HAKs. Thus the precendence would be: BIF < patch.ini < /override < module HAK.

Don't be fooled by the term "patch-hak" that ShaDoOow has coined - it is referring to HAKs loaded through patch.ini as opposed to attaching them to a module. I have been using this method for over a year and have had no issues. You can freely change the patch directory to point to the hak folder if you want - YOU WILL NOT BREAK NwnE (I should know since NwnE is my baby).
               
               

               


                     Modifié par Pstemarie, 26 septembre 2010 - 01:48 .
                     
                  


            

Legacy_Daijin

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +0/-0
CC behaviour in hak and override
« Reply #16 on: September 26, 2010, 05:42:22 pm »


               I started using Pstemarie's NwnE method about 2 years ago, just using the patch.ini and override (i put ALL haks into patch.ini, and it works flawlessly.
               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
CC behaviour in hak and override
« Reply #17 on: September 26, 2010, 07:35:41 pm »


               Seems I misread ShaDoOoW's earlier post. Looking back at my notes from the conversation with Brian, ShaDoOoW is correct when he says that preloaded HAK resources will overwrite duplicate resources in the override.



Even though the /override is loaded after patch.ini the engine ALWAYS gives priority to resources in a HAK over those in the /override folder. This is another reason that Bioware abandoned this system for patching.



What I thought ShaDoOoW was saying is that module haks would not overwrite duplicate resources in a preloaded hak -  which wasn't the case (time to get my glasses checked). Sorry ShaDoOoW.



Now just to clarify precedence according to the engine: BIF < override < HAK. Thus a resource in a HAK will ALWAYS overwrite resources from BIF files or the override.
               
               

               
            

Legacy_Grymlorde

  • Sr. Member
  • ****
  • Posts: 362
  • Karma: +0/-0
CC behaviour in hak and override
« Reply #18 on: October 05, 2010, 10:00:55 pm »


               Does pre-loading haks have any impact on compile time? I notice that my compiles are a lot faster if I use overrides rather than haks. Which has caused me to load certain haks only for the final compile.
               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
CC behaviour in hak and override
« Reply #19 on: October 05, 2010, 10:46:03 pm »


               Since the preloaded haks aren't part of the module they shouldn't have any effect upon module compile times. Nor should the override for that matter, since that's external to the module also.
               
               

               
            

Legacy_Grymlorde

  • Sr. Member
  • ****
  • Posts: 362
  • Karma: +0/-0
CC behaviour in hak and override
« Reply #20 on: October 07, 2010, 12:08:42 am »


               I can't find my patch.ini file. Where is it supposed to be?
               
               

               
            

Legacy_Grymlorde

  • Sr. Member
  • ****
  • Posts: 362
  • Karma: +0/-0
CC behaviour in hak and override
« Reply #21 on: October 07, 2010, 12:29:30 am »


               Solved it. The file name is 'nwnpatch.ini' and not patch.ini. Also the file is found in the NeverwinterNights\\NWN\\ folder
               
               

               
            

Legacy_Grymlorde

  • Sr. Member
  • ****
  • Posts: 362
  • Karma: +0/-0
CC behaviour in hak and override
« Reply #22 on: October 08, 2010, 12:47:53 am »


               Just to let everyone know, this process does not eliminate the need for an override. Tileset re-textures which are in TGA format won't override existing resources unless they are in the override. Whereas DDS works fine. For creatures and items, it's hit and miss. In my testing the TGA files do override sometimes.



Compile time is improved using this patch process which makes a noticeable difference with large haks like WoRM's Arbor Falls PW. Map load time is also improved. So I'm going to use this process for my hak files and will incorporate some of my overrides (e.g. models, DDS).



Thanks for letting us know!
               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
CC behaviour in hak and override
« Reply #23 on: October 08, 2010, 11:56:12 am »


               DDS -->> TGA, that is the order of override.  If a PLT exists, it overrides the DDS, if a DDS exists, it overrides the TGA.  Placing a TGA into override folder will only sometimes work, whereas if you place the DDS version there, it will override correctly.  



So, placing a TGA of the same name as an existing core DDS file, doesn't work correctly, most especially if that DDS exists in ANY of your haks as well.

               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
CC behaviour in hak and override
« Reply #24 on: October 08, 2010, 01:11:11 pm »


               

Grymlorde wrote...

Solved it. The file name is 'nwnpatch.ini' and not patch.ini. Also the file is found in the NeverwinterNights\\\\NWN\\\\ folder


Sorry, I often refer to nwnpatch.ini as "patch.ini" - didn't think doing so would cause so much fuss '<img'>

Yes, this method doe not preclude the use of the override. However, as far as NwnE is concerned - which began as an override housed system - using preloading reduced the override from housing ALL files to just housing the itp, template, and script files.
               
               

               
            

Legacy_Grymlorde

  • Sr. Member
  • ****
  • Posts: 362
  • Karma: +0/-0
CC behaviour in hak and override
« Reply #25 on: October 11, 2010, 05:22:25 am »


               

Bannor Bloodfist wrote...

DDS -->> TGA, that is the order of override. If a PLT exists, it overrides the DDS, if a DDS exists, it overrides the TGA. Placing a TGA into override folder will only sometimes work, whereas if you place the DDS version there, it will override correctly.

So, placing a TGA of the same name as an existing core DDS file, doesn't work correctly, most especially if that DDS exists in ANY of your haks as well.

That explains some of the weird behavior I've seen. Thanks Bannor!
               
               

               
            

Legacy_Grymlorde

  • Sr. Member
  • ****
  • Posts: 362
  • Karma: +0/-0
CC behaviour in hak and override
« Reply #26 on: October 11, 2010, 05:36:54 am »


               Hey folks, I just discovered there is a finite # of haks that can be loaded through a combination of the patch process and module haks. Using Worm's Arbor Falls as a test (24 haks), I can preload 32 haks and no more. Not even a 290k hak more. Likewise I can remove a 522MB hak from the preload but it only counts as 1 hak. While there might be a memory limit, it was easier for me to hit the # of haks limit. I haven't tried preloading 56 haks yet so there might be a different limit but I doubt it.



The actual error condition is that NWN will stop loading haks once it reaches this limit. The game will say that it can't find 1 or more haks and not load the module.



Now I'm tempted to just import my entire override folder into a single hak.......
               
               

               
            

Legacy_Grymlorde

  • Sr. Member
  • ****
  • Posts: 362
  • Karma: +0/-0
CC behaviour in hak and override
« Reply #27 on: August 11, 2012, 09:59:11 pm »


               Can we get a sticky on this? Everyone should know the proper way to pre-load haks using nwnpatch.ini. It sure helps me a lot!
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
CC behaviour in hak and override
« Reply #28 on: July 05, 2013, 09:56:33 pm »


               This deserves a bump due to Zwerkules' facelift compilation.

Also I can confirm what Grymlorde says above. The HAKs preloaded with the Patch loading method count against those loaded for a module. 56 appears to be the magic number as the maximum number of HAKs loaded in this manner, AND a preloaded HAK still needs to be loaded again when the module loads.

That last bit is annoying. One would think that if a HAK was preloaded that you wouldn't need to load it again for a module, but you do.
               
               

               


                     Modifié par henesua, 05 juillet 2013 - 08:56 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
CC behaviour in hak and override
« Reply #29 on: July 14, 2013, 03:23:41 pm »


               I discovered another possible issue with using the patch hak method.

Problem
In nwn.ini I had changed my PATCH alias to /hak
In the toolset and nwnexplorer reborn I was not able to see all of the resources.

Solution
Once I changed the alias back to /patch the problem was solved.

Lesson
So... the takeaway message for me is do not change the alias for the patch to hak.
               
               

               


                     Modifié par henesua, 14 juillet 2013 - 02:28 .