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

Quick Modding Questions Thread

Discussion in 'Civ4 - Creation & Customization' started by kiwitt, Jan 27, 2010.

  1. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,675
    I think it is hit by the same limit as with all other xml files, meaning max 32768 entries (non negative values for a signed 2 byte int). You will run out of memory long before hitting this limit. That is unless most styles points to the same graphics, but then what is the point?

    I'm not aware of any limits other than this and memory limitations. I would pay attention to memory usage if you want to go all out on this though. No graphics are good enough to allow a mod to become unstable due to running out of memory.
     
  2. Leoreth

    Leoreth Friend Next Door Moderator

    Joined:
    Aug 23, 2009
    Messages:
    34,995
    Gender:
    Male
    Location:
    Faraway
    I would like to run some Python code after XML is loaded (and I can call something like gc.getBuildingInfo successfully) but before actually starting a game. That is, when still in the main menu / scenario selection screen. Is that possible? Is there an event being fired after XML loading is complete, or is it possible to create and fire such an event?
     
  3. lfgr

    lfgr King

    Joined:
    Feb 6, 2010
    Messages:
    915
    You could try adding a call to python at the end of CvXMLLoadUtility::LoadPreMenuGlobals in CvXMLLoadUtilitySet.cpp.
     
    Leoreth likes this.
  4. Leoreth

    Leoreth Friend Next Door Moderator

    Joined:
    Aug 23, 2009
    Messages:
    34,995
    Gender:
    Male
    Location:
    Faraway
    Oh, good idea. That may be worth a shot.
     
  5. Leoreth

    Leoreth Friend Next Door Moderator

    Joined:
    Aug 23, 2009
    Messages:
    34,995
    Gender:
    Male
    Location:
    Faraway
    I am still tinkering with doing stuff with Python before the main menu is loaded.

    Unfortunately, I run into a NPE when trying to use the CyTranslator / CvDllTranslator class, in particular it seems that it is impossible to call getSymbolID as is happening when this class is instantiated. Is it possible at all to use this class before the main menu is loaded (and I am just a bit too early), or should I give up trying to get this to work?
     

Share This Page