Aside from the known capture bug, the bug depicted is that you can't build a farm. I'm not sure why that would be. If an improvement is enabled by a resource, it should be constructable on that plot even if all other requirements are missing. The only exception to that would be if it's a peak plot, in which case the 'enabled by' tags should operate on a special case. I suspect that the bug was introduced the last time someone worked on the factors that enable a unit to construct on peaks. I don't recall who was working on that.for some reason i am not able to seed camp in both instances, also when taking a regular unit i try to capture a barb worker, it demolishes it??
Farm doesn't have <bPeakMakesValid>1</bPeakMakesValid> tag.Aside from the known capture bug, the bug depicted is that you can't build a farm. I'm not sure why that would be. If an improvement is enabled by a resource, it should be constructable on that plot even if all other requirements are missing. The only exception to that would be if it's a peak plot, in which case the 'enabled by' tags should operate on a special case. I suspect that the bug was introduced the last time someone worked on the factors that enable a unit to construct on peaks. I don't recall who was working on that.
It should have BonusMakesValid though, and as a result be able to be placed wherever a bonus that uses a farm to access it can be placed, with the exception of peaks. This should be able to override the limitation of normally only being built on flatlands.Farm doesn't have <bPeakMakesValid>1</bPeakMakesValid> tag.
Spoiler :
It has <bBonusMakesValid>1</bBonusMakesValid> in bonusesIt should have BonusMakesValid though, and as a result be able to be placed wherever a bonus that uses a farm to access it can be placed, with the exception of peaks. This should be able to override the limitation of normally only being built on flatlands.
Whomever was tampering with the coding in this area incorrectly made these override bonusmakesvalid. Bonusmakesvalid is supposed to override both of these conditions. The only condition bonusmakesvalid should not override is bRequiresPeak.Looks like <bRequiresFlatlands>1</bRequiresFlatlands> overrides it completely.
Seed camp, Farm, Vertical Farm, Workshop, Factory (cold climate variant too), Manufacturing Complex, Watermill, Hydro Dam, Geoglyph have it.
So looks like this tag should be removed from farms.
Also farm absolutely requires irrigation, so you can't place it on tiles, that aren't fresh water.
Weird, I remember being it like that for very long time.Whomever was tampering with the coding in this area incorrectly made these override bonusmakesvalid. Bonusmakesvalid is supposed to override both of these conditions. The only condition bonusmakesvalid should not override is bRequiresPeak.
I had a feeling all the refactoring going on was going to run into a problem like this.
Refactoring things itself?Might have something to do with the capturing of units and workers then also???
It's a very unrelated issue except that as raxo pointed out, attempts to refactor the code and simplify it may have caused a problem in this section as well... this was a very ultra specific and oddly positioned portion in the code that handled the capture of 0 strength units.Might have something to do with the capturing of units and workers then also???
They could only be built unirrigated if there was a farmable resource there to enable it. Seed camps don't require irrigation and can upgrade to an unirrigated farm IIRC. But no, you could not ever build an unirrigated farm without a resource to justify it. Maybe in RoM or something for a while it might've been possible.Farms in the past did not have to have fresh water to be built. Not like now. When you built them on a plain, grass land or forest tile if there was not river or other water source they would say (unirrigated) and would give 1 o2 less food. Once you researched Irrigation and got water to them then the "not irrigated" went away and the yield increased. Of course there were many ways to get water to the fields, like Building a town well if no lake or river or irrigatd tile was next to the one you wanted to be irrigated. But I'm sure you all know this anyway.
Ah... yes you're right. After a while you can.Iirc there is a pretty late technology that allows farms without irrigation.
Then why SO can't build on this tile?They could only be built unirrigated if there was a farmable resource there to enable it. Seed camps don't require irrigation and can upgrade to an unirrigated farm IIRC. But no, you could not ever build an unirrigated farm without a resource to justify it. Maybe in RoM or something for a while it might've been possible.
Two new bugs per 10 fixedI bet toffer and I have fixed more issues then we have caused. We will fix these problems too.
I have the fix ready on my side, just tidying up some minor stuff before I commit it.Two new bugs per 10 fixed
Now I can place farm on those tiles, but there is some sort of tooltip error.I have the fix ready on my side, just tidying up some minor stuff before I commit it.