Announcement

Collapse
No announcement yet.

[MOD] Terraform Mod

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

  • [MOD] Terraform Mod

    Terraform Mod v1.20(created by tywiggins)
    Released December 29, 2005

    Changes since last version:
    I cut the number of terraforming improvements from 14 down to 10.
    Mountain terrain is now called Rocky terrain
    Rocky terrain produces nothing(But hills/rocky can be mined giving 3 hammers total)
    When you build a road on a Peak, it is now transformed into hills/rocky

    Notes: I need to make some new buttons for raise/lower terrain, and for terraform into rocky.

    Terraform Mod
    --------------------------------------------------------------------------


    Terraform Mod v1.11(created by tywiggins)
    Released December 16, 2005

    Changes since last version:
    Now when you finish building Make Water, all of the units are moved to the nearest valid plot.



    --------------------------------------------------------------------------


    Terraform Mod v1.10(created by tywiggins)
    Released December 15, 2005

    Changes since last version:
    Now when you finish building change adjacent water into plains, you get a popup asking which tile you want to change.
    Made it so it is easier to combine mods

    --------------------------------------------------------------------------


    Terraform Mod v1.01(created by tywiggins)
    Released November 21, 2005


    Changes since Terraform Mod v1.0
    Fixed a bug caused by a comment in the CIV4ImprovementInfos.xml file
    This bug wouldn't let you build mines on mountains.
    Now mountains can be mined(This really makes peaks not so bad, even near the beginning of the game. Just build a road on the peak and then a mine on the mountain and it produces 3 hammers)

    --------------------------------------------------------------------------

    Terraform Mod v1.0(created by tywiggins)
    Released November 16, 2005

    I created this mod because I missed the terraforming in Civ2.

    Here is a list of all the changes/additions I made(I think)

    Improvements:
    Created 14 new improvements
    1. Plant Forest(requires Plains, Grassland, or Tundra)
    2. Make Jungle(requires Grassland)
    3. Terraform into Plains(requires Grassland, Desert, or Tundra)
    4. Terraform into Grassland(requires Plains)
    5. Terraform into Desert(requires Plains)
    6. Terraform into Tundra(requires Plains, or Ice)
    7. Terraform into Ice(requires Tundra)
    8. Terraform into Flatlands(requires Hills)
    9. Terraform into Hills(requires Flatlands)
    10. Make Mountain(requires Hills)
    11. Terraform Mountain into Hills(requires Mountain)
    12. Make Peak(requires Mountain)
    13. Change 1 adjacent water tile into plains(any)
    14. Make Water(requires flatlands)
    Changed Mines to allow Mountains to be mined

    Note on all: Base terraform time is 24 turns. Terraform time for Mountains, Ice, Tundra, Desert is 30 turns. Plant Forest/Make Jungle time is 12 turns(16 for Tundra).
    Note: With Steam Power, workers work 50% faster, so divide time by 1.5. If you also use serfdom, divide time by 2 instead.
    Note on #1 and #2: You can Plant Forest on Forest tiles, and Make Jungle on Jungle tiles. It is a waste of time though.
    Note on #13: The 8 adjacent tiles are checked in order 1,2,3,4,6,7,8,9. The first one to find water is changed into plains.
    Note on #13: You can build this even if there is no adjacent water. It is a waste of time though.
    Note on #13: All water resources (Fish, oil, whale, etc. )are destroyed when you change a water tile into a plains.
    Note on #14: All land resources are destroyed when you change a land tile into water
    Note on #13,14: A Fresh Water lake is when there are less than 10 connected water tiles.
    Note: Coastal cities can build harbors, lighthouses, The Great Lighthouse, The Colossus if there are at least 10 connected water tiles.
    Note: Coastal cities can build drydocks, naval units if there are at least 20 connected water tiles.

    Terrain:
    Changed Ice(Land) Build modifier to +25% (was +50%)
    Made several changes to Peak
    1. Name is now Mountain
    2. Produces 1 hammer
    3. movement cost is now 2
    4. seefrom value is now 2
    5. build modifier is now +25%
    6. defense modifier is now +25%
    7. is no longer graphical only

    Note: Peaks will still be created when you start your game. Mountains will not.
    Note: To change a Peak into a Mountain, all you have to do is build a road or railroad on it.
    Note: Workers have been modified to allow them to climb the impassable Peak

    Features:
    Changed Oasis to allow improvements(terraforming). Also decreased food increase by 1 since farms can now be built on them.

    Note: Flood Plains and Oasis features are destroyed when terraforming
    Note: You can create Flood Plains by Terraforming Flatland Plains into Desert (along a river, just a corner isn't enough)
    Note: You can create Flood Plains by Terraforming Hills/Desert into Flatland Desert (along a river, just a corner isn't enough)

    Units:
    Changed workers and fastworkers so that they can pass impassable terrain, and ignore movement cost.
    Also gave them all the new build orders.

    Technologies:
    Added 2 new Technologies, each requires Ecology
    1. Terraforming(allows new improvements 3,4,5,6,7,13)
    2. More Terraforming(allows new improvements 8,9,10,11,12,14)

    Note: Plant Forest and Make Jungle are now enabled by Ecology.


    Possible Future changes(let me know if you can help with these, or have any suggestions):
    1. Use different graphics for mountains(They look very flat)
    2. Create a "New Forest" Feature nearly identical to "Forest".(I have done this, but they look invisible)
    3. Add Descriptions and civilopedia entries with translations for all the new improvements.
    4. Mountains can have resources
    5. randomly add resources when land is created from water, or water is created from land
    6. keep oil when the land is changed into water, or the water is changed into land
    Last edited by tywiggins; December 30, 2005, 01:29.

  • #2
    Good work!
    Just what i missed.

    Comment


    • #3
      Nice mod!

      But it won't have any impact on most games I'm afraid, since Ecology is so late (which of course makes sense, earlier most terraforming actions would be too powerfull & illogical).

      Comment


      • #4
        Nice, I was working on something extremely similar, but I have too little gaming time to continue at the time being. I linked to this thread in the last version of my Forestry mod to point people looking for actual terraforming here. Hope you don't mind that.
        _____
        rezaf

        Check out my Forest planting mod or my Terrain adaption mod

        Comment


        • #5
          No. I don't mind. Actually, reading through your forestry mod gave me enough information to get me started on my mod.

          Comment


          • #6
            You should post this mod to the Directory.
            Creator of the Civ3MultiTool

            Comment


            • #7
              Okay. I uploaded the file, and submitted a link in the civ4 mods directory.

              Comment


              • #8
                This could actually be a nice start to creating a post-modern era mod I like all the details, very nice.
                ~I like eggs.~

                Comment


                • #9
                  I just released a new version. It fixes a small bug. I also released Terraform Mod Plus. Read the first post for info or to download. You can also download from the directory.

                  Comment


                  • #10
                    Looks like this could be a good starting point (for terraforming) for the Alpha Centauri mod.
                    He who knows others is wise.
                    He who knows himself is enlightened.
                    -- Lao Tsu

                    SMAC(X) Marsscenario

                    Comment


                    • #11
                      A suggestion for an improvement.

                      When you want to convert water to land, instead of going through the tiles in a 1,2,3,4,... order maybe you could change it so that it would select the tile that the mouse is over (if it is within one of the unit's current location).

                      Is this the code you use to make that particular terraform?

                      Code:
                      elif(iImprovement==34):
                      			pPlot.setImprovementType(-1)
                      			bdone = 0
                      			pPlot = CyMap().plot(iX-1,iY-1)
                      			if((pPlot.isWater()==1) and (bdone==0)):
                      				pPlot.setPlotType(PlotTypes.PLOT_LAND, true, true)
                      				pPlot.setTerrainType(CyGlobalContext().getInfoTypeForString("TERRAIN_PLAINS"), true, true)
                      				bdone = 1
                      			pPlot = CyMap().plot(iX,iY-1)
                      			if((pPlot.isWater()==1) and (bdone==0)):
                      				pPlot.setPlotType(PlotTypes.PLOT_LAND, true, true)
                      				pPlot.setTerrainType(CyGlobalContext().getInfoTypeForString("TERRAIN_PLAINS"), true, true)
                      				bdone = 1
                      			pPlot = CyMap().plot(iX+1,iY-1)
                      			if((pPlot.isWater()==1) and (bdone==0)):
                      				pPlot.setPlotType(PlotTypes.PLOT_LAND, true, true)
                      				pPlot.setTerrainType(CyGlobalContext().getInfoTypeForString("TERRAIN_PLAINS"), true, true)
                      				bdone = 1
                      			pPlot = CyMap().plot(iX-1,iY)
                      			if((pPlot.isWater()==1) and (bdone==0)):
                      				pPlot.setPlotType(PlotTypes.PLOT_LAND, true, true)
                      				pPlot.setTerrainType(CyGlobalContext().getInfoTypeForString("TERRAIN_PLAINS"), true, true)
                      				bdone = 1
                      			pPlot = CyMap().plot(iX+1,iY)
                      			if((pPlot.isWater()==1) and (bdone==0)):
                      				pPlot.setPlotType(PlotTypes.PLOT_LAND, true, true)
                      				pPlot.setTerrainType(CyGlobalContext().getInfoTypeForString("TERRAIN_PLAINS"), true, true)
                      				bdone = 1
                      			pPlot = CyMap().plot(iX-1,iY+1)
                      			if((pPlot.isWater()==1) and (bdone==0)):
                      				pPlot.setPlotType(PlotTypes.PLOT_LAND, true, true)
                      				pPlot.setTerrainType(CyGlobalContext().getInfoTypeForString("TERRAIN_PLAINS"), true, true)
                      				bdone = 1
                      			pPlot = CyMap().plot(iX,iY+1)
                      			if((pPlot.isWater()==1) and (bdone==0)):
                      				pPlot.setPlotType(PlotTypes.PLOT_LAND, true, true)
                      				pPlot.setTerrainType(CyGlobalContext().getInfoTypeForString("TERRAIN_PLAINS"), true, true)
                      				bdone = 1
                      			pPlot = CyMap().plot(iX+1,iY+1)
                      			if((pPlot.isWater()==1) and (bdone==0)):
                      				pPlot.setPlotType(PlotTypes.PLOT_LAND, true, true)
                      I'm totally new to this but it looks like there is some code that can be used to deterime where the mouse is on the map:

                      Code:
                      # Shift - ] (Debug - currently mouse-overd unit, health += 10
                      			elif (self.bAllowCheats and theKey == int(InputTypes.KB_LBRACKET) and self.bShift ):
                      				unit = CyMap().plot(px, py).getUnit(0)
                      				if ( not unit.isNone() ):
                      					d = min( unit.maxHitPoints()-1, unit.getDamage() + 10 )
                      					unit.setDamage( d, PlayerTypes.NO_PLAYER )
                      You could use that to determine where the mouse is and then check the X,Y coordinates and if they are both within 1 of the unit's location you could have it transform that particular square instead of going through all 1-9 square in order. It would probably be less code too. Just a suggestion.

                      Roger Bacon

                      Comment


                      • #12
                        that is the code for it. It is quite a bit of code but most of it is the same. I just copy/pasted it and then changed the plot coordinates. I would like to be able to pick the square like you say. The second piece of code that you posted really doesn't help.

                        I know how to get the location of the mouse cursor already. But the problem is, when would you get the mouse location? It would have to be after the worker finished building the improvement. It would have to pop up and ask you to select a tile. I'm not sure how to do this though.

                        Before I released the mod, I had it so that workboats could make land on their current tile. I took this out because I also wanted to be able to get rid of small lakes which workboats don't have access to.

                        Maybe I should add this back in so workers and a water unit can turn water into land. But I think that I should create a new unit based on the workboat instead of using the workboat. The cost for the workboat is only 30. Maybe put the cost to 60(same as the worker), make the time to turn water into land the same as it takes for the worker, and then when the water is changed into land, create a new worker on that tile. (Or possibly move the workboat to an adjacent water tile, if there are any, if not then create a new worker)

                        Maybe I should change the change land into water too, so that the worker doesn't die.

                        Comment


                        • #13
                          Originally posted by tywiggins
                          I know how to get the location of the mouse cursor already. But the problem is, when would you get the mouse location? It would have to be after the worker finished building the improvement. It would have to pop up and ask you to select a tile. I'm not sure how to do this though.
                          Yeah, I see the problem now. I thought that when the worker was assigned his action that the code would capture the location of the mouse at that moment (right when you pressed ctr-alt-whatever) and then the work would start on that tile.

                          Maybe you could add code that "moved" the worker to where the mouse was when you give him the order to begin construction by just altering the x,y coordinates of the worker and not using the regular code for movement.

                          Roger Bacon

                          Comment


                          • #14
                            Oh, one more thing while I'm here. You wrote

                            Code:
                            razor.initUnit(5, city.plot().getX(), city.plot().getY(), UnitAITypes.NO_UNITAI)
                            in your code to create workers when you raze a city. Is the '5' in that code the value for worker? If so, how did you know worker = 5?

                            Roger Bacon

                            Comment


                            • #15
                              I don't know how I could trigger that though. The terraforming is triggered by the appropriate improvement being built. Starting to build an improvement is a "non event". Besides, I don't think that land units can survive on water, thats why workers will die when you turn land into water. I didn't make them die, they die automatically

                              I think that the best way would be for me to add the new "terraform workboat" unit. This will let you pick what water coast tile you want to change into land. And workers can still change water into land

                              Also I don't know if anyone noticed, but Ocean tiles are automatically turned into Coast tiles whenever they are within 1 tile of a land tile, which makes some sense.

                              Comment

                              Working...
                              X