Skip to content

PZConfigHelper is a PHP tool designed to generate mod lists for Project Zomboid.

Notifications You must be signed in to change notification settings

Valgorithms/PZConfigHelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PZConfigHelper

PZConfigHelper is a PHP tool designed to generate mod lists for Project Zomboid from a specified directory structure. It scans directories to create lists of mod IDs and workshop items, and saves these lists to text files.

Installation

Clone the repository to your local machine:

git clone https://github.com/Valgorithms/PZConfigHelper.git

Navigate to the project directory:

cd PZConfigHelper

Install dependencies using Composer:

composer install

Usage

Running the Example Script

Run the script with the --path option to specify the directory containing the mods:

php example.php --path='D:\\SteamLibrary\\steamapps\\workshop\\content\\108600'

This will generate three files in the current working directory:

  • Mods.txt: Contains a list of mod names.
  • WorkshopItems.txt: Contains a list of workshop item IDs.
  • Both.txt: Contains a combined list of mod names and workshop item IDs.

Using the PZConfigHelper Class in Your Own Scripts

You can also use the PZConfigHelper class in your own PHP scripts. Here is an example:

require_once 'vendor/autoload.php';

use PZConfigHelper\PZConfigHelper;

$path = 'D:\\SteamLibrary\\steamapps\\workshop\\content\\108600';
$helper = new PZConfigHelper($path);

// Manually regenerate the lists
$helper->generateModLists($path);

// Save the lists to files
$helper->saveToFile(getcwd());

// Access the generated lists directly
echo $helper->mods;
echo $helper->ids;
echo $helper->both;

License

This project is licensed under the MIT License. See the LICENSE file for details.

Author

Valithor Obsidion [email protected]

About

PZConfigHelper is a PHP tool designed to generate mod lists for Project Zomboid.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages