Announcement

Collapse
No announcement yet.

Tips From a Firaxian on Modding XML and Python

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

  • Tips From a Firaxian on Modding XML and Python

    Hey guys, just wanted to give you all a heads up on some modding stuff.

    Changing the XML and Python is very powerful and can be VERY rewarding. You can do a lot with it, but you have to be very careful.

    My advice, and please heed it well:

    Test after every change and make many backups!

    It is very easy to mess something up and spend hours trying to figure out what is wrong. If you only make SMALL changes and verify those work and keep backups you can avoid such issues from coming up.

    It's easy to say to oneself "oh, it's just a few changes, it should work" - and end up trying to fix a crash for hours. It could be something as simple as a typo, but if you make a lot of changes before testing you'll never know.

    Anyways, just giving a bit of advice to you guys. I'd rather you not have to learn this sort of thing the hard way like I and others have.

    Now go wild.

  • #2
    Hey trip - thanks for the advice.

    Now for something more complex.

    How do i got about adding a "plant forest" feature and a ZOC ala Civ2 style for forts?




    Comment


    • #3
      Re: Tips From a Firaxian on Modding XML and Python

      Originally posted by Trip
      Test after every change and make many backups!
      Duly noted. Thanx for the heads up, Trip!


      D

      Comment


      • #4
        Originally posted by MattPilot
        Hey trip - thanks for the advice.

        Now for something more complex.

        How do i got about adding a "plant forest" feature and a ZOC ala Civ2 style for forts?
        ZOC can be done by checking every time a unit moves, and if it moves next to a fort with an enemy unit in it you can subtract move points.

        You can easily add forest features to a plot (yes, its name is "plot" not "tile" ). Hooking that up to a Worker action may be harder, but we're all creative here, eh?

        As far as the specifics... what, you think I'm just sitting around doing nothing waiting for something to do?

        Comment


        • #5
          Speaking of testing the scripts, I have received conflicting information, so I'd really like to know for sure, because I've looked and looked but found nothing.

          Is there, or is there not a python console accessible from the within the game (US retail version)? If so, how can I get at it? [pretty-please-with-a-cherry-on-top]

          Given that it is mentioned in the config file, I suppose I could use the HAP remote debugger to inspect and modify the game's state, and generally try things out but I would first like to know for sure.

          Comment


          • #6
            If it's there (and I can't imagine it isn't), it's Shift-~.
            Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

            Comment


            • #7
              Doesn't appear to do anything. Thanks anyway.

              Comment


              • #8
                Have you set the cheat code in the .ini?

                Comment


                • #9
                  Doesn't work either way.

                  Comment


                  • #10
                    Trying both ` and ~ doesn't work? Could it have anything to do with the keyboard? (possibly you're not using a American version?)

                    Let me try this with v100 when I get home later.

                    Oh, on an unrelated note:
                    A pet peeve of mine - there's no such thing as Shift ~. The key by itself is ` and thus hitting Shift is what gives you the ~. It would be like saying Shift !

                    Comment


                    • #11
                      You're right of course. It's just that noone ever ever uses the ` for anything (why is it on keyboards exactly?), so in my mind that's just the ~ key
                      Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                      Comment


                      • #12
                        On a French keyboard, ~ and `are quite far away...
                        `is useful in certain languages like LISP, or simply in shell.
                        For instance in shell:
                        for i in `cat ~/toto`
                        do
                        something $i
                        done
                        will repeat something over the contents of the file toto. Need the backquote for that, and it comes really handy. I use that almost everyday at work.
                        Clash of Civilization team member
                        (a civ-like game whose goal is low micromanagement and good AI)
                        web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

                        Comment


                        • #13
                          OK, with the appropriate cheat code rather than just "1" (q.v. Friday's edit of the WBS Manual thread) it works.


                          Thanks for the help and sorry for the trouble.

                          Now I can get serious
                          Last edited by Fruny; November 1, 2005, 11:38.

                          Comment


                          • #14
                            Originally posted by Locutus
                            You're right of course. It's just that noone ever ever uses the ` for anything (why is it on keyboards exactly?), so in my mind that's just the ~ key
                            The ` character (the "grave accent") is also needed in a small number of circumstances to correctly spell a few words (though not in English). Why it's by itself on the English keyboard (the grave accent is written on a letter rather than being used by itself) is presumably due to the coding/UNIX implementation LDiCesare mentioned.

                            Comment


                            • #15
                              Trip would you know how to make it so that temples, shrines, cathedrals, etc. only contribute their effects if you state religion matches the temple religion. For example if you have an Islamic shrine in a city and you have Islam as your state religion then the shrine does its intended effect but if you switch to Judaism then the Islamic shrine doesn't do anything until you switch back to Islam?

                              Comment

                              Working...
                              X