Strategic resources

Thalassicus

Bytes and Nibblers
Joined
Nov 9, 2005
Messages
11,057
Location
Texas
I changed how strategic resources are placed in Gem v1.11.

Each player territory now favors horses or iron. We now get an average of 7 total horses+iron per territory. After deciding the total, the game randomly assigns some slots to horses, and some to iron, with a minimum of 2 of either resource. Each territory has twice as much of one resource as the other, chosen randomly. Leaders with early UUs based on horses/swords get 1 free extra copy of their UU resource.

In the old system each territory randomly got 3-5 horses, and 4-6 iron, with the quantities independent of each other. It gave an equal amount of both resources (on average), and no capability to favor one type over the other.

Militaristic citystates settle near strategic resources in both systems, so we can ally or conquer them to get strategics our territory lacks.
 
This will hurt civs like Rome, Songhai and Japan, that need horses for Swordsman or Longsword or Knight UUs. If I only have 2 iron nearby, and one might be inaccessible or in a city state, them basically one of my UUs is a huge waste of space.

While you're on resources, I'm going to make another shout-out for trying to get more of the oil to appear on land, ideally by letting them show up on jungle or marsh tiles. Far too many of the oil tiles are on water tiles, which are very vulnerable to hit-and-run pillaging by the human player.
 
The leaders with early UUs get a free copy of their resource. If our territory has 2 more, it's highly likely we can pick up at least one. I believe 2 unique units and a supporting army is enough to conquer at least one player, which then doubles our supply. My classical armies usually have 2 each of horses, swords, archers and vanguards, with 2-4 catapults.

If it becomes a problem, I can increase the extra resources to 2.

Oil platforms were turned unpillagable half a year ago, when we made resource quantities random.
 
They can't? Is that why Siam had a lone Destroyer parked on a oil ressource in a City State that was allied with me last game? But just putting a unit on top of the ressource doesn't cut me off from it, right?

If I understand your system above correctly, we will have less ancient era strategic ressources available in total. Seems fine, as I didn't have problems to get them so far.

Why are the modern ressources excluded? Of those, there are few around it seems to me, though it's good to have something restricting the number of air units...
 
Thal did take out recycling centers for super late extra air units. For starters.

Otherwise, yes, there does seem to be a lot of alum most games. Possibly this is because I've been busy overrunning the AIs by then...

I would agree there's way too much oil in the water. But mostly because it makes most of the desert/tundra/snow pretty useless as a result and oil on water is extremely useful for coastal cities. Which are already powerful.
 
Conquerors control so many territories by the modern era, I don't believe it matters if those territories favor oil or aluminum. Controlling even 4 territories gives us very high chances that any individual variation within territories cancels out.

Common aluminum prevents map congestion. Reducing the supply of aluminum would break the AI, unless we modded the core AI to use land units more effectively, which is probably beyond the scope of my abilities.
 
The leaders with early UUs get at least 3 of their resource.
I thought that the map was generated before civs were placed - so does this mean that for example Japan will only be placed into an area where there are at least 3 iron?
Does that interfere with any other placement preferences, like coastal placement for Danes who need iron for Huscarls?

Does "early UUs" mean up to medieval, or up to classical?

Using your UUs to conquer a player and increase your supply isn't really helpful, because conquering a player takes a lot of time, so by the time you have conquered them, your UU has probably become obsolete.

But as long as their is some system such as that you outline that guarantees some supply for relevant factions, then we're probably ok.

Oil platforms were turned unpillagable half a year ago, when we made resource quantities random.
Ok, but it's still weird and ahistoric for most oil to come from the sea. I admit, I hadn't pillaged any lately, because I'm normally done with games before I get to oil platforms, but I've seen many times that all the oil resources on my continent are on ocean.

I'm ok with the reduction in the aggregate number of horses and iron further, 8 per zone is still significant.
 
Huns had an ability in the G&K beta giving free horse resources for their first few cities. That was removed when horse archers turned resourceless, but the capability to add things like it to UAs was left in the data files, so I gave the leaders with classical or medieval horses/swords 1 free resource for their capital. It basically does the same thing as adding the resource directly underneath the capital. I suspect that limitation of the map generation system is why Firaxis added the capability for UAs in the first place.

Oil clustering in inhospitable terrain represents how easily-accessible oil reserves were plundered long ago, so we must go to difficult terrain to get it now that it's scarce (and in Civ terms, strategic). It just avoids grassland, and favors everything else. I could increase the weighting of desert, tundra, and snow to get more of it on land, if you feel that would help.
 
so I gave the leaders with classical or medieval horses/swords 1 free resource for their capital.
Ah! Ok, that sounds like a decent compromise, I look forward to seeing how it plays.
 
Oil clustering in inhospitable terrain represents how easily-accessible oil reserves were plundered long ago, so we must to difficult terrain to get it now that it's scarce (and in Civ terms, strategic). It simply avoids grassland, and favors everything else. I could increase the weighting of desert, tundra, and snow to get more of it on land, if you feel that would help.

Sounds good for the first with the changes to strategic overall and iron/horses for UUs granted.

For the oil, I'd say if it slightly increases land preferences, this would help. Petra helps (a) desert city some already, but tundra or snow is largely useless, and thus kind of pointless to build any. Coal and fish/whales/crab/pearls helps make island cities viable. I'd think some oil would help make a tundra/desert city at least necessary to think about. At the moment it's pretty much a no-brainer as the oil's almost all on the coast (and you probably already have it).
 
Tundra regions actually get a huge increase in bonus resources (deer, fish, etc). It's also covered by lots of forests and hills. These things are designed to balance out the barren spots. I could increase the quantity of bonus resources even more in tundra.

Please check my list of leaders I gave a free resource to (those with horse/sword or knight/longsword UUs). The game places the resource under the player's capital:

Iron
Romans
Vikings
Japan

Horse
Mongols
Songhai
Egypt
Byzantium
Greece
 
Oil clustering in inhospitable terrain represents how easily-accessible oil reserves were plundered long ago, so we must to difficult terrain to get it now that it's scarce (and in Civ terms, strategic). It simply avoids grassland, and favors everything else. I could increase the weighting of desert, tundra, and snow to get more of it on land, if you feel that would help.
I'm not quite sure I follow this.

First, I do not observe oil showing up on plains, and I think (not sure though) that it never shows up on tiles with forests, marshes, hills or floodplains. There are a lot more coast tiles than there are non-hill desert and tundra and snow, so the oil almost always ends up on the coast.

Second, the "easily accessible oil reserves were used a while ago" is true for earth today (and is why lots of modern production is offshore or in tundra), but of course isn't true for historic earth. The first commercial oil exploitation was in western Pennsylvania (grassland in Civ terms) and there has been major oil extraction in Texas for ages (plains in Civ terms); Russia has had major oil production in the Caucasus (grassland or plains), Nigeria has major production from Jungle areas in the delta, etc.

Third, the natural dispersion of oil on earth really did put huge amounts under middle eastern deserts; that isn't just a factor of other oil being used up.

I'm ok with oil showing up more in undesirable locations for gameplay reasons, but I think it needs to show up in jungle and marsh, and should have a heavier weighting on desert.
 
Tundra regions actually get a huge increase in bonus resources (deer, fish, etc). It's also covered by lots of forests and hills. These things are designed to balance out the barren spots. I could increase the quantity of bonus resources even more in tundra.

I don't think this is needed, I think it is ok that tundra areas are generally weaker. It's good for gameplay I think for some zones to be less useful than others.
 
It's not possible for oil to appear on hills, but this is different from avoiding hills. Let's say player Bob has territory with two desert regions separated by grassland. The first desert has 10 hills and 1 flat tile, while the second desert has 0 hills and 5 flat tiles. The first region has fewer flat tiles, but will get all of the oil. It will cluster onto the single valid tile in the larger desert.

I place strategic resources with two basic steps:

1) find average terrain weights
3) place resources on valid plots from highest to lowest weight

The larger desert region has a more weight, so its single valid plot ranks at the top of the list.

Oil production during the 1930s hit prices as low as 10 cents per barrel. This is equal to about $1 adjusted for inflation, compared to modern oil prices upwards of $100 per barrel. Oil was so cheap and abundant in the time it was extracted from grassland that I don't consider it a Civ-style strategic resource during that era. I designed the oil resource to represent its period of scarce strategic value during and after WW2.
 
Horse
Mongols
Songhai
Egypt
Byzantium
Greece
Do camel archers use horses? I thought they did. I think they should, for balance reasons. So Arabs should be added. Siam elephant don't use horses; I don't remember if Indian or Carthaginian elephants do.
Lancer and Dragoon UUs probably come late enough not to need the boost.

Another point though: given that you're reducing iron, you might want to rethink the large iron requirements on naval units.
* * *
Re: oil
This placement method seems strange. I think this is what is driving things onto coasts; presumably they are always the highest weighted regions, so it always goes to them. Adding some randomness here would probably lead to more realistic variation.

And you could get presumably much more oil on land by allowing oil to be placed on plains, and not avoid plains.

Or maybe it is an issue of how regions are defined? A coast region might have many more coast tiles than a desert or plains or tundra region, and this would drive the distribution.

But even in your example, the algorithm gives a weird result. Even assuming that we kept the "desert hills aren't a valid placement site but count for weighting", which is probably fine, then what I would assume we should have is the first region should have 11/16 chance to get each oil resource and the second desert should have 5/16, so the chance that the second desert region will have no oil is (11/16)*(11/16) = 48%. It is a mistake I think to always assign to the highest probability. Rather, each valid tile should lead to an equal chance of receiving the resource.

On oil production history:
I think it is totally wrong to say that there is no overlap between periods where oil was coming from grasslands and when oil was scarce.
First, aggregate oil production before then 1940s was very small compared to what has happened since. It just wasn't true that there was large scale depletion prior to the 1940s.
See for example: http://www.peakoil.org.au/peakoil.htm
Most oil hadn't even been discovered then; the big discoveries were in the 1950s-70s.
Second, even today there is oil production in grassland areas; for example oil production in Venezuala is mostly on what would be termed grasslands in Civ; similarly in Malaysia, and Indonesia, and arguably Kazakhstan and Russia.
Third, most oil production in human history has come from on-land sources; offshore is very small compared to onshore. The model you have is not producing that kind of outcome.

So something is not working, we are not getting a sensible outcome.

I'm fine to keep grassland as avoided, but there needs to be some other tinkering in your placement algorithm to get more placed on land.
 
The current system just ranks the plots, instead of using a random factor. It also demolishes the weight of nearby plots when it places a resource so they don't all appear in one spot. I agree a random factor would help. It's a complicated algorithm though, and took about 50 hours to get to this point, so I stopped and moved on to other things. I didn't want to burn out at the time. I'd be okay with going back now to add randomness; I estimate it would take about five hours.

I'll add some more information - instead of oil favoring water, it inverts nearby land. It appears on land near desert, and water near grassland. Say we have two areas:

  • 10 grass + 1 ring of coast tiles.
  • 1 grass + 100 coast.

The first region gets the oil, despite having less water. Grass is low weight, so the first area might be 0.1 weight on land, compared to 0.5 for the second region. Water inverts that to 10 and 2, so water in the first region has higher priority. I did this because it makes sense for oil to appear near large landmasses instead of large coastal regions.

I'd be okay with increasing the priority of plains as a compromise. :)
 
I'll clarify something else - oil does not technically favor water, it just inverts. It appears on land near bad terrain and water near good terrain. Say we have two areas:

  • 10 grass + 1 ring of coast tiles.
  • 1 grass + 100 coast.
    This has fewer grassland, so the weight might be 0.5 per tile. Water close to the island inverts to 2 weight, which drops off to nothing as we get further from land.

The first region gets all the oil, despite having fewer coast tiles.

I did this by inverting water tiles. Grass is low weight, so the first area might be 0.1 weight, lower than 0.5 for the second region. Water inverts that to 10 and 2, so water in the first region gets oil.
Still not sure that I understand properly sorry, but this suggests that your weighting is too low for plains (and maybe grassland) and too high for water.

Are you saying that the area ranking is determined only by land tiles? That seems strange.
 
How are areas defined? If I understood that, I could design (but not code) a system that worked the way I thought it should.

But this is mostly a cosmetic issue as long as oil platforms (ahistorically) come at the same tech as wells, so could certainly go to the bottom of the "to-do" list.
 
I rank both land and sea tiles. The basic process for each player territory is:

  1. Set weight of land tiles in the territory according to the Resource_TerrainWeights data in /Terrain/GET_Data.xml.
  2. Blur weights to a distance of 3 tiles. I look at each tile, check its neighbors in a 3-tile range, and set the tile to that average. Water tiles invert 1/average.
  3. Find all valid plots and rank them from best to worst.
  4. Place a resource on the best plot, then the next, and so on down the list. Each placed resource drops the weight of adjacent tiles and re-ranks the list.
I adjusted the step 1 weights for v1.11 to give plains a better weight, and favor land desert/tundra more strongly than water inverted next to grass. I'm checking out some test maps to see if this shifts some oil away from grass-adjacent-water towards the other areas. :)
 
Thanks, sounds good, let's see what happens. It sounds like it may have been that the very low grassland weighting were pushing the grassland-adjacent coast weighting very high, thus leading to most oil placed in coasts adjacent to grassland.

But I think there is also a problem with a "pick the highest weighting" strategy rather than using the weightings as actual probability weights, and picking at random from those weights, so you are more likely but not guaranteed to get the higher weighting.
 
Top Bottom