Large Rivers (trying to make an old dream come true) [IMPLEMENTED]

Do you want Large Rivers in WTP?


  • Total voters
    45
Guys, trust me, it shoudl really be a Terrain Feature, otherwise we make MapGeneration and MapScripts incredibly difficult.
(I will be back quite late this night.)
We dropped all talk, which would touch the map generation. The question here is if it's a valid option to trick the graphics engine to draw something other than what the map generation ends up with.

The two terrains won't blend under the feature as they should :(
I'm sorry but I tried all I could :rolleyes:

So the trade-off is:
  1. no River ford feature at all OR
  2. add River ford and accept the "ugly" graphics
Now we tested it and know drawing a new terrain isn't the path to creating much better graphics, all without writing a single line of code. I have an easier time accepting "ugly" when I no the possible alternatives have been tested and that they didn't improve the graphics significantly. I believe it had to be tested and if the graphics would benefit significantly, then look into figuring out how to get the DLL to display it without messing up the code. I have an idea for the code, but it's totally not worth the time if it won't result in significantly better graphics.

Since we need a ford for the strategic gameplay value, I suppose we have no choice but to accept graphics, which aren't as great as we would have liked. It's not like it's horrible graphics, just less good than the rest. Hopefully it will not be too much of an eye sore for the players when they aren't focused on it like we are right now.
 
@Zeta Nexus:
Please send this version of the Terrain Feature Sand Banks to me. :thumbsup:
It may not be perfect yet, but let us see what we can do starting with this.

I still have contacts to a few experienced graphical modders I might be able to ask and beg for help. :dunno:
Maybe old graphics veterans of Civ4Col like @Willi_Tell or @Schmiddie might be so kind to take a look.

We will be able to solve all of this, trust me here.
But the first version might not be graphically perfect yet.

Considering graphics:

There is no need to panic yet. The graphics do not look "that" bad. ;)
Creating great grahics is just as difficult as creating great code.

Even the best graphical modder can fail to create "perfect graphics" his first tries. It is absolutely normal.
But then he might find others to help. Or maybe months later a great idea comes up.

The graphics that you see now in WTP have been created by some of the best graphical modders in Civ4Col history !!!
(Schmiddie, Melcher Kürzer, Willi Tell, ...)

Currently we do not have them on board. :sad:
Thus we can not expect the same extremely high graphical standard at the moment.

At the moment I am however really greatful that @Zeta Nexus helps us. :thumbsup:
And for a beginner in 3D graphical modding his graphics are really great!
So please appreciate that.

Considering overall Technical Concept:

Let us please make this feature not too difficult and too much effort.
It is not worth coding additional complicated logic for a single graphic.

In the future somebody needs to maintain this feature or may want to expand it.
Also the more complicated we make this the more complicated we will make it for modmods.

If I have learned one thing in my feature desings over the last 12 years, it is:
Keep it technically as simple as possible! (Otherwise you will regret it at some point.)
 
Last edited:
I will try to integrate Improvement "Raft Station" and Terrain Feature "River Ford" the next days.
(Once I have all needed graphics for it including Buttons. Might however also try to create some of them my own.)

I will also try to finish the game logic for this feature as soon as I can.
(There are still several small details missing.)
 
Button for raft station:
Thanks a lot.

I would also need a "Build Action" Button for the Pioneer.
Could you create it for me as well?
 
At the moment I am however really greatful that @Zeta Nexus helps us. :thumbsup:
And for a beginner in 3D graphical modding his graphics are really great!
Thx :hatsoff:
We will be able to solve all of this, trust me here.
It's good that you are so optimistic :)
However the game engine has it's limitations. As you cannot turn square tiles into hexes, some graphics may be just impossible.

I'll send you the river ford ASAP...

I also have some ideas about yet an other approach to create a bit better graphics: That would be 2d but may have variety. But I'll probably have time for that only the next week.

I would also need a "Build Action" Button for the Pioneer.
Could you create it for me as well?
How does it look like? Where do I find something similar?
 
How does it look like? Where do I find something similar?
See here:
...\Assets\Art\interface\game hud\actions

These are the images for the Command Buttons (of e.g. the Pioneer) to build something.
Since I want the Pioneer to be able to build this, I also need a button for it.

As an example you could use:
Trapper_House_high_res.dds
 
Hi guys,

ok the "River Ferry Station" (I had renamed it) - is now in the game. :)
(The logic to allow all Land Units to pass Large Rivers with this Improvements is also done.)

Spoiler :

The logic to build it by e.g. a Pioneer is still missing though.
Once I get the Command Button, it should however be a piece of cake.


Colopedia:
Spoiler :




Crossing Large Rivers always being allowed with Improvement River Ferry Station:

(Example Royal Artillery.)
Spoiler :




 

Attachments

  • Civ4ScreenShot0002.JPG
    Civ4ScreenShot0002.JPG
    156.4 KB · Views: 326
  • Civ4ScreenShot0003.JPG
    Civ4ScreenShot0003.JPG
    133.5 KB · Views: 362
  • Civ4ScreenShot0004.JPG
    Civ4ScreenShot0004.JPG
    128.8 KB · Views: 359
Last edited:
How much movement will the crossing cost?
Do you plan to have different costs in regard to "larger" or "heavier" units? For example cost of 1 for infantry units, 1.5 for cavalry and 2 for wagons, artillery and treasure.

Regards
XSamatan

PS: Graphics on the improvement look fine to me!
 
How much movement will the crossing cost?
Either always 1 movement point or 2 movement points. - No special Profession specific or Unit specific rules for that.
(I am not really sure yet, once it is done I first need to give it some test play to see how it feels before balancing details.)

But again, I want to keep this feature simple. ;)

I have no plans to code hundreds of lines of additional special rule code or configuration possibilities for every tiny thing we could imagine.
That would make it too difficult to maintain or too heavy on performance or too instable or too difficult to adapt / change by a modmod.

Most Units (e.g. Treasures, Artillery, Wagon Trains, ...) will only be able to cross Large Rivers with special Improvement or Terrain Feature.
Other Units (e.g. Scouts, Pioneers, ...) will always be able to pass Large Rivers.

I will deliver this feature to work properly and have good quality. :thumbsup:
I had promised this feature many times and thus I feel obligated to keep my word.

But I will do it in a way that is still easy to understand.
Just in case I take a long break after this ...

PS: Graphics on the improvement look fine to me!
I think so too. :)
@Zeta Nexus did a great job. :thumbsup:
 
Last edited:
The logic to build it by e.g. a Pioneer is still missing though.
Once I get the Command Button, it should however be a piece of cake.
Use a different button till then...
 
The buttons should fit with the other buttons for the pioneer (right angle, shadow, colors etc.) ;)

Please let me know if I shall create one. It needs approx. 5 minutes...
You are free to do it.
 
Last edited:
It's good that you are so optimistic
If we had always given up at every technical problem we have met, this giant beast of a mod would not exist. ;)
With enough skill, motivation and perseverence almost everything can be done.

If the skills of a single modder are not enough, the united skills of a modding team usually are.
And if that does not suffice, there is still community as well.

So far this has been working far better than I originally expected.
So there is absolutely no reason not to be optimistic.

I'll send you the river ford ASAP...
But I'll probably have time for that only the next week.
There is no need to hurry, take your time. :thumbsup:
One or two weeks more or less until we finish this do not matter.
 
Last edited:
Ok guys, the next small piece of game logic for Large Rivers has been implemented. :)
(I will try to explain this as easy as I can, because it might be a bit confusing.)

Since "Large Rivers" do not allow larger Ships to sail on them, I have written a logic that ensures the following:

Cities on Large Rivers (without any other Water access) can still build Landing Stages and Docks.
Thus they can still construct Ships that can Sail on Large Rivers (e.g. Small Coastal Ships, Large Coastal Ships and Fishing Boat).

But these Cities can no longer build any higher levels of Harbour Buildings.
Thus they can also not construct any Ships that can not sail on Large Rivers (e.g. Caravels, Merchantmen, Frigates, Galleons, ...).

-------

The logic will fully adapt itself according to the construction dependencies (required Harbor Buildings) of Ships configured in XML.
It will also fully adapt itself to the XML configuration considering which Ships are allowed to sail on Large Rivers and which are not.

There is absolutely no hardcoding of Units or Buildings in this.
This ensure that the logic will still work for whatever is configured in XML for Ships (Movement on Large Rivers or required Buildings).

This was especially important for AI.
(But it should also save us from user complaints.)

-------

See this City at a Large River:
(It could build Landing Stage and Dock, but it can not build any upgrades of those anymore.)
Spoiler :


 

Attachments

  • Civ4ScreenShot0000.JPG
    Civ4ScreenShot0000.JPG
    183.3 KB · Views: 312
Last edited:
We are making good progress with this. :)
And there are absolutely no unsolvable issues left.

It is normal that big features like this take time. So do not worry, that this is not yet completely finished.
There are many details to take care of and need to be done with care to ensure quality, performance and stability.

What will be most time consuming:
  • adapting MapScripts (which will be a real challenge)
  • adapting existing Maps (which will be simply really tedious)
This is my checklist:
Spoiler :

In some aspects it will act like a "Water" plot.
  • It is not possible to found a City directly on top of it [DONE]
  • The only Yield you can get of it is "Fish / Food" [DONE]
  • It will only have Bonus Ressources like "Coast" Terrain [DONE]
  • Allowing Coastal Ships to use it (and few other Ships) [DONE]
  • Having normal Rivers flow into it [DONE]
  • Allow Cities built next to it to build "Piers" (but no Upgrades of that, unless they also have Ocean access directly from another Coast Plot) [DONE]
  • Ensuring that "Large Rivers" that do not end in Ocean do not get "Lake Food Bonus" (otherwise op) [DONE]
  • Ensuring that Water Goodies are not spawned on Large Rivers [DONE]
  • ...
But in other aspects it will act like a "Land" plot.
  • Allowing (specific) Land Units to always enter / cross [DONE]
  • Having new Terrain Feature (to allow other Land Units to enter / cross) [DONE]
  • Having new Improvement (to allow other Land Units to enter / cross) [DONE]
  • Allowing Pioneers to build the new Improvement [DONE]
  • Teaching AI Pioneers how to actually to it in a purposeful way
  • Having normal Rivers not directly affect it (e.g. no Yield modifiers) [DONE]
  • ...
General aspects:
  • Basic Setup of Terrain and its ArtDef [DONE]
  • Buttons for Colopedia and World Builder [DONE]
  • Writing Colopedia Concept Page for "Large Rivers"
  • Adapting Area Size Computation
  • Adapting AI (e.g. Settlement found values) [DONE]
  • Balancing of Movement Speed of Land Units on Large Rivers [DONE]
  • Balancing of Movement Speed of Ships on Large Rivers [DONE]
  • Configuring Combat Balancing and Promotions for Large Rivers
  • Clarifying if Land Combat Units should be allowed to capture e.g. Coastal Ships on Large Rivers [DONE]
  • Forbidding Animals to be spawned there [DONE]
  • Allowing most small Land Animals to enter it (like Crocodiles or Bears) [DONE]
  • Forbidding giant Water Animals to enter it (like Whales) [DONE]
  • Adapting existing Maps
  • Adapting MapScripts to generate Large Rivers
  • ...
 
Last edited:
Ok, I now also implemented AI city found values - considering "Large Rivers"
(Meaning the logic that tells AI the best places to found cities.)

I will try to explain it with the following picture:
(I will ignore for now all the many other rules considering Food, Bonusses, ... because the funtion is too complicated to fully explain.)

"1" Locations:
They have direct Ocean access for all Ships.
Thus they get a higher value (% increase) due to Ocean access for founding Cities generally.
But especially the first City should be placed at such a location (additional increase).

--> Good places to found a City, especially good for first City

"2" Locations:
They do not have direct Ocean access for all Ships - only for small Ships that can pass Large Rivers.
Thus they do not get a higher value (% increase) due to Ocean access for the first City - actually it is slightly decreased for first City to counter the "Food" value effect of Large Rivers.
But all later Cities get a higher value (% increase) compared to Cities that have no Large River access to Ocean.

--> Rather not found first City here - because Ocean access does not work for all Ships
--> For all later Cities it is better though than founding at locations without Ocean access at all

Spoiler :




----------

There is in fact a second aspect that makes "Large Rivers" attractive for AI: Food !
By the food factor alone, AI usually is more likely to settle at "Large Rivers".
(It is a factor of the AI city found value logic as well.)

Thus I had to introduce my logic described above to try to tell it not to be too interested in "Large Rivers" Plots (that are not directly at the coast) for the first City.
(But these details are pretty hard to balance.)

So far it seems to be working good in my first tests. (Some Autoplay)
But only a longer internal test period will really show if I balanced it correctly.

----------

@devolution
I am open to all suggestions for improvement. :thumbsup:

If you want to take a look at the code, you can find it here:
(It is commited to branch "Large Rivers".)

CvPlayerAI.cpp

int CvPlayerAI::AI_foundValue(int iX, int iY, int iMinRivalRange, bool bStartingLoc)
//WTP, ray, Large Rivers - START
// to ensure that first city is not found at Large River without other Water access
 

Attachments

  • Civ4ScreenShot0000.JPG
    Civ4ScreenShot0000.JPG
    260.8 KB · Views: 245
Last edited:
adapting existing Maps (which will be simply really tedious)
As mentioned in issue 385 we should also review the existing maps to specify which colony radius they are intended for. Right now none of the maps have this setting meaning the user can pick. However if the map creator added settlements with a specific radius in mind, then forcing that radius would likely be what we should do.

I can easily mod the map reader to read and discard this value meaning whoever goes through the maps can add the radius setting even if the runtime colony radius isn't in the large river branch.

Something somewhat unrelated, but I feel like it's worth mentioning since both issues share that somebody has to look through the maps and figure out if or how they should be updated.
 
Yeah, that makes sense. The problem is, that I could not render the feature bellow water.

The idea was to use the same texture as the new terrain, so they would blend in each other but as you see, it is floating on the surface of the water :(
I'm new to Nifscope.

Maybe something like this could work?
Spoiler :







In BtS there is a mod (War prizes I think) that lets ships capture ships with a chance but not always. I think that would make the most sense.

Which files have you changed for the sandbar?
 
Top Bottom