Announcement

Collapse
No announcement yet.

Simple map script modifications

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

  • Simple map script modifications

    Personnally I like the maps produced by the custom_continents map script. However I find that there are too many desert tiles. Trying to change this I discovered that it is possible to do quiet some modifications without much work. In fact the repartition of forests, ice and deserts can be changed very simply.

    Open CustomContinents.py and search for a line which looks like:
    terraingen = TerrainGenerator
    Change it to
    terraingen = TerrainGenerator(iDesertPercent, iPlainsPercent, fSnowLatitude, fTundraLatitude, fGrassLatitude, fDesertBottomLatitude, fDesertTopLatitude, -1, -1, grain_amount)
    Where[list=1][*]iDesertPercent is an integer between 0 and 100 indicating how many tiles should be desert. 0 means no desert. Default:35[*]iPlainsPercent is the same for plains plains. Default:20[*]The percent of grass is calculated using 100 - iDesertPercent - iPlainsPercent. I don't know what happens when iPlainsPercent + iDesertPercent > 100[*]fSnowLatitude is a decimal number between 0 and 1. It represents the latitude above which there may be snow. 0 is the equator and 1 the pole. Default: 0.9[*]fTundraLatitude is the same for tundra. Default: 0.8[*]fGrassLatitude is the same for grass. Default:0.1[*]fDesertBottomLatitude is the minimal latitude above which there may be desert. Default:0.2[*]fDesertTopLatitude is the maximal latitude below which there may be desert.Default:0.5[*]I don't know what those -1 means[*]grain_amount should be an integer number which indicated how often tiles change. Meaning a value of 1 or 2 would create only small deserts whereas a value of 20 would create large deserts. Applies to every tile sort, not only to desert.[/list=1]
    Now to change the feature (forest, jungle) distribution. Change
    featuregen = FeatureGenerator
    Change it to
    featuregen = FeatureGenerator(iJunglePercent, iForestPercent, jungle_grain, forest_grain)
    [list=1][*]iJunglePercent is an integer between 0 and 100. I don't know if 0 means all jungle or 100. Default:80[*]iForestPercent similar as iJunglePercent however here I know that 0 means all forest. Default: 60[*]jungle_grain is similar to grain_amount but for jungle only. Default:5[*]forest_grain is similar to grain_amount but for forest only. Default:6[/list=1]
    I haven't figured out how to change the number of hills, mountains or bonis.

    I have made a number of quick test of the above however I can not guarente if everything is correct.

  • #2
    hills/mountains/boni

    Those aren't handled in terraingen. A map generation has several phases, have a look at my fair_continents script for a description and example of a custom implementation of each phase.
    Attached Files
    Check out SmartMap: my ultra flexible map generator for civIV.
    http://apolyton.net/forums/showthrea...hreadid=147547

    Comment


    • #3
      So how exactly do you open a Python script? I wouldn't mind a little less Desert, I personally think they've overdone them.

      Comment


      • #4
        you can just edit python in notepad

        Any text editor will do. You can also use the hapdebugger that they used to do some of their python debugging, it understands python syntax tolerably well. I'd guess there is a plugin for eclipse as well.



        The Eclipse Foundation provides our global community of individuals and organisations with a mature, scalable, and business-friendly environment for open source …
        Check out SmartMap: my ultra flexible map generator for civIV.
        http://apolyton.net/forums/showthrea...hreadid=147547

        Comment


        • #5
          Re: you can just edit python in notepad

          Originally posted by DougM
          Any text editor will do. You can also use the hapdebugger that they used to do some of their python debugging, it understands python syntax tolerably well. I'd guess there is a plugin for eclipse as well.



          http://www.eclipse.org/
          Cool thanks. I don't think my brain is large enough to get into it to much, but at least I can reduce the amount of Desert in the game. I really think they over did it myself. Maybe 25-30% will suit me better.

          Comment


          • #6
            It's pretty cool that we have the ability to make modifications to our maps. I've just spent the last couple of hours tweaking mine.

            Weird results with the Jungle/Forest values. If you give them a higher number you're actually reducing the amount that appears on the map.

            Comment


            • #7
              yeah the fractal generator is confusing

              I don't like the interface to it at all. That's why I wrote my fair continents script ... in the hope that people will be able to build a lot of interesting map scripts from it.
              Check out SmartMap: my ultra flexible map generator for civIV.
              http://apolyton.net/forums/showthrea...hreadid=147547

              Comment


              • #8
                Just here endorsing your product eh?

                No offense, but in the screenshots you showed of your script, I found the coninents to be rather blocky and sqaure. I find that with the custom continents option in the game too. I much prefer the regular continents setting, they look more realistic. I'm not sure why that would be but you might want to look into it.

                As for the setting I mentioned, strangely enough it is only the Forest values that are reversed, the jungle works as you'd expect it to. So a lower number with forests gives you more of them. Very strange.

                Comment


                • #9
                  the continents are quite deliberately square

                  It would be fairly straightforward to make any sort of shaping you wanted. The point is to help others who want to build their own scripts by making it utterly clear (and documented) exactly what the script does in each step, and the square continents in grid layout help with that goal.

                  And yes, I want to make people interested in map scripting aware of it, I think it will help people to understand how to do what they want to do.

                  I don't particularly find it likely that people will enjoy playing the game on it. I'm currently building a second script which will allow you to generate much more interesting scenarios for more realistic gameplay.
                  Check out SmartMap: my ultra flexible map generator for civIV.
                  http://apolyton.net/forums/showthrea...hreadid=147547

                  Comment


                  • #10
                    Alright then, I guess I should take a look at it, if just for curiosity's sake. I'm actually fairly happy just using the default script, with just a tweak or two here and there.

                    Comment


                    • #11
                      @DougM
                      That might be possible that a person that has the knowlege to work himself into your scripts can make other shaped continents. However these little modifications can be done by everybody able to use notepad and I would place everybody interested in a game such as Civ into that category. Also the changes are realy small and can be done very quickly but heavily affect the gaming experience.

                      I personally would consider me as a person able to use your scripts. However I want to play Civ4 and not spend all my time debugging map scripts or generating maps until I have a map which doesn't have too much desert.



                      I'm now playing with no desert and nearly no tundra. Furthermore I have lots of forests (so many that not even the AI manages to cut them all ) and very few jungle. The maps I get are nearly all very fun to play.

                      Comment


                      • #12
                        Originally posted by ben04
                        Furthermore I have lots of forests (so many that not even the AI manages to cut them all ) and very few jungle.
                        You have to be careful about Forests, I discovered that it can seriously screw up the civ spacing. The main criteria for starting spots is the amount of food, and if there's lots of Forests, they get stuck where ever there's a small opening. So sometimes you'll find them jammed in close together.

                        Comment


                        • #13
                          Originally posted by ben04
                          @DougM
                          That might be possible that a person that has the knowlege to work himself into your scripts can make other shaped continents. However these little modifications can be done by everybody able to use notepad and I would place everybody interested in a game such as Civ into that category. Also the changes are realy small and can be done very quickly but heavily affect the gaming experience.

                          I personally would consider me as a person able to use your scripts. However I want to play Civ4 and not spend all my time debugging map scripts or generating maps until I have a map which doesn't have too much desert.



                          I'm now playing with no desert and nearly no tundra. Furthermore I have lots of forests (so many that not even the AI manages to cut them all ) and very few jungle. The maps I get are nearly all very fun to play.
                          I wasn't really aiming to inform someone who just wants a minor tweak of an existing script, but rather someone who is interested in doing a serious custom generation script that goes beyond what the fractal generator can do. It's my hope that my script will be helpful to people looking to do something very custom, and encourage proliferation of additional interesting scripts (for example, the tectonics script).

                          Obviously, if an existing script is very very close to what you want, then tweaking it is a good solution.
                          Check out SmartMap: my ultra flexible map generator for civIV.
                          http://apolyton.net/forums/showthrea...hreadid=147547

                          Comment

                          Working...
                          X