Python Performance and Interface Overhaul (PPIO)

@Toffer90 is it possible to add somewhere on pedia information on when units are (force)obsoleted?

-------
Entries, that are divided by eras, could have additional category named "No era", for stuff without technology requirement.

Here are two example entries.
Spoiler :

Civ4BeyondSword 2018-09-04 15-11-22-68.jpg
Civ4BeyondSword 2018-09-04 15-11-38-15.jpg

 
Last edited:
Is it possible to have the pedia indicate buildings that are made available by a specific building?

I'm not talking of buildings that require others to be built (Drying Frame > Tannery) but rather those buildings that are buildable if one of many different buildings are available like Butchery which requires a Storage Pit or the auto-built Barter Post or the auto-built Trading Post.

Something like what's attached.
 

Attachments

  • Enabled Mockup.jpg
    Enabled Mockup.jpg
    490.1 KB · Views: 161
Is it possible to have the pedia indicate buildings that are made available by a specific building?

I'm not talking of buildings that require others to be built (Drying Frame > Tannery) but rather those buildings that are buildable if one of many different buildings are available like Butchery which requires a Storage Pit or the auto-built Barter Post or the auto-built Trading Post.

Something like what's attached.
It's possible, though it requires a surprisingly large amount of codelines to go through.
I'll create the code to see how much it will slow down the loading of building pages.
If not much, then the next update will have it.
 
Thanks for considering! Though if you see it is a lot of work or it slows down things quite considerably then don't do it.
 
Thanks for considering! Though if you see it is a lot of work or it slows down things quite considerably then don't do it.
Yeah, it's a bit of work, I'll delay that plan for some time. Work on more important stuff first.

PPIO v0.5.9.6.2.1 - Technical update
  • Most changes are unoticable in-game and hard to explain...
  • A few are not:
    • The color palette in dot map strategy interface mode (Ctrl/Alt + X) resize based on resolution.
    • There was a lot of hotkeys for scrolling units and cities that did not work and are now fixed.
      • Numpad:
        • " / * , " ▬ Scroll units on same plot as selected unit.
        • " - + " ▬ Scroll cities regardless of cities being selected or not.
      • Mouse thumb buttons scroll cities and units based on what is selected.
      • When in full city screen the left and right arrow keys scroll cities.
      • There may be more hotkeys that I'm unaware of...
      • All of these were vanilla hotkeys.
      • I'm not sure if those hotkeys work in C2C without this modmod or that I accidentally broke them in this modmod long ago.
 
Last edited:
Oh thank you for that! I use the dot map consistently.
The scaling is only based on vertical resolution.
If you use larger than 1080 pixels Y resolution, then I would appreciate a comment about if the size for the palette is good or not.
I only tested it downwards from 1080 and found the result satisfying.
 
Bug report (PPIO v0.5.9.6.2.1)

Got this when opening my capital city screen, see attached save and logs.

Python Exception.png


EDIT: For the moment I reverted back to v0.5.9.6.2.
 

Attachments

Last edited:
Not sure if this is related to PPIO but here it goes:

Game freezed once when processing a turn and this is what the PythonErr.log says:
Code:
Traceback (most recent call last):
  File "CvGameInterface", line 124, in cannotMaintain
  File "BugGameUtils", line 364, in __call__
ArgumentError: Python argument types in
    CyGlobalContext.getProcessInfo(instancemethod, instancemethod, tuple)
did not match C++ signature:
    getProcessInfo(class CyGlobalContext {lvalue}, int)

EDIT: Got this when researching plumbing:

Error.png
 
Last edited:
PPIO v0.5.9.6.3
  • Overhauled the financial advisor screen.
  • Fixed the second error reported by KaTiON_PT above.
  • No idea what caused the first error, please report it again if you still encounter it.
 
Last edited:
Bug report for PPIO v0.5.9.6.2.3
Code:
Traceback (most recent call last):
  File "BugEventManager", line 313, in _handleDefaultEvent
  File "CvEventManager", line 1544, in onBuildingBuilt
UnboundLocalError: local variable 'CyCityEnd' referenced before assignment
 
Got this error on autorun
Traceback (most recent call last):
File "BugEventManager", line 313, in _handleDefaultEvent
File "CvEventManager", line 1532, in onBuildingBuilt
UnboundLocalError: local variable 'iCityStartID' referenced before assignment

Game progressed normally.
 
Ok, I fixed both of your errors, they were related to building the Appian Road in a city that could not be 100% connected by road to two other cities within the same nation.
Kation could only connect to 1 city while you raxo could not connect to even one, hence the slightly different errors you got.

I'll upload the fix now along with an acceptable financial advisor screen overhaul.
 
Not sure if this is a bug per se but if you chain a monastery the building list is "updated", as in those spaces that are made in replacement of queued buildings are removed.
 
Not sure if this is a bug per se but if you chain a monastery the building list is "updated", as in those spaces that are made in replacement of queued buildings are removed.
The only reason to update the city tabs for buildings is if selecting a building that could potentially exclude others like with the group wonders.
The only good way I found in code for identifying the group wonders was that they are defined as specialBuildings in xml.

There are a few regular buildings that are also defined as specialBuildings, like most of the religious buildings.
I guess I could also add in a check for which city tab is currently open and in that way exclude the regular buildings tab from that tab refresh.
Though the caveat is that there is technically no problem to design regular buildings as group wonders in xml, they would appear in the regular building list and operate like national wonders even though they are not defined as national wonders.

To do so one would need to have this in:
CIV4SpecialBuildingInfos.xml
<iMaxPlayerInstances>1</iMaxPlayerInstances> # Group Wonder

and this in:
CIV4BuildingClassInfos.xml
<iMaxGlobalInstances>-1</iMaxGlobalInstances> # Not a World Wonder
<iMaxTeamInstances>-1</iMaxTeamInstances> # Not a Team Wonder
<iMaxPlayerInstances>-1</iMaxPlayerInstances> # Not a National Wonder

For the particular building.

The value of <iMaxPlayerInstances> within a SpecialBuildingInfos entry is not accessible to python atm.
 
PPIO v0.5.9.6.2.3.1
  • Polished financial advisor screen a bit.
    • Moved building expenses from the middle panel over to the right panel.
It is kinda buggy - got this error
Spoiler :

Civ4BeyondSword 2018-09-09 10-31-03-29.jpg



Your modmod somehow make game unstable, if multithreading is on - try running 100 turns on Ultrafast with and without your modmod.
Multithreading itself doesn't destabilize game in normal conditions, only when using your modmod.
I suspect multithreading derails itself on DLL - Python interference, when your modmod is present.
Maybe recent changes to DLL causes instability in your modmod?

That is game crashes frequently if I leave multithreading on and your modmod is installed.
<Define>
<DefineName>NUM_CITY_PIPELINE_THREADS</DefineName>
<iDefineIntVal>4</iDefineIntVal>
</Define>

I committed change to 1 of this define yesterday and crashes stopped.
There are no crashes without your modmod and with multithreading.

Rightclicking culture wonder doesn't work:
Spoiler :

Civ4BeyondSword 2018-09-09 13-29-54-71.jpg



Some another random error (game continued normally):

Traceback (most recent call last):
File "BugEventManager", line 313, in _handleDefaultEvent
File "CvEventManager", line 879, in onCombatResult
UnboundLocalError: local variable 'X' referenced before assignment

Another one
Traceback (most recent call last):
File "BugEventManager", line 313, in _handleDefaultEvent
File "CvEventManager", line 2496, in onCityDoTurn
ZeroDivisionError: integer division or modulo by zero
 
Last edited:
Back
Top Bottom