Animals and Metals

The buildings are not National Wonders. They are there to "fix" a bug in play, especially for the AI. It is for the case when you have the resource but it is not in the vicinity of any city. If the resource is available in the vicinity of any city then the bug is not there and you should not be able to build the building anywhere. This is especially true for animals where if you have the animal in the vicinity of one city then you have the ability to make it in the vicinity of all cities.

A proper "fix" for metals would let you build one building for every instance of the resource in your nation. It would involve counting the number of the resource you have in the nation and subtracting the number of cities with with the resource in the building. This would be very slow (or take some memory) as it would require a pass over every plot on the map every turn in Python because of what is available to Python.
 
The buildings are not National Wonders. They are there to "fix" a bug in play, especially for the AI. It is for the case when you have the resource but it is not in the vicinity of any city. If the resource is available in the vicinity of any city then the bug is not there and you should not be able to build the building anywhere. This is especially true for animals where if you have the animal in the vicinity of one city then you have the ability to make it in the vicinity of all cities.
I feel like we're thinking about this too much as a patch and not enough about what it appears to the player as. Let's say you wanted a patch for a hole in your jeans. Do you want one that looks like a generic patch or one that looks like you sewed in there because it looks cool and who knew you did it because you had a hole? That flaming skull is much more awesome than a denim square.

There's certainly nothing wrong with the building being both a potential answer to a problem you see there and also a perfectly valid National Wonder as well. It doesn't seem unreasonable to envision the ancients deciding to keep a major central herd collection and considering it 'the' national herd that can supply the nation.

Once the 'bug' is fixed by anywhere gaining vicinity access, however that takes place, you don't even need the 'patch' building. So it should still have its own standalone value. Going about it like this, many players would never realize there was a hole in the design that needed this as a correction in the first place. But by saying it can only be built where vicinity access doesn't exist, when we have ways of making vicinity access take place by spreading the animals around, makes it feel unnecessarily limited in an illogical manner.

Even if vicinity access already exists somewhere, the building could and should be able to make the city a 'better' place to train your units that take from this herd by making it train such units faster since you have access to that stock. That way it still feels like a national wonder and still performs the role it is supposed to by fixing a problem that only exists if you don't already have vicinity access somewhere (but do have access to the resource from any other means such as trade or a routed and improved plot outside of vicinity radius.)

Otherwise it looks like the game demands overwhelmed the aesthetic. Like showing a part of the building without its siding because we didn't give enough room for siding to go on that wall.
 
A proper "fix" for metals would let you build one building for every instance of the resource in your nation. It would involve counting the number of the resource you have in the nation and subtracting the number of cities with with the resource in the building. This would be very slow (or take some memory) as it would require a pass over every plot on the map every turn in Python because of what is available to Python.
Could be done more easily in the code which could be setup to remember the numbers involved. But you only need one national smelter and bam you have ingots for all. If you are lucky enough to have the resource (ore) in vicinity, then you get a local smelter and can thus build it much earlier.

Are you saying you'd prefer Ingots to be more limited and you can only build one smith for that sort for each ingot resource you have access to? I could adjust the tag that gives a free source of a bonus to take a numeric entry so that it can create say, 3 instances of ingots for each smelter, then each smith removes one while requiring one to be constructed. Part of the problem though is that you'd require one, then absorb it, and immediately the building would cease to function because it requires one and now there isn't one because it 'ate' it. I'd have to think on how to get around that.

Would that then limit the amount of wares you'd get? Could make things a bit too difficult for a player.
 
If you really want to go that route, you could in principle alter the national limit of the building when gaining/lossing some of the required resource. This would likely require changes in the C++ code though, and it would only scale to one resource/building. It would be much simpler to keep around a "used" amount of each resource I the same place you count up available resources, then you could change buildable to require more resources than used, while it would keep running while there are any resources.
This would likely require changes to the C++ code too, but it might be simpler and it would pave the way for volumetric resources.
I could try to take a look in the code for how such changes could be implemented, but I am not familiar enough with the DLL setup that I feel comfortable compiling then correctly (I would at minimum need to know which compiler version to use and which settings to compile then under).
 
Once the 'bug' is fixed by anywhere gaining vicinity access, however that takes place, you don't even need the 'patch' building. So it should still have its own standalone value.
Why? If so then why don't obsolete buildings also have a standalone value after they are replaced?
If you really want to go that route, you could in principle alter the national limit of the building when gaining/lossing some of the required resource. This would likely require changes in the C++ code though, and it would only scale to one resource/building. It would be much simpler to keep around a "used" amount of each resource I the same place you count up available resources, then you could change buildable to require more resources than used, while it would keep running while there are any resources.
This would likely require changes to the C++ code too, but it might be simpler and it would pave the way for volumetric resources.
I could try to take a look in the code for how such changes could be implemented, but I am not familiar enough with the DLL setup that I feel comfortable compiling then correctly (I would at minimum need to know which compiler version to use and which settings to compile then under).
Current system does not allow fort dynamic limits but it is something I would love to see.

I have a variation on Kornifere's missionary system that produces a missionary for your State Religion every x turns to where it only produces up to the number the religion needs rather than a hard limit.
 
Why? If so then why don't obsolete buildings also have a standalone value after they are replaced?
Because in this case you really don't want the building to come across as a patch or it looks like we needed one which looks unprofessional. Buildings not having a standalone value after being replaced doesn't strike me as a comparison that fits at all but I am trying to see the point. A building that is replaced is no longer necessary. But a national horse breeder (to use the original name for the sake of discussion) has a production benefit, making it valuable even if it's not being used as a means to gain vicinity access, and being limited to where vicinity access doesn't already exist feels like a strange way to 'bonus' a city for not having a bonus. If I think of it as a simple herd building, then why would it be a national wonder? Why not just make it a normal building you can place anywhere because you have access to horses somewhere else in the nation? I guess because you'd prefer to be able to say you CAN have more than one but only as many as you actually own of the bonus that exists within the nation but outside the range of any city to represent the city side of what's taking place at that given location. And I guess that's why you don't want to enable it due to a traded source?

If I'm starting to finally understand your perspective here, I'd still have to say that I liked the original National Wonder idea of the state building and maintaining a central breeding stock. And what you're trying to accomplish is, exactly as you say, impossible with current capabilities - maybe possible in a sense but not in a way that a player is going to understand your intention. I will give some thought as to how a coded mechanism might be possible regarding what it is you're really trying to achieve.
If you really want to go that route, you could in principle alter the national limit of the building when gaining/lossing some of the required resource. This would likely require changes in the C++ code though, and it would only scale to one resource/building. It would be much simpler to keep around a "used" amount of each resource I the same place you count up available resources, then you could change buildable to require more resources than used, while it would keep running while there are any resources.
This would likely require changes to the C++ code too, but it might be simpler and it would pave the way for volumetric resources.
I could try to take a look in the code for how such changes could be implemented, but I am not familiar enough with the DLL setup that I feel comfortable compiling then correctly (I would at minimum need to know which compiler version to use and which settings to compile then under).
I'm getting a little lost trying to follow you. Can you give some numeric examples of how the transactions would go?
 
Here is an example you have 3 relevant cities, two of the share the same copper deposit, while the third has a copper resource with a copper resource inside it's cultural borders but outside the fat cross. In total you have 2 copper ore resources, but neither of them have been routed. You also have some other cities.

You are not able to currently build any smelters, so you connect the copper ores to your network. In the national limit version this increases the national limit of copper smelters by 2, and in the "used" version you just get the resources, which you now have more than the used amount (0).

You can then start building smelters wherever you want, and in the national limits version this would simply use of those national limits, while in the "used" version those buildings would have a tag that specified that they use 1 copper ore each, and after the amount of total used tags get to the amount you have, then you can no longer build new smelters, but since you still have the resource they don't stop working.

If you the lose a city where you build a smelters, then you would either free up some limit, or have a reduction in the amount of use, so you would be able to build more (to prevent miss-use they should be destroyed on conquest).

If you lose one of your copper ore supplies, then either your national limit would go down (I am not sure whether a net negative limit is a problem, but there are indications that it shouldn't be) or you will simply have fewer awailable resources. Since the used resources could be higher than or equal your amount of resources, then you wouldn't be able to construct new buildings, but those you have would still work until you lose all sources.

I personally strongly Davies the "used" model, since it is a lot more flexible. For instance we could still have both easy to construct local access smelter and a harder to construct non-local smelter, while the combined amount of smelters would still be limited. Prevention of double usage in a single city could be handled with replacement.

The national-limit model is inspired by the model for cathedrals, which also have a varying amount that dictates how many of them you can build, while the difference would be that resources are counted instead of buildings. This means that there should be some codebase to extender from, while the other option might be a bit more work.
 
Here is an example you have 3 relevant cities, two of the share the same copper deposit, while the third has a copper resource with a copper resource inside it's cultural borders but outside the fat cross. In total you have 2 copper ore resources, but neither of them have been routed. You also have some other cities.

You are not able to currently build any smelters, so you connect the copper ores to your network. In the national limit version this increases the national limit of copper smelters by 2, and in the "used" version you just get the resources, which you now have more than the used amount (0).

You can then start building smelters wherever you want, and in the national limits version this would simply use of those national limits, while in the "used" version those buildings would have a tag that specified that they use 1 copper ore each, and after the amount of total used tags get to the amount you have, then you can no longer build new smelters, but since you still have the resource they don't stop working.

If you the lose a city where you build a smelters, then you would either free up some limit, or have a reduction in the amount of use, so you would be able to build more (to prevent miss-use they should be destroyed on conquest).

If you lose one of your copper ore supplies, then either your national limit would go down (I am not sure whether a net negative limit is a problem, but there are indications that it shouldn't be) or you will simply have fewer awailable resources. Since the used resources could be higher than or equal your amount of resources, then you wouldn't be able to construct new buildings, but those you have would still work until you lose all sources.

I personally strongly Davies the "used" model, since it is a lot more flexible. For instance we could still have both easy to construct local access smelter and a harder to construct non-local smelter, while the combined amount of smelters would still be limited. Prevention of double usage in a single city could be handled with replacement.

The national-limit model is inspired by the model for cathedrals, which also have a varying amount that dictates how many of them you can build, while the difference would be that resources are counted instead of buildings. This means that there should be some codebase to extender from, while the other option might be a bit more work.
Ok, I can't believe I'm saying this but I get it.

Translating what you're talking about into a tag is what would this would require. You'd have to make a tag that basically means 'requires an unclaimed source of a bonus' and each building in the nation with this tag that is constructed is tracked like we track buildings with national limits and if the amount of them equals the number of resource sources of the indicated resource, you cannot build any more and if the amount of those buildings exceeds the amount of sources thanks to having lost sources, they get disabled down to the amount that you can maintain (whatever order it's disabled in really doesn't matter so long as only the right amount is disabled.)

This probably wouldn't be all that hard to implement.

In this case, we'd probably want to limit the number of smelters to the number of sources of the metal, yes. However then the local and national still applies, where the locals still need vicinity access because they represent the easier cheaper way to establish the connection to the source and gives the realworld basis for most smelters being built fairly close to where the ore for that metal is being produced. The national level one doesn't HAVE to then be limited, just more expensive and maybe even a little less effective to represent the long distance the ore is coming from. BOTH, however, would use the new ClaimsBonus tag and in sum total, you couldn't have more smelters than you have sources of the ore.

We could further discuss how such a tag would play into other processes thereafter but I wouldn't be against this type of behavior so long as the goal isn't to make things a seriously limiting pain in the arse for players in the end. We're already getting close to that now for some. Yes, I worry this would crack open a lot of cans of worms for us. But it's not something I'm averse to because I can see it playing nicely into a pseudo-volumetric resources process that feeds well into equipment. These kinds of tags are not my forte and it would be a little while before I could really address it based on a number of other things on my plate immediately.
 
I have been considering the "used" resources as a basis for volumetric resources for quite a while. The trick is that it isn't just limited to "have one of a building for each", you could have more or less buildings, and/or you could have bonuses that become available when there are extra unclaimed resources (either as a ratio of total to claimed, or as possible extra claims).

If we extend it far enough, then we could make it such that you could make all the smelters you want, but only the ones that have resources would actually be giving you any value. This would work by setting most of the normal work as a condition on it claiming a resource. It might be taking it a bit too far though, since it would not be obvious which of the buildings gets priority in claiming resources.

Another way to extend it is to have some things only temporary claim the resource, since it would only be used for the creation, and not continually as if the resource was used for the running of said item. We could then apply production penalties when running low on one or more of the resources, or maybe even completely halt the production.

Implementing all of the suggestions might confuse the players though, since it can be somewhat unclear how the different aspects would play together, but I do think we can find a subset of the options that can be both reasonably clear and do much of what we want to do with volumetric resources.
 
I said shellfish not Shellfish :lol: it being short for clams, oysters/pearls and murex.

Clams and oysters being a shore line resource and not very mobile means that they were gathered like plants are not caught like fish, crabs and rabbits.
Ah so you meant group of animals.
Still Gathering tech for revealing water animals doesn't make sense, as you can't work on water tiles until Trap Fishing.
That is you can't place citizen on water tile until Trap Fishing.

I can move reveal techs of plants/animals I listed.
That is Tech Reveal = Nice plant/animal/mineral, it has some uses.
Tech Enable = Full potential of map resource getting unlocked.

Edit:
The Gatherer should be able to make a plot with one of these resources on it improved from a neighbouring land plot.
So how are you going to do that?
That is somehow land improvement taking yields from water resources nearby.
But that would be necessary only until Trap Fishing.

Now all plants are revealed at Gathering (X2), land animals at Scavenging (X3) and water animals at Trap Fishing (X10).
That is map resources.
Their enable tech sometimes is on or not very far off from reveal tech. and sometimes you need few eras - I think record belongs to Rubber with Enable at Alchemy.

For comparison reveal techs for minerals and others are spread out (not counting off Earth map resources):
Hard Hammer Percussion (X5) - Copper Ore, Fine Clay, Marble, Obsidian, Stone
Carving (X8) - Jade
Drying (X11) - Salt
Barter (X12) - Amber, Gold Ore, Silver Ore, Turquoise

Mining (X22) - Diamond, Lead Ore, Rubies, Sapphire, Sulphur
Masonry (X24) - Natron
Metal Casting (X25) - Iron Ore, Platinum Ore
Bronze Working (X29) - Tin Ore

Coal Mining (X48) - Coal
Scientific Method (X55) - Natural Gas, Oil
Geology (X57) - Fossil Beds, Geode, Manganese
Archeology (X58) - Ancient Relics

Industrialism (X72) - Bauxite Ore
Advanced Metallurgy (X73) - Titanium Ore
Quantum Physics (X74) - Uranium
Modern Seismology (X81) - Geothermal Energy, Methane Ice
Volcanology (X82) - Geothermal Sea Vent

Those resources are revealed in nice clusters.
 
Last edited:
The buildings are not National Wonders. They are there to "fix" a bug in play, especially for the AI. It is for the case when you have the resource but it is not in the vicinity of any city. If the resource is available in the vicinity of any city then the bug is not there and you should not be able to build the building anywhere. This is especially true for animals where if you have the animal in the vicinity of one city then you have the ability to make it in the vicinity of all cities.

A proper "fix" for metals would let you build one building for every instance of the resource in your nation. It would involve counting the number of the resource you have in the nation and subtracting the number of cities with with the resource in the building. This would be very slow (or take some memory) as it would require a pass over every plot on the map every turn in Python because of what is available to Python.
I have now been doing some investigation into the resouce "use" or claiming, and while doing so I found that the amount you have available of each resource is already being calculated, and it is also exposed to python. It is the getNumBonuses(BonusTypes eIndex) method for the CvCity class, in python you should be able to call it like city.getNumBonuses(iBonus), which is closely related to city.hasBonus(iBonus) which is used in the pyHelper.py python module to create the hasBonusIdx method for the PyCity class.
All that is left is to count out how many uses you have of "used resources" in a similar fashion, and check for getNumBonuses(iBonus) > sumUsedBonus(iBonus) when building the building. If done in C++ (on the v38.5), then we could have the effect as soon as knowledge of the new tag is icluded, by adding the following piece of code to CvCity.cpp @ line 4525+:
Spoiler extra for CvCity.cpp @ line 4525+ :
Code:
            for (iI = 0; iI < GC.getNUM_BUILDING_CLAIM_BONUSES(); iI++)
            {
                if (kBuilding.getClaimBonuses(iI) != NO_BONUS)
                {
                    BunusTypes iBunus = (BonusTypes)kBuilding.getClaimBonuses(iI));

                    if (getNumBonuses(iBunus) <= sumUsedBonus(iBonus))
                    {
                        return False;
                    }
                }
            }

We would also need 3 other functions:
  • GC.getNUM_BUILDING_CLAIM_BONUSES()
  • kBuilding.getClaimBonuses(iI)
  • sumUsedBonus(iBonus)
To get the above code to work, and ofcause some way to convey it to the user and so on.
 
I have now been doing some investigation into the resouce "use" or claiming, and while doing so I found that the amount you have available of each resource is already being calculated, and it is also exposed to python. It is the getNumBonuses(BonusTypes eIndex) method for the CvCity class, in python you should be able to call it like city.getNumBonuses(iBonus), which is closely related to city.hasBonus(iBonus) which is used in the pyHelper.py python module to create the hasBonusIdx method for the PyCity class.
All that is left is to count out how many uses you have of "used resources" in a similar fashion, and check for getNumBonuses(iBonus) > sumUsedBonus(iBonus) when building the building. If done in C++ (on the v38.5), then we could have the effect as soon as knowledge of the new tag is icluded, by adding the following piece of code to CvCity.cpp @ line 4525+:
Spoiler extra for CvCity.cpp @ line 4525+ :
Code:
            for (iI = 0; iI < GC.getNUM_BUILDING_CLAIM_BONUSES(); iI++)
            {
                if (kBuilding.getClaimBonuses(iI) != NO_BONUS)
                {
                    BunusTypes iBunus = (BonusTypes)kBuilding.getClaimBonuses(iI));

                    if (getNumBonuses(iBunus) <= sumUsedBonus(iBonus))
                    {
                        return False;
                    }
                }
            }

We would also need 3 other functions:
  • GC.getNUM_BUILDING_CLAIM_BONUSES()
  • kBuilding.getClaimBonuses(iI)
  • sumUsedBonus(iBonus)
To get the above code to work, and ofcause some way to convey it to the user and so on.
And the part that makes any programmer hesitate to start a project when he's already in the middle of many others - don't forget all the little AI implications.

Your naming is a touch different than what I'd be inclined to name the functions and you're leaving out the potential for a building to require more than one claim source BUT you're getting pretty close to what I figure would need to be done.

sumUsedBonus(iBonus) I suppose is a fair enough name for the totaling function of how many bonuses are claimed (though I'd be careful to keep the naming convention clear - Used means Claimed in this context so at least call it sumClaimedBonuses(iBonus).

I also want to add that it would be a function of CvPlayer.cpp, not CvCity.cpp, since it is at the Player-wide level that we would want to account for the number of claimed bonuses. We could try to track those by the trade network which bonus counts themselves do but that seems unnecessary since we also make the bonus a prereq for these buildings, vicinity or otherwise.

Therefore, the check for canConstructInternal in CvPlayer is where you'd want that bit of code as the filter for whether the building can be constructed or not.

Watch for misspellings of course, like Bunus. I would also rethink GC.getNUM_BUILDING_CLAIM_BONUSES() as I'm not sure what you're intention is with that. It appears a bit like some interesting caching intended but may not be necessary.

If the building tag getClaimedBonusTypes(iI) in CvBuildingInfos.cpp is properly programmed as a vector so as to not waste precious memory, then the function would start with:
for (int iI; iI < kBuilding.getNumClaimedBonusTypes(); iI++)

You then are able to eliminate:
if (kBuilding.getClaimBonuses(iI) != NO_BONUS) entirely and go straight into:
BonusTypes eBonus = kBuilding.getClaimedBonusType(iI);
and then check to ensure that the number of claimed bonuses is less than the number of currently available bonuses.

Then you'd need to program the 'claimed bonus' tracking variable, the totaling result of which would be sumClaimedBonus(iBonus) (or as I would probably end up naming it, getClaimedBonusesTotal(iBonus) but yours is equally as valid to naming conventions for a totaling function), and all of that, including setting the variable to 0, including the variable in the Read/Write wrapper, and transaction functions like changeClaimedBonuses(int iChange), would take place within CvPlayer.

If you're interested in a walkthrough on how to start programming a tag into C2C, I just last week did a guide on this in the modmods section. If you want to try your hand at coding this, I'm quite happy to help you along the way. Would be more possible for me to do that than to take on the project in fully myself. You can reply to that tutorial thread so that our walkthrough on this becomes record for others to follow. This building tag would be a vector so a lot more complex than the basic int I detail there so would give me a chance to expand the tutorial a bit.
 
Last edited:
I agree that the code has some problems, and the used instead of claimed was a slip.
I basically took the code to check for prerequisite bonus in (if I recall correctly) CvCity::canConstructInternal and made a similar version that did the work for claim surplus. Many of those problems are inherited from that code, and from only implementing the base requirements. If I were to make such improvements I might as well also do it for the related system.

The claim bonus system should be tied to the trade network, because it is used in direct comparison to values in the trade network. Otherwise we could get into the situation where if you have the resource in different parts of your trade network, then you can start building some buildings in different parts, by the total over all the networks would be based on the single network with most copies of the resource in.

I had also considered whether to include possible resource accumulation over turns, which would increase by total-claimed for each trade network. The problem is that I still haven't located the relevant details of the trade network to do these kinds of things.

I will try and take a look at that tutorial tomorrow, assuming I can find it.
 
I agree that the code has some problems, and the used instead of claimed was a slip
Please don't take any of what I said as a criticism but rather as just an attempt to have a constructive discussion on the subject. I feel you did great to give it a strong start. I usually end up figuring out a lot of the structure as I go tbh.
CvCity::canConstructInternal
This calls to the player level checks in this function - there's a CvPlayer::canConstructInternal as well and during the city process, it sends the building to qualify there too.
I basically took the code to check for prerequisite bonus in (if I recall correctly) CvCity::canConstructInternal and made a similar version that did the work for claim surplus. Many of those problems are inherited from that code, and from only implementing the base requirements.
I had guessed as much. I do that too. That said, I often find trying to 'improve' existing systems often triggers some unseen trap of overlooking some unique consideration that the previous coders had seen and accounted for in their approach so it takes great care and I tend to lean towards the if it isn't broke don't break it trying to fix it approach.
The claim bonus system should be tied to the trade network, because it is used in direct comparison to values in the trade network.
I would agree but is it worth the added complexity, and thus memory and processing time that being this specific would require? Not sure since we still use the bonus as a prereq and if you aren't in the overall common national trade network you probably aren't going to qualify for the building on that level.
I had also considered whether to include possible resource accumulation over turns, which would increase by total-claimed for each trade network. The problem is that I still haven't located the relevant details of the trade network to do these kinds of things.
I wanted to do this sort of thing too but I've begun to consider this might be too much for the system to track. I'm not sure yet.
I will try and take a look at that tutorial tomorrow, assuming I can find it.
https://forums.civfanatics.com/threads/building-a-new-tag-in-c2c-code.640222/
 
The code is already very memory optimized, problably far beyond what I would normally recommend. Just having the XML data loaded into memory would likely exceed the memory cost (which I don't expect to go much beyond a few kb for most games). Sure you would have to update some resource values, but it would happen once per trade system, which is often close to once per player, and we are doing this in C++ code so it is not that expensive. We could also reduce it to only some relevant resources, by keeping a list of which resources to keep track of surplus of together with details on such surplus (do the resource decay and/or is there a maximum storage of it and so on).
 
A proper "fix" for metals would let you build one building for every instance of the resource in your nation. It would involve counting the number of the resource you have in the nation and subtracting the number of cities with with the resource in the building. This would be very slow (or take some memory) as it would require a pass over every plot on the map every turn in Python because of what is available to Python.
I remember from playing Realism Invictus that the manufacture chain does consume its resource, in the sense that with say 2 copper ore connected, you can build at most 2 smelters and then 2 smiths. The raw materials of the processes are not depleted, but the number of the raw material you own limits how many times you can build a certain processing building across your country. If two different processes consume the same resource, they don't compete with each other for the resource. It's like each production line keeps an independent counter on its buildings. Has anyone investigated or discussed about this mechanic?
Although there is no vicinity requirement in that mod, so their manufacturer buildings are easier to build anywhere.
I think this might be useful to restrict spamming smiths in every city just because they already have nothing else to build. I just tend to do this when I'm turtling and not preparing for any war. Might also be helpful for AI?
They have custom tags ConsumesBonuses and ProducesBonuses to apply this mechanic.

But they have a problem. When the access to one resource becomes fewer and you have had the maximum number of processing buildings possible, then the disabling starts to cycle through all your cities that have built it. Although it works for the AI, for a human player it is very annoying that it spams a lot of messages every turn you don't recover that resource. They can't just automatically decide which city should sacrifice its workshop.
 
Last edited:
I remember from playing Realism Invictus that the manufacture chain does consume its resource, in the sense that with say 2 copper ore connected, you can build at most 2 smelters and then 2 smiths. The raw materials of the processes are not depleted, but the number of the raw material you own limits how many times you can build a certain processing building across your country. If two different processes consume the same resource, they don't compete with each other for the resource. It's like each production line keeps an independent counter on its buildings. Has anyone investigated or discussed about this mechanic?
Although there is no vicinity requirement in that mod, so their manufacturer buildings are easier to build anywhere.
I think this might be useful to restrict spamming smiths in every city just because they already have nothing else to build. I just tend to do this when I'm turtling and not preparing for any war. Might also be helpful for AI?
They have custom tags ConsumesBonuses and ProducesBonuses to apply this mechanic. Should we develop a similar mechanic too?
I was planning to introduce 2 tags based on a similar concept, but I havent gotten around to the practical part yet (I only just got the .dll code to compile with changes I make to it, thanks in part to your help). The 2 tags would be as follows:
  • ConsumeBonus: A tag for buildings, which reduces the surplus production (which starts at the amount of sources of the bonus you have) you have of the bonus. If there is not enough surplus production of the bonus, then it should act as if the requirement to build it is no longer satisfied.
  • CostBonus: A tag for building/units, where as an additional cost to build it you will need to also pay some amount of the bonus from storage, which is accumulated each turn based on your surpluss of the bonus. If not sufficient it should act as if the requirement to build it is no longer satisfied. The amount should scale with the normal cost of the unit.
The CostBonus tag might be a bit uncalled for, but it should allow some interesting options, and it should mostly touch the same code as ConsumeBonus, so it would make sense to do both at once. One possibility I though of later is to use it instead of national limits and then have it consume surplass from a cultural bonus. This way you wouldnt have a fixed max while you are still limited in the amount of them you can practically make.

That said, it is probably going to be a while before I am anywhere close to done with this, since there are a lot of details to work out, code pieces/functionality to track down and problems to consider (how would the AI be affected by this, how to handle upgrading units ect), and this project is hardly my highest priority code project, so yeah it is going to take a while.
If you can think of a simple to implement solution similar to this that would solve the problem, that would make sense to go for, though I am not the one you need a go a head from.
 
I was planning to introduce 2 tags based on a similar concept, but I havent gotten around to the practical part yet (I only just got the .dll code to compile with changes I make to it, thanks in part to your help). The 2 tags would be as follows:
  • ConsumeBonus: A tag for buildings, which reduces the surplus production (which starts at the amount of sources of the bonus you have) you have of the bonus. If there is not enough surplus production of the bonus, then it should act as if the requirement to build it is no longer satisfied.
  • CostBonus: A tag for building/units, where as an additional cost to build it you will need to also pay some amount of the bonus from storage, which is accumulated each turn based on your surpluss of the bonus. If not sufficient it should act as if the requirement to build it is no longer satisfied. The amount should scale with the normal cost of the unit.
The CostBonus tag might be a bit uncalled for, but it should allow some interesting options, and it should mostly touch the same code as ConsumeBonus, so it would make sense to do both at once. One possibility I though of later is to use it instead of national limits and then have it consume surplass from a cultural bonus. This way you wouldnt have a fixed max while you are still limited in the amount of them you can practically make.

That said, it is probably going to be a while before I am anywhere close to done with this, since there are a lot of details to work out, code pieces/functionality to track down and problems to consider (how would the AI be affected by this, how to handle upgrading units ect), and this project is hardly my highest priority code project, so yeah it is going to take a while.
If you can think of a simple to implement solution similar to this that would solve the problem, that would make sense to go for, though I am not the one you need a go a head from.
We'd been talking about implementing volumetric resources for a while. Some of this would be great and along the lines I've proposed. I suggest to make it granular, so that a unit, whether it be in upkeep - which I have some concepts for that may differ from an automatic compiled cost to the nation every round - or extra cost, doesn't have to measure these in a full 1 source of the resource every round.

I'll have to go look for some of the discussions in PMs we had in the last year on this subject. One thing that would almost be a must is to make volumetric resources a game option, so we'd have to figure out how to balance the use of it vs those not using it and that's where the application to limit certain buildings throughout the nation may come into question.

I had a proposal a while back regarding zones and limiting cities to how many buildings of a category could be built there and we should discuss that again with you guys before we make any concrete plans I think.

All that said, you're really touching on some stuff we've long wanted to get into but were concerned to open the cans of worms on.
 
Wool comes from many other animals in game also. In my last play through I got many subdued Mouflon. More than enough for every city in my 30 city nation. However I got twice as many subdued Ibex and used them for goat herds and exotic herbivore cages.

However I don't see that we need both. In reality they are not that much different.

We obviously live in different worlds. Goat and sheep milk and cheese are not rare here but that may just be because of our form of multiculturalism, which has a lot to do with the sharing of food and drink.

The idea of a "shepherd" is very important in religions also. Important enough to be one of the Religious Civics I would like to have in game. Priests have not always been about the congregation. At times their sole purpose has been to keep the gods happy or at least not concerned with human affairs.

If I do anything more at all for C2C is still up in the air. If I play I see things that need fixing and fix them but I am not playing very much at this time.
I like that we have both sheep and goats.

What is bothering me is that while with enough Subdued Mouflons you can eventually build all of the :
- Herd (Sheep) => Sheep resource and all its dependencies including Farm - Animal (Goat) with Peak in city vicinity
- Herd (Goat) => Angora Goat Breeder => Shearing Barn & Dairy Barn
with Subdued Walia Ibex you can't even build Farm - Animal (Goat) nor the Angora Goat Breeder if you *also* don't have Sheep ??

And the existence of Sheep as a resource but not of Goat IMHO justifies Mouflons being much more rare than Walia Ibexes (Sheep unlocks 8 Cultures, gives bonuses to tons of buildings and 2 Corporations...).

(EDIT : of course, Sheep gets the short end of the stick too compared to some other animals, since it cannot be Tamed, and so you need to rely on your hunters to capture more wild Mouflons to actually spread the sheep.
I guess in the C2C parallel universe sheep are one of those animals that reproduce poorly in captivity, and goats are particularly feral ? :lol: :sheep: )


I'm not even sure that an alternate way to get Farm - Animal (Goat) through Sheep + Peak is worth keeping,
as well as Mouflon just by itself being able to get those 3 goat buildings, considering just how much goats get the short end of the stick here...
(Is Subdued Walia Ibex tradable ?)
 
Last edited:
OtoH I guess the above would make sense if Tamed Sheep are just missing the graphics or something and are TODO...
Still, subdued wild goats (Walia Ibex) should be able to build all goat buildings,
and while tamed sheep doesn't exist, the goat buildings from subdued wild sheep (Mouflon) should be commented out.
 
Top Bottom