We currently use a single UnitClasses.sqf file for all 4 sides in our modsets. For every combination we add a new one that has to maintained later with every update on code or the addons.
My idea is to divide it into one file per side, so we have UnitClassesPlayer, UnitClassesEnemy, UnitClassesIndep and UnitClassesCivilian. That way we have a single UnitClassesEnemy file for RHS AFRF to maintain and can then choose a different UnitClassesIndep file in the build script depending on terrain or mods that we want, for example a version for old RHS Indep units, new RHS GREF factions, something from CUP, our CAF units, etc.
The problem I see is how to seperate the files for arrays with an overlap between sides? We have that on most surprises, the parked vehicles and static weapons. We could handle it by:
- choosing only one side and putting it in there. Least amount of work, but which side? What about factions that don't have the necessary units, on a different combination of addons we might want the other side? On the plus side no more mixed camps, but maybe we want that.
- using two arrays, as with all the others. More work to a bunch of different scripts. Upside, no more mixed camps and the possibility to do for example different roadblocks for Enemy and Indep side. But again, maybe we want mixed stuff and what about missing units, would empty arrays be a problem? What about empty arrays for both sides?
- changing all arrays to the style we use for ammo boxes. Using the pushback command we add to the existing array. Most work, but that way we could still mix. Separating arrays could of course still be done if we want. But this way we would have support to use more than one UnitClassesSide file in a mission (additional work). No idea how useful it is, but for example we can build a version with only the BIS version of UnitClassesCivilian, or one with only the CUP version. On a third we combine the two (and add a third or fourth) but still only maintain one file . It would allow people to easily add just a few more weapons or units from other addons and do their personal versions without changing it on every update.
I hope it's understandable what I want to say. Any thoughts? Problems I didn't think of? Any ideas how to actually implement that?