Jump to content

LoadREDFORUnitClasses

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (LoadREDFORUnitClasses – 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: LoadREDFORUnitClasses
Function Description: Loads REDFOR 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.REDFOR and logs success or failure messages accordingly.
File Location: cmm.persistence.lua
Syntax: CMM.LoadREDFORUnitClasses( string FilePath )
Return Value: nil
Parameters: Name Description
FilePathFull path to the JSON file containing REDFOR unit class data. If not provided or invalid, defaults to CMM.TEMPLATEDIR .. "REDFOR_UNIT_TYPES.json".
Example: CMM.LoadREDFORUnitClasses("CMM/Custom/REDFOR_UNIT_TYPES.json")
Example Description: Loads custom REDFOR unit classes from a specified file path and assigns them to CMM.REDFOR, logging success or failure based on file existence and validity.
Related Functions:
Notes: