1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Python Performance and Interface Overhaul (PPIO)

Discussion in 'C2C mod mods' started by Toffer90, Jul 7, 2017.

  1. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    7,201
    Location:
    Norway
    PPIO v0.5.9.8.1
    SVN rev.10329
    • Traits pedia pages will now display help and strategy text if defined for the trait; as per TB's request.
    overview.jpg
    Strategy and help text will be filled in a panel in the upper right corner of the page, if there is no text the panel will not be made as seen in the screenshot.
    I expect all traits should have a strategy entry at some point.​
    The regular pedia text panel was previously where Strategy and Help text is now.
    Moved to the right of the effect panel.
    I don't really expect all traits to have a regular pedia text.​
    "Effect" panel will stretch to cover the "Pedia text" panel area if there is no pedia text for the trait.
    I expect all traits to have at least 1 effect.​
    If a trait for some reason does not have any effects then it should have a pedia entry that explains the point of it.
    The pedia text panel will then stretch to cover the effect panel area.​
     
    KaTiON_PT likes this.
  2. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    28,058
    Gender:
    Male
    Location:
    Las Vegas
  3. Harrier

    Harrier Deity

    Joined:
    Feb 19, 2002
    Messages:
    2,416
    Location:
    UK
    GOG.com sell the "Civ4 Complete Edition", currently on sale less 75%. £3.78 normally £15 in the UK..
     
    Last edited: Dec 17, 2018
  4. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    7,201
    Location:
    Norway
    PPIO v0.5.9.8.2
    SVN rev.10329
    • Overhauled terrain pedia pages.
      • Not that big a difference from how it was, just a bit better use of the extra space.
     
    raxo2222 likes this.
  5. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,810
    Location:
    Poland
    Can those list buildings, that require such terrains in vicinity?
     
  6. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    7,201
    Location:
    Norway
    PPIO v0.5.9.8.3
    SVN rev.10329
    • Added a "Buildings enabled" row at the bottom of the terrain pedia pages.
     
    Snofru1 and raxo2222 like this.
  7. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,810
    Location:
    Poland
    Something like that could be done for features too :)

    This list is very cool - you can see some space related buildings too.
     
  8. KaTiON_PT

    KaTiON_PT Emperor

    Joined:
    Jan 2, 2010
    Messages:
    1,090
    Location:
    Portugal
    And it saves you some work when validating stuff @raxo2222
     
    raxo2222 likes this.
  9. Fermongu

    Fermongu Warlord

    Joined:
    Oct 27, 2017
    Messages:
    195
    Gender:
    Male
    Last SVN and PPIO 0.5.9.8.2. I get this error entering military advisor:

    Traceback (most recent call last):

    File "CvScreensInterface", line 1059, in handleInput

    File "CvMainInterface", line 5430, in handleInput

    File "CvScreensInterface", line 135, in showMilitaryAdvisor

    File "CvMilitaryAdvisor", line 154, in interfaceScreen

    File "CvMilitaryAdvisor", line 195, in UL_refresh

    File "CvMilitaryAdvisor", line 235, in UL_refreshUnitSelection

    File "UnitGrouper", line 399, in processUnit

    File "UnitGrouper", line 428, in _processUnit

    KeyError: 3
    ERR: Python function handleInput failed, module CvScreensInterface
     
  10. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    7,201
    Location:
    Norway
    PPIO v0.5.9.8.4
    SVN rev.10333
    • Fixed the military advisor BUG reported above by Fermongu.
    PPIO v0.5.9.8.5
    SVN rev.10333
    • Small tweak to city wall layout.
      • The way it was (due to PPIO) looked ridiculous when I was watching idioticult1mara stream C2C.
     
    raxo2222 and KaTiON_PT like this.
  11. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,810
    Location:
    Poland
    It would be nice if pressing Backspace moved page back in pedia - just like pressing "Back"

    Also Feature entries could list buildings, that need such features in vicinity.
     
  12. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    7,201
    Location:
    Norway
    You can move page back with three buttons already...
    • Mouse thumb button, the one closest to you.
    • A
    • Left arrow
    Isn't that enough?
     
    Last edited: Dec 20, 2018
  13. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,810
    Location:
    Poland
    I didn't knew about those.
    Mouse thumb button is unreliable though - this one seems to need to be double clicked and when hovering over list.
     
  14. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    7,201
    Location:
    Norway
    PPIO v0.5.9.8.5
    SVN rev.10333
    • Made the tooltip that is close to the mouse darker on request from @IdioticUlt1mara
    • Figured out a hack to be able to set the city screen camera FoV to a constant value.
      • The city screen FoV should always have the same value regardless of what FoV is in use on the map.
      • Previously one would have to scroll forth and back once between two cities to get the correct FoV in the city you first entered.
      • I call it a hack because when the exe tells python that city Z has just been entered; the FoV currently in use by the map camera is the one that has been set for the city screen camera, and the city screen camera won't change its FoV after it has been set.
        • Therefore my solution was, when the exe just proclaimed that city Z has been entered, to order the exe to exit city Z, then tell the exe that the FoV has changed to a constant value meant for the city screen camera, and at last I tell the exe that city Z has just been entered.
      • It's not an elegant solution, but the elegant solution could only be placed in the exe code that we cannot mod.
      • Why it is not elegant: The city camera, among other things, will be set up twice every time a city is entered. First time with the wrong FoV, then the city is exited and the city camera removed, then the FoV is changed, then the City camera is set up again with the correct FoV. It doesn't cost many nano seconds, but is is code that does something wrong that has to be corrected by later code.
    That is caused by an exe limitation.
    Mouse events don't get reported to python if the mouse is above a UI panel that could potentially have a scroll bar (doesn't matter if the scroll bar is hidden), the panel will consume any and all mouse clicks so that they are never reported to python as having been clicked.
    This is probably because the panel scroll bar can be controlled by the mouse wheel if the mouse is above the panel, so the exe has a simplified code that consumes all mouse signals when the mouse is above the panel.

    It's this logic: the user interaction has been handled at this point, so there is no reason to report the interaction event down the hierarchy chain (meaning dll and python).

    PPIO v0.5.9.8.6
    SVN rev.10333
    • Rewrote the "Feature" pedia page code so that it is similar in layout and content as the terrain pedia pages.
      • Yes raxo, that means it will now show buildings that are enabled by the feature. ^^
     
    Last edited: Dec 20, 2018
  15. irishhombre

    irishhombre Prince

    Joined:
    Oct 29, 2014
    Messages:
    502
    Gender:
    Male
    Location:
    Rannoch, Perseus Veil
    Awesome update. :thumbsup:
     
  16. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,810
    Location:
    Poland
    @Toffer90 it would be nice if units listed from what units they are upgraded.
     
  17. sorcdk

    sorcdk Chieftain

    Joined:
    Jun 26, 2014
    Messages:
    75
    Location:
    Denmark
    After installing this modmod and deleting the userSettings directory, I started to run into some errors. When I load a game the bug settings are reserved to defaults, even if I make a new save and change the bug settings before saving. When I try to start a new game, I get a crash to desktop when I click past the, by the way here are the settings you have set this game to go with window, while I can also see some error message before clicking it the window away that it failed to locate the bug settings file.
    Note that this is for the v38.5, and that things seem to work now that I restored the userSettings directory. I couldn't find any information on how to deal with this, thoughbI find this tread way too long to manually read through for some solution.
     
  18. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,810
    Location:
    Poland
    Don't delete UserSettings if you are using V38.5
     
  19. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    7,201
    Location:
    Norway
    Yeah... I updated the opening post now, so that it is more clear what v38.5 players should do when installing the modmod.
    I tend to forget about the v38.5 edition of the modmod...
     
  20. KaTiON_PT

    KaTiON_PT Emperor

    Joined:
    Jan 2, 2010
    Messages:
    1,090
    Location:
    Portugal
    Toffer do you still have that post you once made that presented a way to solve the bark (bonus) -> bark (promotion) issues in the Civopedia?
     

Share This Page