I've repeatedly had WoC lockups when one or two units from a civilization with which I have Open Borders attempts to attack a Dragon Fanatic or Wyvern Rider garrisoned in one of my cities. Skipping or deleting the unit(s) in question resolves the issue, and moving the DF/WR further from my borders or onto an inaccessible tile appears to cause the AI to ignore them. I've seen them cause lockups on both PatrolMove and ConquestMove in the AI log, for what it's worth. Haven't seen any other repeatable WoCs in the last two or three releases.
Those last couple of log entries are interesting because it is just one unit involved in the loop. The DLL has code to force the game out of a loop if its due to a single stuck unit, so these log entries indicate to me that the issue does involve a python call somewhere.
Interesting. I dont have Magister's mod installed on my machine at the moment. What is special / different about those two units?
Dragon Fanatics and Wyvern Riders a have the
bAlwaysHostile tag in my modmod. Unless you have recently dealt with the C++ end of that tag, handling requests I made a long time ago, then they can cause all sorts of issues.
The big problem seems to be that bAlwaysHostile units don't count as enemies when in non-enemy cities as far as actually attacking them goes, but they do seem to count when it comes to being able to plan an attack. The attacking unit may keep trying to attack the unit in the city but never be able to complete the attack.
bAlwaysHostile units are also able to conquer rival cities and superforts without war. (I blocked this in python and gave the units the bNoCapture tag to handle it, but would prefer a more permanent solution in the DLL.)
I also made the various equipment units count as bAlwaysHostile, so that rivals could capture the equipment that has been dropped and so pick it up themselves. I have noticed that this can cause the equipment to be destroyed if it was dropped in a city and if the city was handed over to another player (usually a puppet state) upon being captured.
I already added a spell to let a unit player convert a teammate's equipment to his control so he can take it. I could easily add a similar spell to let players take unguarded equipment from their rivals.
(Honestly I'm thinking bAlwaysHostile is not the best way to handle the equipment though. I just probably just change it on my own.)
I would prefer it if the <UnitInStackPrereq> and <PromotionInStackPrereq> did not only check the player's own units, but if tags like bImmuneTeam/bImmuneNeutral/bImmuneEnemy limited what units it checked.
Doubled Immortality-granting promotions appears to cause some odd behavior. I haven't done any testing, but in my latest game one of my Adventurers is being duplicated whenever it upgrades. He currently has both Immortal from Blood of the Phoenix, and Life III. The resulting clone loses Immortal but retains Life III, I believe. Adventurers with Immortal but without Life III don't clone on upgrade.
I'll look into this.
I already added code to remove the Immoral and Life III promotions during the "And now for Something Completely Different) effect, but changing promotions for upgrading units is not something the game makes easy.
It looks like the code that removes immortal-granting promotions stops looking after finding the first one.
If worst comes to worse, I could make it so that Life III does not itself make a unit immortal but rather grants the immortal promotion too whenever it is granted, and so that the resurrection spells remove that promotion too.
Is there any particular reason the Guardian Elemental from the Tower of Elements has Hidden Nationality? The AI seems to like suiciding on them when you have Open Borders.
I used the Lair Guardian promotion for this, mostly so that the unit would not remain held if something kicked it out of the city. This promotion grants a permanent HN status because it is also used for barbarian units generated from lairs which should not be friendly to Barbarian trait civs.
Since the promotion already uses python to remove itself when the unit leaves a city or permanent improvement, I think I'll try making it apply the normal HN promotion to barbarian units instead of having HN status built in to itself.
Black Mirror-ed Great Engineers are capable of building improvements.
I'm not sure I'd consider that a problem any more than Black Mirror-ed combat units being able to attack. It would be a problem if they were able to hurry wonders, found buildings, or start golden ages, but I'm pretty sure they cannot.
In the Order vs Veil rioting event, which offers the choice between 50% removal of the selected religion, 25% of both, or tossing the rioters in the dungeon, the dungeon option was unavailable to me despite having a dungeon present. Possibly caused by the dungeon being provided by the Tower of Eyes rather than being built?
This appears to be handled around like 15775 of CvCity.cpp
Code:
//FfH: Added by Kael 09/21/2008 (so setting a buildingclass without a change number will make the event require that building to be in the city)
if (kEvent.getBuildingChange() == 0)
{
if (getNumRealBuilding(eBuilding) == 0)
{
return false;
}
}
//FfH: End Add
I'm not sure why Kael chose to use "Real" there, but it would cause the effect you describe. I'd suggest Tholal change this.