[Religion and Revolution]: Large Rivers

Is there any curently active developmente of this feature?
Unfortunately I don't think so.

The solution imagined by Ray, with a whole new terrain type being halfway between coast and land, is intellectually the most satisfying but I believe it requires so big changes in the game that it can't be done without a very tedious debugging. I'm not sure we have the community for that unfortunately.

Now that I think about it, there might be another solution which could be easier to implement. It would be to base the large rivers on roads mechanics. RAR already succesfully implemented plastered roads that carriage units cannot leave, so we can limit movements on roads currently on RAR. Here would be the general idea:
  • Only scouts and pioneers have access to large river tiles. The other units cannot reach them. Pioneers and scouts could benefit of a movement bonus in following them (just like on a road).
  • Pioneers could build a new feature there which would be river docks. The feature would make the tile accessible to other units, and serve this way as a crossing point.
  • For convenient reasons, no city can be founded on large river tiles, they can only be built on its shores.
  • If a city is nearby a large river, it can build a riverboat, which would be a transport unit working exactly like the carriage: it can only move on large river tiles, and can transport both goods and other units (just like a carriage).
  • If a large river is within a city radius, it produces fish and we can assign a fisherman to work on the tile. The river dock improvements increase fish production.
I would personally oppose the construction of bridge on large rivers. The first bridge over the Mississippi was only completed in 1856. River docks should be enough to make large rivers being crossed by land units.

This approach might be interesting as I believe it requires a lot less addition in game core concepts with the same expected result. Here are the difficulties I see:
  • The AI would need to be guided here. Maybe AI pioneers getting on a large river should be pressured to build river docks on it. The AI should also value land tiles nearby a large river as better spots to found a city.
  • A new map script would be necessary to generate large rivers. That would be something like "large river" road type joining coast to normal rivers. A normal river would necessarily end in meeting a large river. I'm really no expert in map scripts and I don't know how they work so the opinion of an expert would be appreciated here.

Anyway, that's all just a first idea. I would really be glad to have others opinion about it. What do you think? Wouldn't it be easier to implement this way?
 
Last edited:
I've dug a bit more the idea about using roads mechanics in order to implement large rivers.

Actually, avoiding units to get on large rivers is really easy. This is managed in the file CivUnit.cpp on line 3012. We just need to add something like:
Code:
if (pPlot->getRouteType() == 3)
{
if (!(m_pUnitInfo->allowsMoveIntoPeak() || (getProfession() != NO_PROFESSION && GC.getProfessionInfo(getProfession()).allowsMoveIntoPeak()) && (pPlot->getImprovementType() != (ImprovementTypes)(GC.getDefineINT("RIVER_DOCKS")))))
    {
        return false;
    }
}

Now it doesn't solve the map scripting which is a field I really know nothing about. @raystuttgart has elaborated the maps scripts for RAR but he's retired now. Contrary to normal roads, the script should force all "large river tiles" to be connected up/right/down/left, and not diagonally. Otherwise this would creates holes in which normal units could sneak in.

Here's a little scheme to imagine different paterns.
- A large river begins with a small river and ends in the ocean.
- Tiles with river docks are pictured in green. They can be crossed by normal units.
- Large river tiles which can't be reached by normal units are pictured in brown.



Graphics look a bit tedious to create because there are tons of image to generate, but it looks like something which could be done. They are all defined in XML/Art/CIV4RouteModelInfos.xml. @Schmiddie bumped this thread and he knows a lot about Civ4Col graphics, so his opinion would be valuable here.

As for the coding part, there are probably difficulties I've overlooked. The opinion of @devolution, @Nightinggale or any other experienced developpers would be appreciated regarding this.
 
Perhaps also, all tiles adjacent (or even up to two tiles away) from a large river gain the same resource effects as being on a small river tile? Stuff like better pastures or whatever the current bonus is to resources on river tiles. (Two tiles is probably too much, cause then a city founded next to a large river pretty much has almost all its tiles with the river bonus).
 
Perhaps also, all tiles adjacent (or even up to two tiles away) from a large river gain the same resource effects as being on a small river tile? Stuff like better pastures or whatever the current bonus is to resources on river tiles. (Two tiles is probably too much, cause then a city founded next to a large river pretty much has almost all its tiles with the river bonus).

Which would not be entirely wrong - cities have been founded and flourished next to rivers historically. How many tiles should be dependant on mapsize (e.g. 2 tils on huge but only 1 on medium).
 
Marla_Singer, I think it's a wonderful idea! I'd love to see this added but know nothing about modding so I'm not much help except as a cheerleader and someone to bounce ideas off of.
 
This is a really cool feature, and it would be fantastic if we could get to the point where it could be implemented. Unfortunately, we don't have any team members to spare for the foreseeable future :sad:

@Marla_Singer : Thank you for your thoughts and also the nice mockup-graphics. I think that modifying the map scripts may actually be the hardest part to get this feature working. The movement\pathfinding AI logic, may not be that bad (at least I'd volunteer to implement that if someone did the map generation)
 
Last edited:
Here's an idea for map generation:
Maybe you don't need entirely new scripts just some afterwork on the regular rivers. Write a script that replaces normal rivers with LargeRiver tiles starting from its delta at the ocean and going up certain amount of tiles - of course a lot restrictions would be needed in that script.

Example:

This is the start.
upload_2018-7-6_10-31-9.png


The script starts replacing rivers with LR tiles
upload_2018-7-6_10-32-35.png


keeps working on the left branch until it must stop because of the hills
upload_2018-7-6_10-34-32.png


works on the right branch for some more (a random amount of tiles or converts no more than half of the original river, as you prefer)
upload_2018-7-6_10-37-2.png


I'm not a programmer so I don't know if it would be really a good solution, I just know some of the basic logic of programing and imagine it a simple solution.
 
Hi guys,

I might be out of Civ4Col-Modding since quite a while.
But I still remember my code analysis and protoyping for this.

Trust me:
Large rivers as a TerrainType is the best technical solution.
Everything else is way more complicated.

* Improvement Logic would work (more or less easy xml configuration instead of heavy coding)
* Yield Logic would work (more or less easy xml configuration instead of heavy coding)
* Building Logic e.g. Landing Stage in Cities could be adjusted (with reasonable coding in DLL)
* Resource Logic would work (more or less easy xml configuration instead of heavy coding)
* Momement Logic would work (with reasonable coding and adjustment of xml schema and xml)
* Map Generation Logic could be adjusted (with reasonable coding in DLL and Map-Script)
* AI Logic could be adjusted (with reasonable coding in DLL and Map-Script)
* Graphics could be done without difficult overlay effects
* Performance would be much better than with other solutions
...

Don't waste your time with anything else.

There are still a lot of challenges in this.
(Hardest part are graphics, map generation and AI logic for settlements etc.)

In fact, this feature is very much possible.
(It is a lot of effort though.)

The question for me simply was:
Would it add enough new fun to the game to really justify the efforts for implementation.

By the way, I still take a look in the forum occcasionally. Event though I am often not logged in with my account.

Best regards,
ray
 
Last edited:
Top Bottom