Announcement

Collapse
No announcement yet.

Making Passable the Impassable

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

  • Making Passable the Impassable

    I would like to define a larger number of terrain types as "impassable" and have them remain so only until a road is built upon them.

    For example, I would like for jungles to remain impassable to all but worker units. When the worker completes a road, then other units may travel through the jungle on this road.

    This was possible in Civ 3 but does not seem to be possible in Civ 4. Does anyone know how it can be done?

  • #2
    Yes, this is possible.

    Make a new type of terrain: jungle2. Make it use the same graphics as jungle but in the xml file for terrain make it impassible by changing the <0> to <1> on the impassible line. Then add a python event that when a road is built on jungle2 to change it to jungle. There is an example of hot to do this in the terraforming mod that is posted somewhere on this forum. The creator changes "peak" (impassible) into "Mountain" (passible). You will also have to change the entry for worker to allow it to enter impassible terrain. Unfortunately, this seems to also have the effect of making the terrain cost only 1 movement point, which might make the fast worker move through the jungle faster than you want. I don't think there is away around that though.

    Roger Bacon

    Comment


    • #3
      Problem is, I haven't a clue about Python.

      I'll take a look for the thread you mentioned. Thanks for your help.

      Civ 4 is supposed to be a moder's dream but Civ 3 was in so many ways so much easier to change for a non-technical person.

      Comment


      • #4
        I made the terraform mod. rogerbacon was right about most of what he said.

        Instead of making jungle2 a new terrain, I would make it a new feature, since underneath the jungle is grassland terrain. Make jungle impassable, and jungle2 passable. This way the map generator will make jungles that are impassable.

        Also I intentionally changed the worker to make it ignore movement cost. It wasn't a side effect of passing impassable terrain.

        I didn't know any python when I started the terraform mod. If you know any programming language, then you can probably pick it up pretty easily. I can help you out if you need any further help.
        Last edited by tywiggins; December 15, 2005, 01:05.

        Comment


        • #5
          Originally posted by rogerbacon
          Yes, this is possible.

          Make a new type of terrain: jungle2. Make it use the same graphics as jungle but in the xml file for terrain make it impassible by changing the <0> to <1> on the impassible line. Then add a python event that when a road is built on jungle2 to change it to jungle.
          That's the most half-assed workaround I think I've ever seen in a civ mod. I hope it can be done in a better way than that...

          Comment


          • #6
            Kuciwalker, do you have any ideas about how to do it better? Impassable squares are impassable even if there is a road there. This gets around that problem. When the SDK is released, there might be a better way to do this. But right now, I think this is the best way to do it.

            Comment


            • #7
              I didn't know any python when I started the terraform mod. If you know any programming language, then you can probably pick it up pretty easily. I can help you out if you need any further help.
              I am quite adept at JavaScript and know a smattering of JSP. I note a more than superficial resemblance between these and Python so I imagine I can figure it out -- if I have the time to devote to the project. It's just a shame that the process is so much more complex than it was under Civ3.

              In Civ 3, I made Jungles, Forests, Hills and Mountains all impassable to wheeled units and then defined all my units as wheeled units (with the exception of certain special units). To move a unit across one of these terrain types, it was first necessary to build a road.

              So why do this?

              Well, if you look at a map, you will notice that political borders tend to follow natural geography. Nations are seperated by geographical features that act as barriers to the movement of armies -- mountains, deserts, jungles, forests and rivers.

              Now, I wasn't able to make rivers impassable in Civ 3 (and I pursued a slightly different strategy when it came to deserts) but I was able to do so with the other terrain types. The effect was that cities tended to be built in relation to one another such that civilizational borders ran along major axis of impassible terrain features.

              To accentuate the effect, I designated barbarian units as non-wheeled units -- allowing them free movement in jungles and forests and on hills and mountains. Because Jungles required the most significant investment of worker times (workers who would have to build roads through the jungles without any protection from the barbarian inhabitants), and because Jungles tended to cover the widest swath of geography, large sections of the map -- dominated by jungles -- remained unexplored and unexploited until the age of discovery.

              I initiated the age of discovery by making the explorer unit the first available unit capable of entering impassable terrain. I also gave the explorer only just enough fire-power to compete with Barbarians. A group of explorers could then provide an effective escort to my workers as they built roads through the jungles for my settlers. Often these jungles were absolutely infested with Barbarians by this time -- the barbarians having been hiding and multiplying inside them for half the game.

              What I'd like to do in Civ 4 is essentially the same thing -- but I'd also like to explore some kind of means by which to make rivers act as more effective barriers to movement as well. That, however, may not be any more possible in Civ 4 than it was in Civ 3.

              Comment


              • #8
                Re: Making Passable the Impassable

                Originally posted by 1shmae1
                For example, I would like for jungles to remain impassable to all but worker units. When the worker completes a road, then other units may travel through the jungle on this road.
                Wow, that sure would make a jungle start tough(er).

                Comment


                • #9
                  Yes. It did. But it wasn't impossible. I made sure that the first settlers (the ones given at game start) were unique settler units that (unlike all subsequent setler units) could travel through jungles. This meant that, if you started the game in a jungle, you could march out before building your first city, or find a juicy spot along the coast with nearby ocean resources.

                  Comment


                  • #10
                    I did a little work for you. I made forests and jungles impassable. Peaks, forests, and jungles will be made passable after a worker builds a road or railroad.

                    The problem is that that the graphics for the forest2 and jungle2 aren't working. So when you build a road on a jungle or forest, it creates an invisible jungle or forest.

                    The Peaks get changed into mountain terrain. It looks really flat, but its better than invisible jungles and forests.
                    Attached Files

                    Comment


                    • #11
                      Originally posted by tywiggins
                      I did a little work for you. I made forests and jungles impassable. Peaks, forests, and jungles will be made passable after a worker builds a road or railroad.

                      The problem is that that the graphics for the forest2 and jungle2 aren't working. So when you build a road on a jungle or forest, it creates an invisible jungle or forest.

                      The Peaks get changed into mountain terrain. It looks really flat, but its better than invisible jungles and forests.
                      This is wonderful! Thank you so much!

                      But I must ask, is there a reason why the same graphic cannot be used for forest2, jungle2 and Peek2 that is used for the default terrain type?

                      Comment


                      • #12
                        I'm just about to test your Mod but I've a sneaky suspicion I'm about to find a problem.

                        What happens when a road is destroyed? Does Jungle2 revert to Jungle?

                        Comment


                        • #13
                          No, it won't revert back. Think of it this way. When you build a road, you have to clear a path through the jungle. If the road was later destroyed, the path would still be there.

                          But if you wanted to, at the beginning of every turn, you could check every tile. If it is a jungle2 with no road, you could change it back to a jungle.

                          I have run out of ideas about the artwork though.

                          Comment


                          • #14
                            I think there's a better way to do this.

                            Obviously, the "impassable" feature/function must be defined somewhere. I (we?) need to define another type of terrain characteristic such as "impassable without road." Then, every terrain entry would get a new XML entry like [impassableWithoutRoad]1[/impassableWithoutRoad]. That's the best way to handle this.
                            Last edited by 1shmae1; December 17, 2005, 10:51.

                            Comment


                            • #15
                              Yes, ideally that is how you would do it. But, I'm pretty sure that you will have to wait until the SDK is released before you can accomplish that.

                              Comment

                              Working...
                              X