Python Performance and Interface Overhaul (PPIO)

Would it be possible to have a setting that autosaves always at the end of the turn, directly after pressing enter?

Hi Snofru1. It is already possible to autosave at the end of each turn, using values in a file called "CivilizationIV.ini" that (at least in Windows 10) you should find in your "Documents" folder, sub-folder "My Games", sub-folder "Beyond The Sword". In Windows explorer, the file name will show as "CivilizationIV" and the "Type" as "Configuration Settings" (with the internal file type of ".ini").

In this file, there should be 4 lines with text like:
; The maximum number of autosaves kept in the directory before being deleted.
MaxAutoSaves = 100

; Specify the number of turns between autoSaves. 0 means no autosave.
AutoSaveInterval = 1

I copied the text above from my own file, where I have set the autosave interval to 1 (which is what you are asking for), and the maximum number of autosave files to to 100 (meaning the 101st oldest autosave file will automatically be deleted when the latest file is autosaved - pick your own number, preferably a little lower than the normal interval when you do manual saves. This also saves garbage cleanup of possibly several thousand autosave files at the end of a game.

Oops, forgot to mention you will need a standard text editor like Windows Notepad, or (better yet) an open-source download - I use and recommend "Notepad++"
 
@SirJohnEh: That will only save at the beginning of the turn, Snofru wants it to save at the end of each turn.

PPIO v0.5.9.7.9.2
SVN rev.10303
  • Another performance oriented update.
  • Tweaked the BUG autosave coding.
    • Added a save late in turn autosave option in BUG options.
    • Added a turn interval option that is applied to the above option.
  • Fixed an error in BUG options that made it impossible to change the ini files if the ini files were created in that same game session
    • BUG option changes wouldn't be saved unless the game was restarted once after the ini file was created.
    • That deep BUG coding for file handling and options can be quite cryptic and convoluted, it's a wonder I figured out what was wrong.
I could make it autosave directly before you hit end turn...
Wasn't as easy as I thought, I settled with having the autosave happen at the point when the evil eye turns green for the first time in a turn.
 
Last edited:
@Toffer90 you can't lookup building chains bottom up, if there are OR requirements of building.
Z needs X OR Y -> X and Y won't show, that they are needed for Z in pedia.

Spoiler :

Civ4BeyondSword 2018-12-07 15-14-55-05.jpg
Civ4BeyondSword 2018-12-07 15-15-18-41.jpg
Civ4BeyondSword 2018-12-07 15-16-12-05.jpg

 
Concerning the bug in BUG ( :lol: ): Is that related to the observation that you need to save twice before BUG changes are remembered?
BUG options are in no way tied to the save file, they are only stored in the ini files, saving the game has no impact on the saving of BUG options whatsoever.

BUG options are in core C2C stored 4 times a second all the time.
BUG options are in PPIO only stored once when you click the exit button within the BUG option screen.
 
I don't understand the problem? What should I look at in those screenshots?
That Central Breeder - Horse doesn't say it is needed for Horse Trainer - it is one of OR prereqs, while Horse Trainer says it needs Central Breeder - Horse as one of OR prereqs.

And similarly with Horse Trainer, that it doesn't say it is required to train Tamed Horse, while on Tamed Horse it is shown, that it needs Horse Trainer.
Stables, forges, offices and other with replacement chain won't show some of buildings in "Required to build: " section as they often are OR prereq.
 
That Central Breeder - Horse doesn't say it is needed for Horse Trainer - it is one of OR prereqs, while Horse Trainer says it needs Central Breeder - Horse as one of OR prereqs.

And similarly with Horse Trainer, that it doesn't say it is required to train Tamed Horse, while on Tamed Horse it is shown, that it needs Horse Trainer.
Stables, forges, offices and other with replacement chain won't show some of buildings in "Required to build: " section as they often are OR prereq.
So you are asking if I can add another bar at the bottom of the building pedia page containing icons of the buildings that are unlocked by the building?
 
So you are asking if I can add another bar at the bottom of the building pedia page containing icons of the buildings that are unlocked by the building?
Yes, no matter if they are mandatory (AND requirement) or are one of alternatives (OR) requirement.
That is Z needs X AND Y
Z needs X OR Y
Then in both cases X and Y would display that it is needed for Z.
 
Yes, no matter if they are mandatory (AND requirement) or are one of alternatives (OR) requirement.
That is Z needs X AND Y
Z needs X OR Y
Then in both cases X and Y would display that it is needed for Z.
It would be more correct to say:
if Z needs X AND/OR Y
Then in both cases X and Y pedia pages should display that they unlock Z​

I don't like the idea much, first of all it's a lot of code and work to get it working, secondly it may confuse players who looks at building X in pedia to see that it unlocks building A, B, C, D, etc. when most of those buildings probably requires more buildings than just X.
A third point is that a pedia page should not contain too much information as it may become tiresome to take in all that info (readability).
There are cases of buildings that occur as a requirement for a lot of other buildings in one way or another and there will be no way to indicate in the display what kind of requirement the building X counts as for A, B, C.... (OR to what and AND to what).
 
Last edited:
It would be more correct to say:
if Z needs X AND/OR Y
Then in both cases X and Y should display that Z needs them...​

I don't like the idea much, first of all it's a lot of code and work to get it working, secondly it may confuse players who looks at building X in pedia to see that it unlocks building A, B, C, D, etc. when most of those buildings probably requires more buildings than just X.
A third point is that a pedia page should not contain too much information as it may become tiresome to take in all that info (readability).
There are cases of buildings that occur as a requirement for a lot of other buildings in one way or another and there will be no way to indicate in the display what kind of requirement the building X counts as for A, B, C.... (OR to what and AND to what).
I can see what you mean. Can sometimes get a bit too complex and I was thinking similarly, like you don't want to say it definitely does need this building anywhere because if it can use a different prereq it can lead to false bug reports.
 
So lets say if X and Y are OR requirements for 10 buildings, then X and Y won't show, that they are needed to build those 10 buildings.
But 10 buildings will list X or Y as their building requirements.

This could be solved like this:
X may be needed to build those buildings
 
So lets say if X and Y are OR requirements for 10 buildings, then X and Y won't show, that they are needed to build those 10 buildings.
But 10 buildings will list X or Y as their building requirements.

This could be solved like this:
X may be needed to build those buildings
At least it's good wording resolution but it doesn't fix the fact that it would be hell to program to setup and could also become overwhelming. But It's a good resolution to the definitive wording issue yes.
 
Okay, so I turned on the "highlight Python errors" option, as you suggested, but that only led to the game freezing when loading up a new game (I don't have any saves)
 
Okay, so I turned on the "highlight Python errors" option, as you suggested, but that only led to the game freezing when loading up a new game (I don't have any saves)

Check your Logs folder to see if there's any heavy files in there, it sounds like it's stuck on an infinite loop.
 
This could be solved like this:
X may be needed to build those buildings
That would fit better in the large middle panel to the left in building pedia pages.
The text lines within that panel are constructed within the dll, I can't change the content of it in this modmod, it would be a dll project.
Okay, so I turned on the "highlight Python errors" option, as you suggested, but that only led to the game freezing when loading up a new game (I don't have any saves)
Are there any python errors logged in the PythonErr.log file found within the logs folder (check root folder of C2C)?
 
I copied all the contents of the latest SVN copy into a folder named Caveman2Cosmos in the \steamapps\common\Sid Meier's Civilization IV Beyond the Sword\Beyond the Sword\Mods\ folder. Then I took the contents inside "PPIO v0.5.9.7.9.2 in a" and pasted them in Caveman2Cosmos, overwriting the files that had identical names and folder paths. I also did this with 2 other modmods, Custom Civilizations and Sword of Gedemon Soundtrack Mod.
 
I also did this with 2 other modmods, Custom Civilizations and Sword of Gedemon Soundtrack Mod.
The order in which this was done may matter and it sounds like there may be a conflict between one of those and this one, which modmods are prone to having (another reason to get this in the core asap.)
 
I copied all the contents of the latest SVN copy into a folder named Caveman2Cosmos in the \steamapps\common\Sid Meier's Civilization IV Beyond the Sword\Beyond the Sword\Mods\ folder. Then I took the contents inside "PPIO v0.5.9.7.9.2 in a" and pasted them in Caveman2Cosmos, overwriting the files that had identical names and folder paths. I also did this with 2 other modmods, Custom Civilizations and Sword of Gedemon Soundtrack Mod.
Are you sure the three modmods don't contain any overlapping files?
There may also be more complex incompatibilities even if there are no overlapping files between the modmods.
 
Back
Top Bottom