Previous title: Shadows (or lack thereof)
We've had the 'disappearing shadows on strat-map buildings' issue for a while - I'm reasonably sure it's caused by the faction_variants of the settlement models (models_strat/residences/faction_variants) - am now finally getting round to testing to try and find out if it's the number of variants / the size of models/textures or some combination of those plus other stuff on the campaign map.
In our case the last listed culture (Ireland) is the one that always loses shadows.
Test 1: I tried using the smallest .cas I could find (port walls) as the variant model replacing 7 city/castle levels for 30 factions. The shadows problem didn't show up but the mod did gain a 100% each time crash and hang on exiting the campaign! Tried again with fewer factions and still had crash on exit - thought it might be something to do with the port model so went on to try village...
Test 2: Used the vanilla ne village model (18kb) copied and re-named to replace 7 settlement levels for 12 factions - Ireland's shadows have disappeared and I still have that crash and hang on exit
Reverted our strat trees and textures to vanilla and removed all resources from descr_strat - still no shadows + crash on exit.
Reverted our character models so everyone is using vanilla ones and everyone is using denmark ambassador.tga
Result: looks like a dogs breakfast - still no shadows on Ireland settlements - still crashes and hangs with
"Medieval 2: Total War encountered an unspecified error and will now exit." - but that one did actually close instead of hanging...
Think we can safely say it is a problem with number of faction_variants!
Test 3: As an afterthought - removed some copies of within the residences folder - in case it's a number cached and not number used issue...
Nope
Test 4: One faction only - 7 replacement settlement levels (still using the vanilla village .cas) - shadows are back - no crash on exit
Four factions - 7 replacement settlement levels (note I'm not checking if these actually all appear on the map, a lot probably don't) - all still OK
Seven factions x 7 = still OK
Ten factions x 7 = shadows are OK but back to crash and hang on exit
I think I now need to also cross check with our descr_strat and see if this is related to variants that are actually getting used, because France actually has a large castle etc...
Test 5: removed 2 old copies of IWTE.exe from the residences folder! Turned off campaign shadows in options
10 factions with 7 replacement variants each still crashes on exit (obviously no shadows!)
Test 6: changed a couple of descr_strat entries so none of my variant factions are using largest castle. Didn't remove models. Still do have shadows - but still crash on exit.
Removed the large_castle .cas (which was still re-named village file) from the 10 variant folders. Campaign exits without problem!! So the crash problem seems to exist if you have the variants there, even if they've not actually been used on the map.
Rechecked that one as it seemed a bit odd - with large_castle model in the 10 folders got crash back - removed smallest castle so we're back to 10x6 models total in the variant folders = OK again
Added another faction with same models so 11x6 - crash and hang on exit is back.
Removed a few not in use .cas's and odd files from the main residences folder. Still crash on exit with 66 variant models. Removed 2 random ones to give 64 total - exits OK
Added one back - 65 total (in variants folders) - exited OK
rechecked with 66 - crashed again.
Called one of the 66 .cas files Fred.cas (e.g. not listed in cultures) - 65 valid names + fred = exited OK
Added one more faction folder with 1 valid named .cas so we have 66 valid named files + fred in diferent no of folders = crash on exit
Called one of the files _copy - so we're back to 65 valid named files = exited OK