Criteria not working exactly the same after May update.

Arstahd

Chieftain
Joined
Apr 20, 2006
Messages
85
After the recent update, my City banner mod stopped working. Seems Firaxis updated CityBannerManager.lua for all three versions of the game. No big deal, I updated each file and began testing.

GS game : Worked great.
R&F game : Looked like it worked (turns out there were some errors in the banner drop downs that I didn't notice at first.)
Base game : Didn't work.

After some troubleshooting, I discovered that the Criteria that I set so that only the proper LUA would load for each game version was no longer working. All three LUAs were loading and overwriting each other, with the GS version coming last, explaining my initial results.

It turns out that you can no longer give a Criteria a custom ID, it must match the Criteria itself. When I changed my ID's to match, everything worked like it used to.

Code:
    <ActionCriteria>
        <Criteria id="Base">
            <GameCoreInUse>Base</GameCoreInUse>
        </Criteria>
        <Criteria id="Expansion1">
            <GameCoreInUse>Expansion1</GameCoreInUse>
        </Criteria>
        <Criteria id="Expansion2">
            <GameCoreInUse>Expansion2</GameCoreInUse>
        </Criteria>
    </ActionCriteria>
 
On further inspection, I think I was implementing my original Criteria incorrectly. In my ImportFiles action, I was calling out either "Base", "Expansion1", or "Expansion2", and not my custom Criteria IDs. The game may have picked these up as the Firaxis Criteria IDs used in the expansions and used them appropriately. The base game one probably didn't work, it was likely always enabled, just overwritten by the expansion versions in those games.

Regardless, something changed in the way things worked. They probably tightened up some coding resulting in my original mess no longer functioning.

I just tried using a custom Criteria ID and it worked when my actions properly referenced this ID.
 
Back
Top Bottom