Announcement

Collapse
No announcement yet.

[PYTHON] Save Map

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

  • [PYTHON] Save Map

    This is a python file. When you run it from the Civ4 python console it will create a new mapscript based on the current map. It saves goody huts, resources, terrain, features(with feature variety), rivers, and the starting plot for each player.

    Instructions:
    1. Put my savemap.py file into your C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Assets\Python directory.
    2. In the CivilizationIV.ini file, enable cheating by changing CheatCode = 0 to CheatCode = chipotle
    3. Run CIV4. Load a scenario or load a game with the map you want to save.
    4. If you want, use WorldBuilder to make any changes to the map.
    5. Open up the python console by pressing Shift ~
    6. Type "import savemap"
    7. Here you have several options depending on what you want the filename to be.
    7a)If you want the filename to be civ4map.py, type "savemap.savemap()"
    7b)If you want the filename to be civ4mapx.py, where x is a number, type "savemap.savemap(x)"
    Example: savemap.savemap(8) will make a file named civ4map8.py
    7c)If you want to set the filename yourself(.py will be added on at the end), type "savemap.savemap("filename")"
    Example: savemap.savemap("Earth") will make a file named Earth.py
    8) Quit Civ4
    9) Run Civ4
    10) You can now select the map when you start a new game.
    Attached Files

  • #2
    Does this also work for the warlords maps? If so then you have made my week....this is exactly what I've been after....an earth map for a 'custom game'. Cheers!

    Comment


    • #3
      Yes. It works with warlords maps.

      For step 1: Put my savemap.py file into your C:\Program Files\Firaxis Games\Warlords\Assets\Python directory

      The attached python script is identical to my original, except that it saves the mapscript to the warlords Public Maps directory.
      Attached Files

      Comment


      • #4
        Ooo, nice! (Although I haven't tried it yet)
        "For it must be noted, that men must either be caressed or else annihilated; they will revenge themselves for small injuries, but cannot do so for great ones; the injury therefore that we do to a man must be such that we need not fear his vengeance." - Niccolo Machiavelli

        Comment


        • #5
          thanks for the info but i cannot open the python console by pressing ~ how can i do that?

          Comment


          • #6
            That would be Step 2.

            EDIT: Oh, and if you don't have a US keyboard, you'll probably want the ` key (next to the 1, and above the TAB key)
            Ceeforee v0.1 - The Unofficial Civ 4 Editor -= Something no Civ Modder should ever be without =- Last Updated: 27/03/2009
            "Just because I'm paranoid doesn't mean there's no conspiracy"

            Comment


            • #7
              I tried with a real Earth map with Warlord but the saved map resulted in a full grass land!
              Also "\\My Documents\\.." in the save path should be changed for non english S.O.

              Comment


              • #8
                Originally posted by Skunky
                I tried with a real Earth map with Warlord but the saved map resulted in a full grass land!
                Also "\\My Documents\\.." in the save path should be changed for non english S.O.
                I haven't seen it do that. Did you do anything in WorldBuilder?

                What is S.O. ?

                Here is the mapscript I made using Rhye's 24 civ Earth map for Warlords.
                Attached Files

                Comment


                • #9
                  He probably means OS.
                  Ceeforee v0.1 - The Unofficial Civ 4 Editor -= Something no Civ Modder should ever be without =- Last Updated: 27/03/2009
                  "Just because I'm paranoid doesn't mean there's no conspiracy"

                  Comment


                  • #10
                    Originally posted by tywiggins


                    I haven't seen it do that. Did you do anything in WorldBuilder?

                    What is S.O. ?

                    Here is the mapscript I made using Rhye's 24 civ Earth map for Warlords.
                    Your attachment seems fine to me, I will play with it since that's what I need it, thanks.
                    Maybe I did something wrong with the worldbuilder.

                    About the path I mean that the folder "My Documents" exists only on english Windows but on different localized language versions that folder got a different name/path:
                    On french is "Mes Documents", on italian is "Documenti" ect. ect.

                    Comment


                    • #11
                      Originally posted by Skunky
                      About the path I mean that the folder "My Documents" exists only on english Windows but on different localized language versions that folder got a different name/path:
                      On french is "Mes Documents", on italian is "Documenti" ect. ect.
                      Is it "My Games" in non-english versions of windows? Or is that in different languages as well?

                      Comment


                      • #12
                        Re: [PYTHON] Save Map

                        Originally posted by tywiggins
                        1. Put my savemap.py file into your C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Assets\Python directory.
                        This should be:
                        'C:\Documents and Settings\<user>\My Documents\My Games\Sid Meier's Civilization 4\CustomAssets\python'
                        or
                        'C:\Documents and Settings\<user>\My Documents\My Games\Warlords\CustomAssets\python'
                        to protect your game files.

                        Also, you might want to add instructions for people to change the details according to their system.
                        Last edited by MMC; August 18, 2006, 19:37.
                        Ceeforee v0.1 - The Unofficial Civ 4 Editor -= Something no Civ Modder should ever be without =- Last Updated: 27/03/2009
                        "Just because I'm paranoid doesn't mean there's no conspiracy"

                        Comment


                        • #13
                          "My Games" is correct since this folder is made by Civ, or other games as well, and it's not system folder.

                          Comment


                          • #14
                            This script is really good news. Finally a way to create Civ 3 style pre-made maps with customizable options that Civ 4 has been missing since the release.

                            -- Migo
                            Last edited by mikkoam; September 8, 2006, 09:17.

                            Comment


                            • #15
                              I can't find CheatCode = 0, can u pls help me

                              Comment

                              Working...
                              X