Announcement

Collapse
No announcement yet.

Python/XML Scripting

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

  • Python/XML Scripting

    What does everyone in here think of the announcement that scripting through Python will be available for things like combat, AI, etc.?

    I think it (obviously) opens up a whole new realm of possibilities when it comes to modding the game, for which there is a large community in the Civ world.

    Hopefully practically everything will be moddable through Python, as that is the best way to both tweak things in-house and allow modders the greatest flexibility.

    Let's hope things work out.

  • #2
    Wasn't Jeff Briggs the one that said "scripting only makes it possible for players to create bugs" or something like that?

    I hope the attitude at Firaxis has changed.

    Comment


    • #3
      It was Mike Breitkreutz. I don't remember the exact quote, but it was something like "I don't believe in giving user scripting languages because the only additional power they give is the power to create bugs".

      Well, that's great news, as it will mean Civ4 will be about as moddable as CtP2 .
      Solver, WePlayCiv Co-Administrator
      Contact: solver-at-weplayciv-dot-com
      I can kill you whenever I please... but not today. - The Cigarette Smoking Man

      Comment


      • #4
        Yup. Mike is working on Pirates (at the moment).

        Comment


        • #5
          Python?

          Does that mean the game will be written in Python for a 20x performance hit?



          XML, on the other hand, can be an interesting vehicle.
          (\__/) 07/07/1937 - Never forget
          (='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
          (")_(") "Starting the fire from within."

          Comment


          • #6
            I hope there will still be an intuitive editor to do the things the Civ3 and Civ2 editors do, and maybe you should be able to create a customized editor from scratch to more conveniently do the things you like to do. And it would be nice to be able to create a customized startup options sequence.

            Comment


            • #7
              I know this is an old thread, but the title describes pretty well what I want to ask: I am currently going a year on "folkehøyskole", a Nordic thing where you learn something you are interested in without any pressure of homework, grades etc. I am attending IT and we can here choose some things that we want to learn in addition to the HTML, C++, Linux and so on. And I thought I'd check out Python since Civ4 will have that programming language. So, I just wondered what you guys thought would be a good strategy? Aside from the basics, what should I focus on? I guess some things will be more important than others...
              Do not fear, for I am with you; Do not anxiously look about you, for I am your God.-Isaiah 41:10
              I praise you because I am fearfully and wonderfully made - Psalms 139.14a
              Also active on WePlayCiv.

              Comment


              • #8
                Thread necromancy seems to get ever more popular these days...

                I haven't done much Python yet, somehow it always unsettles me that logical constructs are done via indentation of the code (ifs for ex.). In a way it keeps your code kind of readable, but it's strange if you come from C++ or PHP like I do...

                Other than that, you will need the basics unless you already have some programming knowledge. Apart from that, the things you will want to focus on depend on what parts of the game you will want to work on.

                And that's the hard part: we have no idea yet what the API for Python modding will look like, so it's possible a lot of the functionality you need is already implemented and you mostly need to put together existing function calls, and add any really specific functionality yourself. I think file/IO aspects are important, as you will always need those - beyond that, it really depends...

                If you want to work on the AI, you will need in-depth knowledge of the language as a whole (contructs, string handling, tables, etc.) to build something that doesn't hog too much resources. But as I said, 80% of what you need to learn depends on the available API.

                ...and btw, I hope they will include a good reference for developers in there. I remember Etherlords - great potential via the LUA scripting language, but near to no reference: that ruined modding completely.
                "Give me a soft, green mushroom and I'll rule the world!" - TheArgh
                "No battle plan ever survives contact with the enemy." - Murphy's law
                Anthéa, 5800 pixel wide extravaganza (french)

                Comment


                • #9
                  I have no experience in programming at all, but I hope to understand something... But it sounds from what you write that AI is nothing for me then...

                  Heh... It would be nice to be able to do something with the game, I hope I have the brains for this...
                  Do not fear, for I am with you; Do not anxiously look about you, for I am your God.-Isaiah 41:10
                  I praise you because I am fearfully and wonderfully made - Psalms 139.14a
                  Also active on WePlayCiv.

                  Comment


                  • #10
                    Don't worry - start with the basics, and then just start modding and see how it works. You will always find some people here who are willing to help if you are stuck
                    "Give me a soft, green mushroom and I'll rule the world!" - TheArgh
                    "No battle plan ever survives contact with the enemy." - Murphy's law
                    Anthéa, 5800 pixel wide extravaganza (french)

                    Comment


                    • #11
                      Originally posted by Nikolai
                      And I thought I'd check out Python since Civ4 will have that programming language. So, I just wondered what you guys thought would be a good strategy?
                      from our civ4 section
                      Python has been added as a scripting language (and a powerful one at that), which will allow modders to add events to the game, change game rules, change the User Interface, modify the map generation algorithm, etc.
                      Co-Founder, Apolyton Civilization Site
                      Co-Owner/Webmaster, Top40-Charts.com | CTO, Apogee Information Systems
                      giannopoulos.info: my non-mobile non-photo news & articles blog

                      Comment


                      • #12
                        Wohoo MarkG, nice Avatar
                        "Give me a soft, green mushroom and I'll rule the world!" - TheArgh
                        "No battle plan ever survives contact with the enemy." - Murphy's law
                        Anthéa, 5800 pixel wide extravaganza (french)

                        Comment


                        • #13
                          Originally posted by AeonOfTime
                          Thread necromancy seems to get ever more popular these days...
                          Great definition! ROTFL!
                          "We are reducing all the complexity of billions of people over 6000 years into a Civ box. Let me say: That's not only a PkZip effort....it's a real 'picture to Jpeg heavy loss in translation' kind of thing."
                          - Admiral Naismith

                          Comment


                          • #14
                            Well, what can I say, Mike Breitkreutz is surely one of those "uber-programmers" who think everyone around are just idiots who don't understand the importance of his work.
                            Have been working with such as I am a programmer myself.

                            I can say that I will be all-in for modding this and I have the expierence and knowledge for it.

                            Also, Trip, if there are any other people in Firaxis who don't think volunteeristic modding can lead to anything good, let them visit Paradox Entertainment Forums and see what "user-developer interaction" and "powerful modding" mean.

                            Each game of the historical simulation series [Crusader Kings, Europa Universalis(2), Victoria, Hearts of Iron(2)] has it's own community-made mods which actually are the most played versions of those games, one of the best examples being AGC-EEP mod for EU2.


                            At least from what's breedin in SMACX community, it seems we will be aiming for something similar if Firaxis doesn't plan SMAC2 in near future.
                            -- What history has taught us is that people do not learn from history.
                            -- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

                            Comment


                            • #15
                              How to Think Like a Computer Scientist -- Learning with Python

                              This is an excellent guide for learning programming in genernal and Python in particular. I'd expect that the first 10 chapters and appendix A would be most useful if you want to learn it specifically for Civ4. If you're more/also interesting in programming in general the other half of the book is a definite recommended read as well.

                              (And no, this does of course not include any Civ4-specific info such as the API but you can't use the API until you learn the basics anyway, and this is probably one of the best possible places to start learning the basics)
                              Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                              Comment

                              Working...
                              X