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

Mining, trapping, prospecting, and depleting resources

Discussion in 'Civ4Col - Medieval: Conquests' started by Kailric, Aug 16, 2014.

  1. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    I am looking into adding a new way to gain certain resources such as the precious metals and hides/skins. The idea is that most of the resources are not limitless and a good part of man's history has been to go in search for such resources and that is what I am hoping to add here. The thrill of adventure, finding, and reaping the mother load.

    Rivers, mountains, hills, forests can all be prospected for certain resources. Prospecting, or "Scouting" for when in a forest, returns a bit of the resource (like a treasure unit) that you can unload in your cities. It also reveals any hidden resource.

    Resources will not be limitless and will deplete over time, causing you to have to go in search for more resources. Once a resource is gone, it may not be gone for good as Techs can unlock new veins of resources, or techniques to get at these resources.

    Naturally, if you play a game long enough you will deplete all the maps resources. This should not be a huge issue in M:C but for longer mods like a World History this could lead to some interesting environmental challenges.

    Here is what I am working towards:

    Coding Notes
    Code:
    Each plot has a random chance to have a resource set in the XML. 
    Random Yield amount is set in XML.
    When a Unit Prospects if there is no Yield Present there is a chance to find some.
    If Yield is present and not revealed it is revealed.
    Can only Prospect once per Layer.
    Need a boolean for each player stating if Plot is Prospected. 
    When a new Layer is added set this boolean to false.
    New Profession: Prospector
    • -New Build Type Prospecting
    • -Cost is 10 gold, increasing by x 10 each attempt with max at 1000
    • -Reveals Hidden resources
    • -Reveals Goody Huts (see below)
    • -Experts gain bonuses when prospecting
    • -Experts may "sense" were a nearby source is, "Somewhere to the NE"
    • -Can create a Resource Cart; these carts have a random amount of a resource

    Limited Resources
    • -Resources on a plot will deplete over time, must then find more
    • -Techs can reveal more on your plots
    • -A Bonus on plot will provide unlimited use

    New Goodies
    • -Some are discoverable like all other Goodies
    • -Abandoned Mine, Increased Resource potential and or Mine Improvement already built
    • -Abandoned Mine with an Expert Miner
    • -Abandoned Mine with a Bonus

    New Hunter Options with Limited Fur/Hides
    • -Will be able to scout for Game
    • -More details later
     
  2. Don Senglar

    Don Senglar Chieftain

    Joined:
    Nov 8, 2010
    Messages:
    76
    I like your ideas to limit some resources!

    In this post I collected some available information about this subject.

    1. Idea of "Quantity-based resource system?" belongs to TC01. Please, follow this link.

    2. NeseryozniyVET was the first modder who published "Amount Resources and New City Capacity" mod, where some resources were limited. Unfortunately, he published no comments or explanations for his mod.

    3. KJ Jansson later updated NeseryozniyVET's mod and published "1492: Gold Rush".

    This mod contains the following new elements:

    - New distribution of all resourses (both mineral and vegetatives),
    - Two types of Gold deposits: hard rock gold mining and placer gold fields,
    - Limited and exhausted mineral resources (ore, silver, gold),
    - New logic in the Warehouse capacity calculation.

    All these modcomps including source codes are available on this forum.

    It looks KJ Jansson updated this or his 1492 Global Colonization mod (sorry, I don't know all details) and added to exhaustible some renewable natural resources. This conclusion follows from these pictures. Compare

    silver for exhaustible mineral resources



    and fish for renewable natural resources



    Mechanics of renewable natural resources is following: the quantity of renewable resource changes during the game. It grows if fish tile is outside the city or decreases if a colonist catch fish.

    4. Kailric proposed "New Profession: Prospector". In his first post he asked

    I found couple screens of Prospector.





    Here Prospector has a horse, not a donkey. Sorry, but all donkeys are busy in our governments. :)
     
  3. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Oh wow, thanks for info. I didn't realize similar effects have already been done, I will need to check it out. What mod has the prospector unit?

    I actually started on this today before I read this post. In my code so far you can assign the initial amount in the TerrainInfos and it will start to deplete each turn you mine or otherwise harvest a resource. Once it is depleted you only gain a trickle, meaning 1 per turn, no matter who is working the plot.

    I will have to read over the links you gave and study the mods for more ideas. And I had totally forgot about my prospector idea post, heh, thanks for bringing this all to my attention.
     
  4. Don Senglar

    Don Senglar Chieftain

    Joined:
    Nov 8, 2010
    Messages:
    76
    You are welcome. I was a little bit surprised why you plan to make a new version of already-done limited resources. This is the reason of my previous post in this tread.

    Difficult question. Most probably this unit from next versions or "1492: Gold Rush" or from "1492 Global Colonization" or from something else. I don't know exactly.

    I found two screens of this unit where KJ Jansson explained how prospector unit should look. I like the view and in a private message asked him to give me this unit for testing. KJ sent me it and as usually permitted to use this unit as I want. I exchanged my Scoot unit on his Prospector in one of my personal modifications and tested. Everything was OK and I had no bugs related to his prospector.

    I have no restrictions from KJ Jansson concerning this unit and can send you, if you are interesting. However before I have to find it because all story was a lot of months ago and I have to seach this prospector unit in my archives.

    Probably, TerrainInfos also can be used to the same purposes. The game has a lot of possibilities to incorporate new element.

    Now I'm reading how the limited resources were described in NeseryozniyVET's and KJ Jansson"s mods. They used the Bonus system. In CIV4BonusInfos.xml for each limited resource were added two tags

    Code:
    			<iMinAmount>MIN reserve deposit</iMinAmount>
    			<iMaxAmount>MAX reserve deposit</iMaxAmount>
    Great point! Every player can adjust these values as he want. :goodjob:

    To my opinion the using of Bonus-system for limiting resources has also one big advantage. You can use different bonuses for the same yield. Look, YIELD_GOLD has two different bonuses BONUS_GOLD (gold ore required gold mine to extract) and BONUS_PLACER_GOLD (alluvial gold where no gold mine required).

    BONUS_GOLD
    Code:
    			<iMinAmount>20</iMinAmount>
    			<iMaxAmount>30</iMaxAmount>
    BONUS_PLACER_GOLD
    Code:
    			<iMinAmount>10</iMinAmount>
    			<iMaxAmount>15</iMaxAmount>
    Here for each Bonus we have different values of MIN and MAX gold reserve deposits. This is correct from geological-mineralogical point of view.

    Plus additionally the limited bonus resource disappears from the map when deposit exhausted. Here you can see a lot of screens explaining this process in time.

    There is a bad moment of both NeseryozniyVET's and KJ Jansson's mods: absent possibility to discover new mineral deposits. :(

    Fortunately you plan

    It would be excellent addition in the game. I hope your attempt will be successful and we will have really limited resources that can be not only exhausted but also discovered by our prospectors.
     
  5. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Well I checked out the code and KJ used a similar approach to what I done, however as you pointed out there is no way to prospect for more resources. I played a bit of the Gold Rush mod and it is unfinished as there just isn't enough Bonus resources to go around. Just using Bonuses will not give a player near enough opportunities to gain any kind of significant amount of a resource.

    In early medieval Europe mining took a step backwards after the fall of Rome. There were no great mining ventures deep in the earth and people mostly obtained their ore from alluvial deposits (formed by running water). Some of the abandoned Roman mines could have been worked however.

    So, to start with something to test it will work as I mentioned in the opening post. Perhaps the Bonuses can still be revealed through scouting, and they represent obvious places where ore and such can be found and also give a bonus each turn and have more resources, and when it is exhausted it gives a bit more than a trickle each turn. We don't want to handicap players but instead reward them for their exploration efforts.

    I new type of Goody can be added, the Roman Mine, or abandoned mine. This will have a Mine improvement already built and perhaps a Bonus resource. Which gives me the idea perhaps with a bonus resource the plot will work as normal, with unlimited potential, at least in the medieval times. So, I will need to added Free Improvement and Free Plot Bonus to Goody infos.

    Then for Prospecting, each Expert Profession, such as Expert Miner, can be masters at Prospecting for their chosen resource, with a better chance to find a Bonus and also more resources.

    How should the Prospecting mission work is a question? Can a plot me prospected more than once? Perhaps it could cost 10 gold your first attempt then the cost multiplies after than. Players could then gamble on Mining Ventures. First attempt 10 gold, second 100, third 1000, then increases by a 1000 each time after that.


    I'd love to have it if you can round it up. However, it looks pretty simply to create. I already have the basic unit in the mod as the Mongol peddler unit and it looks like he just attached Worker tools to the pack.
     
  6. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Well, here is my first attempt at a Prospector. Just to give me a unit to play around with :) I still wouldn't mind having the one you posted a screen shot of.

     

    Attached Files:

  7. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Here is what I am working towards:

    New Profession: Prospector
    • -New Build Type Prospecting
    • -Cost is 10 gold, increasing by x 10 each attempt with max at 1000
    • -Reveals Hidden resources
    • -Reveals Goody Huts (see below)
    • -Experts gain bonuses when prospecting
    • -Experts may "sense" were a nearby source is, "Somewhere to the NE"
    • -Can create a Resource Cart; these carts have a random amount of a resource

    Limited Resources
    • -Resources on a plot will deplete over time, must then find more
    • -Techs can reveal more on your plots
    • -A Bonus on plot will provide unlimited use

    New Goodies
    • -Some are discoverable like all other Goodies
    • -Abandoned Mine, Increased Resource potential and or Mine Improvement already built
    • -Abandoned Mine with an Expert Miner
    • -Abandoned Mine with a Bonus

    New Hunter Options with Limited Fur/Hides
    • -Will be able to scout for Game
    • -More details later
     
  8. Don Senglar

    Don Senglar Chieftain

    Joined:
    Nov 8, 2010
    Messages:
    76
    I found KJ Jansson's variant of Prospector. As can be seen from the picture, this unit has not only tools, but as a weapon to protect hilself from the natives, barbarians and wild animals.

    Prospector.jpg

    Your ideas are different from NeseryozniyVET and KJ's variant, but your working plans looks very-very promising!
     

    Attached Files:

  9. Don Senglar

    Don Senglar Chieftain

    Joined:
    Nov 8, 2010
    Messages:
    76
    The essence of the idea (cycle):

    Step1.
    While your Prospector is moving through the tiles, he is gaining "Geology points". Let's say: 1 tile = 1 Geology point.
    It's quite similar to Founding Fathers for Scout that discover new land ("Exploration points") or Missionary that establish Missions ("Religion points").

    Step2.
    When Prospector gains a certain number of "Geology points" he will discover a new mineral deposit on nearest available tile. Such tile could be Hill, Mountain or River bank.

    Step 3.
    After new deposit discovery "Geology points" counter = 0 and we return to Step 1.


    Why not? The cycle could be unlimited if Geology point threshold is correct (rather big or all time increasing after each deposit's discovery).

    Maybe, but I don't like this variant with constant and all time growing payment (stupid AI).

    Much easier to make Prospector very expensive unit in Europe, let say 2-3 time more expensive then Soldier, but to give to your Prospector required quantity of Tools to work and Guns to protect himself, as shown on screen in my previos post. Moreover, the player needs Prospector in the middle of the game, when he has enough money to buy extra-expensive unit. This variant is much easier for AI.
     
  10. Androrc the Orc

    Androrc the Orc Chieftain

    Joined:
    Apr 19, 2004
    Messages:
    1,620
    Location:
    Vienna, Austria
    Maybe it would be better to randomly generate all potential resources on map generation, rather than on prospection. This might work well:

    1. Have each hill, mountain and other terrain type that can have deposits have (for instance) 3 layers. On map generation there would be a % chance for each of the layers to contain a deposit.

    2. Prospectors begin the game only capable of inspecting layer 1. If they inspect a tile and its layer 1 has a deposit, then the appropriate "bonus" is created. After the quantity of minerals in the deposit is gone, then the bonus disappears.

    3. As technology progresses, prospectors gain the ability to inspect tiles' layer 2 and layer 3.

    4. Tiles are "prospectable" if there is still a layer there that hasn't been inspected (if inspecting such a layer is possible with the player's current technology).

    5. Prospectors only inspect one layer at a time. So even if the player already has the technology for inspecting layers 2 and 3, if the prospector is set to inspect a tile whose all three layers haven't been inspected so far, then the prospector only inspects the first layer. After that is done, if the prospector is set to inspect the same tile again, then he will inspect layer 2, and so forth.

    6. Number of deposits and resource quantity in deposits should be balanced so that there are sufficient deposits for the player to usually not run out of resources if he keeps up technologically.

    7. Layer 2 would only be prospectable if layer 1 has no resource, or if layer 1's resource has been depleted. Likewise, layer 3 would only be prospectable if layer 2 has no resource or if layer 2's resource has been depleted.
     
  11. Don Senglar

    Don Senglar Chieftain

    Joined:
    Nov 8, 2010
    Messages:
    76
    Fast question: How we could generate 2nd and 3rd layers of resources?
     
  12. Androrc the Orc

    Androrc the Orc Chieftain

    Joined:
    Apr 19, 2004
    Messages:
    1,620
    Location:
    Vienna, Austria
    They wouldn't be resources in this case, but a variable associated with a tile. The resource would be created if the variable says that there is a deposit of that resource type in the tile.
     
  13. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone


    While this is an interesting idea, I fear it would be difficult to balance with players having multiple Prospectors.

    I will be first adapting this for the M:C mod, but will attempt to make it easy to take out of the mod as a stand alone mod so others can put this in their own mods. Even thought that unit shows to have a gun, it doesn't have an Attack animation :(

    That is an interesting idea. From a coding point of view I am not sure what would be best; to generate resources on the fly or at the start, either way would work the same while playing. There wouldn't need to be a number set for each layer until it is uncovered, thereby each plot would only need one total resource count that gets changed as each layer is revealed.

    If we go with layers the number of layers could be set up in the XML so that mods that cover longer periods of time, like World History, could take advantage of more mining opportunities. The setup leaves out some of the ideas I was planning on implementing such as Unlimited Bonus resource, Prospector skill, and random Goodies.

    1. Each plot when created generates the number of layers set in the XML
    2. It then adds the number of resources for that layer (or this step may be skipped for the moment)
    3. When the plot is Prospected the number resources is modified by the skill of the Prospector then...
    4. Any extra Bonuses are revealed
    5. Once that layer reaches zero that resource can no longer be mined.
    6. Techs Unlock the next layer, go to step 2.

    Another issue...

    We also have multiple types of Prospectors; such as Expert Ore Miner, Expert Silver Miner, etc and possible multiple types of Resources for each Plot; Ore, Silver, etc. I have it coded to simply add a Resource count for any yield setup in the XML.

    • Now, when a the plot is Prospected, what resource get's revealed?
    • Should an Expert Ore Miner, or a simple Peasant, reveal a Silver vein?
    • Should common Peasants be allowed to Prospect or should this only be done by Experts?

    We could set it up so that only Experts can take on the Prospector Profession and only Prospect for yields in their given profession. That would simplify things. Or, none experts would only reveal a small percent of the max. But then, what happens when you prospect a plot with a none expert and then acquire an Expert; should he be alloyed to re-prospect? In reality the better Prospector could very well find ore that the none expert didn't find. That is if we want to add a bit of realism.

    Anyway, there is some more thoughts to mull over. I want to get Nights input.. oh Night:wavey:
     
  14. Androrc the Orc

    Androrc the Orc Chieftain

    Joined:
    Apr 19, 2004
    Messages:
    1,620
    Location:
    Vienna, Austria
    In regards to skill affecting prospection, one possibility is to have it so that non-experts take double (or another desired proportion) of the time prospecting. Expert Ore Miners could take only 50% longer to prospect tiles with ore deposits (but in this case, it would be necessary to not tell the player how long a prospection action would take, otherwise the player would already know a tile has ore when the expert ore miner begins prospecting).
     
  15. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    That is a good idea. I am making Prospecting a BuildType, so it will have moddable costs and build times with Expert Units being able to increase build time. We shouldn't need to worry about the player knowing if a tile has ore because all Prospectable tiles will cost the same regardless if there are Resources present. Some Mining ventures will return zero:cry:

    Plus restricting Prospecting to only Experts doesn't fit to how any of the other Professions work. Also, it would take away those moments when a Leader sends out a novice saying, "We are all counting on you; our life is in your hands (or pickaxe)" :)
     
  16. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    My first thought here is that if we have a counter on each plot for the amount of yields left, then the bonus should supply (X / 50) + 1 as bonus production. If we take hides, then the number is high, there are animals all over and it is quick to find some. As the number decreases, more time is spend/wasted looking for game and the same amount of people will produce less each day. I'm not sure if it should be 50. Most likely it should scale to game speed and possibly also be less linear as I propose.

    I'm not sure about the concept of depleting resources. My fear is that it can break the game due to not being balanced enough. At the same time it is an interesting addition. Whatever is done (if anything), it should be carefully considered as it will really affect gameplay.

    Layer idea
    It sounds like a good idea, but I wonder how many problems we will encounter with it as it is a big change.

    I propose (based on brainstorming rather than careful thinking)
    • Generate layers on the fly
      This allows us to use unmodified map scripts
    • Allow civics to give layer +1 rather than absolute value
      Layer 3 tech will not make layer 2 tech useless and vice versa
    • No fixed upper limit for layers
      The number of layers would be combined bonus of all civics (+ starting layer)
    • Ability to prospect the same layer again after a certain cooldown time
    • Having layers, which reveal their content only with proper tech
      This rock has iron in it, but the last time we checked nobody knew that
    • Maybe allow prospecting next layer before being able to mine it

    One thing which comes to mind when I think about mines and technology is the main problem with mines. Most people think that cave-ins are the greatest danger. However in historical mines, the most common cause of death was drowning. Think about it. You dig a hole in the ground and groundwater starts to fill the hole. Normally that's a good thing because you call those holes for wells. However you don't want that to happen when you call your hole a mine.

    The simple solution is to give a bucket to a man and tell him to go to the bottom, fill the bucket and take it to the surface where it pours it into the nearly stream. This is one of the most commonly used methods. Sadly due to the amount of water, it mean more people work with buckets than actually mining.

    Technology, which has been used in mining:
    Water wheels:
    We have no written records of them, but we have found remains of one in a Roman mine in Spain. It's quite simple, yet efficient. It's like a giant hamster wheel with two people inside (like the cranes we talked about a while ago). On the outer edge of the wheel, there are buckets or similar, which picks up water at the deepest point and it pours out on the top. It's way larger than the access route meaning it must have been constructed on site.

    Then there is the concept of using water powered wheels to power pumps. While searching for a good picture of how this would work, I found this article, which appears to be gold for anybody, who wants to dig into water powered water draining. http://www.lowtechmagazine.com/2013/01/mechanical-transmission-of-power-stangenkunst.html

    The part I find most amazing is actually the ability to have the waterwheel at one location and the mine+pump at another location. It looked like this:
    Spoiler :


    However mines were not properly drained until steam power arrived. Depending on source, it was in 1712, 1723 or 1734. Seriously I have seen all 3 years as the one where Thomas Newcomen made his first engine. Regardless of the year, the 18th century was the time where mine went from near impossible to drain to the tin mines in Cornwall, which followed the tin seams even when they reached under the ocean.

    The oldest working engine in the world is a steam engine from 1788 (somewhere in England). It is built on top of a coal mine and has the capacity to drain 12 tons/minute. That gives a pretty good impression of what it takes if you want to go deeper than the natural water level. It's not really realistic with the bucket system.

    It is estimated that by year 1800, at least 2000 miners were saved from drowning because steam pumps countered flooding. This is in comparison to what they did prior to getting steam and it isn't like steam showed up everywhere on day one. They spread from English (the place where they were invented), but they haven't even reached all of western Europe yet.

    For the record: boats have been used in mining.

    Effet on gameplay:
    Unknown. However it is likely that people can see the next layer without mining it. It will more or less be like "we followed this seam and it appears to go on and on, but then the mine filled with water and we can't reach it anymore".

    I don't know yet what I think should be implemented or how. I need to think of this some more.
     
  17. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    All good ideas for a brainstorm. I like the water wheel and since we have that as a tech in M:C when you build a Water Wheel it can increase your mining Layer by + to all Mines around the City.

    Peaks and Hills are not actually TerrainTypes, even though they are listed in Terrains. The Terrain is what is underneath the Hills and Peaks such as Grasslands. Hills and Peaks are determined by PlotType, which is setup in the map generator and not XML.

    Anyway, some coding ideas...
    • Terrain with a Layer would have a positive number greater than 0, all others would be -1.
    • When a Layer reaches 0 it means that Layer is depleted (Should never go below 0).
    • If a Tech or Building increases the Layer, the New Layer is generated and added to the existing Layer. This way we don't need more than one variable. And it would make since; if the original Layer is shallow then with a new tech to go deeper you still have the shallow layer plus the deeper layer.
    • Each Tech/Layer level could increase output each turn as well as the amount of resource

    And I don't know how this will effect game play either, but the goal is to get Civs competing for Resources like in real history. It is not overly complicated to code, so I will add it and people can test things out.
     
  18. Don Senglar

    Don Senglar Chieftain

    Joined:
    Nov 8, 2010
    Messages:
    76
    Stand-alone mod with your version of limited resources would be the optimal variant for testing, balancing and bug catching.

    And about Prospector with Guns: The general idea to give Guns to this unit is to protect him against agressive natives and animals. Thus the Prospector can only defend himself, but cannot attack other units.
     
  19. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
    Another conversation missed, but it all sounds very positive.

    I look forward to getting my sticky fingers on it and the other recent additions you made! :D
     
  20. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    The whole concept should be a game option as some players would like to turn this feature off regardless of how well it turns out. This mean it would be more like just using the development version than releasing a standalone version. Still experience tells that we might have an issue of getting people to use/compile the development version, which mean we should release a DLL file for it.
     

Share This Page