Unofficial Patch for 3.19

No, the human is not moved to the end. Player #5 is ;)

Better said, between points 13 and 17, all of the AI play one turn as far as I could detect it ( this mainly by queue analysis, but also by troop movement ). This strongly points to the turns starting with 6 ( the colony ) to 17 and then 0 to 5.

P.S This really needs debug analysis, but i'll not not do that at 1:30 AM ;)
 
I modified CvEventManager to report on player/game turns and saw some interesting results. I loaded the save and hit end turn. Everything looks great for turn 752.

Code:
End player 4 turn 752
End player 5 turn 752
End player 7 turn 752
End player 8 turn 752
End player 9 turn 752
End player 10 turn 752
End player 11 turn 752
End player 12 turn 752
End player 13 turn 752
Player 14 Chinese attacks Player 4 a bunch of times
End player 14 turn 752
End player 15 turn 752
End player 16 turn 752
Player 17 Korean attacks Player 4 a few times
End player 17 turn 752
End player 18 turn 752
End game turn 752

On the next turn, England (0) frees their colony to create player 6, and here's where things go off the rails. Play first jumps from player 0 to player 6, skipping 1-5.

Code:
Player 6's alive status set to: 1
Team 6 becomes a Vassal State of Team 0
End player 0 turn 753
End player [B]6[/B] turn 753
End player 7 turn 753
End player 8 turn 753
End player 9 turn 753
End player 10 turn 753
End player 11 turn 753

But after player 11 goes the game really gets screwy and jumps back to player 1, but it doesn't continue up to 5. No no, take a look.

Code:
End player [B]1[/B] turn 753
End player 2 turn 753
End player [B]12[/B] turn 753
Player [B]13[/B] Civilization Persian Empire Unit Knight was killed by Player 4
End player [B]3[/B] turn 753
End player [B]13[/B] turn 753

Notice that somehow player 13 attacked player 4 during player 3's turn. :confused: Play continues from 13 up through 18 before it is now the human's turn again. Notice that turn 753 has not ended yet and player 5 hasn't had a turn yet either.

Code:
End player 14 turn 753
End player 15 turn 753
Player 16 Mongolian attacks Player 4 a couple of times
End player 16 turn 753
End player 17 turn 753
End player 18 turn 753

Here I simply end the turn for the human to let the madness continue. Players 4 and 5 get their turn 753, but then players 6-18 get another crack at turn 753 for good measure.

At this point we return to the normal universe: turn 753 ends, players 0-3 take their turn 754, and it's now player 4's turn 754.

Code:
End player 4 turn 753
End player 5 turn 753
End player 6 turn 753
End player 7 turn 753
End player 8 turn 753
End player 9 turn 753
End player 10 turn 753
End player 11 turn 753
End player 12 turn 753
End player 13 turn 753
End player 14 turn 753
End player 15 turn 753
End player 16 turn 753
End player 17 turn 753
End player 18 turn 753
End game turn 753
End player 0 turn 754
End player 1 turn 754
End player 2 turn 754
Player 3 Egyptian attacks Player 7 once
End player 3 turn 754

I ended the turn to see what happens, but the next round went exactly as above.

The only part that is messed up is turn 753 from the point where England splits off the colony. Some players get two turns, but everyone eventually gets a turn. Once the game turn ends, however, everything goes back to normal. :goodjob:

Was this game started under 3.17? Can someone that still has 3.17 try it and see what happens? If you can, copy CvEventManager to your CustomAssets/Python folder and add these two bold lines:

Code:
	def onEndGameTurn(self, argsList):
		'Called at the end of the end of each turn'
		iGameTurn = argsList[0]
		[B]CvUtil.pyPrint("End game turn %d" % iGameTurn)[/B]
		
	def onEndPlayerTurn(self, argsList):
		'Called at the end of a players turn'
		iGameTurn, iPlayer = argsList
		[B]CvUtil.pyPrint("End player %d turn %d" % (iPlayer, iGameTurn))[/B]
 
Yes, I have seen this happen before ... civs fill in dead player slots a lot in my Revolution mod. This multiple turn thing seems crazy, but its true!

The root of the problem before came from the fact that CvPlayer::init() calls CvPlayer::setAlive(true). Inside this function there's the following snippet (broken on to multiple lines for convenience):

Code:
	if (GC.getGameINLINE().isMPOption(MPOPTION_SIMULTANEOUS_TURNS) 
		|| [B](GC.getGameINLINE().getNumGameTurnActive() == 0) [/B]
		|| (GC.getGameINLINE().isSimultaneousTeamTurns() && GET_TEAM(getTeam()).isTurnActive()))
	{
		setTurnActive(true);
	}

Last time I ran into this, I was creating a new rebel civ in between player turns and so no one's turn was active. This caused the new civ's turn to be set active based on the code above. Then, once that happened the game let all the civs with higher player numbers have a second play for the turn.

It's a weird bug.

So, are colonies created while the motherland civ's turn is still active? It seems so from EF's log above, so we may have a different cause of the same symptoms here ... not sure.
 
But why the bouncing around? And how do we correct this?

So this isn't caused by 3.19? It worked before because new colonies could only appear at the end of the list of players?
 
To fix this bug, I would suggest simply moving the call to AI_doSplit() from CvPlayerAI::AI_doTurnPost to the very end of CvPlayerAI::AI_doTurnUnitsPost.
 
honestly - why fix it! This is a delightful bug that we should all enjoy!
 
What is the current best approach?

Play the BTS version 3.17 and the .21 unofficial patch? at least for now? which is what I have,

and wait a bit until BTS version 3.19 gets a new unofficial patch?

or play BTS 3.19 with no unofficial patch applied is better?
 
What is the current best approach?

Play the BTS version 3.17 and the .21 unofficial patch? at least for now? which is what I have,

and wait a bit until BTS version 3.19 gets a new unofficial patch?

or play BTS 3.19 with no unofficial patch applied is better?

I would go BTS 3.19 + BBAI 0.77
 
Hi

I'm not sure if this is an issue or not. It could just be me BUT I think one of the UP's did a lil tweak to make the forest heavy starts less ridiculous and now with 3.19 it seems like starts of like ALL but 1 or 2 tiles being forrrested are back.

Kaytie
 
I would recommend BTS 3.19 and BBAI 0.78 ... which will be posted in the 12 hours.

I might take a look at that. Right now I play 3.17 + BAT 1.2 (Graphics but includes BUG) + UP 0.21 + Blue Marble.

I guess I am thinking that to evolve from this go to 3.19 with a (needed?) new UP and that other mods are compatible with 3.19. Is anybody looking at or working on a 3.19 UP? Or is it obsolete at this point? Does not seem to be completely clear yet.
 
:stupid:
We should PM the mods and get them to switch stickys so the most current version is up top. As the format is right now, it probably is confusing.
 
Thanks again for looking in to the colony problem, but whilst I'm on a roll...

Has anyone else not always been getting a "The enemy has been spotted near..." message? Seems to happen for some SoDs stationed next to one of my cities, but in an other civs culture, and always for horseman and knights (perhaps it's problem with the mounted units?) which still remain unspotted even if they then cross in to my culture. Save and screenshot attached.

Thanks.
 

Attachments

  • Civ4ScreenShot0000.JPG
    Civ4ScreenShot0000.JPG
    137.7 KB · Views: 386
  • BTS Saves.zip
    2.7 MB · Views: 280
Another bug I have found in 3.19: Mass upgrade isn't working properly. Even when I have enough money to upgrade all units in the map, pressing "ALT + upgrade" only upgrades a few ones. Has anyone experienced this?

(Edited) I have attached a savegame. I'm trying to upgrade ALL riflemen (10) to infantry and I have enough money.
  • When I do ALT + upgrade selecting the rifleman in Amsterdam, only 5 riflemen are upgraded
  • When I do ALT + upgrade selecting the rifleman in Lagos, 9 riflemen are upgraded

This behaviour is very odd...

EDIT: Removed the savegame because I'm out of quota
 
Another bug I have found in 3.19: Mass upgrade isn't working properly. Even when I have enough money to upgrade all units in the map, pressing "ALT + upgrade" only upgrades a few ones. Has anyone experienced this?

Note that you cannot upgrade units outside of your culture and units which haven't got movement points left. Another reason that you cannot upgrade is because the area where you're trying to upgrade isn't connected to the right resources.

If all of this isn't the case, then upload a savegame so that the issue can be tracked down.
 
Note that you cannot upgrade units outside of your culture and units which haven't got movement points left. Another reason that you cannot upgrade is because the area where you're trying to upgrade isn't connected to the right resources.

If all of this isn't the case, then upload a savegame so that the issue can be tracked down.

No, it's not the case. All the units to upgrade have movement points left, they are inside my borders, I have enough money and I'm trying to upgrade riflemen to infantry so resources are not an issue.

I have posted a savegame on my previous post.
 
Top Bottom