Results 1 to 22 of 22

Thread: Making Passable the Impassable

  1. #1
    1shmae1
    Chieftain
    Join Date
    03 Oct 2004
    Posts
    65
    Country
    This is 1shmae1's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    19:39

    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. #2
    rogerbacon
    Chieftain
    Join Date
    21 Nov 2005
    Posts
    98
    Country
    This is rogerbacon's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    19:39
    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

  3. #3
    1shmae1
    Chieftain
    Join Date
    03 Oct 2004
    Posts
    65
    Country
    This is 1shmae1's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    19:39
    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.

  4. #4
    tywiggins
    Warlord
    Join Date
    11 Nov 2005
    Posts
    106
    Country
    This is tywiggins's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    19:39
    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 at 00:05.

  5. #5
    Kuciwalker
    Deity Kuciwalker's Avatar
    Join Date
    17 Feb 2001
    Posts
    19,361
    Thanks
    5
    Thanked 16 Times in 12 Posts
    Local Date
    May 23, 2013
    Local Time
    15:39
    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...

  6. #6
    tywiggins
    Warlord
    Join Date
    11 Nov 2005
    Posts
    106
    Country
    This is tywiggins's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    19:39
    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.

  7. #7
    1shmae1
    Chieftain
    Join Date
    03 Oct 2004
    Posts
    65
    Country
    This is 1shmae1's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    19:39
    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.

  8. #8
    platypotamus
    Chieftain
    Join Date
    18 Nov 2005
    Posts
    48
    Country
    This is platypotamus's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    11:39

    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).

  9. #9
    1shmae1
    Chieftain
    Join Date
    03 Oct 2004
    Posts
    65
    Country
    This is 1shmae1's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    19:39
    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.

  10. #10
    tywiggins
    Warlord
    Join Date
    11 Nov 2005
    Posts
    106
    Country
    This is tywiggins's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    19:39
    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 Attached Files

  11. #11
    1shmae1
    Chieftain
    Join Date
    03 Oct 2004
    Posts
    65
    Country
    This is 1shmae1's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    19:39
    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?

  12. #12
    1shmae1
    Chieftain
    Join Date
    03 Oct 2004
    Posts
    65
    Country
    This is 1shmae1's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    19:39
    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?

  13. #13
    tywiggins
    Warlord
    Join Date
    11 Nov 2005
    Posts
    106
    Country
    This is tywiggins's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    19:39
    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.

  14. #14
    1shmae1
    Chieftain
    Join Date
    03 Oct 2004
    Posts
    65
    Country
    This is 1shmae1's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    19:39
    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 at 09:51.

  15. #15
    tywiggins
    Warlord
    Join Date
    11 Nov 2005
    Posts
    106
    Country
    This is tywiggins's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    19:39
    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.

  16. #16
    Zen
    Chieftain
    Join Date
    07 Jul 2000
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    19:39
    Interesting guys.

    How about rivers?

    Is there anyway to make rivers uncrossable unless they have a road?

    I would like to make rivers more realistic in a mod I am working on. And I don't want to use water tile or an impassible tile.

    thanks in advance,

    -Zen Blade
    FARSCAPE......................

  17. #17
    1shmae1
    Chieftain
    Join Date
    03 Oct 2004
    Posts
    65
    Country
    This is 1shmae1's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    19:39
    Originally posted by Zen
    Interesting guys.

    How about rivers?

    Is there anyway to make rivers uncrossable unless they have a road?

    I would like to make rivers more realistic in a mod I am working on. And I don't want to use water tile or an impassible tile.

    thanks in advance,

    -Zen Blade
    Making rivers impassable without roads would likely prove even more difficult. Nevertheless, it would be much more realistic were this change made. After all, Ceasar had to build a massive bridge across the rhine to move his army across.

    Rivers have allways marked political boundaries and thay have done so because they are, in fact, natural barriers to armies.

    But how to simulate this? Must a road be present on both sides of a river or on one side only (rivers run between tiles)? And as for how to accomplish it programatically, I've no idea. I'd settle right now just for making jungles, forests and hills impassable without roads.

  18. #18
    Brass_Taxxx
    Settler
    Join Date
    09 Nov 2005
    Posts
    1
    Country
    This is Brass_Taxxx's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    19:39
    Not sure if anyone mentioned this:

    If a terrain/feature plot is marked impassable then it produces no food/production/commerce. So if it lies in a city radius then the city will derive no benefit from it. I'm pretty sure this is so for features (but I don't quite remember).

    I struggled with this while trying to create a zone of control mod. I planned on switching terrain/feature in the ZoC from passable to impassable. In the end I could think up many more problems than I could think up answers. That and graduate exams are looming...

    Cheers

  19. #19
    tywiggins
    Warlord
    Join Date
    11 Nov 2005
    Posts
    106
    Country
    This is tywiggins's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    19:39
    Actually that might not be that difficult to do after the SDK is released.

    My guess is that after the SDK is released, the CyUnit functions CanMoveInto, and CanMoveorAttackInto can probably be altered to return false if the unit's current tile and the tile that it is checking are on opposite sides of a river and both tiles don't have roads or railroads. I believe that the CyPlot function isRiverCrossing could be used to determine if the tiles are on opposite sides of the river.

    It only took Caesar 10 days to build the bridge though.

    In Civ4, rivers connect cities to your trade network. If you build a road to a river, a graphic appears into the river. This is likely a pier, dock, wharf whatever you want to call it. So I choose to believe that there are boats going up and down the river. So I believe you should be able to cross rivers if there are roads on both sides before bridge building, but it will take all of your movement points. If you have bridge building and roads on both sides of the river, then movement should be normal.

  20. #20
    Zen
    Chieftain
    Join Date
    07 Jul 2000
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    19:39
    My point with rivers is this...

    fording a river with a small number of people is not difficult.

    Fording a river with a a few thousand troops, wagons, horses, etc... is a little more difficult and effectively makes the river uncrossable. Especially if the river is running higher (spring months, autumn, rainy season).

    What I would like is for the river to either be unpassable, or to cause multiple turns-delay. Like it takes two turns to cross a river.

    ideas?

    -Zen Blade
    FARSCAPE......................

  21. #21
    tywiggins
    Warlord
    Join Date
    11 Nov 2005
    Posts
    106
    Country
    This is tywiggins's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    19:39
    Like I said in my last post, with the SDK, making a river impassable shouldn't be that difficult. I'm not sure how you would handle multiple turn delays, but it could probably be done.

  22. #22
    1shmae1
    Chieftain
    Join Date
    03 Oct 2004
    Posts
    65
    Country
    This is 1shmae1's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    19:39
    You should be able to cross rivers if there are roads on both sides before bridge building, but it will take all of your movement points. If you have bridge building and roads on both sides of the river, then movement should be normal.
    That sounds perfect.

Similar Threads

  1. Making rivers impassable?
    By Feet in forum Civilization IV Creation
    Replies: 1
    Last Post: November 4, 2005, 12:31
  2. are mountains always impassable?
    By vee4473 in forum Civilization IV General
    Replies: 19
    Last Post: October 29, 2005, 00:28
  3. Impassable terrain in TOT
    By Heresson in forum Civilization I and Civilization II
    Replies: 9
    Last Post: June 23, 2005, 17:38
  4. Impassable Terrain
    By zulu9812 in forum Civilization III
    Replies: 7
    Last Post: July 29, 2002, 18:20
  5. Railroads on impassable terrain
    By Hannibal3 in forum Civilization I and Civilization II
    Replies: 4
    Last Post: April 5, 2000, 01:40

Visitors found this page by searching for:

jungle impassable civ 4

civ iii make impassable tile

how do you make a building in warcraft impassable

settlers 4 make unpassable

civ 4 makes peaks passable

civ4 mountains impassable

civ iii will barbarians spawn on impassable terrain

civilization 4 peaks

civilization 4 mod mountains

civ iv impassable

civ IV: mod to make jungle impassable

can mountains be passable in civ 5

peak impassable civ iv

civ3 river terrain setting impassable

civ 4 roads through mountains

make peaks passable civ 4

civ4 make peaks production impassible

impassable civ

civ 4 impassable

Mountains in Civ 4

civ4 passable feature throug technology

peak impassable

civilization v passable mountains

how do i make mountains passable in civ iv

Bookmarks

Posting Permissions