As some forks can dramatically change behaviors how engine works is good to allow mods that expect given behavior.
Because of this I added in main OXC code base code that is used to recognize what mod is compatible with engine.
In file ModInfo.cpp there is table:
/**
* List of engines that current version support.
*/
const EngineData supportedEngines[] = {
{ OPENXCOM_VERSION_ENGINE, { OPENXCOM_VERSION_NUMBER }},
{ "", { 0, 0, 0, 0 } }, // assume that every engine support mods from base game, remove if its not true.
};
Each mod should change `OPENXCOM_VERSION_ENGINE` macro to report current name of engine that mods can test against.
Example:
const EngineData supportedEngines[] = {
{ "EngineX", { 1, 2, 0, 0 }},
{ "EngineY", { 1, 4, 0, 0 }},
};
This will make mod main file metadata.yml:
name: "Some Mod"
version: 5.0
reservedSpace: 1
requiredMasterModVersion: 1.2
requiredExtendedEngine: EngineX
Will be allowed to be loaded by engine because it require supported version EngineX.