Does it break anything, short of some extra visibility?
Thank you for your great work. This really narrows down the cause of the problem. Fixing it is much easier once the cause of the issue is identified rather than just the end result.I have done some looking.
As you surmised, the bug occurs when weather features are applied in between a player's turns. When a weather feature is applied, a unit is still able to see tiles on the other side of the weather (screenshot 0001). When the unit then moves away, the game expects that visibility should have been being blocked by the weather, and therefore increases it to compensate (screenshot 0002), resulting in the tile becoming permanently visible.
This does not occur when the unit moves near to a weather tile, as the visibility reduction is correctly applied (screenshot 0003).
Forest chopping alone would not be sufficient to trigger this bug, as the bug relies on a prior visibility reduction having failed to be applied correctly. I couldn't test whether this bug can occur by having a forest grow while within sight of a unit, due to the rarity and unpredictability of forest growth.
I think if it happens to the AI, then the visible plot will be used for AI planning because it's visible. However unless you happen to end your turn with a ship at precisely that plot, it will be very unlikely that the AI will change behavior just because it can see a plot of water. The same is true for a human player. A few plots might not be covered by fog of war when they should, but that's not the same as you will change strategy.Does it break anything, short of some extra visibility?
Hi all,
in my current game there are no wild animals at all. Neither on land nor in the ocean. I'm playing Louis de Frontenac an a gigantic map and the year is 1570 ...
In the game settings you can select "No wild animals on land/water", but i've not checked this option.
Is there a trigger then wild animals show up?
Well, It's not like I am the best person to answer these questions or anything. It won't break a save game. It will only take effect, I believe, if you happen to be at the less than five turns into the game stage, and it's not going to retroactively throw in extra animals to make up for lost spawns. And for some reason it took me until 1583 yesterday before I saw my polar bear roaming the desert border, even on '0', so maybe there is a bug; but I didn't really pay overt attention before.Will it take affect only if you start a new game? Or also if you change it and load a already saved game?
No there is no bug in there to my knowledge.And for some reason it took me until 1583 yesterday before I saw my polar bear roaming the desert border, even on '0', so maybe there is a bug; but I didn't really pay overt attention before.
Since the last update the King ever refuses to grant troops in the diplomacy screen. Has something been changed in the DLL?
I have done some looking.
As you surmised, the bug occurs when weather features are applied in between a player's turns. When a weather feature is applied, a unit is still able to see tiles on the other side of the weather (screenshot 0001). When the unit then moves away, the game expects that visibility should have been being blocked by the weather, and therefore increases it to compensate (screenshot 0002), resulting in the tile becoming permanently visible.
This does not occur when the unit moves near to a weather tile, as the visibility reduction is correctly applied (screenshot 0003).
Forest chopping alone would not be sufficient to trigger this bug, as the bug relies on a prior visibility reduction having failed to be applied correctly. I couldn't test whether this bug can occur by having a forest grow while within sight of a unit, due to the rarity and unpredictability of forest growth.
I have enough money but he does not grant anything - also at the beginning when the relationship is very good.
int CvPlayerAI::AI_militaryHelp(PlayerTypes ePlayer, int& iNumUnits, UnitTypes& eUnit, ProfessionTypes& eProfession)
{
FAssert(GET_PLAYER(ePlayer).getParent() == getID());
iNumUnits = 0;
eUnit = NO_UNIT;
eProfession = NO_PROFESSION;
if (AI_getAttitude(ePlayer) < ATTITUDE_CAUTIOUS)
{
return -1;
}
CvPlayer& kPlayer = GET_PLAYER(ePlayer);
int iBestValue = MAX_INT;
for (int i = 0; i < GC.getNumUnitClassInfos(); ++i)
{
UnitTypes eLoopUnit = (UnitTypes) GC.getCivilizationInfo(kPlayer.getCivilizationType()).getCivilizationUnits(i);
if (eLoopUnit != NO_UNIT)
{
CvUnitInfo& kUnit = GC.getUnitInfo(eLoopUnit);
if (kUnit.getDomainType() == DOMAIN_LAND && kPlayer.getEuropeUnitBuyPrice(eLoopUnit) > 0)
{
// ERIK: TODO: Find out how to check for combat / armed units
bool bValid = (kUnit.getCombat() > 5);
/*
for (int j = 0; j < GC.getNumPromotionInfos() && !bValid; ++j)
{
if (kUnit.getFreePromotions(j))
{
bValid = true;
}
}
*/
if (bValid)
{
int iValue = kPlayer.getUnitClassCount((UnitClassTypes) i);
if (iValue < iBestValue)
{
iBestValue = iValue;
eUnit = eLoopUnit;
}
}
}
}
}
if (eUnit == NO_UNIT)
{
return -1;
}
iNumUnits = 1;
eProfession = (ProfessionTypes) GC.getUnitInfo(eUnit).getDefaultProfession();
return kPlayer.getEuropeUnitBuyPrice(eUnit) * GC.getDefineINT("KING_BUY_UNIT_PRICE_MODIFIER") / 100;
}
Ah ok I undstand.I added that "quick hack" to work around the king offering Medics (due to them having medic 3 which is OP btw)
It is not only the "European Line Infantery". There are many more "Experts for Military Professions".I agree that it was an unforeseen consequence that the European infantry is now a profession rather than a unit which breaks this check.
@devolution: I will take care of this and try to improve the logic, if you do not mind.The code however could have an "OR" checking for the Combat Strength of the Units Default Profession.
Go aheaddevolution: I will take care of this and try to improve the logic, if you do not mind.
It is fixed, tested and committed.Go ahead![]()
Nope, no evil medics with their devlish poison !.. and hopefully no medics![]()