Skip to content
/ A3PT Public

Simplify your ArmA 3 Presets. A3PT lets you extract, combine and create presets quickly and easily.

License

Notifications You must be signed in to change notification settings

MBarkerUK/A3PT

Repository files navigation

Arma 3 Preset Toolkit (A3PT)

Shell Script Security Last Commit Codacy Badge

This repository is regularly scanned for security vulnerabilities using GitHub Actions, ensuring code quality and safety. The build status indicates the current state of the automated tests, and the last update badge shows recent development activity.

A3PT (Arma 3 Preset Toolkit) is a command-line utility designed to streamline the management of Arma 3 mod presets. It provides functionality to extract mod lists from preset files and merge multiple presets into a single, unified file

Features

  • Mod List Extraction: Quickly generate a list of mods from an Arma 3 preset HTML file, facilitating easy inspection and configuration.
  • Preset Merging: Combine multiple Arma 3 preset files into a consolidated file, simplifying the management of complex mod configurations.
  • Steam Collection Extraction: Extract mods from Steam Workshop Collections and build a mod preset out of them for easy setup.

Usage

Mod List Extraction

Linux/macOS

./A3PT-Extract.sh

Windows

.\A3PT-Extract.ps1
Detailed Explanation

This command extracts mod names from a given Arma 3 preset HTML file.

  1. File Selection: A file selection dialog will appear, prompting you to choose the desired preset HTML file.

  2. Mod Name Extraction: The script parses the HTML file, identifying and extracting the mod names.

  3. Output: The extracted mod list is saved to ModList.txt in the current working directory. The file contains a single line with mod names delimited by ;@, suitable for direct use in configuration files.

Preset Merging

Linux/macOS

./A3PT-Merge.sh

Windows

.\A3PT-Merge.ps1
Detailed Explanation

This command merges two Arma 3 preset HTML files.

  1. File Selection: You will be prompted to select two preset HTML files.

  2. Template Utilization: The script uses a template file (Arma 3 Preset Default.html) to ensure proper formatting of the merged output.

  3. Mod List Extraction & Combination: The script extracts the mod lists from the selected files and combines them.

  4. Template Population: The combined mod list is inserted into the designated section of the template.

  5. Output: The merged preset is saved as Arma 3 Preset Merged.html in the current working directory.

Steam Collection Extraction

Linux/macOS

./A3PT-Steam-Extract.sh

Windows

.\A3PT-Steam-Extract.ps1
Detailed Explanation

This command extracts a mod list from a Steam Workshop Collection URL and merges it into an Arma 3 preset file.

  1. Collection URL Input: A dialog will appear, prompting you to enter the URL of the Steam Workshop Collection.

  2. Output File Selection: You will be prompted to choose where to save the generated Arma 3 preset HTML file.

  3. Template Utilization: The script uses a template file (Arma 3 Preset Default.html) to ensure proper formatting of the output preset.

  4. Mod List Extraction & Combination: The script parses the HTML from the Steam Workshop Collection URL, extracts the mod names and their Steam Workshop IDs, and combines them into a format suitable for the Arma 3 preset file.

  5. Template Population: The extracted and formatted mod list is inserted into the designated mod list section of the template.

  6. Output: The new preset containing the mods from the Steam Workshop Collection is saved to the location you specified.

Installation

  • Download: Download the A3PT scripts from here.
  • Make Executable (Linux/macOS): For the Bash scripts, execute the following command:
chmod +x A3PT-Extract.sh A3PT-Merge.sh A3PT-Steam-Extract.sh
  • Make Executable (Windows): For the PowerShell scripts, ensure you have the necessary permissions to execute scripts. You may need to set the execution policy:
Set-ExecutionPolicy Unrestricted

Dependencies

  • Linux/macOS: zenity, grep, cut, sed, tr, cat (Typically pre-installed on most distributions.)
  • Windows: PowerShell (Pre-installed on Windows).

Releases

Contributing

Contributions are welcome! Please submit pull requests or open issues.

License

This project is licensed under the GNU General Public License v3.0.