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

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

  1. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    5,250
    Location:
    Norway
    PPIO v0.6.0.4
    SVN rev.10485
    • Included SVN changes introduced since the previous version of PPIO.
    • Fixed an oversight error in barbarian civ python code related to minor civs becoming full civs and the free bonus units they get in the process.
    • Reduced the odds a bit for minor civs to become full civs.
     
    raxo2222 likes this.
  2. raxo2222

    raxo2222 Warlord

    Joined:
    Jun 10, 2011
    Messages:
    4,776
    Location:
    Poland
    @Toffer90 is it possible to make terrains section display allowed features, improvements and resources?
    Similarly features section could show allowed improvements and resources.

    Is it possible to make events visible in pedia?
     
    Last edited: Mar 25, 2019
  3. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    5,250
    Location:
    Norway
    I doubt it, but I'll look into it anyhow.
    I could perhaps make something like that, but I don't think I would be able to access the effects and requirements for events.
    It could possibly only show the event name/picture/and some of the related text...

    I'll look further into this too.
     
    raxo2222 likes this.
  4. blovdubb

    blovdubb Chieftain

    Joined:
    Feb 4, 2006
    Messages:
    67
    Location:
    Charlotte,NC
    so if i have 38.5 installed i only delete BUG Main Interface.ini? or do i still need to delete the user settings file and i have the newest vpn is that a problem? im just learning all this stuff long time civ3 mp/ amateur modder lol
     
  5. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    5,250
    Location:
    Norway
    vpn???

    VPN = Virtual Private Network

    If you meant SVN... The version of the SVN tortoise client is irrelevant.
    If you mean you have the latest SVN revision of C2C then you do not have C2C v38.5; you then have C2C revision 10495.
     
  6. Fermongu

    Fermongu Chieftain

    Joined:
    Oct 27, 2017
    Messages:
    154
    Gender:
    Male
    Latest SVN and PPIO. I got a new python error playing with "Barbarian civs" option, around half prehistoric era:

    Traceback (most recent call last):
    File "BugEventManager", line 313, in _handleDefaultEvent
    File "BarbarianCiv", line 46, in onBeginGameTurn
    File "BarbarianCiv", line 700, in checkMinorCivs
    NameError: global name 'bodStr2' is not defined
     
  7. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    5,250
    Location:
    Norway
    PPIO v0.6.0.5 ▬ Minor hotfix.
    SVN rev.10504
    • Untested fix for error reported by Fermongu.
     
    Fermongu and raxo2222 like this.
  8. Fermongu

    Fermongu Chieftain

    Joined:
    Oct 27, 2017
    Messages:
    154
    Gender:
    Male
    Two python errors playing with revolutions:

    Traceback (most recent call last):
    File "BugEventManager", line 313, in _handleDefaultEvent
    File "Revolution", line 617, in onEndPlayerTurn
    File "Revolution", line 1058, in updatePlayerRevolution
    File "Revolution", line 2295, in checkForRevolution
    File "Revolution", line 3798, in pickRevolutionStyle
    File "Revolution", line 4854, in makeRevolutionDecision
    File "Revolution", line 5753, in processRevolution
    TypeError: doRevRequestDeniedPenalty() got an unexpected keyword argument 'revIdxInc'

    Traceback (most recent call last):
    File "BugEventManager", line 313, in _handleDefaultEvent
    File "Revolution", line 6901, in onModNetMessage
    File "Revolution", line 4974, in revolutionNetworkPopupHandler
    File "Revolution", line 5753, in processRevolution
    TypeError: doRevRequestDeniedPenalty() got an unexpected keyword argument 'revIdxInc'
     
  9. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    5,250
    Location:
    Norway
    PPIO v0.6.0.6 ▬ Minor hotfix.
    SVN rev.10504
    • Untested fix for error reported by Fermongu.
      • Made some small code changes unrelated to the problem in that file, so hope I didn't break anything else as I haven't had my morning coffee.
    PPIO v0.6.0.7 ▬ Very minor update.
    SVN rev.10511
    • Updated to latest SVN, nothing of particular note to mention.
      • I updated MToS to rev 10511 recently, and it's nice to have both modmods at the same SVN rev. when making a compatibility patch for them.
    PPIO v0.6.0.8
    SVN rev.10518
    • Fixed that invisible units showed up in the unit plot list. The player should not know that there are invisible units on the same plot as its own units if they cannot be seen or attacked by any of your units.
    PPIO v0.6.0.9
    SVN rev.10518
    • Fixed build queue glitching out when clicking the graphical representation of what you are building in the queue.
    • Fixed tech bar right clicking not going to the correct pedia page.
    PPIO v0.6.0.10
    SVN rev.10525
    • Updated to latest SVN revision.
     
    Last edited: Apr 13, 2019
    KaTiON_PT likes this.
  10. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    5,250
    Location:
    Norway
    PPIO v0.6.1.0
    SVN rev.10527
    • Optimized some revolution code.
     
  11. raxo2222

    raxo2222 Warlord

    Joined:
    Jun 10, 2011
    Messages:
    4,776
    Location:
    Poland
    I like that it instantly goes to city when it runs out of things in queue instead of showing "what do you want to build" popup.

    EDIT: It looks like its case when you have "no production popup" enabled in BUG options, but you have disabled "minimize popups" in game options (one with graphics, audio and other stuff).
     
    Last edited: Apr 15, 2019
  12. raxo2222

    raxo2222 Warlord

    Joined:
    Jun 10, 2011
    Messages:
    4,776
    Location:
    Poland
    Yeah, I guess its one of those "ghostly" features, that people may not remember it exists in game.

    That feature works bit differently if you have "minimize popups" in vanilla game options enabled too.
     
  13. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    5,250
    Location:
    Norway
    PPIO v0.6.1.1
    SVN rev.10537
    • Fixed hide unconstructable buildings/units BUG option not being respected.
      • The dll was asking what the option are set to before BUG had initialized and read the values from the ini files, so it simply returned False to the dll when asked.
      • Most python files are now initialized earlier than what was the case before. Probably not possible to initialize them earlier than this without having the case where the dll and/or the exe are not ready to answers python queries during py initialization.
     
    Last edited: Apr 17, 2019
  14. Fermongu

    Fermongu Chieftain

    Joined:
    Oct 27, 2017
    Messages:
    154
    Gender:
    Male
    Yes! thank you Toffer :D
     
  15. irishhombre

    irishhombre Chieftain

    Joined:
    Oct 29, 2014
    Messages:
    141
    Gender:
    Male
    Excellent update, thank you Toffer.
     
  16. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,286
    Gender:
    Male
    Location:
    MN
    ur starting to confuse me here, i look at one modmod and the PPIO is 6.1.1 and then another modmod is 6.1.0
     
  17. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    5,250
    Location:
    Norway
    PPIO v0.6.1.2
    SVN rev.10541
    • Fixed a serious bug that I introduced in v0.6.1.1.
      • Game was unable to create new ini files within UserSettings folder without breaking down completly.
      • You would only experience this bug if you deleted your UserSettings folder.
    PPIO v0.6.1.3
    SVN rev.10541
    • Fixed an uninitialized variable error in BarbarianCiv.py (Spotted by @MattCA)
     
    Last edited: Apr 19, 2019
  18. Fermongu

    Fermongu Chieftain

    Joined:
    Oct 27, 2017
    Messages:
    154
    Gender:
    Male
    Latest SVN and PPIO. Got python errors when trying to do a manual recalc (shift+ctrl+t)

    Traceback (most recent call last):
    File "BugEventManager", line 321, in _handleConsumableEvent
    File "CvEventManager", line 359, in onKbdEvent
    File "CvEventManager", line 161, in beginEvent
    File "CvEventManager", line 2772, in __eventAwardTechsAndGoldBegin
    File "CvDebugTools", line 197, in cheatTechs
    AttributeError: 'module' object has no attribute 'getIcon'
     
  19. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    5,250
    Location:
    Norway
    PPIO v0.6.1.4
    SVN rev.10541
    • Worked on the civic screen today, managed to get a fast version working already, It's a work in progress.
      • The current version is quite simplistic.
      • I have some ideas for alternate versions of the civic tab.
      • I'll try to set up a tab, that resembles the old one, further down the road.
      • The policy tab is just broken now, as the code just leads into the ruins of the old civic screen code that I've partly demolished.
    • Partly fixed error reported by Fermongu above, it would only happen to those who use the chipotle cheat code.
      • Clicking shift+t will still cause the same error, but hitting ctrl+shift+t no longer throws the error.
      • I'll fix the true error later, shift+t is somehow related to getting/giving free techs to players with the chipotle setup.
     
    KaTiON_PT, raxo2222 and MattCA like this.
  20. Fermongu

    Fermongu Chieftain

    Joined:
    Oct 27, 2017
    Messages:
    154
    Gender:
    Male
    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
     

Share This Page