v27 and above - Single Player Bug/Crashes report thread

Status
Not open for further replies.
Zulu has built Pyramids
India has built Sphinx

... long ago (in current game)

Then all of a sudden:
Valley of the Kings has been built in a far away land
Barbarian golden age has begun!!!

Apparently the Barbarian civ has not had the Valley of the Kings building class set to NONE for it's "UB" type.

Interesting situation I noticed in the code: If a building class gets building type NONE via the UB mechanism for a civ, then that civ can build any building that requires a building of that class as if the prereq for buildings of that class did not exist. (In both CvPlayer::canConstructInternal, which checks for civ wide building count prereqs, and CvCity::canConstructInternal, whcih checks for presence of a prereq building in the city, it skips the check if the building type for the prereq class is NO_BUILDING. It really ought to return false if the civ can't ever build a building of the prereq class instead if just skipping the check.)
 
Apparently the Barbarian civ has not had the Valley of the Kings building class set to NONE for it's "UB" type.

Correct, if there are late game barbarians i want them to have certain attainable assets also. Thats how the Goths/Vikings etc were, infact they were very powerful back in the day because they had a better concept of NOT having restrictions put on them like regular civ/countries do/did. (i believe i am right, if not let me know)
 
Apparently the Barbarian civ has not had the Valley of the Kings building class set to NONE for it's "UB" type.

Interesting situation I noticed in the code: If a building class gets building type NONE via the UB mechanism for a civ, then that civ can build any building that requires a building of that class as if the prereq for buildings of that class did not exist. (In both CvPlayer::canConstructInternal, which checks for civ wide building count prereqs, and CvCity::canConstructInternal, whcih checks for presence of a prereq building in the city, it skips the check if the building type for the prereq class is NO_BUILDING. It really ought to return false if the civ can't ever build a building of the prereq class instead if just skipping the check.)

Too bad G-E that you don't have C2C SVN write access! Then Bugs like this could be squashed faster and not have to wait as long. (Hint, Hint, Nudge, Nudge!) ;)

JosEPh :)
 
Correct, if there are late game barbarians i want them to have certain attainable assets also. Thats how the Goths/Vikings etc were, infact they were very powerful back in the day because they had a better concept of NOT having restrictions put on them like regular civ/countries do/did. (i believe i am right, if not let me know)

His point is a valid note that we have a huge potential bug situation in a number of other areas beyond just the Valley of Kings. I get what he's saying but wish he'd have mentioned which function to refer to correct the issue. I may be able to address this over the weekend if I can get on top of my own project here by then.
 
Correct, if there are late game barbarians i want them to have certain attainable assets also. Thats how the Goths/Vikings etc were, infact they were very powerful back in the day because they had a better concept of NOT having restrictions put on them like regular civ/countries do/did. (i believe i am right, if not let me know)

I don't disagree with this policy. I think the barbs should be able to build most things, probably including many of the less complex to build world wonders and at least some of the national wonders. (For example, why shouldn't they have a Heroic Epic?) They are not likely to actually get to build any world wonders due to their lagging in technology, but I don't really see why it shouldn't be possible for a lot of them, should the rare opportunity arise.

The issue in this case is that they are bypassing the regular requirements. A human, or regular AI civilization, must have built 2 other wonders in 1 city to get the Valley of the Kings. The barbarians don't need to do this. I'm not sure that this is a problem. Possibly a problem is that the VotK has easier prereqs than the Pyramids or Sphinx.

As it is, if the two prereq wonders are not built in the same city (either one civ foolishly builds them in 2 different cities or 2 different civs build them) then it is guaranteed that the barbarians will get the Valley of the Kings auto-built in the first city of theirs that it checks once they get the tech for it. The prereqs are not a restriction due to being civilized, rather it is the case that the VotK is a reward for accomplishing the feat of building two wonders (which become available at roughly the same time) in the same city - you won the race, you get the reward. As it is now, the barbarians get the reward not for winning the race, but just because someone else didn't win the race.

This is a strange thing, but not necessarily bad. It gives 2 points/turn towards a great doctor. Sooner or later, I expect it will make the barbarians get a great doctor. That is weird. (Unless the barbarian civ is never checked for generating great people.) Also, not only does it get them a golden age, it gets them a free tech. It might just be possible that the barbs could get a tech nobody else has, although it seems unlikely.

With the new requirements involving sculpture for the Pyramids and Sphinx, it might also be possible for the barbarians to get the VotK before anyone can build those two prereq wonders since the VotK does not have any such prereq (just Masonry and Ceremonial Burial). Maybe. (Again, it seems unlikely but not impossible.) Now that would be a huge surprise: here you are almost finished with the Pyramids in the city where you built the Sphinx thinking that you can not fail to get both the Pyramids and the VotK and what happens? The barbarians get the VotK because their prereqs for it are a lot easier to meet than your prereqs for it.
 
His point is a valid note that we have a huge potential bug situation in a number of other areas beyond just the Valley of Kings. I get what he's saying but wish he'd have mentioned which function to refer to correct the issue. I may be able to address this over the weekend if I can get on top of my own project here by then.

But I did...
Me said:
In both CvPlayer::canConstructInternal, which checks for civ wide building count prereqs, and CvCity::canConstructInternal, whcih checks for presence of a prereq building in the city, it skips the check if the building type for the prereq class is NO_BUILDING.

I was, however, wrong about CvPlayer::canConstructInternal. It checks more than once in this function for different purposes (like a separate loop over all building classes for a check for when a prereq building is obsolete, which is the one I was actually looking at) and it turns out that the second check does not have this problem. Oops.

But it looks to me like the "building class required in city" check (those checked via the isBuildingClassNeededInCity function of the building info) in CvCity::canConstructInternal does have this problem. If the civ can't build a building of the prereq class, then it always acts as if its cities have a building of that class for any building that requires one.

It seems more logical to me that it would act as if it never has a building of that class (since it doesn't). But the current behavior might be more interesting, in a whack kind of way. If nobody wins the race to get both the Pyramids and Sphinx in once city then the barbarians get it. Of course, it might have other effects too.
 
Apparently the Barbarian civ has not had the Valley of the Kings building class set to NONE for it's "UB" type.

Interesting situation I noticed in the code: If a building class gets building type NONE via the UB mechanism for a civ, then that civ can build any building that requires a building of that class as if the prereq for buildings of that class did not exist. (In both CvPlayer::canConstructInternal, which checks for civ wide building count prereqs, and CvCity::canConstructInternal, whcih checks for presence of a prereq building in the city, it skips the check if the building type for the prereq class is NO_BUILDING. It really ought to return false if the civ can't ever build a building of the prereq class instead if just skipping the check.)

I think the barbs should be able to build most things, probably including many of the less complex to build world wonders and at least some of the national wonders. (For example, why shouldn't they have a Heroic Epic?) They are not likely to actually get to build any world wonders due to their lagging in technology, but I don't really see why it shouldn't be possible for a lot of them, should the rare opportunity arise.

I was, however, wrong about CvPlayer::canConstructInternal. It checks more than once in this function for different purposes (like a separate loop over all building classes for a check for when a prereq building is obsolete, which is the one I was actually looking at) and it turns out that the second check does not have this problem. Oops.

But it looks to me like the "building class required in city" check (those checked via the isBuildingClassNeededInCity function of the building info) in CvCity::canConstructInternal does have this problem. If the civ can't build a building of the prereq class, then it always acts as if its cities have a building of that class for any building that requires one.

It seems more logical to me that it would act as if it never has a building of that class (since it doesn't). But the current behavior might be more interesting, in a whack kind of way. If nobody wins the race to get both the Pyramids and Sphinx in once city then the barbarians get it. Of course, it might have other effects too.

Very interesting stuff, but for me, HUH? No Offense . . .:)
 
But I did...


I was, however, wrong about CvPlayer::canConstructInternal. It checks more than once in this function for different purposes (like a separate loop over all building classes for a check for when a prereq building is obsolete, which is the one I was actually looking at) and it turns out that the second check does not have this problem. Oops.

But it looks to me like the "building class required in city" check (those checked via the isBuildingClassNeededInCity function of the building info) in CvCity::canConstructInternal does have this problem. If the civ can't build a building of the prereq class, then it always acts as if its cities have a building of that class for any building that requires one.

It seems more logical to me that it would act as if it never has a building of that class (since it doesn't). But the current behavior might be more interesting, in a whack kind of way. If nobody wins the race to get both the Pyramids and Sphinx in once city then the barbarians get it. Of course, it might have other effects too.
Ok... sorry for missing that when I scanned through.

I wonder if there was a good reason for skipping this though. I found a similar situation with promotions when manipulating some things there where plugging just that sort of perceived 'hole' caused some problems I hadn't expected due to some inappropriate assumptions as to what 'free promotions' had for prereqs... its going to take some consideration there as there could be some deeper things afoot.

I have a feeling Koshling should take a look at this himself as he'd understand some deeper potential implications of rushing in to fix that since he designed the Auto-Build tag in the first place.
 
As it is, if the two prereq wonders are not built in the same city (either one civ foolishly builds them in 2 different cities or 2 different civs build them) then it is guaranteed that the barbarians will get the Valley of the Kings auto-built in the first city of theirs that it checks once they get the tech for it.

If it worked like that, it would be not a problem. The problem is that in my present game I have built both prereq wonders in my capital and I was not able to build VotK because Barbarians built it before me. Maybe I could build it immediately after meeting the requirements? I do not know. Edit: and please remember some of my earlier posts: it seems the Valley is flagged as auto-built (at least in the WorldBuilder - or maybe I have misunderstood something).

S.
 
Very interesting stuff, but for me, HUH? No Offense . . .:)
Well...

The overall idea/point is that the reason the barbs get the Valley of the Kings autobuilt for them if nobody else gets it is due to them NOT being able to build the two prereq buildings. Both the Pyramids and the Sphinx appear in the barbarian CivilizationInfo set to have building type NONE for them. The Valley of the Kings is not set this way.

The "req" part of "prereq" stands for "requisite" which is synonymous with "required". Therefore you might think that having both the prereq buildings set to be unavailable would make the Valley of the Kings be unavailable. You would be wrong. It has the opposite effect. It makes it so that they automatically get the VotK the instant they get both prereq techs for it, ignoring the building prereqs, unless someone else already has it or there are no barbarian cities at that time. If they don't have a city, they will get the VotK as soon as there is a barbarian city - so the instant a population 1 barb city spawns in some out of the way place, probably in the tundra like so many are, it will get the VotK autobuilt in it.

This is due to weirdness in the code (what could be considered a bug, if you don't like the current odd behavior) that determines if a city has the required prereq buildings(Pyramids & Sphinx) in it to allow the city to build, or autobuild, a building (the VotK). Not being able to build a building for a building class causes it to act as if it has a building of that building class in every city of that civ, for purposes of building prereq checks.

If both of the Pyramid and Sphinx were allowed builds for the barbarians then this would not happen. They would have to build both in one city to get the VotK.

If just one were allowed for them, they would only need to build that one (or capture the city with it in it) and they would get the VotK in that city.

Since neither of them is allowed, they can get the VotK without building anything.
 
Both the Pyramids and the Sphinx appear in the barbarian CivilizationInfo set to have building type NONE for them. The Valley of the Kings is not set this way.
It sounds like the safest fix here is to set the Valley of Kings to NONE correctly in the barbarian CivilizationInfo.

I REALLY don't think its wise to allow the barbs to build this wonder out from underneath a player who takes the time to build the prerequisites, especially as great an achievement as it is to do so!
 
If it worked like that, it would be not a problem. The problem is that in my present game I have built both prereq wonders in my capital and I was not able to build VotK because Barbarians built it before me. Maybe I could build it immediately after meeting the requirements? I do not know.

S.

They get it if nobody else has it at the time they get the prereq techs. That's when the relevant check is done for them.

Completing the prereq buildings later, after they already got the VotK, just means you should not have been so slow about it, I guess. But they do have fewer prereq techs to get to it since the VotK does not require anything involving Sculpture.

This is assuming you are playing V27, where the VotK is autobuilt the instant you finish the Pyramids and Sphinx - you don't have to actually build it (I think this was in v27 - or was this added in a SVN version after version 27?). If not, then you would have more time to get it since the barbarians would also have to build it. But in that case you can dawdle even more and not even try to build it until long after it becomes available, which gives the barbarians a bigger window of opportunity.
 
This is assuming you are playing V27, where the VotK is autobuilt the instant you finish the Pyramids and Sphinx - you don't have to actually build it (I think this was in v27 - or was this added in a SVN version after version 27?).

I play v27, no SVN. If so, VotK is not as good as before - when I was playing v26 I managed to meet the requirements once and I delayed building this wonder when I needed a GA to make a big revolt without Anarchy (AFAIR Republic and a few other civics). Now it is much more tricky - especially that I prefer to have Ancient starts so (I guess) Barbarians get prereq techs faster.

S.
 
I was able to continue my game by taking a turn and then doing a modifier recalc. It still took a long while to finish.
 
It sounds like the safest fix here is to set the Valley of Kings to NONE correctly in the barbarian CivilizationInfo.

I REALLY don't think its wise to allow the barbs to build this wonder out from underneath a player who takes the time to build the prerequisites, especially as great an achievement as it is to do so!

Can't you just set the Prereqs for the VotK to Sculptures too, so it can only be built if you could build Pyramides and the Spinx? I think the barbs are alyways behind in the techrace.
 
@ Koshling:

Somehow the SVN 4315 does not want to take effect even with Viewports enabled?? But its only three changes??

Other question is my map is 60% water and i am having a hard time keeping it from CTDing (which i have never had this problem before, heck i only have 6 civs on the map or so?), i did as you said and switched to viewports, but i cant take unit A from section A, and place in in Section B, just wont happen?? Plus sometimes i use those arrows again and it switches to another town, even if it just above the city like it is supposed to be if i want to view the city advisor?

If you're trying to move a unit off the current edge of the viewport you can do it in a couple of ways:

1) Center the viewport on the unit so that it's not near an edge and the turn's movement is all within the viewport (ctrl-alt-C with the unit selected I think - might be shift-alt)

2) Position the viewport using the military advisor (clicking the map in there will place the viewport centered on where you click).

The restriction is that you can only target (for movement) a plot that is in the viewport you're currently looking at when moving the unit, so you need to move the viewport to show both the unit you want to move and the target you ant to move to (or somewhere you know is on the way if it's extremely distant)
 
I was able to continue my game by taking a turn and then doing a modifier recalc. It still took a long while to finish.

I'm guessing you people having problems are either into semi-advanced games, have large numbers of civs, or both. I just tried a SVN4319 game at less than 600 turns and 7 civs, and the re-calc took about 20 seconds.
 
I dowloaded lastest SVN , recalculated the game, and now options in ctr-alt-o menu dont want to save at all.
They are forcing them selves to default the moment i close window

Didnt try new game yet i want to finish this one , but default options are annoying.
 
Do you have all of these?

Tattoo Hut
Req Techs: Tattoos AND Shelter Building
Req Resources: Dye AND Bone
Req Buildings: Storage Pit OR Barter Post OR Trading Post

Plus other buildings ...

Boneworker's Hut (Provides Bone)
Req Techs: Bone Working AND Shelter Building
Req Resources: Ivory OR Pelts OR Carcass
Req Buildings: Storage Pit OR Barter Post OR Trading Post

AND

[Animal] Hunter's Camp (Provides Carcass)
Req Techs: Hunting
Req Resources: Some Animal in the City Vicinity
Req Buildings: -

OR

[Animal] Traps (Provides Pelts)
Req Techs: Trapping
Req Resources: Some Animal in the City Vicinity
Req Buildings: -

OR

[Subdued Animal Building] (Provides Carcass)

AND

Dye Maker (Provides Dye)
Req Techs: Natural Pigments
Req Resources: -
Req Buildings: Indigo Gatherer OR Henna Gatherer OR Indigo Farm OR Henna Plantation OR Murex Diver OR Madder Plantation OR Fustic Grove OR Saffron Plantation OR Sulphur Mine OR Brazilwood Grove OR Cochineal Farm


I have, but the Dye resource are duplicated, one are prerequesite to tattoo, the other is a bugged copy.
 
Status
Not open for further replies.
Back
Top Bottom