RevolutionDCM for BTS

Cool, I'll change that. That's certainly the smarter way to go, and I can go through the code and do that.
Just be aware that you are invalidating all savegames with that (replacing bool member variables with int).

Chagneplayer: if one python module causes trouble in another python module, then I think that's a bit out of my league. I can still try though.
tomorrow.
 
No - I was/am pretty sure I fixed the popups from appearing in AI Autoplay. You've updated to the latest version, right? Which popups are appearing, Barbarian Civ one's, or Revolution ones?

It appeared that this was indeed fixed in rev 544 but the changes were reverted back to the prior code in rev 547. If you diff the Barbarian.py and Revolution.py files between the two revs, you'll see it.

Cheers,
ripple01
 
Just be aware that you are invalidating all savegames with that (replacing bool member variables with int).

Yeah, that'll break save games, but that is not an issue here. 2.8 will be a benchmark release, and all benchmark releases of RevDCM have broken previous save game compatibility. The way I did it was not to change m_bUpgradeAnywhere, as I'd have bools everywhere that needed to be changed to ints. Instead I changed CvPlayer::setUpgradeAnywhere to CvPlayer::changeUpgradeAnywhere, and added a new variable m_iUpgradeAnywhereCount that kept track of the count, but set m_bUpgradeAnywhere to true if it was greater then 0, and false otherwise. I suppose I could throw an assert in there just to ensure that m_iUpgradeAnywhereCount isn't less then 0 or greater then 3, as that should be impossible, but I don't see how that could happen...
 
It appeared that this was indeed fixed in rev 544 but the changes were reverted back to the prior code in rev 547. If you diff the Barbarian.py and Revolution.py files between the two revs, you'll see it.

Cheers,
ripple01

Who reverted my code!
 
Sorry, was me when implementing the fixes in BarbCiv.py, and Revolutions.py must have reverted that code unwittingly.

Edit: Of course I must ask though, do you really not want AIAutoplay to break when revolutions occur? Could make bug hunting more difficult. Also isn't this a Revolution.ini option?
 
Other then some .isAlive() and valid player ID checks (within 0 and max players), which were needed do to bughunting, I can find no difference in the last merge and the current one in Revolution.py, StartAsMinors.py or BarbCiv.py. I don't think any Revolution pop ups were changed...
 
Edit: Of course I must ask though, do you really not want AIAutoplay to break when revolutions occur? Could make bug hunting more difficult. Also isn't this a Revolution.ini option?

The popups for revolutions will still appear if you turn file debugging on. ;)

Just be sure you don't remove my changes again - it's a one line change in Revolution.py, and 2 lines in BarbarianCiv.py
 
Listen Phungus, Afforess, Fuyu, Mamba, Ripple brilliant stuff keep it up. You've lost me :) Accidents happen and Phungus admits it and it get's sorted. I cannot believe how much Phungus has learned about computer science considering that he has no background in it (Economics?) :goodjob: The bugs are tricky and Jdog will be the first to admit that he learned a lot implementing Revolutions in Python back in the early days (something he would not do again). All this information on the forum is invaluable so thanks! When civ5 comes, at least there will be something written down to assist those few left behind on civ4 like myself will be.

I've heard from Jdog as you guys probably have. He's doing well and the big house move from one end of the country to the other is finished. He's got a heck of a lot of real life issues though. For the mean time work on Civ is taking a back seat until he can get the issues sorted. He is in the same boat as myself and phungus. We need new computers to run civ5 but new computers are not in the budget(Economics!).

Cheers
 
phungus, when I load your autosave the game ends the turn on its own and I end up in turn 61 (1560BC), where switching to the germans causes no errors at all.

If that's AIAutoplay, how do I stop it?
 
Do you have python exceptions turned on? This bug is very easy to reproduce, and eventually causes a crash on my computer, so this is wierd. I have able to reproduce it 100% of the time by having barbarian civs turned on, then when a new barb civ spawns, if I switch to one of these newly spawned civs I get a key error, and multiple python errors, and if I continue to try to play it out the game will hang.
 
I have a PythonErr.log file, it's just empty.

If you can give me a ready-to-debug savegame, that would be nice. Maybe you still have teh autosave from one turn before AutoSave_BC-1600.CivBeyondSwordSave ?
But I guess I could just try to recreate it on my own, revdcm + barbarian civs + switch to whatever spawns.
 
That save throws an error for me when I load it up and switch to the germans. I'll create another one using RevDCM, since I've significantly changed the LoR code base (wrote some GG AI logic last night so that they will actually attach GGs to legends, in the current BBAI code the AI never even considers attaching a general to a unit unless it feels threatened).
 
OK, just updated the RevDCM SVN, so ensure you update as save game compatibility was lost (fixed the boolean traits so they are removed properly as per your advized method). Load the save, go into debug mode, and change your player to Holy Rome, also ensure you have python exceptions on in your Civ4 ini file; if I remember right the python error log wol't always log python exceptions if this option isn't on. And thanks again for having a look at this, I'm unable to work on the last remaining issues as they all revolve around changePlayer, so I need to figure something out here first.
 
@glider

I've been trying forever to figure out how the Revolutions Information (mainly that bar in the city screen) is created and displayed. I can't figure it out, could you tell me what specific functions this uses so I could manipulate it?
 
CvPlayer::init vs CvPlayer::initInGame
The NonStateReligionCommerce and UpgradeAnywhere handling is missing from initInGame, is that intentional?

edit: Assuming it isn't, I added it there.
Also I don't get any errors with changeplayer switch to Holy Roman, python or otherwise, with or without HidePythonExceptions off.

Whatever error you get, you'll have to find out what it is on your own. You can show me logs or a screenshot of the popup though, maybe I can still see something.
 
CvPlayer::init vs CvPlayer::initInGame
The NonStateReligionCommerce and UpgradeAnywhere handling is missing from initInGame, is that intentional?

No, if all other traits or civics are loaded in CvPlayer::initInGame and these are not, this is an oversight, probably the same one that caused the crash in CvInitCore::getCiv since the game would be looking up a nonexistant player that exists anytime changePlayer is executed.
 
No, if all other traits or civics are loaded in CvPlayer::initInGame and these are not, this is an oversight, probably the same one that caused the crash in CvInitCore::getCiv since the game would be looking up a nonexistant player that exists anytime changePlayer is executed.
I could not follow your from initInGame to changePlayer but I must simply assume you know that code better than me.

So, des any of this explain why I get no python errors from your save?
 
No, and I could be completely wrong, I just know Thomas said that that could cause a crash, and it sort of makes sense, better theory then anything else. As far as the key error, if you're in debug mod, and switching, and your python exceptions are on, and your'e not getting any errors, I don't know. I'll need to start a thread on this in the python/SDK forums I guess.

My question though is, can you play forward as the switched to civ without a hang occuring after a couple dozen turns? If you switch to a player, then switch out of them and get them killed (naturally not via WB, though WBing units and AI DoWs is fine, jsut the killing blow be natural), will that run normal as well? Doing that on my comp hangs for the former, and will crash for the latter.
 
I can try the former (is AIAutoplay good enough?), and for the latter does it matter if the killer is human or AI?
 
Back
Top Bottom