0 of 0

File information

Last updated

Original upload

Created by

SurDno

Uploaded by

SurDno

Virus scan

Safe to use

Tags for this mod

About this mod

A mod loader for Pathologic 2, allowing several mods that touch the same file to be used alongside each other. Includes support for code, XML and asset patching.

Requirements
Permissions and credits
P2ModLoader is a tool that allows several differnet mods to be used alongside each other, circumventing P2's main limitation which is that most mods usually end up modifying same files.

The way it works is it emulates dnSpy functionality, allowing a mod to just supply a list of changed and new code and for P2ModLoader to patch this into the game. On top of that, it also allows some (very limited) support for XML & asset patching.

Feature list
  • Can patch in mod code into existing game assembly. Currently provides support for adding & editing enums, modifying method bodies in existing classes and creating completely new static classes. However, it works with a limited subset of C#, more about the limitations can be read here.
  • Can merge several mods modifying the same .xml or .xml.gz file by finding which nodes have been changed compared to vanilla file and copying the changes one by one.
  • Can add assets into game's assets files. Currently only supports text assets.
  • Backs up all the changed files, allowing you to recover original vanilla assets or change your mod order in a single click.
  • Automatically highlight conflicts between mods to know when stuff isn't compatible.
  • Allows you to go through your saves and assign unique names to your game profiles as well as delete saves & profiles without doing this in-game.
  • Includes auto-update functionality - you can get new releases from GitHub as soon as they arrive. 

Installation instructions
  • Download P2ModLoader archive and unpack the contents to any folder.
  • Open P2ModLoader.exe.
  • In Settings tab, select your installation directory. If you have the game installed through Steam, you can press "Locate" and it will find it automatically for you. For GOG / pirated installs you will have to 
  • In Mods tab, press "Initialize" to create the necessary folders for P2ModLoader to work inside your installation directory. 
  • P2ModLoader is set up! To add new mods, add their folders into Mods directory.
  • Once you have mods in the directory, refresh the list and add check marks near mods you want to activate. 
  • Press "Patch" (or any of the patch & launch buttons). 
  • Once the game has been patched, you do not need to keep mod loader active or launch it again unless you want to change your mod order - the files have already been modified and you can launch the game normally. Enjoy!
Using existing mods with P2ModLoader
  • If the mod is installed through UABE installer, it cannot be used with P2ModLoader. You have to install and uninstall it manually.
  • If the mod is provided as a full replacement for an asset file, it cannot be used with P2ModLoader. You have to install and uninstall it manually.
  • If the mod is provided as a DLL replacement or XML / XML.GZ replacement, you can adapt it to be compatible with P2ModLoader. Just create a mod folder, inside create a ModInfo.ltx and fill in following fields:
name = Mod Name
description = Short description of the mod.
author = Author
version = 1.0
  • After that, copy the modified files and position them inside directories with the same name as they would be in base folder, so a DLL file that goes into Pathologic_Data/Managed/ should instead go into Mods/%ModName%/Pathologic_Data/Managed, and an XML file going into Data/VirtualMachine/PathologicSandbox/ should go into Mods/%ModName%/Data/VirtualMachine/PathologicSandbox/
Mods with P2ModLoader support out of the box


If you're having trouble figuring out how to install mods or want to make your own mods to be used with P2ModLoader, join Pathologic Modding Discord. If you want to check out the code or even contribute to P2ModLoader's creation, check out the project's GitHub repository.