Aller au contenu

Photo

question on 2da compatibility


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

#1
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
As far as I understand it, you can have multiple copies of the same 2da file in a .hak or override for a campaign and there will be no problems unless different information is stored on the same line in different copies.  Is that correct?

What if one copy has information on a certain line and another has it blank?  The copy with information should always override the blank one, right?

#2
_Knightmare_

_Knightmare_
  • Members
  • 643 messages
No, don't think so. 2das have a priority level. I believe it goes (from highest priority to lowest): Override folder, hack, campaign. So if you have the same 2das, one in a hak and the other in the campaign folder, the hak one will override. If that line in the hak 2da is blank, the line entry will be non-functional in game.



I could be wrong... ymmv.

#3
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
The game will only read ONE 2da of a given name. Which ever one it will be can be random. The game will not merge them for you, and having more than one is just going to make you very confused. I always religously remove any haks i don't want in my game and put them all in a single hak attached to the module. If there is no 2da's in haks' i use override. Trying to figure out the priority level just confuses me still :) .

#4
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
Cut and paste From  
Documentation: Key and BIF File Format

1.2. Resource Management
The game and toolset both use the same resource management system for requesting game
resources (ie., files).
Any resource can be obtained simply by specifying a ResRef (filename restricted to 16 characters
or less) and ResType (file type). The resource manager handles all the details of getting that
resource from whereever it is physically located, which may be in a folder, packed inside a BIF or
HAK file, etc. If there is more than one copy of a given file, then one of them overrides all the
others, as determined by rules outlined later in this section.
The resource manager has 3 types of source from which it builds its list of resources:
· keytable: a .key file, typically located in the same directory as the application itself. A keyfile
provides information regarding the contents of a set of .bif files, and each bif file contains
files that are used as game resources. (Examples of keytable files: chitin.key, xp1.key,
patch.key. Examples of .bif files: any of the .bif files in the data folder). The key and bif
formats will be discussed in much greater detail later in this document.
· directories: an ordinary directory containing game resource files. (Examples of resource
directories: override, modules\\temp0)
· encapsulated file: an encapsulated resource file (ERF), which contains other files used as
game resources. (Examples of encapsulated files: hak paks located in hak folder, erf files
located in texturepacks folder). See the ERF Format document for details on the encapsulated
resouce file format.
BioWare Corp.
http://www.bioware.com
There can be any number of resource sources of each type. If there is more than one resource with
the same name and type located in more than one resource source, then the following rules
determine which copy of that resource takes priority:
The last resource source of a given type overrides the first source of that type
.
Example:
the toolset adds the override directory to the resource manager on startup, but the
module temp directory is created and added to the resource manager only after creating a module.
Thus, files the temp directory take precedence over those in the override directory.
Encapsulated files have the highest priority, then directories, then keytables
, regardless of the
order they were added to the resource manager.
Example
: suppose that the following were added to the resource manager one after another:
chitin.key, patch.key, override folder, textures_tpa.erf, modules\\temp0 folder, customcontent.hak.
The resource manager will place them, in order of lowest to highest priority, as: chitin.key,
patch.key, override folder, modules\\temp0 folder, textures_tpa.erf, customcontent.hak. If both
your module and the customcontent.hak file both contained a script called ns_test00, then the one
in the hak file would be used.



#5
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Thanks for the responses and very helpful info. So, just to make sure I understand, if I use two different .hak files that have different copies of a certain .2da file (like placeables.2da), I would want to be sure to merge that .2da file and have only one copy. Is that correct?

#6
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
It does not matter if more then one of the 2da's are left in the haks or not.   Only one of the 2da' will be used however.  The 2da the will be used (overriding the others) will be the one highest in the list.

Hak list.

TopHak
hak 1
hak2
hak3

If you have a 2da called. myloot.2da in both hak1 and hak2, The myloot.2da from hak2 will never be used.  because hak 1 overrides it.  Now if you also have the same myloot.2da in the TopHak it will also override the one in hak 1. 

Another way to look at this.  When the game is asked for a resource, It returns the first one it finds.  It starts its serach for the need file with the Hak at the top of the list.  If it does not find it it then looks in the next hak.  If it is not found in the haks, It then looks in the override folder. If it is still not found it then looks in the game file (.mod)  then the last place it looks for the requested file is in the .key(original content)  files. 

EDIT:  This is a NWN1  overview  NWN2 may have changed or added a few things.  

Modifié par Lightfoot8, 26 février 2011 - 05:18 .


#7
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
I would suggest simplicity.



Multiple 2da's in a hak ( which the pw admin is adamant is not the issue generally ) is a big source of bugs for which they are pulling their hair out.



If there is a choice provide the 2da as a loose file, it WILL have to be merged since no one just uses a single source of content. Users will then have to see it, and install it inside a hak, and they will be asking tech support type questions, but it will make them know about that 2da. Provide instructions on putting them in override, into their own hak via nwn2packer, and say that you should merge them, etc. Add to that the fact ANY 2da will be obsolete quickly, which requires re-downloading the given large hak. You also will notice things go a LOT faster if the 2da's are separate.



In the hak load order make a hak with your rules at the top. Under that take the OFFICIAL haks from OEI, merged from all 3 versions, to ensure you have control over the 2da's. Then do the regular haks. Note if you are doing SP content this WILL make your content not work with kaedrins, so this advice is only for those who need control like a PW.



If you are doing content try to use the slowly being established community 2da's. My appearance.2da is pretty much covering all vault content, allows you to still fully choose what content is available, and allows scripters to know if you are appearance X you are an efreeti, which allows us to know you are likely fire based. And it should allow the eventual sharing of content. This allows those in SP to use custom creatures while still allowing players who use things not planned out by you, to use vault content like improved companions, familiars, and even a potential shifter class to be compatible. I think even kaedrin is using a custom appearance.2da. Ideally we can work together and come up with other 2da's like this, the more people reviewing and fixing things greatly reduces bugs.

#8
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 598 messages
My understanding is that hak content is highest preference. Then override content. Then campaign content. Then module content.



Both the campaign and override folders can contain folders though, so multiple copies of a file could be within the campaign or override folders. My personal testing with the override folder determined that the content in the newest subfolder is used, based on the date and time of folder creation, not based on the date of the file creation or folder name.



My testing was with compiled scripts, not 2da files, but I think it likely that the precedence rules are the same.



Regards