7.2.1 Misc. Bugs

Txurce

Deity
Joined
Jan 4, 2002
Messages
8,293
Location
Venice, California
In a current game as Persia, there is a 1-iron resource and one x-horse resource, both 8 tiles from my capital. All other resources are beyond CS and AI borders. This is definitely on the slim end - does it fit the new resource layout?

I have also played two games in which Friend status caused by wiping out a barb camp did not result in any free units before it expired. Edit: neither do standard alliances with Militaristic CS.

Finally, the CS-settler bug is alive and well. It may be worth going back to consider what changes were made when it first appeared.
 
How large was the horse deposit?

The land closer to you than AI capitals will always have exactly 4 iron and 4 horses (the quantity does not vary from game to game). There's no restrictions on citystate placement, but that hasn't been a problem in my games. It's easy to conquer a citystate within the first hundred turns with a few archers and spearmen. Peaceful players can defend adequately with spearmen, or ally with the citystate if strategic resources are needed.

I don't know when the CS settler problem appeared. I make no changes to citystate unit availability, nor place settlers with any code manually, so I don't know what causes it or where to look.
 
How large was the horse deposit?

The land closer to you than AI capitals will always have exactly 4 iron and 4 horses (the quantity does not vary from game to game). There's no restrictions on citystate placement, but that hasn't been a problem in my games. It's easy to conquer a citystate within the first hundred turns with a few archers and spearmen. Peaceful players can defend adequately with spearmen, or ally with the citystate if strategic resources are needed.

I don't know when the CS settler problem appeared. I make no changes to citystate unit availability, nor place settlers with any code manually, so I don't know what causes it or where to look.

1. My game worked out differently. The iron deposit I mentioned (size 1) is 8 tiles from my capital, and 6 tiles from an AI capital. There is a second iron deposit equidistant to an AI (10 tiles away), but in CS territory from the start. I don't know how big the horse deposit is, but it's the only one closer to me (slightly) than to an AI capital.

2. The CS settler problem was first mentioned with beta 14.
 
I just took a Militaristic CS having researched MI, but was given two plain infantry. This may not be a bug, but if not, the payoff short-changes the attacker.
 
The reason the quantity is important is because it places 4 units of the resource, not 4 deposits. If the first iron deposit has 1 unit, the other has 3, or there's an additional iron deposit somewhere in your region -- possibly on an island nearby. The total per region is constant. :)

Militaristic citystates use the CanTrain function to check what units can be built in the city, so if it gave a unit that's not buildable, it's a bug with that function (not fixable because that part's coded in the c++).
 
How large was the horse deposit?

The land closer to you than AI capitals will always have exactly 4 iron and 4 horses (the quantity does not vary from game to game).

The reason the quantity is important is because it places 4 units of the resource, not 4 deposits. If the first iron deposit has 1 unit, the other has 3, or there's an additional iron deposit somewhere in your region -- possibly on an island nearby. The total per region is constant. :)

The horse deposit had 3, for a total of 4 in my region including the 1 iron. That fits with the second quote above, and means there's no problem. Your first reply seems to imply I would have had 4 of each, and that's what was still throwing me off.
 
I think a visual example is the best way to explain this:
attachment.php


Civ divides the map into regions with a capital near the center of each (marked with dots). I used that basic framework to give each region exactly 4 horses, 4 iron, 3 coal, 3 oil, and so on. The quantity per region is always the same. For each region, resources are placed based on terrain types they favor (see the table below). A horse was hiding under your capital, and some other resources were under more cities. :)

Citystates are placed after region division, favor regions with few luxury resources, and are placed near good city sites around decent yields and resources. Citystates place 1 luxury resource, a few bonus resources, but do not place strategic resources. They just appear near strategics because those are usually good city sites.

Code:
Resource   #/region  Favors
Horses     4         flat, open, arable, fresh water
Iron       4         opposite of horses
Coal       3         hills
Aluminum   4         hills
Oil        3         Desert, tundra, snow. Also appears
                     in water offshore from grassland, plains.
Uranium    2         random
 

Attachments

  • Region Division.JPG
    Region Division.JPG
    403.2 KB · Views: 2,378
Here's how the game created regions on your map. Each region has a capital near the center and contains exactly 4 horses, 4 iron, 3 coal, 3 oil, etc. A horse was hiding under your capital. :)

That's pretty funny about the single horse under my capital. More importantly, now I understand that CS count as part of "my" region.

What I particularly liked is how the regions are not all the same number of tiles... but offer you the same chance of acquiring a resource. Yes, a CS having 3/4 of one makes it less attractive, but so would the deposits being near the regional border (as mine also are) or just far because a region is so big (as in England's case for half its iron). I much prefer this sort of variance. Again, this is a terrific "transparent" improvement.
 
The region division is part of why Civ start locations are very balanced overall. I only had two problems with vanilla: strategic resources, and the importance it gave to various terrain types.

Sirian from the Civ community did most of the map generation system, while Ed Beach created an efficient regional division algorithm (I think Ed is Firaxis employee but the documentation doesn't say).

Sirian's code divides the map into regions based on the "fertility" score of the tiles. Each region's total fertility is identical. Players with poor land (tundra/desert) get more room to expand, since the frequency of good city sites is lower.

Mod values:

Mountain, Oasis, FloodPlain tiles = -1, 6, 6 and do not count anything else.
Rest of the tiles add up values of tile traits.
Terrain: Grass 4, Plains 4, Coast 3, Tundra 2, Desert 0, Snow -1
Features: Hill +1, Forest 0, Jungle 0, FreshWater +1, River +2, Marsh -2, Ice -1

Vanilla:

Mountain, Oasis, FloodPlain tiles = -2, 4, 5 and do not count anything else.
Rest of the tiles add up values of tile traits.
Terrain: Grass 3, Plains 4, Coast 2, Tundra 2, Desert 0, Snow -1
Features: Hill +1, Forest 0, Jungle -1, FreshWater +1, River +1, Marsh -2, Ice -1
 
I have also played two games in which Friend status caused by wiping out a barb camp did not result in any free units before it expired. Edit: neither do standard alliances with Militaristic CS.

Thal, you may have missed this possible bug. It happened in the same game I sent you to check for the "missing" resources.

Weirdly, no one else has mentioned it.
 
It's not actually problems with expiration. I've just been working on the yield library in CiVUP a lot: organizing things, improving efficiency, and so on. Everything else uses the yield library, so whenever there's a bug in the library, anything that uses that section of code spits out errors too.

Betas! :lol:

It'll be bug-free in the release version.
 
Back
Top Bottom