Skip to content

Commit 0f07e28

Browse files
authored
Version 3.1.5W
Complete rework part 1
1 parent 7297459 commit 0f07e28

File tree

100 files changed

+9143
-420
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+9143
-420
lines changed

BuildMod.bat

Lines changed: 1123 additions & 43 deletions
Large diffs are not rendered by default.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
How to Create a Patch for an existing MOD PAK ?
2+
3+
Background:
4+
Mods in NMS are loaded from top to bottom (when listed in alphabetical order).
5+
Lower mods that modify the same file in any above mod will win all changes to that file
6+
7+
So, to make a Patch for a mod named xyz.pak, you could do:
8+
1. Extract from that mod PAK the file you want to change, it gives you a .MBIN
9+
2. Decompile the .MBIN to .EXML format using the appropriate MBINCompiler version
10+
3. Find what you want to change and make these changes by hand to the .EXML file
11+
4. Recompile the .EXML file to .MBIN using the "latest" MBINCompiler version
12+
5. Pack this new .MBIN file to a new .PAK (name it as you like) as "ZZZPatch_xyz.pak"
13+
6. Make sure the name is lower than the original PAK file in ascending alphabetical order
14+
so it load later
15+
7. Place both files into your NMS MODS folder
16+
8. Verify that the DISABLEMODS.TXT file in PCBANKS folder is still deleted
17+
9. Enjoy
18+
19+
Using the .EXML file from the mod xyz.pak ensure that most, if not all, of the changes made by the MOD
20+
will be saved and the MOD will continue to work as intended.
21+
In using the ZZZPatch_xyz.pak, only if you changed something that affects that MOD, will that change how the MOD works
22+
otherwise the MOD AND YOUR CHANGES will work as planned by you.
23+
24+
MODBUILDER can help in creating the "ZZZPatch_xyz.pak"
25+
A. Create a simple "ZZZMyScript.lua" script with the changes you want to make to the .EXML file (covers steps 1., 2. and 3. above)
26+
***** We have included plenty of examples and a Script_Rules.txt file to help in creating a script *****
27+
Note: "ZZZ" in the name tryies to make it load ~last in MODS. Change the name to suit our paks
28+
B. Copy the script AND the MOD PAK you want to patch to the ModScript folder (and steps 4. thru 8. are handled by MODBUILDER)
29+
Note: Having more than one pak in ModScript will NOT combine both paks, only the last one will combine
30+
if it mofidies the same .EXML file
31+
Note: A future version will probably be able to handle correctly multiple paks in ModScript
32+
C. MODBUILDER will attempt to use your MBIN_FILE_SOURCE named in the script by searching for it in the mod PAK
33+
*** If found, that will preserve the mod PAK changes UNLESS you have changed the exact same values with your script ***
34+
*** which could be what you want to do... ***
35+
D. A new mod PAK will be created in the CreatedModPAKs folder (give it the name you want in the script)
36+
or after by renaming it
37+
E. Use that new PAK in 7. above if you did not let MODBUILDER copy it for you
38+
F. Verify that the DISABLEMODS.TXT file in PCBANKS folder is still deleted if you did not let MODBUILDER delete it for you
39+
G. Enjoy
40+
41+
NOTES: * The name of the lua script "ZZZMyScript.lua" can be changed.
42+
* Any other script can be put in ModScript at the same time, they will all be COMBINED in the resulting PAK
43+
* The name of the resulting pak "ZZZPatch_xyz.pak" can be changed, but should be at the BOTTOM of the NMS MODS folder
44+
for optimum effect

0 commit comments

Comments
 (0)