Announcement

Collapse
No announcement yet.

[MOD] Terraform Mod

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

  • #31
    Originally posted by tywiggins
    >snip info about problem<

    Mynex, When I finish with rewriting the terraform mod, I will combine my FreeTech Mod, Terraform Mod, Abandon/Raze City Mod, and Railroad speed Mod.
    Well I hope it goes easy for you to fix/enhance that stuff... I know XML, so no issues for me there, but python... ugh!

    So thank you, you get that all set up and you'll be my hero (at least for a couple minutes! )...

    I did get all the mods I was messing with (so far) to play nice together, but I have no idea if I have anything hosed up on the python side... at least I'm not getting the error on python load anymore (CVMainInterface.py)... *shrug*

    Ah well... back to merging mods (or trying to. :S)

    Comment


    • #32
      Downloading this mod right now.

      When I'd gotten the game, the lack of terraforming was noticable. I figured I may as well contribute a bit in return.


      1. Plant Forest - Biology
      2. Make Jungle -Biology
      8. Terraform into Flatlands - Chemistry
      11. Terraform Mountain into Hills - Chemistry

      These are the ones that seem most natural. As near as I can tell, Chemistry is a close equivalent of the Explosives technology in earlier Civ games, so I guess you might want to link more terraforming to that technology; I figure the actions which involve blowing things up are the most intuitive.

      Comment


      • #33
        I released a new version. Check my first post for more info and the link.

        Comment


        • #34
          Are we supposed to get a "Debug event" message when we turn water into plains? My PythonErr2.log has...

          "PY:Improvement Terraform Adjacent Water into Plains was built at 91, 44
          PYEBUG Event: RemoveWaterPopup (Roger Bacon)"

          ...whenever I raise water into plains and it prints the same message on the screen.

          Roger Bacon

          Comment


          • #35
            Let's keep this great mod alive!

            I have written an update of terraform.py. This update adds random resource generation (5% chance) when you terraform a terrain into a different type (plains, grassland, tundra, desert, snow, jungle, or coast). It also keeps OIL as a resource when you transform land to water or water to land on a tile that already has oil.

            Roger Bacon

            [update]

            Added twiggins code to get teh message to display the city name.

            [update 2]

            Fixed a bug that would cause "Coal was discovered near..." whenever a non-terraform improvement was built. Sorry about that.
            Attached Files
            Last edited by rogerbacon; January 12, 2006, 22:05.

            Comment


            • #36
              rogerbacon, try this:

              nearestcity = pPlot.getWorkingCity()
              if(nearestcity.isNone()):
              [TAB]message = "%s was discovered at %s , %s." %(resourceName, iX, iY)
              else:
              [TAB]nearestCityName = nearestCity.getName()
              [TAB]message = "%s was discovered near %s." %(resourceName, nearestCityName)

              This is not perfect, but it should be good enough. If the tile can be worked by a city's population, then that city's name will be included in the message. If the tile can not be worked, the coordinates will be included in the message instead.

              I couldn't get the CyMap().findCity function to work either.

              I haven't tested your changes yet, but they look good.

              Comment


              • #37
                Originally posted by tywiggins
                rogerbacon, try this:

                nearestcity = pPlot.getWorkingCity()
                if(nearestcity.isNone()):
                [TAB]message = "%s was discovered at %s , %s." %(resourceName, iX, iY)
                else:
                [TAB]nearestCityName = nearestCity.getName()
                [TAB]message = "%s was discovered near %s." %(resourceName, nearestCityName)

                This is not perfect, but it should be good enough. If the tile can be worked by a city's population, then that city's name will be included in the message. If the tile can not be worked, the coordinates will be included in the message instead.

                I couldn't get the CyMap().findCity function to work either.

                I haven't tested your changes yet, but they look good.
                Thanks twiggins. I'll give it a try when I get home tonight.

                Roger Bacon

                Comment


                • #38
                  Thanks twiggins it worked.
                  I have updated the attachment above.

                  Now, I know I should just walk away from this but...

                  It would be really cool if we could make it show those little icons at the edge of the screen when an event occurs. Anyone know how to do that?

                  Roger Bacon

                  Comment


                  • #39
                    Just fixed a bug that would cause "Coal" to be listed as a discovered resource when a non-terraforming improvement was built.

                    Roger Bacon

                    Comment


                    • #40
                      Originally posted by tywiggins
                      A couple of days ago, I noticed an error in my terraform mod. It seems that the buttons for Make Mountain and Make Peak no longer show up. I know they did show up before the civ4 1.09 patch, but they don't now. It seems that a unit is now only allowed to have 31 build tags(With my 14 terraforming builds, there were 33). I know that these two particular terraforming options will almost never get used, but I feel like I should fix it. I think I can get reduce the number of terraforming options down to 10 without losing any real functionality. Some of course will be combined. For example, Terraform into Flatlands and Make Water will be combined into Lower Elevation; Terraform into Hills and Make Peak will be combined into Raise Elevation. I will also change the Peak terrain(which I called Mountain) into "Rocky". When you build a road on a Peak it will change it into Rocky/Hills. I can also eliminate Terraform into Tundra and Terraform Mountain into Hills.

                      Mynex, When I finish with rewriting the terraform mod, I will combine my FreeTech Mod, Terraform Mod, Abandon/Raze City Mod, and Railroad speed Mod.
                      I just wanted to ask, how long will it aproximately take, until you will release your combined mod?

                      Comment


                      • #41
                        I had it done 2 weeks ago, I just forgot to post it. Here it is
                        Attached Files

                        Comment


                        • #42
                          Many thanks!
                          You are the man.

                          Caesium

                          Comment


                          • #43
                            rogerbacon, instead of your addImmediateMessage line, use this line to get the icons on the screen:

                            CyInterface().addMessage(pPlot.getOwner(),True,10, message,"",-1,gc.getBonusInfo(gc.getInfoTypeForString(resource Name)).getButton(),ColorTypes(2),pPlot.getX(),pPlo t.getY(),True,True)

                            Also, I just noticed that when converting water into land, there is still no chance of a resource(except oil)

                            I really don't understand why the oil graphics do not work right after the plot is changed from water to land.
                            Last edited by tywiggins; January 14, 2006, 01:47.

                            Comment


                            • #44
                              Originally posted by tywiggins
                              rogerbacon, instead of your addImmediateMessage line, use this line to get the icons on the screen:

                              CyInterface().addMessage(pPlot.getOwner(),True,10, message,"",-1,gc.getBonusInfo(gc.getInfoTypeForString(resource Name)).getButton(),ColorTypes(2),pPlot.getX(),pPlo t.getY(),True,True)

                              Also, I just noticed that when converting water into land, there is still no chance of a resource(except oil)
                              Hmm... Didn't work. It says "TypeError: this constructor takes no arguments"

                              Code:
                              if(resourceName!= "NONE"):
                              			if(nearestCity.isNone()):
                              				message = "%s was discovered at %s , %s." %(resourceName, iX, iY)
                              			else:
                              				nearestCityName = nearestCity.getName()
                              				message = "%s was discovered near %s." %(resourceName, nearestCityName)
                              			#CyInterface().addImmediateMessage(message,"")
                              			CyInterface().addMessage(pPlot.getOwner(),True,10,message,"",-1,gc.getBonusInfo(gc.getInfoTypeForString(resourceName)).getButton(),ColorTypes(2),pPlot.getX(),pPlot.getY(),True,True)
                              			CvUtil.pyPrint(message)
                              I didn't include any chance of random resources when changing the level of terrain (mountain, hills, flat, water), just the type (plains, grassland, desert, tundra, and snow). The exception was turning land in to water because you can't edit water further.

                              Roger Bacon

                              Comment


                              • #45
                                I'm not sure why it didn't work correctly. The following code I have tested and works correctly.
                                Now it also will only show the message if you have the required technology to reveal the resource.

                                For example, if you do not have scientific method, and you terraform into desert, it is possible that you create oil. But it will not show up on the map and no message shows up.
                                Without the new code it wouldn't show up on the map, but there would be a message saying that oil was discovered.
                                Code:
                                if(resourceName!= 'NONE'):
                                        if(nearestCity.isNone()):
                                                message = "%s was discovered at %s , %s." %(resourceName, iX, iY)
                                        else:
                                                nearestCityName = nearestCity.getName()
                                                message = "%s was discovered near %s." %(resourceName, nearestCityName)
                                        if(pPlot.getBonusType(pPlot.getOwner()) != -1):                                
                                                button = gc.getBonusInfo(pPlot.getBonusType(pPlot.getOwner())).getButton()
                                                CyInterface().addMessage(pPlot.getOwner(),True,10,message,"",-1,button,ColorTypes(2),pPlot.getX(),pPlot.getY(),True,True)
                                                CvUtil.pyPrint(message)
                                Also, you need to set the resourceName for jungles and forests, or the message won't show up.

                                Comment

                                Working...
                                X