Page 1 of 1

A way to make Civ3 rivers

Posted: Wed Jul 10, 2019 12:00 pm
by Ignatus
In commercial Civilization >= III rivers go between tiles; they do few compared to CivI/II rivers, only increase defense while attacked through and delete move bonus when you can't build bridges. While we don't have tile-edge extras, we likely can do it with our roads. For a rectangular map, we just define 8 road types that have negative move bonus (have not checked but it is either possible or requires minor code changes). After continents are generated, a script fills them with pattern

Code: Select all

A B C D
E F G H
C D A B
G H E F
Then we run a river generator - another script that finds appropriate tile edges with one end at a coast and lines them farther; to do so, you put on one of the two tiles an extra filled before on the another:

Code: Select all

A  B  C   D
    +-------
E  F|FGC HD
    |
...
The sprites can be drawn so that the extras will be invisible if not connected and will form nice rivers when connected. When a road is built by a civilization knowing bridges, the river-makers are replaced by neutral extras by a callback, and it happens automatically in their territory, and a third callback restores river if a bridge (road at one side) is destroyed (it's likely even cooler than in Civ3 where you AFAIK just removed the penalty for your units wherever just learning the tech).
A direction-aware defense bonus can be given by placing an invisible fortress by action_started_unit_unit and removing it by unit_lost callbacks.
Of course, all these callbacks will make AI feel dizzy.

Re: A way to make Civ3 rivers

Posted: Sun Jul 14, 2019 10:32 am
by Ignatus
Ah, the move bonus here won't work. Units use the fastest road present, they give speed and the bonus works only between turns.