Skip to content

LoadoutManager

Miksuu edited this page Sep 10, 2023 · 23 revisions

Author: Miksuu

Introduction

LoadoutManager is a C# program (created by Miksuu) designed for managing various vehicle loadouts. It manages generating code for Arma 2’s SQF language for the essential files: EASA_Init.sqf & Common_BalanceInit.sqf

Additionally the program brings these changes (and any other code change excluding mission.sqm, and version.sqf files) to our modded maps which we currently run biweekly events on the weekends.

Why we created this tool

Before we started working The Air Balance Patch

SqfFileGenerator.cs

SqfFileGenerator.cs is a C# utility class central to the LoadoutManager program. It specializes in generating SQF (Status Quo Script) files that are tailored to specific loadout configurations. The class serves as a vital link between the program's data models and the SQF files used in the game. One of the key methods inside the class is GenerateAircraftSpecificLoadouts(), that invokes a method: GenerateLoadoutsForTheAircraft() from the BaseAircraft.cs class. This method plays a significant role in generating aircraft-specific loadouts and leans heavily on other classes like BaseWeapon.cs and BaseAmmunition.cs to manage various types of ammunition. This data is processed to generate the SQF files' content, providing a seamless transition from the program's internal logic to the external SQF files. By doing so, the class ensures that the generated files are compliant with the specific loadout requirements that are setup properly to create a balanced game environment. Beyond generating content, SqfFileGenerator.cs has methods for writing these configurations to files. This makes it easier to integrate them into different modded terrains. The class contains properties that store the text content for these SQF files, which can then be written to disk.

Clone this wiki locally