Python Performance and Interface Overhaul (PPIO)

Several python errors with last PPIO:

- On mod start (repeats 3-4 times):

Traceback (most recent call last):
File "BugEventManager", line 308, in _handleDefaultEvent
File "CvEventManager", line 200, in onWindowActivation
File "CvScreensInterface", line 1302, in lateInit
TypeError: __init__() takes exactly 2 arguments (1 given)

- On load a save (I think):

Traceback (most recent call last):
File "BugEventManager", line 308, in _handleDefaultEvent
File "CvEventManager", line 585, in onLoadGame
File "CvEventManager", line 475, in gameStart
AttributeError: BugEventManager instance has no attribute 'mapBuildingType'

- when trying to open civics screen (don't work, it doesn't open):

Traceback (most recent call last):

File "CvScreensInterface", line 1046, in handleInput

File "CvMainInterface", line 5434, in handleInput

File "CvScreensInterface", line 104, in showCivicsScreen

KeyError: 9
ERR: Python function handleInput failed, module CvScreensInterface
Seems like he forgot a file :p
 
Hello, maybe this file "EntryPoints/CvScreensInterface.py"
Add this change to Line 1302:
Now it works.
Those icon bars could be moved to left, and civics, that aren't unlocked yet would be greyed out just like unbuildable buildings.
Also pedia entries could be placed to right.
 
Several python errors with last PPIO:

- On mod start (repeats 3-4 times):

Traceback (most recent call last):
File "BugEventManager", line 308, in _handleDefaultEvent
File "CvEventManager", line 200, in onWindowActivation
File "CvScreensInterface", line 1302, in lateInit
TypeError: __init__() takes exactly 2 arguments (1 given)

- On load a save (I think):

Traceback (most recent call last):
File "BugEventManager", line 308, in _handleDefaultEvent
File "CvEventManager", line 585, in onLoadGame
File "CvEventManager", line 475, in gameStart
AttributeError: BugEventManager instance has no attribute 'mapBuildingType'

- when trying to open civics screen (don't work, it doesn't open):

Traceback (most recent call last):

File "CvScreensInterface", line 1046, in handleInput

File "CvMainInterface", line 5434, in handleInput

File "CvScreensInterface", line 104, in showCivicsScreen

KeyError: 9
ERR: Python function handleInput failed, module CvScreensInterface
Lol, I forgot to include one of the files I changed. Will fix asap.
Hello, maybe this file "EntryPoints/CvScreensInterface.py"
Add this change to Line 1302:
Exactly the change I forgot to add to the new upload. ^^

Edit:
Re-uploaded PPIO v0.6.1.4. I forgot to include a file.
 
Looks better to have them mid adjusted, if there's enough civics in a category then you will be able to scroll horizontally, then the civics will start from the far left, and the category header will repeat itself to the right for every X interval so that you don't scroll away from the category header.
I was planning to add a big red cross over the ones you cannot choose.
Some of the civic icons are quite grey in design, so graying them out wouldn't be visible at all.
Not sure what you mean there, you can get to the pedia entry by right clicking the civic buttons.
Red cross is fine too.

Also I meant, that you could read about civic without right-clicking.
 
Red cross is fine too.

Also I meant, that you could read about civic without right-clicking.
As I said when announcing the last update, I will be making another tab that resembles the old civic screen closer.
This is more of a "glance" tab that is supposed to be clean and simple, there's simply not enough dedicated space for any text windows in this tab, especially considering that the rows of civic icons can be "infinity" long.
No matter how many new civics are added this screen will display them all correctly. With the exception of MAF crash due to too many interface elements loaded at once.

Attached a picture of how it may look like with crossed out unavailable civs.
 

Attachments

  • 8800_20190421175450_1.png
    8800_20190421175450_1.png
    392.3 KB · Views: 246
As I said when announcing the last update, I will be making another tab that resembles the old civic screen closer.
This is more of a "glance" tab that is supposed to be clean and simple, there's simply not enough dedicated space for any text windows in this tab, especially considering that the rows of civic icons can be "infinity" long.
No matter how many new civics are added this screen will display them all correctly. With the exception of MAF crash due to too many interface elements loaded at once.

Attached a picture of how it may look like with crossed out unavailable civs.
Ah so that is fine.
 
PPIO v0.6.1.5
SVN rev.10541
  • Refined the new civic screen a bit.
    • It is now obvious which civics that are unavailable due to unfulfilled prereqs.
  • Optimized the code for the civic screen, like cleaning up memory usage when closing the screen, etc.
Edit: { Next version is around the corner and will have this (see picture) alternative civic screen.
You can switch between the two display layouts by clicking the scroll button in the upper left corner.

The game will remember which layout you used last even after exiting to desktop.
Civic screen Layout B.png }
 
Last edited:
Very nice.
 
PPIO v0.6.1.6
SVN rev.10541
  • Added a new civic screen layout.
    • I feel finished with the civic screen now, I will of course fix bugs if they show up.
    • The policy tab will be made at a much later point, got to figure out what kind of layout that would make sense for it first.
 
Last edited:
PPIO v0.6.1.7
SVN rev.10545
  • Minor behavioral tweaks to the text based civic screen
  • I also added a compare functionality to it
Good job at civic screen :D.

Also @Dancing Hoskuld wanted to do something with it.
I guess he still can suggest changes to it as he wanted to do some changes.

Here I started in Ancient era to show how it looks with couple of civics already unlocked.
Spoiler :

Civ4BeyondSword 2019-04-22 11-49-42-83.jpg
Civ4BeyondSword 2019-04-22 11-49-47-20.jpg

Civ4BeyondSword 2019-04-22 11-49-59-49.jpg
Civ4BeyondSword 2019-04-22 11-50-03-73.jpg

 
PPIO v0.6.1.8
SVN rev.10551
  • Minor tweaks to building pedia pages code.
    • Mostly performance related.
If anyone have UserSettings files generated on an old version of PPIO (like v0.6.1.4 or older), then I recommend that you delete your UserSettings folder and let it autogenerate with defaults (just start/load a game).
Some really odd bugs can occur when there's old junk data in the UserSettings ini files.
 
Last edited:
PPIO v0.6.1.9
SVN rev.10551
  • Fixed a packing mistake I made, where I managed to pack one of the MToS-PPIO compatibility patch python files into the PPIO mod.
    • Was a pretty important python file, CvEventManager.py.
    • This will fix not getting tribal guardian in first city and not getting free gatherer when researching gathering; as well as some other minor stuff.
 
Last edited:
PPIO v0.6.1.10
SVN rev.10551
  • Fixed unit action buttons not appearing when:
    1. Premise: Nothing selected
    2. First select city
    3. then select unit before un-selecting the city.
    4. Result: No unit action buttons....
  • Fixed units with national limits not reappearing in the build list when they should, like after planting a city with a tribe unit; or after removing a unit with national limit from the build queue.
 
Last edited:
Using latest SVN 10573 and your modmod.
Had a crash to desktop.
Seems it is realalted to your mod , as someone without your mod was able to end that turn,see post 3569 at Single Player Bugs.
 
Not a simple matter.

You can alternately use shift or alt key when selecting cities to select multiple cities (alt to select all cities shift to add one city to the selection), and it's also possible to save the selected city group to a number key (ctrl+number).

Sorry for the late reply, but I've tried this, and it works nicely for some of the cases, but for others it doesn't. My gameplay experience with this mod is a little different -- I usually build a ton of cities and then sit around building and teching just for the fun of it (trying to build everything everywhere). Hence, I often need to select a group of cities to, for example, rush-buy something (for instance, I have a 100 cities, 10 of those have weak production, and I want to rush-buy a building in there, while other cities build the same building at an ok pace). For this case selecting cities each turn manually by shift-clicking is too much of a chore.

So I want to ask -- is it possible for me to temporarily switch off this mod through a configuration change (completely switch it off, not partially), to perform this specific task, then switch it back on to continue playing? (I'm aware this would require restarting the game)
 
Using latest SVN 10573 and your modmod.
Had a crash to desktop.
Seems it is realalted to your mod , as someone without your mod was able to end that turn,see post 3569 at Single Player Bugs.
Saw the discussion, someone (Anq) with PPIO reported to have played your save without problems, so I suppose the problem is on your side. Not much I can do without any error logs nor directions on how to replicate the crash.
Edit: I loaded your save and played two turns just fine with PPIO.
Sorry for the late reply, but I've tried this, and it works nicely for some of the cases, but for others it doesn't. My gameplay experience with this mod is a little different -- I usually build a ton of cities and then sit around building and teching just for the fun of it (trying to build everything everywhere). Hence, I often need to select a group of cities to, for example, rush-buy something (for instance, I have a 100 cities, 10 of those have weak production, and I want to rush-buy a building in there, while other cities build the same building at an ok pace). For this case selecting cities each turn manually by shift-clicking is too much of a chore.

So I want to ask -- is it possible for me to temporarily switch off this mod through a configuration change (completely switch it off, not partially), to perform this specific task, then switch it back on to continue playing? (I'm aware this would require restarting the game)
You could try to revert the domestic advisor to the old one, but turning off PPIO can only be done through re installing C2C completely.
Spoiler To use the old domestic advisor you would need to make a few changes: (I can't promise that this will work) :
"...\Beyond the Sword\Mods\Caveman2Cosmos\Assets\Python\EntryPoints\CvScreensInterface.py"
line 1284 ▬ import CvDomesticAdvisor
→ import CvCustomizableDomesticAdvisor​

line 1296 ▬ CvDomesticAdvisor.CvDomesticAdvisor(DOMESTIC_ADVISOR)
→ CvCustomizableDomesticAdvisor.CvCustomizableDomesticAdvisor()​

Then go into your SVN folder at "YourPathToSVN\Assets\Python\Screens" and find the original CvCustomizableDomesticAdvisor.py file.
Copy that file into your working copy (the one you play from), which should be in "YourInstallPath\Beyond the Sword\Mods\Caveman2Cosmos\Assets\Python\Screens"

This may work, but it's quite possible that I forgot about some details that are important to this.
 
Last edited:
Back
Top Bottom