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

Upgrading Units

Discussion in 'Civ 4 - K-Mod: Far Beyond the Sword' started by Alrik2002, Dec 8, 2013.

  1. Alrik2002

    Alrik2002 Warlord

    Joined:
    May 24, 2012
    Messages:
    214
    Location:
    Berlin, Germany
    Hi Karadoc,

    I´ve seen that you´ve find a way to avoid the python callback to get the cost for upgrading units. Since I would like to add a wonder, which gives a discount on upgrading units and it uses python (in CvGameUtils.py), I believe I have to reactivate the callback.

    I´ve already found the code I have to change back but before I do it, I have the following questions:
    1. Is something elste in K-Mod depending on the new structure of upgrading units?
    2. Where there any bugs so you decided to change the original code or was it just for performance?
    3. In your opinion, is reactivating a big deal for the performance or will it slow the game just a little bit?

    Thank you for your answers.
     
  2. Alrik2002

    Alrik2002 Warlord

    Joined:
    May 24, 2012
    Messages:
    214
    Location:
    Berlin, Germany
    Hi karadoc,

    I´ve seen, that I just have to activate the callback USE_UNIT_UPGRADE_PRICE_CALLBACK. Then it works.

    What I don´t understand is how this worked before your change. This callback didn´t exist before in the pythoncallbackdefines.xml. Why have you added it, if you don´t use it?

    Would it be better for the performance to undo all of your changes in this point or just set the callback to active?

    Thx
     

Share This Page