# Thread: A fix for mesoamerican, asian, and zimbabwe factions character trait triggers

1. ## A fix for mesoamerican, asian, and zimbabwe factions character trait triggers

Greetings all,

First, some background....

The problem is the trigger:
Code:
;------------------------------------------
WhenToTest GovernorBuildingCompleted

Condition SettlementBuildingExists >= wooden_wall
and not SettlementBuildingExists >= corn_exchange

Affects BadTrader  1  Chance  100
"Corn_exchange" is the internal name of the first level of the European trade building. It's listed as Grain Exchange in the construction menu of the settlement. But the obvious problem is that Native American factions don't have access to the Grain Exchange. So the second they build wooden walls, their generals immediately get hit with BadTrader 1, aka "Fiscally Challenged." The solution? Adding this one line of code does the trick:
Code:
;------------------------------------------
WhenToTest GovernorBuildingCompleted

Condition SettlementBuildingExists >= wooden_wall
and not SettlementBuildingExists >= corn_exchange
and not CultureType mesoamerican

Affects BadTrader  1  Chance  100
Adding "and not CultureType mesoamerican" ensures that this trigger will not run for the Apache, Aztecs, Mayans, and Incans. Of course, this still won't allow them to gain points in GoodTrader, and that got me thinking about all the other character traits your generals are supposed to get from constructing various buildings, which led to this modification of the original script.

https://www.dropbox.com/s/j27nrsxqwr...raits.txt?dl=0

To apply the patch, simply navigate to your installation directory for Falcom Total War, open the data folder, drag and drop the file into the data folder, and choose to overwrite the existing file when you are prompted.
NOTE: Unfortunately, making even the slightest changes to any of the scripts seems to make the game incompatible with previous saves. Meaning that once you apply the patch, you'll have to start a new campaign.

A complete changelog....

- Fixed not_building_trade trigger for Mesoamerican factions (Apache, Aztecs, Mayans, and Incans)
- Added not_building_trade_meso trigger and not_building_trade_apache triggers to give points in BadTrader to Mesoamerican governors present in a settlement with at least a wooden wall and without their faction's trader building
- Added building_trade_meso and building_trade_apache triggers to give points in GoodTrader when a governor is present and builds his faction's trader building
- Fixed BadFarmer trigger for Mesoamerican factions
- Added corrected BadFarmer trigger and GoodFarmer trigger for Mesoamerican factions
- Added building_religion triggers when Mesoamerican factions and all new factions added by Falcom construct buildings that enable the recruitment of priests. The triggers mimic the triggers for European factions building churches

A note for future changes....
I mentioned above that I made this modification with the assumption that CA made an oversight when writing the original script, and did not intentionally handicap the Native American factions with the inability to gain positive traits from constructing the same buildings as their European and Middle Eastern counterparts. I welcome any discussion with regards to maintaining balance between all the factions available in Falcom's mod.

Additionally, for many of the non-European factions, the Native American ones especially, there are multiple religious buildings, but not all of them give the same conversion bonus, and not all of them allow you to recruit priests. I only added triggers on the buildings that enabled the recruitment of priests. This is another balancing question that could be debated. I thought about adding a trigger on all the religious buildings to give your generals more positive traits, but opted against it. This is another one of those balancing questions that could be debated. I, unfortunately, don't believe that I am experienced enough in Total War games in general to make such a decision on my own, so I open up the topic to anyone else reading who has a firm grasp on the grand strategy of Total War.

Lastly, of course, if anyone finds that the triggers are not working as you would expect, or has found that I neglected to add a fix for a different trigger that's broken for the new factions, please leave me a reply detailing what you did in the game, and what you expected to happen that didn't.

2. ## Re: A fix for mesoamerican, asian, and zimbabwe factions character trait triggers

So after testing out the changes in a new Apache campaign, I noticed that I missed a few triggers for negative traits. So I went through the whole script file looking for triggers that relied on buildings as conditions and added a slew of new triggers and fixes for pre-existing triggers. I overwrote the old file in my DropBox folder with the new version, so the link in the original post should still work, but will now download the latest version.

Here's an updated changelog that includes the code that I added and the code that I modified (I tried to include the blocks of code that pertained to these new fixes, but apparently, something in my formatting was triggering a security flag, and caused me to be blocked):

- Fixed triggers for generals sitting around in settlements with religious buildings to only fire on religious buildings consistent with a faction's religion
- Added triggers for religious buildings of new factions and Mesoamerican factions
- Added trigger for generals sitting around in a settlement with a Sweat Lodge (mimicked trigger for settlement with a bimaristan)
- Fixed 'Unjust' trigger that fires when a general is sitting around in a settlement with no town hall to ignore Mesoamerican factions (which don't have access to a town hall)
- Added 'Unjust' trigger for Mesoamerican factions that still ignores the Apache (who don't have access to any type of governor's building)
- Fixed 'RhetoricSkill' trigger that fires when a general is sitting around in a settlement with a city hall to ignore Mesoamerican factions (who don't have access to the city_hall building)
- Added 'RhetoricSkill' trigger for Mesoamerican factions that fires when a general is sitting around in a town with an acropolis, but still ignores Apache (who don't have access to any type of governor's building)
- Fixed 'StrategicSkill' trigger that fires when a general is sitting around in a settlement with a Militia Drill Square or a castle with a Drill Square to ignore Mesoamerican factions (which don't have access to either type of drill square)
- Added 'StrategicSkill' trigger for Apache that fires when a general is sitting around in a settlement with a Raider's Longhouse but ignores other Mesoamerican factions (because they do not have access to any specific barracks buildings)
- Fixed 'GoodEngineer' trigger that fires when a general is sitting around in a settlement or castle with Siege Works to ignore Mesoamerican factions, Zimbabwe, Japan, Srivijaya, and the Khmers (who don't have access to, and/or cannot recruit siege units)
- Fixed 'Ignorance' trigger that fires when a general is sitting around in a settlement without a Library, Alchemists Lab, or City Hall to include a check for a Acropolis as a condition (since the Aztecs, Mayans, and Incans use the Acropolis instead of the City Hall) and to exclude the Apache from the trigger (since they don't have access to any of the buildings in the list of checks, nor do they have access to any type of governor's building)
- Added triggers that fire when a general is sitting around a settlement with the Aztecs Aqueduct or with the Chultun (mimicked the trigger for settlement with Public Baths)
- Added triggers that fire when a Mayan general builds a Chultun and when an Aztec general builds aqueducts (mimicked trigger for Public Baths)
- Added trigger that fires when an Aztec, Mayan, or Incan general constructs a level of governor's building (mimicked trigger for town hall)
- Added trigger that fires when a chivalrous Aztec, Mayan, or Incan general constructs a level of governor's building (mimicked chivalry trigger for town hall)
- Added trigger that fires when a dreadful Aztec, Mayan, or Incan general constructs a level of governor's building (mimicked dreadful trigger for town hall)

If anyone is interested, I also tried to write a custom trait called BallPlayer that was intended to be the Mesoamerican version of the TourneyKnight and HorseRacer traits. I wrote triggers for it to be fired when a general was sitting around in a settlement with a Ball Court, but I commented out those sections of code in the version of 'export_descr_character_traits.txt' I uploaded to DropBox because in its current state, the trait isn't working correctly, and I suspect it may have been behind a crash I experienced. When I figure it out, I will upload my updated version of the script to DropBox, and post a link to any additional script files that may be needed to get the custom trait working.

Furthermore, having gone through the whole character traits script, it also got me thinking about the ancillaries triggers. But as I started to skim through the ancillaries script, I realized that simply tweaking the current triggers and adding new ones would only be a half measure. I intend to make a number of custom ancillaries that would be like Mesoamerican and Asian equivalents of the standard ancillaries, but this will take some additional time, and likely a fair amount of testing and troubleshooting, seeing as right now I can't even get a custom trait to work right. I'll post here again (possibly in a new thread) when I have something to show.

Until then, I hope you enjoy the fixes to the character traits.

3. ## Re: A fix for mesoamerican, asian, and zimbabwe factions character trait triggers

So I was able to get the custom trait working. I've uploaded the updated version of export_descr_character_trait.txt to my DropBox under the same name once again, so the link in the original post should still work. Additionally, to get the custom traits working properly in your own game, you'll need to download and install this modified version of export_vnvs.txt.