It is no good. I can either make the mountain mine available anywhere there is a resource or I can make it valid only on Peaks but not registered as vicinity bonus. The XML is fine at it is currently.
So expect it is something in the vicinity code, t is probably relying on the bonuses making the improvement valid.
I suspected there would be need to write some unique code that would enable them properly. As you've found, the Peak restriction is more of an enablement for peaks while the Bonus Makes Valid tag makes it possible to build the improvement wherever the bonus exists but is also the key to making the improvement access the bonus. That's basically all vanilla programming and they had been able to stay within those established limitations.
I'm thinking it'll take an additional tag to sort it out properly. Or we could just abandon the mountain mine entirely and re-enable mine, quarry, and other improvements to be built on peaks.
2. New (freshly built) Caravels get multiple Land promotions before adding normal promotions.
Are you pointing at the promotions they can select or the free promotions they start with. It looks like the ones they can select are valid for naval units but I did see a few odd ones that may only impact land units in their freebies. I MAY be able to identify them from the pics but it would be easier if you could say which ones they are. I noticed Tattoos - not sure if that would be valid for both. Pankraton - again not sure. What were the other two? Martial Arts was one right? That's not too valid I don't think (then again doesn't do anything to harm them either.)
The recent change of C2C_ROUGH_BOMBARD_VALUE_MODIFIER to -25 seemed to have helped a bit, until I stumbled over these three AIs...
Any ideas of what else I can try to change to minimize siege use even more? Feels like we're trying to treat the effects, not the cause.
Would it be too extreme to enforce some national limits on siege unit counts based on number of cities?
The modifier could only change the percentage of how much siege should be used in a city attack stack. And based on observations, it works brilliantly except that in the earliest wars I saw they weren't bringing enough to continue the attack past the first city which may be fine for the first wars and would clear up with non-self-sacrificing siege weapons.
What you're showing is another issue entirely and from what I've seen in my games so far (which haven't encountered this issue like this) there's a few possibilities:
1) These siege units are somehow coming up as valid for roles they probably shouldn't be. What role that would be is hard to say without watching their behaviors more. City defense perhaps? The particular siege unit that's being shown should be checked in the xml to see what the AI types it has set are.
2) I captured quite a few siege weapon units with ambushers in this last game. How the AI would work with such captives I don't know. Spreading them all over their lands would be strange. Having each start their own new city attack stack would be strange but something I could kinda see happening. (though it shouldn't and would be a very bad spot in the code if they do.) It's possible they pick up an AI that behaves in this odd way you show.
3) It's possible that better developed nations than I've seen in my games reach a point where they keep thinking they need more attack stacks. If they keep seeding new attack stacks it might produce something odd like this. I know the spot in the code under some suspicion for this. But I'd need to see if that's the issue.
Is there any way to tell if they are building all of these siege or if they could possibly be captured? Are they pooling together into many stacks? What's the further behavior of these things?
I can tell you though, the worst problem the AI has at the moment is the way it leaves itself vulnerable to a dominant strike force and/or criminal onslaught. It builds things that can see them, sure, but while it appropriately reacts to pull in its workers, it ignores that even its primary units may be vulnerable to destruction if caught outside its cities. It places its dogs around the land rather than pulling them in, making them killable. It's priorities don't change appropriately to combat the situation before moving on to other goals. It would take a LOT of work to resolve but what it should be doing is as soon as it gets attacked or has a plot razed by an invisible foe is build up a response force if it doesn't have one. There are lots of unit options for a proper response force but I think it would take a complex new set of AI types to pull it together effectively. The AI has been needing a Homeland Defense military initiative for a while now anyhow.
The problem is, too, that this method needs to work differently than the brokerage and there is an element to the brokerage that needs to be halted when a nation is being attacked by invisible HN units from within. When a brokered unit is built, it immediately starts running off to go to the point where the unit that brokered it is situated. This means they can end up sending an endless herd of lemmings into the jaws of powerfully promoted Strike Teams lying in wait for them, accomplishing nothing but further pillaging and xp gain for those Strike Teams. If they were building units even to generate a response team this could still end up being what happens to them - the stack never gathers because it keeps getting killed enroute to the gathering point. So they need to pick the ONE city that the response team will be built from, build all units there, and not move units out of the city until that stack is formed and ready to rock.
And in the meantime, the strongest unit that has been killed within the borders should become the measuring strength for what is allowed to be outside of a city within their own borders until a clean sweep has taken place.
A clean sweep would enforce that a check for invisible units (to the extent of the best invisible types they can produce units to see) has been made on all national plots in the same segment that an invisible attack took place has been made before allowing the rest of the AI to behave as normal.
If they find anything lurking around where they can't get at it like a peak or a city, they would build and assign a unit that can see it to stay as close to it as possible, in as defendable position as possible (a city optimally) and to try to find the unit if it runs off. Once the response team has swept the rest of the area, it can come back to attempt a quarantine of the enemy, hoping to make it impossible for the foe to escape or move at all without being destroyed.
Then we can work on the cops taking down criminals in a city thing.
This is a seriously complex AI suggestion of course. Something I'm not up to now or any time soon. But a few of its measures could be adopted at least. They're REALLY stupid once you've established an invisible/HN unit dominance in their lands. The City Defenders just walk out of the city to be killed. The Lemming effect. Yes, Healers, but it gets down to how the brokerage works and applies to most units.
If they need to respond by building the best anti-Invisible/HN units they have and putting those units on every plot before they can move on to other things (and if those units are getting killed, just give up on building units at all for a while)... that would be better at least.
Anyhow... it's a problem for them and a complex one.