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. Anq

    Anq Chieftain

    Joined:
    Apr 14, 2019
    Messages:
    80
    Gender:
    Male
    Location:
    Anser quadrupedis quackahonkahonk (whaaaaat---)
    There's a way to unload PPIO without reinstalling, first use TortoiseSVN's revert functionality, then do a clean-up with the option "Delete unversioned files and folders".

    CvCustomizableAdvisorScreen imports FontUtil, but there is no FontUtil because Toffer reworked how the special icons are presented: as a unicode character (unichr) I think.
    Replacing all instances of FontUtil.getChar with CyGame().getSymbolID may work
    Second problem, no GameUtil


    Too many things are incompatible, there is no easy conversion. FontUtil, GameUtil, save to ini, etc. I gave up trying to make a quick conversion. The answer is no for mixing the base file among the PPIO ones. The BUG components are overhauled and you'll have tons of conflict to resolve while merging.
     
    Last edited: May 14, 2019
  2. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    5,302
    Location:
    Norway
    Practically the same as reinstalling C2C, especially if you don't play from the SVN folder directly.
    Yeah... Had a feeling there was more to it than that.
     
    Last edited: Jun 14, 2019 at 10:33 AM
  3. TaylorItaly

    TaylorItaly Chieftain

    Joined:
    Oct 24, 2016
    Messages:
    53
    Gender:
    Male
    Why is your Cavemen2Cosmos.ini different to the original C2C.config.ini ?
    And if i have the original one alongside with the rest of your mod , can this cause trouble?
     
  4. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    5,302
    Location:
    Norway
    Are you talking about the "Caveman2Cosmos Config.ini" file that is located in the "\Beyond the Sword\Mods\Caveman2Cosmos" folder?
    That one is only some settings for the code that award tech bonus to players that conquer cities from a more advanced civilization.
    That file from PPIO should overwrite the one with the same name in the core C2C assets.
    Having the original one alongside this would be impossible as they have the same name and file extension, so one would have to overwrite the other.
     
  5. TaylorItaly

    TaylorItaly Chieftain

    Joined:
    Oct 24, 2016
    Messages:
    53
    Gender:
    Male
    Yeah, i mean that file.
    Of course it would overwrite it :smoke: , but only if i copy it.
    So, if i don`t like the settings of your file , and keep the C2C ini , could that cause any trouble?
     
  6. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    5,302
    Location:
    Norway
    Yeah, that would cause problems as the code would not find any of those three variables when it reads that ini file, and it won't be looking for any of the original variables either.
    The problem wouldn't be huge though, you would get some non-fatal python error messages each time you load a game or alt tab in and out of the game, at the points where the config ini is read that is.
    It would fail to read the values and would then use the default values defined in the code which are True, 0, and 2 in the respective order as seen in the config ini.

    The settings are there for you to be able to change them, you can even edit that ini while a game is running and your changes will be immediately taken into use by the game when you alt-tab into the game again.
     
  7. TaylorItaly

    TaylorItaly Chieftain

    Joined:
    Oct 24, 2016
    Messages:
    53
    Gender:
    Male
    :thumbsup:
    Thanks for clarification!!
     
  8. sorcdk

    sorcdk Chieftain

    Joined:
    Jun 26, 2014
    Messages:
    62
    Location:
    Denmark
    I have tried to run this with the latest SVN version, and using the inverse shift option (and possibly other bug options, I did not go too deeply in my tests), I experianced several bugs.
    I did 3 tests, where played at least one turn, saved the game and closed civIV between each test. I had backed up and deleted .../Mods/Caveman2Cosmos/UserSettings/* before the first test.
    The first 2 reacted as if the option was not triggered at all. I checkec that the UserSettings was generated after the second test, where they were generated (I might have checked after the first test and found them not generated, but I might remember wrong).
    The third test all the other bug options seems to have been saved, but inverse shift option was turned off. When I enabled it it still queued things in the wrong way, but it also didnt put replaced items back into the possible builds until I changed build tab.
     
  9. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    5,302
    Location:
    Norway
    The inverse shift option is not implemented in PPIO yet. Sorry.
    I'll look into that.
     
  10. irishhombre

    irishhombre Chieftain

    Joined:
    Oct 29, 2014
    Messages:
    143
    Gender:
    Male
    There is an issue with the Civics screen, I can not select Mercenaries. According my civic screen, I have no military civic at all now. Sorry for the bad image, but print screen is busted on my computer. Don't ask.
    Spoiler Screenshot :
    upload_2019-5-21_11-10-19.png
     
  11. raxo2222

    raxo2222 Warlord

    Joined:
    Jun 10, 2011
    Messages:
    4,876
    Location:
    Poland
    @Toffer90 is is possible to forcefully show all unbuildable buildings?
    That is building would remain hidden only if its either:
    - Obsolete
    - Doesn't have researched tech prereqs.
    - In case of religious building it would be hidden until its religion is researched by someone.
    - In case of -1 cost buildings if it isn't buildable by unit or if its myth/story/stories.
     
  12. raxo2222

    raxo2222 Warlord

    Joined:
    Jun 10, 2011
    Messages:
    4,876
    Location:
    Poland
    This happens if same category civics are in same columns but different techs.
    Click on page on top left to switch to other civic screen.
     
  13. irishhombre

    irishhombre Chieftain

    Joined:
    Oct 29, 2014
    Messages:
    143
    Gender:
    Male
    Okay thank you Raxo
     
  14. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    5,302
    Location:
    Norway
    What is shown in the city build selection screen is mostly handled by the dll.
     
    Last edited: Jun 14, 2019 at 10:29 AM
    raxo2222 likes this.
  15. raxo2222

    raxo2222 Warlord

    Joined:
    Jun 10, 2011
    Messages:
    4,876
    Location:
    Poland
    @Thunderbrd how hard would be to implement such function?
    It could exist as separate BUG option entry next to those "hide X stuff"

    This feature is more useful in PPIO as unbuildable and buildable stuff are separated from each other here.
     
  16. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    24,862
    Gender:
    Male
    Location:
    Las Vegas
    I'm not really sure how it goes about determining what is baseline partially visible and what is not. It's not an area I care to develop on except that I do want to add a player capacity to add buildings they wish to ignore to an optional blackout list that they can then clear or look at when they wish.
     
  17. Faustmouse

    Faustmouse Chieftain

    Joined:
    Jan 31, 2012
    Messages:
    3,490
    Are there any plans to integrate this mod (or parts of it) into the main mod?
     
  18. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    5,302
    Location:
    Norway
    Vague plans at best.

    PPIO v0.6.1.11
    SVN rev.10584
    • Adapted to latest SVN revision.
     
  19. raxo2222

    raxo2222 Warlord

    Joined:
    Jun 10, 2011
    Messages:
    4,876
    Location:
    Poland
    @Toffer90 projects have animal icons in city build screen, that is where you build stuff.
     
  20. raxo2222

    raxo2222 Warlord

    Joined:
    Jun 10, 2011
    Messages:
    4,876
    Location:
    Poland
    looks like last commit broke PPIO.
    Code:
    Traceback (most recent call last):
    
      File "CvScreensInterface", line 250, in pediaJumpToBuilding
    
      File "Pedia", line 621, in pediaJump
    
      File "PediaBuilding", line 345, in interfaceScreen
    
    RuntimeError: unidentifiable C++ exception
     

Share This Page