Patchus Maximus

Patchus Maximus (PaMa) is the SkyProc Patcher included in. It is a dynamic patch creation tool powered by Java (made by Oracle) using the SkyProc library (maintained by Dienes). You should maintain the most up-to-date version of Java at all times, you do not need to download the SkyProc library to use PaMa or any other SkyProc Patcher, it is a development tool.

Setup
Like most mods that use a SkyProc Patcher, it, and your system, needs to be setup properly for it to work. You can also watch Cal's video here

Java
0. Download Java from oracle.com or Java.com. You can check your current version at Java.com/verify.

Mod Organizer
1. In MO add PaMa as an executable as normal.

2. In MO Edit the executable to look like the picture:

3. You can also append  "-NOSTREAM" to the argument to help with memory;
 * -Xmx1024m -jar "C:\Program Files (x86)\Mod Organizer\mods\Perkus Maximus - Maximum Perk Overhaul\SkyProc Patchers\T3nd0_PatchusMaximus\PatchusMaximus.jar"
 * -Xmx1024m -jar "C:\Program Files (x86)\Mod Organizer\mods\Perkus Maximus - Maximum Perk Overhaul\SkyProc Patchers\T3nd0_PatchusMaximus\PatchusMaximus.jar" "-NOSTREAM"

Note: MO CAN launch 64bit Java it just needs to be limited to 1GB (1024m).

Non-Mod Organizer
1. Use the 64 or 32bit batch file to launch PaMa.

Optional
1. Install SUM, in SUM's options in the Max Allocate Memory window type 2048, can be increased by multiples of 1024 depending on your available memory. For 32bit and MO setups use 1024, anything higher will not run.

Running PaMa from the data folder through MO
This may help some having issues getting MO to run PaMa.

by Jaskov on Reddit

1. (Forgot to set this wink wink) Copy "SkyProc Patchers" in its entirety from your Mod Organizer "mods" directory from Perkus Maximus folder TO Steam\steamapps\common\Skyrim\Data

2. Open Mod Organizer.

3. Click drop down arrow next to "Run" and click "".

4. Write something in "Title".

5. Click "..." next to "Binary" field. Select Steam\steamapps\common\Skyrim\Data\SkyProc Patchers\T3nd0_PatchusMaximus\PatchusMaximus.jar (The one you copied, NOT the one in Mod Organizer's "mods" folder). All fields will be filled automagically. You may have to add -Xmx1024m in Arguments.

6. Click "Add".

7. ???

8. Profit

GamerPoets
Mod Organizer : Installing Perkus Maximus - Adding PaMa to MO and running it.

Cal of Dirty Weasel Media
Editing General Settings.xml - Covers edits needed if NOT using all three(3) modules or if NOT using English or if you do NOT want weapons to have the type appended to the name.

Perkus Maximus Advanced Installation for Mod Organizer - Covers creating the Merged Patch, Bashed Patch and running PaMa.

Errors
With PerMa 1.3 PaMa is much more resistant to record based errors, during testing only outdated/pirate copies of the game were able to cause patching failures, the patcher can still fail from memory based errors. When reporting issues, please let us know if you use MO, NMM (and version), Wrye or manually install your mods. PaMa creates logs to help troubleshoot issues. Please use PasteBin, or a similar site, to post large text files, such as Load Order, Debug Log and Asynchronous Log. Logs can be found in; Skyrim/Data/SkyProc Patchers/T3nd0_PatchusMaximus/SkyProcDebug. If you use MO then they will be in: Mod Organizer/mods/ModName/SkyProc Patchers/T3nd0_PatchusMaximus/SkyProcDebug or Mod Organizer/Overwrite depending on how you handle them.

Fails to run
Make sure your Java is up to date and insure you followed the above instructions. Trying -Xmx512m instead of -Xmx1024m works for some people.

If you have a version of java that starts with 1.8, they moved more things to the heap. This is why reducing the heap to -Xmx512m helps. See

☀https://blogs.oracle.com/poonam/about-g1-garbage-collector,-permanent-generation-and-metaspace

Missing Master
You have a mod that is missing a master or a plugin is loading before its master.

java.lang.OutOfMemoryError
The "heap space" error. A memory based error, it means that the operation it is performing will cause the patcher to exceed its memory limit. If you are getting this error, make sure your Java is up to date and insure you followed the above instructions.

java.lang.StackOverflowError
Another memory based error, it means that the operation it is performing has caused the patcher to exceed its memory limit. If you are getting this error, make sure your Java is up to date and insure you followed the above instructions. Extremely large mods, like Immersive Jewelry, can also cause this error due to the sheer volume of items being patched. (In the case of Immersive Jewelry, there is a patch that exists for Perkus Maximus which should be loaded after a Patchus Maximus made without Immersive Jewelry active in the load order.)

java.lang.NullPointerException
You have a plugin making the patcher error. You will have to check your plugins for the one (or more) that is causing the problem. Keep checking half at a time until you narrow it down to the plugin causing the error. Once you find the offending mod put it in Blocklist.txt and report it at. If you get this error on Skyrim.esm, Update.esm, Dawnguard.esm, Hearthfires.esm or Dragonborn.esm you will need to verify your install through Steam, which will redownload any files that don't match what they have on file. After re-downloading them if you clean them with TES5Edit (recommend you do), make sure to carefully follow the cleaning instructions.

javax.xml.bind.UnmarshalException
This means there is a typo in an xml preventing it from being read, these should almost never make it to a live version of the XMLs, if they do I need to know about them right away as they will affect everyone.

BufferUnderflowException
This error occurs when the buffer limit is reached. 32bit systems and MO users have a much lower limit than 64bit systems and non-MO users. There is no special fix for it except to make PaMa have less to do (as in run less mods or add a lot of extra exclusions).

Null or Empty NPC or Item names
If you use a non-English esp the patcher may display mixed language strings or fail to properly patch items. This can be easily fix:

1. Go to to Skyrim.ini and under [General] put sLanguage=YOUR LANGUAGE

2. Go to Skyrim\Data\Strings you'll find your string files there (for example named Skyrim_YOUR LANGUAGE.dlstrings), copy all strings, dlstrings and ilstrings from this folder to a different folder.

3. Rename All moved strings names to English (for example rename Skyrim_YOUR LANGUAGE to Skyrim_English) for ALL strings, dlstrings and ilstrings.

4. Move the renamed strings back into your Skyrim\Data\Strings folder (yes, they contain the same data, its only renamed, I know this, you know this, but SkyProc doesn't :))

5. Some mods and DLC have their strings packed in a bsa, you will need to unpack the strings to rename them. After renaming the unpacked strings put them in the Skyrim\Data\Strings folder with all the rest.

6. Rerun PatchusMaximus and force patch on exit

Potions have no duration
1. Make sure you are using the Thief module and 'General Settings.xml' has 'useThief=true'

2. If you use a non-English esp, see the above issue.

3. If you use a sorting mod the xml will not be able to see items correctly.