LoadREDFORUnitClasses
Appearance
| 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 |
| FilePath | Full 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: | ||