We-the-People-civ4col-mod / Mod

This is the repository where the mod resides.
84 stars 36 forks source link

Horse yields from random event not affected by Pasture nor Expert #1009

Closed dbrakman closed 2 months ago

dbrakman commented 2 months ago

A random event placed 1 Horse on a number of tiles, but an Expert Rancher in a Pasture do not apply the expected increase to that yield:

Pasture

ExpertHerder1Horse

horses_bug_AD-1542.ColonizationSave.txt

Schmiddie1979 commented 2 months ago

Could you please attached a proper savegame. A .txt format can't be unsed. The file needs to have the format .ColonizationSave

What do you mean with "a random event placed 1 horse"? What I see on the screenshot looks fine - 4 horses in the city results in 1 horse per turn by the expert rancher...

For breeding (e.g. horses, cattles) you also need to consider that you need a certain amount of "animals" (yield) in stock.

An expert rancher will double the "production" of horses per turn at 35, i.e. you need 35 horses in stock, then he will produce 2 per turn. Other units would produce 2 per turn when they have 70 in stock.

You will reach the peak with the rancher at 85 in stock. Then the expert rancher will produce 5, whereas other units will produce only 2.

Finally the rancher will always produce 6 with 100 or more in stock without any further bonus due to stable etc. when other units will produce only 3 horses per turn.

I.e. it looks fine from my side - no bug.

Nightinggale commented 2 months ago

Could you please attached a proper savegame. A .txt format can't be unsed. The file needs to have the format .ColonizationSave

The filename is horses_bug_AD-1542.ColonizationSave.txt. Just remove the .txt and you get the right ending. The format seems to be correct too as a savegame file.

Schmiddie1979 commented 2 months ago

Ok, the savegame doesn't help because it is a MP savegame. I can't start it and I can't test anything.

What exactly happened? Which event was triggered that provided +1 horse? Was it really an event that has been triggered or have you maybe only put in some horses in stock?

dbrakman commented 2 months ago

The file needs to have the format .ColonizationSave

I don't think it's possible to attach a file with a .ColonizationSave extension directly: GitHub gave me a We don't support that file type error (Fig. 1) about when I tried to Paste, drop, or click to add files. To work around this, I appended a .txt extension github_file_extensions_error

What do you mean with "a random event placed 1 horse"

If I remember correctly, at the start of the game (AD 1492), the selected tile did not include any horses in its possible yields. Only after dismissing some popup did the red-circled base tile yields of 1 horse appear. (Fig. 2) base_yields_clarified

I don't remember the text of the popup as it many turns have elapsed since then: I only wanted to try dedicating a citizen to producing horses once I had infrastructure for them to produce more than 1 per turn. Maybe TXT_KEY_EVENT_PIRATES_3 could add horses? I'm not too concerned about how the base tile yield came to include 1 horse, though. I thought an event interaction could be related, but I could be wrong.

Fig. 2 also shows the pasture on the tile 1 space northeast of the city center. If I have any non-expert citizen work any of the other 1 horse tile tiles without a pasture, I get 1 horse per turn, which makes sense to me. The Colopedia page for the Pasture Improvement (Fig. 3) seems to indicate that a horses tile with a pasture will have its yields increased by at least +2 horses. colopedia_pasture Having a non-expert citizen work the pasture tile still produces only 1 horse per turn. I was confused why 1+2 is still 1.

An expert rancher will double the "production" of horses per turn at 35, i.e. you need 35 horses in stock, then he will produce 2 per turn

The Colopedia page for the Expert Rancher Unit (Fig. 4) says both that the unit produces +3 horses and that it doubles the production of horses. Is one incorrect? In either case, I was confused why 1+2+3 = 1 = 2*(1+2). colopedia_expert_rancher

I see now under the Colopedia page for Livestock breeding (Fig. 5) that horses production is also modified by the number of horses in the city's stockpile. I take it a multiplicative penalty for insufficient breeding stock is applied after all the above additive modifiers? colopedia_livestock_breeding

I'll try importing more horses. If that changes the per turn production I can accept this as not a bug. I wonder if there's a way to improve the documentation or if there's a starting reference I should have read earlier.

I'd like to understand the whole formula better: If I have a stockpile of 100 horses and then slot an expert rancher in a pasture on a tile with a base yield of 1 horse, should I expect production of 6 horses per turn? In a hypothetical City B with a stockpile of 75 horses, in a pasture on a tile with a base yield of 3 horses, should I expect the expert to produce round(min(1, ((3+2)*2)*75/100)) = 8 horses, round(min(1, (3+2+3)*75/100)) = 6 horses, or something else?