KP Liberation for Arma 3

repository·master·Indexed 43 days ago

https://github.com/killahpotatoes/kp-liberation

A persistent, large-scale 'Capture the Island' campaign mission for Arma 3 featuring resource management, base building, and tactical combat. Includes a build system using Node.js and Gulp for assembling mission folders, packing PBO files, and distributing to the Steam Workshop.

Tokens
2.8K
Snippets
5
Records
8
Agent score
5%

What's inside KP Liberation

  1. Overview of KP Liberation for Arma 3

    master

    KP Liberation is a persistent, large-scale 'Capture the Island' campaign for Arma 3. Players work together (up to 34 players) to liberate settlements across a map over several weeks of real time.

    Key Features:

    • Persistent Campaign: Features a built-in server-side save system to ensure progress is never lost.
    • Resource Management: Purchase infantry, ground vehicles, and air vehicles using three physical resources: supplies, ammunition, and fuel.
    • Base Building: Includes an in-game 'what you see is what you get' system for building Forward Operating Bases (FOBs).
    • Roles & Cooperation: Supports a Commanding role, fire-team squads, medevac, and logistical support squads, alongside AI recruits.
    • Dynamic Combat: Features custom urban combat AI, aggressive hostile forces that adapt to player actions, and independent guerrilla forces.
  2. Set up the KP Liberation builder

    master

    To use the KP Liberation builder, ensure you have Node.js version 7 or higher installed. Follow these steps to install dependencies and prepare the environment:

    1. Install project dependencies: Run npm install in the project root.
    2. Install Gulp (Recommended): To avoid re-installing Gulp every time, install it globally using npm install -g gulp.
    # Install dependencies
    npm install
    
    # Install gulp globally to prevent reinstallation every time
    npm install -g gulp
  3. Recommended mods for KP Liberation

    master

    To enhance the gameplay experience, the following mods are recommended. Some are best used as server-side mods.

    General Recommendations:

    • ACE & Compatibilities: ACE, ACE Compat - RHS AFRF, ACE Compat - RHS USAF, ACE3 - BWMOD Compatibility.
    • Communication & UI: ACRE 2, DUI - Squad Radar, KP Ranks, Discord Rich Presence.
    • Movement & Combat: Advanced Urban Rappeling, Enhanced Movement, Suppress.
    • Audio: JSRS SOUNDMOD (including RHS AFRF and RHS USAF support packs).
    • Utility: CBA_A3, Immerse.

    Recommended Server-Side Mods:

    • Advanced Rappeling
    • Advanced Sling Loading
    • Advanced Towing
  4. Required mods for KP Liberation maps

    master

    To use prepackaged mission files from the Steam Workshop or release tabs, specific mods are required depending on the map chosen. If you wish to play on a map without these mods, you must set the preset to custom in the kp_liberation_config file.

    Commonly Required Mods:

    • CUP Terrains (Core/Maps): Required for Al Rayak, Chernarus, Chernarus Winter, Panthera, Sahrani, Takistan, and Taunus.
    • RHS (AFRF & USAF): Required for Al Rayak, Chernarus, Chernarus Winter, Lythium, Sahrani, and Takistan.
    • Project OPFOR: Required for Lythium and Takistan.

    Map-Specific Requirements:

    • Al Rayak: CUP Terrains - Core, G.O.S Al Rayak, RHS AFRF, RHS USAF.
    • Chernarus / Chernarus Winter: CUP Terrains - Core, CUP Terrains - Maps, RHS AFRF, RHS USAF.
    • Livonia: Contact DLC.
    • Lythium: Jbad, Lythium, Project OPFOR, RHS AFRF, RHS USAF.
    • Malden: None.
    • Panthera: CUP Terrains - Core, CUP Units, CUP Vehicles, CUP Weapons, Island Panthera.
    • Sahrani: CUP Terrains - Core, CUP Terrains - Maps, RHS AFRF, RHS USAF.
    • Song Bin Tanh: The Unsung Vietnam War Mod.
    • Takistan: CUP Terrains - Core, CUP Terrains - Maps, Project OPFOR, RHS AFRF, RHS USAF.
    • Tanoa: Apex DLC.
    • Taunus: BWMod, CBA A3, CUP Terrains - Core, CUP Terrains - Maps, RHS AFRF, RHS USAF, X-Cam-Taunus (Version 1.1).
    • Weferlingen / Weferlingen Winter: Global Mobilization CDLC.
    • Yulakia: Yulakia Map, CUP Terrains - Core.
  5. Run KP Liberation build tasks

    master

    The builder uses Gulp tasks to assemble, pack, and distribute missions. Build files are outputted to the build/ directory.

    Execution Methods

    • Standard Build: Run npm run build to execute the default build sequence.
    • Specific Task via npx: Use npx gulp <task_name> to run a specific task using the local installation.
    • Specific Task via Global Gulp: If gulp-cli and gulp 4 are installed globally, use gulp <task_name>.

    Available Tasks

    TaskDescription
    cleanRemoves the build/ directory
    buildAssembles mission folders and sets configuration values
    pboPacks mission folders into PBO files
    zipCreates release ZIP files
    workshopUploads built PBOs to the Steam Workshop
    __default__Runs build, pbo, and zip in sequence
    # Run mission build
    npm run build
    
    # Run task with local gulp via npx
    npx gulp <task_name>
    
    # With gulp-cli and gulp 4 installed globally
    gulp <task_name>
  6. Configure mission presets in presets.json

    master

    The presets.json file defines how missions are built. It must contain a JSON array of Preset objects. For every preset entry, one mission file will be generated.

    Each Preset object requires the following structure:

    • sourceFolder: The path to the folder containing mission.sqm, relative to the <missionsFolder>. Use an empty string "" if mission.sqm is in the root of <missionsFolder>.
    • missionName: The name used for the output directory. Using a name different from the source allows building multiple versions of a mission on the same map.
    • map: The map name used for the output directory. The combination of missionName and map must be unique for every preset.
    • configFile: The name of the configuration file (e.g., kp_liberation_config.sqf).
    • variables: An object where keys correspond to variables in the configFile. The values provided here will be injected into the configuration file.
    [
        {
            // Source folder with mission.sqm, relative to <missionsFolder>
            // If mission.sqm is in root of <missionsFolder> should be set to empty string
            "sourceFolder": "kp_liberation.Altis", 
    
            // Name and map is used to build output directory: <missionName>.<map>
            // Name different than source allows to build multiple version of mission on same map
            // Combination of <missionName> and <map> should be unique for every preset
            "missionName": "kp_liberation",
            "map": "Altis",
    
            // Keys of <variables> object represent variables in <configFile>.
            // These variables values will be set to corresponding value in <variables>
            "configFile": "kp_liberation_config.sqf",
            "variables": {
                "KP_liberation_preset_blufor": 0,
                "KP_liberation_preset_opfor": 0,
                "KP_liberation_preset_resistance": 0,
                "KP_liberation_preset_civilians": 0,
                "KP_liberation_arsenal": 0
            }
        }
    ]
  7. Configure recommended difficulty settings

    master

    For the best experience, use a custom difficulty preset in your server's user profile. This configuration balances immersion with gameplay by disabling certain indicators while keeping essential ones like weaponInfo and vonID enabled.

    User Profile Configuration: Apply the following DifficultyPresets to your server profile:

    difficulty="Custom";
    class DifficultyPresets
    {
        class CustomDifficulty
        {
            class Options
            {
                groupIndicators=0;
                friendlyTags=0;
                enemyTags=0;
                detectedMines=0;
                commands=0;
                waypoints=0;
                weaponInfo=1;
                stanceIndicator=1;
                reducedDamage=0;
                staminaBar=0;
                weaponCrosshair=0;
                visionAid=0;
                thirdPersonView=0;
                cameraShake=1;
                scoreTable=0;
                deathMessages=0;
                vonID=1;
                mapContent=0;
                autoReport=0;
                multipleSaves=0;
                squadRadar=0;
                tacticalPing=0;
            };
            aiLevelPreset=3;
        };
        class CustomAILevel
        {
            skillAI=1.0;
            precisionAI=0.15;
        };
    };

    Server Config File (server.cfg): Ensure your mission is set to use the custom difficulty:

    forcedDifficulty = "custom";
    
    class Missions
    {
        class kp_liberation
        {
            template = "kp_liberation.Altis";
            difficulty = "custom";
        };
    };
    difficulty="Custom";
    class DifficultyPresets
    {
        class CustomDifficulty
        {
            class Options
            {
                groupIndicators=0;
                friendlyTags=0;
                enemyTags=0;
                detectedMines=0;
                commands=0;
                waypoints=0;
                weaponInfo=1;
                stanceIndicator=1;
                reducedDamage=0;
                staminaBar=0;
                weaponCrosshair=0;
                visionAid=0;
                thirdPersonView=0;
                cameraShake=1;
                scoreTable=0;
                deathMessages=0;
                vonID=1;
                mapContent=0;
                autoReport=0;
                multipleSaves=0;
                squadRadar=0;
                tacticalPing=0;
            };
            aiLevelPreset=3;
        };
        class CustomAILevel
        {
            skillAI=1.0;
            precisionAI=0.15;
        };
    };
    
    forcedDifficulty = "custom";
    
    class Missions
    {
        class kp_liberation
        {
            template = "kp_liberation.Altis";
            difficulty = "custom";
        };
    };
  8. Configure filesystem paths in gulpfile.ts

    master

    The gulpfile.ts uses a paths variable of type FolderStructureInfo to define the filesystem locations required for the build process. You may need to adjust these if your directory structure differs.

    • frameworkFolder: The directory containing mission scripts.
    • missionsFolder: The directory containing base mission files (where mission.sqm files reside).
    • workDir: The output directory for build artifacts.
    /** 
    * Mission folders configuration
    */
    const paths: FolderStructureInfo = {
        // Folder with mission scripts
        frameworkFolder: resolve('..', 'Missionframework'),
    
        // Folder with base mission.sqm folders
        missionsFolder: resolve('..', 'Missionbasefiles'),
    
        // Output directory
        workDir: resolve("./build")
    };