PGTools - hakasapl/PGPatcher GitHub Wiki

PGTools is a companion EXE CLI tool that makes use of the same backend as PGPatcher.exe. It is primarily intended to be a mod author tool.

CLI Usage

To get set up, I recommend adding the PG install directory to your PATH.

  1. You can do this by search Environment variables in your start menu and choosing the edit the system environment variables app.
  2. From there click on Environment Variables.
  3. Next click on Path under user variables and press Edit
  4. Add the PG install location as a line item and press okay
  5. The next time you open a terminal pgtools will be an available command now

Shortcut Usage

For those that prefer not to use the CLI, see this section.

Set up a test folder with the following sub folders:

  • meshes - any meshes you want to process
  • textures - any textures you want to process
  • PBRNifPatcher - if you want to use patch truepbr and are using PBR jsons
  1. Create a shortcut of PGtools in that test folder
  2. Right click the new shortcut and click properties
    1. Put the path to your test folder into the "run in" field.
    2. In the shortcut target, define any CLI arguments after pgtools.exe. For example: D:\Mods\Skyrim\PGPatcher\pgtools.exe --shortcut patch fixeffectlightingcs,truepbr[no_path_check],hairflowmap
      1. Adding the --shortcut CLI argument will prevent PGTools from auto closing so you can actually see the log and close manually
  3. Run the shortcut by double clicking, a PGPatcher_Output folder will be created in the same folder

Commandline Arguments

PGTools can run any of the patchers on a local folder. For now it will only read loose files and all relevant files must be in the directory you are running from (including meshes you want to be patched and the relevant textures).

To run the patcher use the command:

pgtools patch <comma separated name of patcher>

Available patchers are:

  • parallax
  • complexmaterial
  • truepbr
  • parallaxtocm
  • particlelightstolp
  • converttohdr
  • optimize
  • fixeffectlightingcs
  • fixsss
  • fixmeshlighting
  • fixtextureslotcount
  • hairflowmap

Any number of patchers can be chained together. For example to run truepbr and optimize, you could run pgtools patch truepbr,optimize

--help should work for all subcommands as well.