Jump to content

LoadBLUEFORUnitClasses

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (LoadBLUEFORUnitClasses – created via PowerShell script (2025-11-11T21:12:31Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
Environment: Mission Scripting
Function: LoadBLUEFORUnitClasses
Function Description: Loads BLUEFOR unit class data from a specified JSON file or falls back to a default file if the provided path does not exist. Parses the JSON content into CMM.BLUEFOR and logs success or failure messages accordingly.
File Location: cmm.persistence.lua
Syntax: CMM.LoadBLUEFORUnitClasses( string FilePath )
Return Value: nil
Parameters: Name Description
FilePathFull path to the JSON file containing BLUEFOR unit class data. If not provided or invalid, defaults to CMM.TEMPLATEDIR .. "BLUEFOR_UNIT_TYPES.json".
Example: CMM.LoadBLUEFORUnitClasses("CMM/Custom/BLUEFOR_UNIT_TYPES.json")
Example Description: Loads custom BLUEFOR unit classes from a specified file path and assigns them to CMM.BLUEFOR, logging success or failure based on file existence and validity.
Related Functions:
Notes: