I've been doing quite a bit of that during this whole cycle actually. And there's a few things to bring up that need repairing that I've waited for the freeze to mention because I believe I mentioned them before:
![]()
and
![]()
Just a few references being called in the XML that don't exist anymore. Not causing a crash on load but they come up EVERY time I run the debugger which is a lot these days...
As a note, there's also something wrong with the numUnitCount and numVisiblePlots (or something like that) in the AI codes that takes place a lot as soon as games develop to where AI's are on the scene. I've tried taking a look but I don't understand that region too well. I suspect it may be wrapped up into the 'Sometimes Invisible units that should still be invisible are being detected when they shouldn't be' bug.
Also: I have a few known longstanding bugs I'm going to be attempting to resolve. Last night I filtered through my list to pick those out as 'the things to focus on now'. We have a less bugged version than most have been already, but there's still some longstanding issues to address.
Sadly, OOS problems are likely to continue to be an issue for this release though.
The first two are really simple to fix, so long as I know what the correct targets are for that XML. The next two have been around forever and Koshling said he didn't know what was causing them, so I wouldn't worry too much about them.
@Dancing Hoskuld
1. In civpedia when I click on the Vanilla resource I get a messed up pedia page.
2. Where did the Armadillo and Opossum go? They seem to have diapered from the game.
Where did you get the Event info from??
@Hydro:
The Flamingo is upside down and backwards.It must have wandered too far into the Salt Flats and died or something.
"Error in BeginPlayerTurn event handler <bound method Revolution.onBeginPlayerTurn of <Revolution.Revolution instance at 0x1D2858A0>>"
Not sure if that's related or something else entirely.
My current game freezes when ending the turn.
The only way I'm able to continue playing I've found so far is to either delete a few (2) of Alaric's cities or most of his units.
It also seems to continue if the city of Scandza is subdued by an agent and falls back to the Goths, whereas in that process I'm again at war with them.
I'm normally playing on v27 release, but have also tried with the newest SVN version (4622), which didn't solve the issue. Though I'm receiving an error log message with the newest SVN just before the game freezes:
"Error in BeginPlayerTurn event handler <bound method Revolution.onBeginPlayerTurn of <Revolution.Revolution instance at 0x1D2858A0>>"
Not sure if that's related or something else entirely.
About the Tunnel problem I see two possible solutions though how easy they would be to implement I don't know:
Both require an "give promotion while on a tunnel plot or an improvement" that all land based units can have, but is removed when no longer on said plot.
1. If possible to add it to the road improvement a Spy or Special Invisibility promotion comes into effect while on the plot. Special would be needed so units meeting each other in sea tunnels can fight each other. It might be needed to have something enabling them to move along the tunnel even through enemy boats though, that might be the trickiest part.
2. If not possible to add it to a road improvement then make the Tunnel a dual build improvement, making a Tunnel as well as a sea improvement (or feature if that's better) that then grants the invisibility promotion.
The problem with moving through enemy boats that are on the surface is another matter and probably the most difficult one to solve.
Cheers
This is such an excessive amount of missionaries - since they cost $1 a turn and he just has them sentry there like a .
Notice he has another small pack of them to the north west too. Also, the fact that a great prophet is sitting there on that horse tile undefended, and a great general amongst this pack of missionaries undefended is worrying..
Earlier in the game the greeks wandered a great merchant through my territory - I could have easily picked it off with a rogue since it was undefended. AI need to be told to guard there great people/generals.
Spoiler :![]()
We need the PythonErr.log (not PythonErr2.log) from that game to isolate the cause. It will tell us which line in the Revolution code (Revolution module) the problem is occurring.
Traceback (most recent call last):
File "BugEventManager", line 363, in _handleDefaultEvent
File "Revolution", line 566, in onBeginPlayerTurn
File "Revolution", line 998, in checkCivics
AttributeError: 'NoneType' object has no attribute 'getDescription'
[0640] 4 of 15 -- AI Promote
[0640] 11 of 15 -- AI Promote
[0640] 1 of 15 -- AI Promote
[0640] 5 of 15 -- AI Promote
It is attempting to identify the civics that the revolutionary group should select. This could mean that the leader of the revolutionary group has a preferred civic that does not exist but probably not, I think those would show up as XML errors. OK perhaps I should look at the codeThe PythonErr.log contains the following entries:
Code:Traceback (most recent call last): File "BugEventManager", line 363, in _handleDefaultEvent File "Revolution", line 566, in onBeginPlayerTurn File "Revolution", line 998, in checkCivics AttributeError: 'NoneType' object has no attribute 'getDescription'
RevEvents.recordCivics( iPlayer )
if (kPromotion.isBlitz())
{
//ls612: AI to know that Blitz is only useful on units with more than one move now that the filter is gone
if (GC.getUnitInfo(eUnit).getMoves() > 1)
{
if ((eUnitAI == UNITAI_RESERVE ||
eUnitAI == UNITAI_ATTACK ||
eUnitAI == UNITAI_ATTACK_CITY ||
eUnitAI == UNITAI_PARADROP))
{
iValue += (10 * iMoves);
}
else
{
iValue += 2;
}
}
else
{
iValue += 0;
}
}
if (kPromotion.isBlitz())
{
//ls612: AI to know that Blitz is only useful on units with more than one move now that the filter is gone
if ([COLOR="Red"]iMoves [/COLOR]> 1)
{
if ((eUnitAI == UNITAI_RESERVE ||
eUnitAI == UNITAI_ATTACK ||
eUnitAI == UNITAI_ATTACK_CITY ||
eUnitAI == UNITAI_PARADROP))
{
iValue += (10 * iMoves);
}
else
{
iValue += 2;
}
}
else
{
iValue += 0;
}
}
int iMoves;
if (pUnit == NULL)
{
iMoves = kUnit.getMoves();
}
else
{
iMoves = pUnit->baseMoves();
}
And more importantly, it seems the game is stuck in an endless loop concerning AI Promotions. At least the "RandomLogger - Player 0 - Set xx.log" file is continually being filled with entries like
Code:[0640] 4 of 15 -- AI Promote [0640] 11 of 15 -- AI Promote [0640] 1 of 15 -- AI Promote [0640] 5 of 15 -- AI Promote
I've terminated the game after the log file had reached 100 MB.
Actually I've now hit this freeze 3 times in this specific game. The first time I was able to work around by deleting all units of one specific Goth city, the second time, which is my original post, I'd deleted basically ALL of the Goth's units (and gave back after that turn), and now I've just hit the third occasion where the game freezes and fills up the log file with AI Promotion entries.
I have no idea how to fix this besides AGAIN deleting units...
I have a weak theory as to what MAY be causing that second issue there with promos but it is decidedly a longshot.
On some code review, the ai will use this a lot as build choices and tech selections are going to cycle through all units and check various promotion values. It's not just used for the units to determine their own promo choices. Makes that whole section a bit heavy and there was one spot I was wondering about that might be a bit 'off' in the way it processes depending on the circumstances and that I've patched in the code on my end and will be available on the next update.
For ls612's sake I'll explain the change:
Spoiler :This is what you had. This is the minor change I've adjusted it to:Code:if (kPromotion.isBlitz()) { //ls612: AI to know that Blitz is only useful on units with more than one move now that the filter is gone if (GC.getUnitInfo(eUnit).getMoves() > 1) { if ((eUnitAI == UNITAI_RESERVE || eUnitAI == UNITAI_ATTACK || eUnitAI == UNITAI_ATTACK_CITY || eUnitAI == UNITAI_PARADROP)) { iValue += (10 * iMoves); } else { iValue += 2; } } else { iValue += 0; } }
This is because iMoves is defined above with:Code:if (kPromotion.isBlitz()) { //ls612: AI to know that Blitz is only useful on units with more than one move now that the filter is gone if ([COLOR="Red"]iMoves [/COLOR]> 1) { if ((eUnitAI == UNITAI_RESERVE || eUnitAI == UNITAI_ATTACK || eUnitAI == UNITAI_ATTACK_CITY || eUnitAI == UNITAI_PARADROP)) { iValue += (10 * iMoves); } else { iValue += 2; } } else { iValue += 0; } }
They did this because there are a few ways this segment may be processed and some of those ways involve not having an actual in-game unit defined but rather only the unit type itself. If that second case is in play, the GC.getUnitInfo(eUnit).getMoves() could cause some issues. I kinda doubt this is actually the problem being reported here but its the only theory I can come up with based on any recent changes to that segment. Haven't been many of late.Code:int iMoves; if (pUnit == NULL) { iMoves = kUnit.getMoves(); } else { iMoves = pUnit->baseMoves(); }
I've made a lot of mistakes figuring this out about the unit references in this section but they always led to crashes I spotted in playtesting after adjustments were made which is why I kinda doubt this is the issue. I'm thinking if it was truly problematic it would be causing a CTD.
More likely, we probably have some kind of repeated over-evaluation taking place on the build selections or tech choices somewhere and it's checking this function a lot as a result. Unfortunately, that would be a lot harder to find!
On a side note, I'm not sure that getMoves is quite the right reference for an actual unit either... but I haven't looked that deeply at it yet. I'm not sure if its the actual move maximum the unit currently has or if its the base moves unmodified by other sources like existing promos and such.