I realize that I am a bit late to the Shogun 2 modding thing, but I wanted to create a mod that would allow either destroying or downgrading castles. (Stupid AI and their love of grand architecture...)

The first thing that I noticed was that in building_levels, SHO_Castle_1_Fort has the destructionterminator flag set, just as the 0-level buildings in other mandatory building tiers like farms have. That is as we would want it to be, but I couldn't find any settings anywhere that looked like they would be blocking the higher level castle versions from being destroyed. Either there is a setting that I missed somewhere, or it is hard-coded.

As an alternative, I tried adding the next castle tier down as an upgrade option for each castle type above Fort in building_upgrades_junction. Doing so, however, resulted in a crash to desktop immediately upon attempting to either load a game or to start a new campaign after selecting options. I am guessing that the game is trying to map out upgrade paths and is getting stuck in an infinite loop going back and forth between castle levels. If necessary, I might do something like create a parallel castle tier that looks and behaves the same, with each castle from the original tier above Fort having the next lowest castle from the parallel tier as an upgrade option. The parallel tier would have no upgrade options taking you back to the original tier, so no upgrade loops and no crash, but you would then be unable to downgrade again after the first downgrade. I haven't looked into TW scripting yet, but I could then perhaps write a script to check for buildings in the alternate tier every turn and replace them with the equivalent building from the original tier. If that worked, it would allow unlimited downgrade/upgrade cycles while still having no circular upgrade paths.

Does anyone have any ideas for how else to get either destroying or downgrading to work, or know of any reason that my (ugly) possible solution to downgrading might not work? Thanks!