PAK: Difference between revisions
EthanRDoesMC (talk | contribs) (Some basic PAK info and notes on priority) |
EthanRDoesMC (talk | contribs) m (Add category) |
||
Line 14: | Line 14: | ||
Mod conflicts are generally resolved with AMUMSS. | Mod conflicts are generally resolved with AMUMSS. | ||
[[Category: TechDocs]] |
Latest revision as of 05:39, 20 March 2023
PAK files are a type of archive used by No Man’s Sky to efficiently store and load assets. They are essentially .psarc archives by a different name. PSArcTool is typically used for extracting and packing PAK files, and as the format has not changed, the tool works with any version of No Man’s Sky[1].
Loading
No Man’s Sky will load any PAK contained within /GAMEDATA/PCBANKS
[any?] and, as of 1.12, /GAMEDATA/PCBANKS/MODS
— provided that /GAMEDATA/PCBANKS/DISABLEMODS.TXT
does not exist. The PAKs that ship with No Man’s Sky are located in the aforementioned PCBANKS folder. In 1.10 and below, mods are stored in PCBANKS as well. PAKs in the MODS
folder will load after the game’s PAKs load.
A PAK will load even if its file extension is appended or changed[not sure about the latter].
Load Order and Priority
PAKs are loaded in alphabetical order, starting with symbols, then 0-9, then Aaà-Zzź (capital, lowercase, accent)[2]. It is worth noting that the “priority” of a PAK is the exact opposite order, and if two given PAKs contain the same file, the game will use the file from the PAK that loads second. This can be mentally visualized as a stack: the PAK to load last will override all files, and the second-to-last PAK will have priority for every file not contained in the last PAK, and so on.
A mod developer should carefully consider this when deciding the name of a PAK, particularly on the Release 1.0x versions of No Man’s Sky, but also with regard to other mods in general. Mods with custom content may want to load earlier than most, while mods that largely change vanilla files will probably want to load as late as possible. In the case of shader mods, mods with fragment and vertex shader edits should load before mods with edits to “common” shaders. A new function should be contained either within the shader that will use it, or in a new header shader.
Mod conflicts are generally resolved with AMUMSS.