Aller au contenu

Photo

.hak file order of precedence - Have I made an error, or Is the NWNWiki incorrect?


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
I have 2 .hak files for my campaign: a main hak and a patch.  I want the patch to take precedence over the main hak. 

I read this on the NWN wiki:

"Multiple hakpaks can be attached to a single module. They are added in the same way as described above. As you add hakpaks you will see the list on the top left of the hakpak interface panel grow. As mentioned above, hakpaks are safer than loose files because you can never run the risk of overwriting a file when installing multiple packages. However, this doesn't mean you don't need to deal with resource conflicts at all. If you have two or more hakpaks that contain the same resource, then you will have a resource conflict. The way this is dealt with is the same as I described above regarding resource repositories -- hakpaks are subject to a hierarchical priority system. The priority is determined by the hakpak's position in the hak list displayed on the hakpak interface panel. You will notice that haks are numbered from 0 onwards. * Currently, the toolset will take the last hakpak listed as the highest priority hak on the list. If you had three haks numbered 0, 1 and 2, then the hakpak listed as number 2 would be the highest priority. So, if hakpak number 2 had the same resource as hakpak number 0 or hakpak number 1, then the resource from hakpak number 2 would be the one used."


This suggests that my main hak should go in the 0 position and my patch should go in the 1 position.  Could a more experienced modder please confirm that I have this properly?  I have never used a patch before.


Also, I assume that a .hak will override content in the campaign folder, right?  Otherwise patching would not do much good for campaign conversations or scripts.

Modifié par M. Rieder, 20 janvier 2012 - 02:01 .


#2
NWN DM

NWN DM
  • Members
  • 1 126 messages
I think it looks at the haks in order from top to bottom, so position 0 takes precedence over position 1 etc....

Whenever there's a 2da update that needs to get added to a hak, everyone says to make the new 2da it's own hak and put that at the top of your hierarchy - what I am basing my answer on.

#3
Jezla

Jezla
  • Members
  • 173 messages
I always understood it to be that way too. The hak at the top of the list takes precedence. I would also think that the Campaign folder will supersede a hak, as I've heard the campaign folder described as an override folder for a specific group of modules.

#4
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
I just did some testing. I had two versions of the same conversation: the patch and non-patch version.

First I tested the patch versus the campaign folder. When I ran the campaign, the patch version showed up. So it looks like a .hak will override the campaign folder. This is good and expected because I have seen campaigns that use a patch system and it wouldn't make sense for them to use a .hak for a patch if it wouldn't override the campaign folder.

Next I checked the precedence of .hak files. I put the non-patch conversation in hak in the 0 slot (top slot) and then the patch conversation in the .hak that was in the 1 slot (second from top). When I ran the campaign, the non-patch conversation played.

To be sure, I switched the two slots so that the patch conversation was in the top slot (slot 0) and the non-patch was in the lower slot (slot 1). When I ran the campaign, the patch conversation played.


These tests suggest that:

1) The .hak files will override the campaign folder.
2) The .hak files take precedence in the order they are added. That is, the first one added, in slot 0 will take highest precedence, the next one, in slot 1 will take next precedence, and so forth.


This is important because it is different than what the WIKI says. Either I have botched my tests or there is a discrepancy on the wiki. If someone could confirm or deny my testing, it would be helpful.

#5
kamal_

kamal_
  • Members
  • 5 260 messages
Short answer: for a patch hak it shouldn't matter.
Long answer: You're only ever going to patch via two things, scripts, and conversations. These things shouldn't be in a non patch hak anyway, they should be in a campaign/module.

haks have precedence over the campaign folder btw.

#6
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
That's a good point, Kamal. I really won't be patching anything else, so I guess it is a moot point.