Single Player bugs and crashes v40 plus (SVN) - After Oct 2019

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??
 

Attachments

  • seed (3).JPG
    seed (3).JPG
    366.7 KB · Views: 43
  • seed (1).JPG
    seed (1).JPG
    418.4 KB · Views: 131
  • Shaka BC-26351.zip
    2.4 MB · Views: 27
Seed camp build action is obsoleted at agriculture.

Also only regular workers can build it.
You should be able to build farms instead.

Farms can be placed on flatlands, and one resource is on hill (that needs farm to be useable).
So looks like that scenario, that you are playing is broken resource-wise.
Its Large Earth Map 10.

So you can start new game on generated map as well - no idea how many resources may be in locations, that renders them unimprovable.
 
Last edited:
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??
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.
 
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.
Farm doesn't have <bPeakMakesValid>1</bPeakMakesValid> tag.
Spoiler :

Civ4BeyondSword 2020-04-05 22-08-28-97.png

 
Farm doesn't have <bPeakMakesValid>1</bPeakMakesValid> tag.
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.
 
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.
It has <bBonusMakesValid>1</bBonusMakesValid> in bonuses

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.
 
Last edited:
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.
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.
 
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.
Weird, I remember being it like that for very long time.
 
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.
 
Go MattCA Go! :D

@raxxo2222, @Thunderbrd,
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.

The recent changes have been to allow bogs and swamps (marshes too I think) to be a fresh water sources. This all happened right before the time that the Burnt forest cycle changes began iirc. Just my observations of the way the mod has changed over the winter. Thought they were all intentionally planned since Toffer was adding more things from his modmod into the main mod. At least it seemed that way. :dunno:

Lots of hands behind the discord scene is now adding to the mod and they don't post here. Just sayin'.
 
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.
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.
 
Iirc there is a pretty late technology that allows farms without irrigation.
Ah... yes you're right. After a while you can.
 
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.
Then why SO can't build on this tile?
Spoiler :



It has resource, that should allow farm to be built here despite everything.
This tile doesn't have fresh water.

So looks like two tags got broken somewhere.
That is
<bRequiresFlatlands>1</bRequiresFlatlands>

Also there are two tags related to fresh water now:
<bFreshWaterMakesValid>1</bFreshWaterMakesValid>
<bRequiresIrrigation>1</bRequiresIrrigation>

So only "requires irrigation" should be here.
Or all three booleans aren't overridden in presence of resource.

As for other screenshot that hill doesn't have fresh water too.
So this may be fresh water related thing again.
 
Last edited:
I have the fix ready on my side, just tidying up some minor stuff before I commit it.
Now I can place farm on those tiles, but there is some sort of tooltip error.
Spoiler :

Civ4BeyondSword 2020-04-06 11-27-20-65.png
Civ4BeyondSword 2020-04-06 11-27-24-16.png


At this point in first screenshot it should be "requires farm" not "requires seed camp"

To west there are spices, tooltip should be talking about orchard, not whatever, that upgrades to orchard.

I think tooltip has problem with valid improvements, that can upgrade to multiple different improvements.

List of branched improvement upgrades:

Seed Camp: Farm, Cottage, Thatch Cutter, Jungle/Desert/Wetland Camp
Tar Gatherer: Hydrocarbon Well, Workshop
Scavenging Camp: Nomadic Herd, Hunting Camp
Workshop: Factory, Factory (cold climate)
Fruit Picking Camp: Orchard, Lumberjack, Cottage, Winery
Plant Picking Camp: Plantation, Lumberjack, Cottage
Stone Tools Workshop: Mine, Early Quarry, Quarry, Wood Gatherer
 

Attachments

  • x.CivBeyondSwordSave
    3.4 MB · Views: 25
Last edited:
Top Bottom