1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

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

Discussion in 'Civ4Col - We The People' started by raystuttgart, Mar 5, 2020.

?

Do you want Large Rivers in WTP?

  1. Yes, it adds lots of new possibilities for gameplay.

    93.9%
  2. No, the is too big, too complicated and will delay everything else.

    6.1%
  1. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,420
    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.

    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.
     
  2. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    5,724
    Gender:
    Male
    Location:
    Stuttgart, Germany
    @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: Oct 17, 2020
  3. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    5,724
    Gender:
    Male
    Location:
    Stuttgart, Germany
    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.)
     
  4. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    5,724
    Gender:
    Male
    Location:
    Stuttgart, Germany
    Thanks a lot.

    I would also need a "Build Action" Button for the Pioneer.
    Could you create it for me as well?
     
  5. Zeta Nexus

    Zeta Nexus Deity

    Joined:
    Jan 23, 2014
    Messages:
    3,969
    Gender:
    Male
    Location:
    In a constant brainstorm...
    Thx :hatsoff:
    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.

    How does it look like? Where do I find something similar?
     
  6. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    5,724
    Gender:
    Male
    Location:
    Stuttgart, Germany
    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
     
  7. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    5,724
    Gender:
    Male
    Location:
    Stuttgart, Germany
    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 :




     

    Attached Files:

    Last edited: Oct 17, 2020
  8. XSamatan

    XSamatan Chieftain

    Joined:
    Sep 4, 2013
    Messages:
    56
    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!
     
  9. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    5,724
    Gender:
    Male
    Location:
    Stuttgart, Germany
    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 ...

    I think so too. :)
    @Zeta Nexus did a great job. :thumbsup:
     
    Last edited: Oct 17, 2020
    Mr. ZorG likes this.
  10. Schmiddie

    Schmiddie Emperor

    Joined:
    Feb 27, 2012
    Messages:
    1,378
    Location:
    Germany
    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...
     
    HermanHeydt and raystuttgart like this.
  11. Zeta Nexus

    Zeta Nexus Deity

    Joined:
    Jan 23, 2014
    Messages:
    3,969
    Gender:
    Male
    Location:
    In a constant brainstorm...
    Use a different button till then...
     
  12. Zeta Nexus

    Zeta Nexus Deity

    Joined:
    Jan 23, 2014
    Messages:
    3,969
    Gender:
    Male
    Location:
    In a constant brainstorm...
    You are free to do it.
     
  13. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    5,724
    Gender:
    Male
    Location:
    Stuttgart, Germany
    @Schmiddie
    Thanks, that would be really nice. :thumbsup:
     
    Last edited: Oct 17, 2020
  14. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    5,724
    Gender:
    Male
    Location:
    Stuttgart, Germany
    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.

    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: Oct 17, 2020
    HermanHeydt likes this.
  15. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    5,724
    Gender:
    Male
    Location:
    Stuttgart, Germany
    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 :


     

    Attached Files:

    Last edited: Oct 17, 2020
    HermanHeydt and Mr. ZorG like this.
  16. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    5,724
    Gender:
    Male
    Location:
    Stuttgart, Germany
    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 :

     
    Last edited: Oct 25, 2020 at 2:18 AM
    HobyMorgan and HermanHeydt like this.
  17. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    5,724
    Gender:
    Male
    Location:
    Stuttgart, Germany
    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
     

    Attached Files:

    Last edited: Oct 18, 2020
    Zeta Nexus likes this.
  18. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,420
    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.
     
    raystuttgart likes this.
  19. Schmiddie

    Schmiddie Emperor

    Joined:
    Feb 27, 2012
    Messages:
    1,378
    Location:
    Germany
    Which files have you changed for the sandbar?
     
  20. Zeta Nexus

    Zeta Nexus Deity

    Joined:
    Jan 23, 2014
    Messages:
    3,969
    Gender:
    Male
    Location:
    In a constant brainstorm...
    Sorry, I don't remember :blush:
    That was my first try and when I failed with it I simply deleted it.
     

Share This Page