1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Resources Stockpile, Routes, Placement and Acquisition

Discussion in 'Gedemon's Civilization, a total overhaul project' started by Gedemon, May 7, 2017.

  1. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,436
    Location:
    France
    RESOURCES : Stockpile & Transfer

    Spoiler First new city, first transfer link... :



    Transfer are automatically made between cities of the same civilization if there is a river route (as in the above picture), a road, a sea route, or a trader linking them.

    The routes have different efficiency, limiting the amount that can be transferred, using a trader will allow 100% efficiency.

    International transfer will not be automatic, unless a specific trade agreement is made, or simply when using a trader unit.

    Spoiler And first transfer the following turn :



    As when transferring to units, cities keep a percentage of their stock to themselves (more important for city transfer : 75%), and will transfer only to a city that as less quantity of a resource.

    In the above case 45 is the reserve value of the stock of sheep in Cairo, the surplus (6 sheeps) has been send to Damietta.

    There is no migration of population coded yet, but it's planned, at least for later eras.
     
    Last edited: Oct 28, 2017
  2. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,436
    Location:
    France
    Some more visualizations of trade network :

    Spoiler Trader and River Routes :
    Clipboard-1.jpg

    On the screen above, you can see all the cities Delhi is sending resources to:
    - Mumbai using a Trader Route
    - Calcutta and Baltimore using a River Route (you can see that those are not affected by mountains)

    Note that Baltimore is exporting resources to Delhi (Bananas) and Mumbai is transferring resources to Delhi (Marble)

    Calcutta is not sending resources to Delhi, on mouse over its name you would not see a visualization, only the routes for resources going out are shown (but I do plan a report screens at the city level for all routes)

    In the mod context I use "transfert" when sending resources to another city of the same civilization and "export" when sending resources to a foreign city (ATM this requires Open Borders, except when using a Trader, I'd like to have this linked to a new diplomatic agreement)

    Transfers does not generate incomes, but Import/Export does (for gameplay reasons, you'll get more gold from exporting than from importing, which means that, yes, importing is also a source of income)

    Spoiler Coastal and Road Routes :
    Clipboard-5.jpg

    Here you see that Philadelphia is sending resources to:
    - Los Angeles using a Coastal Route
    - Washington using a Road Route (in fact a Trader Route from Washington, but it will become a Road Route once the Trader is affected to another city)

    Spoiler I call that a feature ! :
    Clipboard-6.jpg

    You can't see Routes linking to a city you've not discovered, but you can see a Route between two cities you know, even if you haven't discovered all the plots forming the Route.

    But to create a Route, your own cities will require you to reveal all plots.

    In the example above, Scythia has explored all the required plots, which allows Kostromskaya to Export resources to Calcutta, but Calcutta can't create the reverse Route until I've revealed it.

    I do think it's an acceptable gameplay mechanism, you know the two cities, you know there is a route between them, you even know the path, but you don't know what's on it, and so your own traders requires you to map it.
     
  3. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,436
    Location:
    France
    Spoiler Another trade network example :

    This one is interesting to illustrate that routes may have different efficiency over distance.

    Efficiency controls how much resources can be send from cityA to cityB, the current value for Road Routes efficiency is lower than the value for Sea Routes, that's why Pazyryk is using Coastal Routes to Neapolis and Kostromskaya instead of the available shorter Road Routes.

    Note that the path must be free of enemy units, if there were ships blockading Pazyryk, it would use the Road Routes (transferring less resources) and would be cut from Calcutta.
     
  4. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,436
    Location:
    France
    About resources, at the map scale, I don't think we could add too many resources which would lead to some resources unavailable in an area (one of the goal is to have them more accessible but also more important), but I could develop what's already in the mod: stacking multiple resources on tiles, and having the current civ6 resources representing large deposits.

    What I'm also pondering (to prevent having dozen of different resources showed on the UI for a tile) is also to show just a generic resource value (for example "metal ores") being collected on the tiles, the resulting resources (type, quantity) being linked to the tech level of the civilization and/or the building (but still keeping the "large deposit" concept above)
     
    Last edited: Oct 27, 2017
  5. Knasp

    Knasp Chieftain

    Joined:
    Sep 10, 2011
    Messages:
    119
    I actually would suggest maybe getting rid of food "resources" altogether, but hear me out. Or see "My food ideas" below for concrete suggestions, if you're impatient.

    Especially in prehistoric times and in the beginning of the agricultural revolution, a variety of plants were domesticated and cultivated in different parts of the world, at different times. But once a plant was successfully domesticated, it's use seems to have spread to neighboring settlements and cultures, and then further off into lands "unknown". An important limitation for this diffusion/spreading was of course the plant's required climate and soil, to which the wild plant initially evolved. But through cultivation and stubborn breeding, even such limitations could sometimes be overcome. Two examples of this diffusion are Soybeans and Bananas. Soy was first cultivated in China, around 7000 BCE. Between 100-1600 CE, Soy was introduced to India and SE Asia. Eventually Soy was introduced through trade in N America by 1765, and to the rest of the world in the late 1800's.
    Spoiler Fun fact :
    The Hitler Youth supposedly called them "Nazi beans" :lol:.
    Today soybeans are an excellent source of protein and a vital staple food for populations (and livestock) all over the world. The Banana is another interesting example. It was originally cultivated in SE Asia 8000-5000 BCE and was brought to Madagascar by sailors in 4th century CE. Later Bananas were introduced to Africa and Spain, by the Islamic world in the 6th - 10th centuries. And finally bananas were brought to S America in the 15th-16th centuries by the Portuguese. The domestication of animals have followed a similar pattern.

    The point I'm making is that it makes little sense to have food and animal resources evenly distributed across the world. I would rather see that plants and animals were native to certain climates/environments (or continents in a simplistic Civ VI context), and that these could be bred, traded and brought to new places. If a Civilization establishes trade over oceans, or establishes new colonies there, perhaps they can find new, fertile ground for planting and cultivating non-native crops, and add the possibility to introduce new species or breeds of livestock to new continents.

    Spoiler My food ideas :

    Resource placement, gathering and domestication
    • Plant placement (Staple foods) following semi-realistic environmental and terrain requirements
    • Wild animals could be represented as units, at least in a Prehistoric Era (before Ancient Era). Civilian, barbarian, animal units, that wanders around, and that you can capture and then domesticate. The actual domestication could be as easy as bringing the Sheep or Horses to a tile within your cultural borders and then use that unit's ability to construct a Pasture.
    • Plants could be spawned randomly (within their respective climate/terrain types) and then they could be discovered by your Gatherer- or Scout units. After discovery, they could be brought home in a similar fashion, to be planted like farm improvements. Basically you would have a subtype of Farms. I.e. Farms (wheat), Farms (soybean), Farms (flax), and so on.
    Cultivation of domesticated plants and animal husbandry
    • Once a plant or animal has been domesticated, you can construct new farms or pastures with the specific species subtype. The Builder would gain access to the newly aquired Farm or Pasture subtype.
    • Different plants and animals, can offer different bonuses. So if you want to grow lots of food, then you can plant Wheat and Beans. But if you want to weave Linen for clothes and sails, then you need to plant Flax. If you want to increase your Gold income through trading and/or provide luxuries for your population, then you can plant Cocoa, Coffee or Bananas.
    • Domesticated plant and animal species could then be acquired through direct trade, far reaching maritime trade (East India Company), or from neighbor to neighbor, slowly through diffusion.
    • Another possible way to gain access to new organic resources would be to send exploratory expiditions all over the world, carrying the desciples of Linneaus, or perhaps a young Charles Darwin ;-)
    • You could settle a colony in New Zealand, and fill that entire place with non-preexisting Sheep :goodjob:
    • Animals that have been domesticated, can then be bred for a specific purpose. Horses can be bred (Application) for size and strength, to carry heavy cavalry. Elephants can be herded/bred (Application) for the Ivory resource, or for combat purposes (War Elephants).
    Additional/alternative ideas:
    • Unlike farms, in order to keep livestock you need to have actual units of flock-herders moving the animals between available grasslands and pastures. For example you could have an action by the Herder (Sheep) unit, to let the animals Graze, which could take a few turns, and this action would bring food to the population (or inrease the size of the herd). This idea would basically introduce micromanagement of animal husbandry, and having to optimize the placement of your animals. Because over-grazing a tile would reduce the ability of that tile to sustain the herd. You would need to leave the tile for some time, to allow it to recover. Overgrazing can add to desertification, as seen in Northern Sahara (16,000-0 BCE)
    • Wild animals, that can't be domesticated, will spawn and keep moving around and grazing. They could be hunted for food by Hunters or military units. If the hunting is excessive, there is a risk that all animals of that species are extinct. Like horses were in North America, prior to the European colonisation. Other wild herd-animals, that can't be domesticated, like Reindeer or Bison, could be harvested for food, whenever you move a hunter unit onto the same tile. So basically you have to follow the herd wherever it is migrating (Tundra or Plains in a simplistic Civ VI context
    • In War, when enemies come attacking or raiding, you could then move the herds of strategic horses, or valuable livestock, to safer grounds. And if you can't escape in time, then the enemies will capture your livestock, granting them food resources. Partly by affecting their supply needs (the soldiers can eat the livestock), or by allowing them to take the herds of livestock home to their own lands as valuable plunder. If you move the livestock to tiles that can't support them, they will also require food from supply lines, like military units, or the herd will diminsh in size.
    • The addition of these walking-food-resources, could essentially make for a lot of interesting situations. Perhaps you could take livestock units with you, when going to war, thus providing your troops with a nearby food supply. Or perhaps you could move the livestock when natural disasters flood an area, and so on.
    Final thoughts regarding terrain and features:

    I'd like to see new terrain types and terrain features introduced. A diversity of terrain types could limit the ability of specific plants and animals to appear, or be utilised all over the world, north and south. I would personally want to see Terrain have properties of Climate, Elevation, Roughness, Soil type. Apart from resource placement, and fertility for farming/grazing, it could also find uses regarding combat. New features could be different Wetlands, River deltas, Estuaries, Mangrove forests on coastal tiles and Archipelagos on water tiles in general. Savannah, Evergreen forests and so on...

    The biggest problem with these food related ideas of mine, is that I'm doubtful whether the A.I. could handle it.
     
    Last edited by a moderator: Oct 27, 2017
  6. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,436
    Location:
    France
    Dynamic resources is something I'd love to implement, but (because of AI, implementation in MP and my own difficulties to code anything new related to the UI) I don't want it to be dependent of any new type of actions, we have to link it to existing actions. I'd also like to avoid too much micromanagement (not preventing it completely, but not making it mandatory either)

    For example: new policies coded to encourage trade of (specific) resources and/or building/improvements/policies/project coded to allow resources diffusion on tiles or from a city having access to that resource.

    Say a city have access to a resource from its trade network, that could unlock a project in that city to implement the resource on a nearby tile (with conditions/limitations of course), consuming part of the city's resource stock each turn until the resource is implemented on the tile.

    If we go for dynamic resources, encoding overexploitation is a possibility, as well as (re)spawning/slow migration of wild animals.

    A small note too on the "scale" of the mod's worlds as I'd like it to be (relatively, gameplay first !) consistent with the mechanisms, IMO a tile should represent an area of 10000km², that's a bit small compared to the real ratio (Giant Earth = 16920 tiles, Earth surface = 510072000 km2, that would be 30146km²/tile, Largest Earth has 26680 tiles which would be 19118 km²/tile), but that way we can simply assume an easy to remember distance of ~100km between tiles centers.

    And that's why stacking (of units/resources/most districts) makes sense in relation to the mod's scale.

    About terrains, I'm no artist and won't change the apparence of the tiles, that being said it should be already moddable and I will include more terrains/features if another modder make them.

    What I can do (independently of the graphical representation of a tile) is to set different layers/properties for each tile. For example, the map generator use a height map to create the terrain type, the "height" property of a tile can be kept for later use.

    Now don't ask me to code a new map generator from scratch, what I propose is to take the current terrain/feature generator, then add a new layer of information on top of that.

    First we'd need to determine the sub-terrain types and the new features (and every other parameters we'd like to have), then how to place (or replace) them in relation with the current terrain/features generated by the map (and latitude)

    Resources are placed last, and that can be completely influenced by our own data.
     
    Last edited: Oct 27, 2017
  7. Knasp

    Knasp Chieftain

    Joined:
    Sep 10, 2011
    Messages:
    119
    Ok, good to know! Short on time right now, so I don't have time to think about or respond to all your good points. Just one thing:
    Is it possible to trick the A.I., by changing the effect of standard actions? For example: If the A.I. is programmed to build Builders and send them out to build Farm improvements. Could you change the effect of the standard "Build Farm" action? In that case you should be able to change it so that instead it builds either (1) a Farm with a "randomized" subtype, or (2) from pick from a "Priority list", i.e. a subtype that the City is currently missing. Then you can add new actions, that allows human players to choose freely, which Subtype they want, if they want.

    Also, will the A.I. try and capture Barbarian civilian units? In that case you might be able to make the A.I. go out and try to capture a "Wild Horse" unit. Once the unit is captured, it is transformed into a "Builder" unit with the Subtype "Horse herders". If the A.I. can be made to believe that it is a Builder unit, they will move it to their own (city) tiles and attempt to build a farm. If you can change the Standard action to prioritise the subtype of the unit in question (Horse-herder), then instead of a random farm, it builds a Horse Pasture.

    And if a player dislikes micromanagement (choosing) of the farm type, that player can also use the Standard action. Personally I think that choosing the type of improvement to build is a fun form of micromanagement, especially since the effects of the action are visible on the map (Unlike promotions for units).
     
  8. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,436
    Location:
    France
    Yes, I could code a random choice or use a priority list for the AI (the later is, in fact, AI coding), but there is still the problem of hacking something (from the chat system for example) to propagate the new action between players in MP games, and the UI coding, which is (really) not my cup of tea.

    But spawning a specific unit with a unique and specific improvement action is a viable solution for all cases, one that I like.

    So civilian barbarian horses converted to a "horse herders" unit that could only build a special improvement (spawning the horse resource on the tile) would work, even if many times during autoplays I've done a few facepalms seing some lone barbarian settlers running around for multiple turns in some civs territory...

    Another usage for some cultivable luxury resources could be similar to the idea idea of project, but this time spawning a kind of great marchant (similar to the "horse herders" in its use) in the city exploiting the luxury, and you'll have to escort him back to the place you want to implement the resource (but bonus resources would keep a more streamlined mechanism, like the first idea with projects)

    Now the problem is to create the units representations. It's possible (and it looks much more easier/faster than for civ5), but I don't have a lot of experience with the artdef files (and I'd prefer to use my modding time to code the mod's mechanisms, remember that we're already talking of years for the development)

    I may try to recruit at some point when the design of the base mechanisms feel good enough.
     
  9. Knasp

    Knasp Chieftain

    Joined:
    Sep 10, 2011
    Messages:
    119
    Interesting! I don't know much about the the map generator, but now I want to learn more. Anyway, I understand your position about the graphics. I've used the ModBuddy, and actually managed to add a new feature, by combining visual components (artdefs) from two different features. But for some reason the new feature doesn't show in the minimap/strategical view, and I'm not sure how to find what's missing. So, my biggest problem is my lack of familiarity with SQL and XML coding and particularly Civilization VI's file structure. All I've done so far is to copy existing code and tried manipulating things. Your mod has opened my eyes to what could be possible, if only I could learn. I think I'll make some more attempts ahead, and I would be glad to contribute anything at all really. But for now I think that I'm more likely to actually accomplish something, helping out with historical research or spit-balling concepts.

    I'd really love to see dynamic resources, because it's annoying to see food resources be completely static. Starting out, I wondered whether you could add a function to move the Food resource to a different tile. But that would require a new action, as you point out.

    My second point about getting rid of food resources was simply to reduce the cluttering of resources on the map, even if allowing stacking would stop them them from blocking other resources. If new food resources appear when building improvements, then you still face cluttering problems.

    When it comes to my ideas about domesticating food resources above, these are mostly relevant if a new game should start earlier than 4000-3000 BCE. Otherwise you could just as well randomly assign the "knowledge" of plant species and the kinds of domesticated animals at the start of the game. Just give some to each Civ, based on their starting environment and continent. I'd still think it would be cool if you only could build specific farms or pastures based on the current knowledge of your Civ. Anyway, I think it's rather dull that improvements are permanent, and that you don't need to maintain or improve your existing improvements (unless they were pillaged or something).

    Another (more abstract) suggestion is to abandon the idea about Farm subtypes. Instead you could have some different way of producing several plant resources on the cities farms. One way is to have the farms automatically switch to produce the specific plant resource that is needed at the moment. For example: If the city prioritizes food/is starving, then the farms will switch to growing Grains. But if the city is building ships/particular housing or conducting a trade project, then the farms would switch to produce Flax/Cotton. I mean, grains and textiles were often important in early trading.
    Though it would be more fun if the player can influence what is produced, and thereby let Civs specialize cities. Perhaps a few sliders similar to Civ 4's, together adding up to 100%:

    0-----50-----100 :c5food: Grains/Food crops (Growth & Stocking)
    0-----50-----100 :c5gold: Fruits & Spices (Luxuries)
    0-----50-----100 :c5production: Fibers (Textiles/Rope/Paper)
    I guess you could have a slider for every different plant resource, but that could become annoying (especially if more plants became available). The benefit of this second suggestion is that it would fit your Stocking/Supply concept. The downside however is that you wouldn't see individual plant resources represented on the actual map. Unless you could continually alter the appearance of the Farm improvements, to reflect the cities current choice of plants.


    Moderator Action: All posts above, this one included, have been copied and some may have been edited to fit the topic, but the original (unedited) posts are still available in the main thread - Gedemon
     
    Last edited by a moderator: Oct 27, 2017

Share This Page