disabled game mode criteria

Contravity

Chieftain
Joined
Apr 26, 2021
Messages
8
Just a syntax question about criteria in the modinfo file.

How would you define a criteria that specifies a condition when a game mode is disabled? I have xml code that is being triggered on presence or absence of certain dlcs/game modes/community mods. Until the March update, due to the content of my upcoming mod, I didn't have to check for the absence of a game mode.

Enabled:
Code:
    <Criteria id="TowerDefenses">
      <ConfigurationValueMatches>
        <Group>Game</Group>
        <ConfigurationId>GAMEMODE_TOWERDEFENSE</ConfigurationId>
        <Value>1</Value>
      </ConfigurationValueMatches>
    </Criteria>

Disabled?:
Code:
    <Criteria id="TowerDefensesDisabled">
      <ConfigurationValueMatches>
        <Group>Game</Group>
        <ConfigurationId>GAMEMODE_TOWERDEFENSE</ConfigurationId>
        <Value>0</Value>
      </ConfigurationValueMatches>
    </Criteria>

The above was my guess based on how it could be based on how some other components work, but this doesn't seem to trigger the loading of files associated with this criteria like I had hoped. As far as I can tell, no one has asked this before. Any suggestions?

If my mod only had to be compatible with Firaxis built content, this wouldn't be an issue. However, I'm trying to ensure optional compatibility between my mod, Firaxis content, and other mods. Without the criteria functionality provided by Firaxis, the xml/sql code will get a lot more complicated than I want to deal with as it will have to check multiple conditions to apply a change.
 
Last edited:
Top Bottom