Announcement

Collapse
No announcement yet.

Need a small favour...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need a small favour...

    ... from someone with both Python and Civ4 v1.52 installed -- as ATM I don't.

    I need the pydoc information from v1.52 so I can hopefully generate a detailed change log of the Python API in the new patch. This should benefit all Python coders, as there are quite a few changes (nothing too mind-blowing but interesting enough to be aware of).

    To obtain that file, I need someone who has Python installed on his/her system, and of course also the v1.52 patch, to do the following:

    1) Open [Civ4 dir]\Assets\Python\EntryPoints\CvAppInterface.py and set PythonHelp = 1 in the init() function. Save the file (duh).

    2) Start Civ4 and begin a new game (or a savegame, whatever).

    3) Go to [Civ4 dir]\logs, you should find the file CvPythonExtensions.hlp.txt there. This is the file I need. You can attach or upload it here (or somewhere else for that matter), or email me at locutus@apolyton.net

    4) Change PythonHelp back to 0 (for a teeny tiny increase in performance).

    I would much appreciate it...
    Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

  • #2
    Ask and you shall receive . . .

    . . . text file attached.

    Thanks for keeping us updated!

    MC
    Attached Files

    Comment


    • #3
      Yay! Thanks a ton!

      I can now tell you the new patch will have 250 API changes compared to v1.52 (mostly new functions) At least, assuming the version I have now is the final one (which it almost certainly is). They're mostly not very spectacular changes, but I'm pretty sure some of the new functions will find their way into people's scripts before too long.

      I will of course post the list as soon as the patch is out, lest I not violate my NDA.
      Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

      Comment


      • #4
        Originally posted by Locutus
        Yay! Thanks a ton!

        I can now tell you the new patch will have 250 API changes compared to v1.52 (mostly new functions)
        I hope we'll have the ability to set values that are defined by XML as well as the current ability to get the values. That way we can make events in game that causes changes. For example, the min city distance is defined in XML. I'd like to have a scenarion when the number starts out as 6 and then, later in the game it drops down to 4 and then down to 2. That way there would always be new places to build cities even late in the game.

        Roger Bacon

        Comment


        • #5
          Heh, that was actually the very first thing I asked for as well, when the Firaxis folks asked me to give my thoughts on modding in Civ4 almost 2 years ago, just after they invited me to become a tester for the game

          They said, 'that's already possible', which it obvously wasn't -- they didn't quite grasp the true meaning and scope of what I was asking for. They were in some respects a bit naive about modding in those days, I had to teach them a few things there. And in reverse, I learned quite a bit from them about the challenges and restrictions involved in making a (commerical) game extremely moddable.

          And that's exactly what you just ran into: although everyone will agree that that would be great to have, implementing that would require dedicated code for every one of the thousands of XML values in the game. That would be a Herculean task that would months to implement. Firaxis could've opted to do that, but then they'd have to have dropped something else, like MP or the religion and Great People models. I don't think many of us would've like that very much. The amount of effort required to implement your suggestion is unfortunately disproportionate to the advantage it would give.

          However, many things that can't be changed directly can be done indirectly. For example, you can't directly change unit support costs in Python, but you can change the amount of gold a player has. In the Desert War scenario, I modded the gold income (and related UI elements) such that it simulates an increase in unit support cost during the Operation Barbarossa event. In similar vain, you can implement your suggestion by simply disallowing Settler units to settle within a certain radius of other cities through Python.
          Last edited by Locutus; March 18, 2006, 01:40.
          Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

          Comment


          • #6
            Originally posted by Locutus
            I can now tell you the new patch will have 250 API changes compared to v1.52 (mostly new functions)
            Without breaking the NDA, can you mention how many changes there are to the existing functions?

            Bh

            Comment


            • #7
              5 functions have been removed altogether, 11 have had changes to their arguments (as far as I could tell from CvPythonExtensions.hlp.txt -- not all arguments are documented in there -- but it can't be far off), 1 has been renamed.
              Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

              Comment


              • #8
                Ok, thanks. That's definitely a lot of new functions then. I look forward to the new options.

                Bh

                Comment


                • #9
                  Thanks Locutus
                  Gurka 17, People of the Valley
                  I am of the Horde.

                  Comment

                  Working...
                  X