We-the-People-civ4col-mod / Mod

This is the repository where the mod resides.
90 stars 37 forks source link

Variable (and random) plot yields (aka making maps more interesting, diverse and dynamic) #338

Open devolution79 opened 4 years ago

devolution79 commented 4 years ago

I've been pondering the following:

Why don't we randomize the plot yields on a per yield basis ? Right now every grassland has +3 food yield and every forest has (+x lumber). Would it not be far more interesting if the tile yields could vary so that we could have areas where the grassland was great for farming, mediocre for tobacco and terrible for breeding horses. The same terrain type would then have different characteristics elsewhere.

Unlike civ4, the base yields per tile is are high in COLO that we can easily accommodate this without throwing the map balance out the window.

It's also very easy to implement. Consider this: We simply iterate through all map plots after the map has been generated. For all yields we perform a random draw that assigns the tile yield (for all possible yields of a given terrain\feature combo) to one of the following categories: poor (-1), medium(0), superior(+1). We then assign this modifier to the plot's corresponding (CvGame::m_aPlotExtraYields) extra yield (weirdly placed in CvGame for some reason...) To make it more realistic we'd introduce some correlation so that we'd have small clusters that would have similar properties.

This would encourage players to seek out the best spots for the desired yield output. This would be an easy way to make the map terrain\feature matter a lot more without needing to introduce new types.

We could even consider additional features to make the map more dynamic:

A rainfall model when making maps (like Alpha Centauri) that would determine the plot yield variation to "enhance realism". Introduce resource depletion and resource discovery for mines (many civ4 mods have this like AND2) Soil erosion: Highly productive land plots could have their yields decreased due to overworking which could be a good nerf to super cities. Weather effects on land plots like sand storms on desert plots, blizzards in the arctic etc. Shallow water reefs (to make naval combat and maneuvering more interesting): https://forums.civfanatics.com/threads/modcomp-1492-reefs-and-weather.353871/#post-8907097  Migrating ice(bergs) Forest\jungle fires etc.

devolution79 commented 4 years ago

I forgot to mention that this stuff would ofc be optional and probably be enabled either through XML or a dedicated game option

devolution79 commented 4 years ago

Natural Wonders could also spruce things up a bit:

https://github.com/We-the-People-civ4col-mod/Mod/issues/250

Nightinggale commented 4 years ago

This really should be a map option considering it has to do with the map generation.

I like the idea (as optional!), but I'm wondering about how to implement it. One issue I have with it is what happens if you change the xml files like changing food from 3 to 2. When loading a game after such a change, the plots should update. Ideally what is saved is the offset from the xml value. The most common value would be 0, which in the new savegame format is implied if the data isn't included in the savegame. In other words we can save the offset for all plots without actually saving a whole lot of data.

Another issue is performance. Would it be possible to cache the production for faster access time? Something like a YieldArray telling the production values of all yields on the plot instead of calculating them each time. The AI spends a whole lot of time deciding where to place units in colonies. If the yield production can be cached, the AI would likely speed up enough for the player to notice.

While not strictly needed to implement this concept, it would be something to consider if we change the implementation anyway.

LibSpit commented 4 years ago

Would this not be more work than simply adding new terrain types?

You would have to some how display the yield quality for each yield on each tile and the player would have to also track this info, would it not be visually and functionally easier to just add the different terrain types, Is it not technically already done using the bonus yields (denoting a superior cotton tile for example.

It seems like you would be making a whole new system and UI implementation for a function that already exists that could be modified relatively easily?