1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

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

Discussion in 'Bugs and Crashes' started by Thunderbrd, Oct 20, 2019.

  1. VCrakeV

    VCrakeV Prince

    Joined:
    Aug 22, 2014
    Messages:
    448
    I am having a CTD when I try to end my turn after loading my save (earlier saves crash once I catch up with the newer save and end my turn). Any idea what might be wrong here?
     

    Attached Files:

  2. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    6,843
    Location:
    Norway
    I played three turns on that save with your usersettings, something was strange with your usersettings though, so I attached your settings after I played with them in case it fixed something with them...
    If you are on a windows 7 system, then try running the game in windows vista compatibility; I've heard it fixes some win7 specific CTD's.

    What SVN revision are you on? revision 11159 had a CTD fix in it.
     

    Attached Files:

  3. VCrakeV

    VCrakeV Prince

    Joined:
    Aug 22, 2014
    Messages:
    448
    I'm using Windows 10; that doesn't benefit from any compatibility modes, right?

    I'm on 11156 anyway, so I'll update it.
     
  4. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    6,843
    Location:
    Norway
    None that we know of, windows 10 is actually surprisingly compatible with old games.
    Good idea, also 11157 had a CTD fix specific to the resource depletion bug option.
     
  5. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,555
    Location:
    Poland
    I could pass turn in latest SVN.
    So some updates fixed it.
     
    VCrakeV likes this.
  6. armenia4ever

    armenia4ever Chieftain

    Joined:
    Aug 4, 2017
    Messages:
    21
    Gender:
    Male
    Got a bizarre error where I end my turn and I'm suddenly shifted to control of another civilization. I dont have any game options turned on that would enable this and I went into the world builder and there doesn't seem an option to be able to return to controlling my actual starting civ.

    Tried saving and reloading a few times and rebooting the game but no luck.
     
  7. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,555
    Location:
    Poland
    Your save is corrupt, or you forgot to turn off one of those challenge options.

    There was bug with certain game option - it had to be in certian place as EXE demanded it.
    This game option was moved, all other game options were shifted by one place.

    That is No Nukes option became One City Challenge and so on.
    Spoiler :

    Civ4BeyondSword 2020-04-14 21-01-58-72.png


    Alternatively you used old INI backup before option reshuffle and you didn't look at options.
     
    Last edited: Apr 14, 2020
  8. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    16,062
    Gender:
    Male
    Location:
    Western IL. cornfields
    Can't build salt gatherer on salt flats now. As you can see I was able to build them before.
     

    Attached Files:

  9. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,555
    Location:
    Poland
    Probably @Toffer90 made mistake by adding more advanced improvement upgrade as first one.
     
  10. VCrakeV

    VCrakeV Prince

    Joined:
    Aug 22, 2014
    Messages:
    448
    On that note, is salt gatherer suppose to upgrade to (early) quarry? Are you suppose to be able to build quarries on salt flats? I haven't been able to.
     
    ingvarr777 likes this.
  11. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    6,843
    Location:
    Norway
    I'll look into it.
    This is not related to the recent changes to the improvement upgrade mechanics. Also, I only changed the main upgrade for seasonal camp in xml.
    This may be the reason why workers can't build salt gatherers on salt flat, they can build the main upgrade of salt gatherer, so salt gatherer is disqualified. While the gatherer unit can build salt gatherer because they are unable to build the early quarry.
    This is probably a bug that's been around for a while.
    Either we remove the upgrade from the salt gatherer, or we allow quarries to be built on salt flats.
    The former would signal an intention to add more salt flat specific improvements that are more akin to salt gatherer than the quarry is.
    The latter would signal that we don't intend to have a salt flat specific salt extraction improvement line after the prehistoric era.

    Edit: Yup, just confirmed that workers lose the ability to build salt gatherer improvement when you invent the Masonry tech which unlocks the quarry upgrade, it's not because of the upgrade per say, it's because the salt gatherer worker build is set to obsolete at masonry tech.
     
    Last edited: Apr 15, 2020
    raxo2222 and VCrakeV like this.
  12. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    6,843
    Location:
    Norway
    My temporary solution was to remove the obsolete tech from the salt gatherer worker build. It still can't upgrade to quarry, all worker units seems to have the salt gatherer build available to them, even the android worker has in its xml the salt gatherer build.
    As long as we don't have an upgrade for the salt gatherer we'll have to use the salt gatherer improvement for all eras, I think some other imps will become available later that are simply better than salt gatherer for salt flats, so I don't think it will be seen on maps around modern era.
     
  13. VCrakeV

    VCrakeV Prince

    Joined:
    Aug 22, 2014
    Messages:
    448
    Is there a reason why we can't allow workers (and later units, but not gatherers) to just build (early) quarries on salt flats? You know, if salt gatherers can't upgrade to quarries for whatever reason.
     
  14. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    6,843
    Location:
    Norway
    Salt flats are supposed to be the barren terrain in C2C until at least modern era, no animal or plant life, not suitable to be widely utilized by human culture, which is what an improvement represent, and too costly to operate mines and quarries for the low amount of resources available in salt flats.

    My opinion is that we should remove the salt gatherer improvement and allow seasonal camp to do its only role, which is to provide 1 commerce and have the possibility of discovering a salt resource.
    Salt gatherer could be an available building in the city if any salt flat is in city vicinity. Salt resource would enable the quarry to be built on the salt flat.
    Thing is that the salt in salt flats is usually costly to excavate (relative to other ways to excavate salt) and so filled with other minerals that it is not high quality salt without filtering and evaporation processes applied to it. A salt resource on the salt flat would signify a significant amount of high quality salt concentration available to be quarried.

    Edit: Actually, I don't think the seasonal camp should be available on salt flats either, there are no hospitable seasons in salt flat terrains. Improvements also reduce terrain damage, and prehistoric is too early to allow that removal for salt flats.
    I could add some code to allow salt flats to discover salt bonuses if worked by a city even if it's unimproved.
     
    Last edited: Apr 15, 2020
    VCrakeV likes this.
  15. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    6,843
    Location:
    Norway
    @raxo2222 Somewhat unrelated to what's discussed above, but I'll make a code optimization on improvements bonus discovery that will reduce turn times.
    Reason I'm meantioning it is because it will impact what values we should give for improvement bonus discovery for a specific resource.
    Currently the code starts on bonus number 0 and loops through all bonuses in the game until a valid one has a successful random roll or all bonuses have been checked.
    I'm changing it so it start at a random bonus index and loop from there (resets to 0 if it reach the last index) until it finds one that is valid for discovery, it then do a random roll and stops the loop regardless of it being a successful or a failed random roll.

    This means that we don't have to set the discovery odds to be worse per bonus the more bonuses an improvement can discover, or in other words, an improvement doesn't get a higher chance to discover a bonus per turn the more different bonuses it can discover.
    So an improvement that can discover 60 bonuses on a plot where all the bonuses has 1000 odds will not have a higher chance per turn to discover a bonus than an improvement that only can discover 1 bonus with 1000 odds.

    In addition to optimizing turn times this will make it easier to decide the odds values for an improvement in xml, as the chance to discover a bonus is the average odds of all valid bonuses for discovery instead of something that you cannot calculate by head in any good way.

    I'm thus making all bonus discovery chances about 10 times more likely as some of them only had low chances because there was many bonuses with a low chance that equaled a high chance, but that is no longer the way it works with my change.
    Edit: The xml change in my last commit is only a rough adjustment to accomodate the new value paradigm, I leave it up to xml modders like you to revise and fine tune them further.
     
    Last edited: Apr 15, 2020
    raxo2222 and VCrakeV like this.
  16. Snofru1

    Snofru1 Emperor

    Joined:
    Dec 29, 2005
    Messages:
    1,217
    Location:
    Germany
    It seems that one of the last SVNs broke some automatic upgrades. Many of my Lumberjacks don't upgrade to Lumbermills automatically. The tile is worked by the city, I can build a Lumbermill with my worker but the hover doesn't say anything like "X turns to Lumbermill". Strangely some tiles have this display, e.g. a Lumberjack that is built on Resin, but all my Lumberjacks on "normal" forest or on Prime Timber don't upgrade automatically.

    Edit: I just found another Lumberjack on Resin that also doesn't upgrade, not sure what is going on here...
     
  17. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,555
    Location:
    Poland
    Upload save
     
  18. Snofru1

    Snofru1 Emperor

    Joined:
    Dec 29, 2005
    Messages:
    1,217
    Location:
    Germany
    The seasonal camps also don't upgrade anymore...
     

    Attached Files:

  19. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,587
    Gender:
    Male
    Location:
    Las Vegas
    That was my thinking which was why I was going to suggest we not allow the seasonal camp in extremely hostile, excessive and uncommon, terrains in general - and that we should leave the salt gatherer in place. A quarry CAN be built there IF a resource comes up, so why should the salt gatherer require the quarry to be qualified when the bonus emergence would qualify it? Seems improvements should not be checking to make sure their upgrades can qualify as part of their own qualification for build.

    This, by the way, is the ONLY improvement we have that seems reasonable that it should be attempting to discover bonuses if it's not being worked - because even with a little yield boost, working the tile is probably not a great use for a population in comparison to any specialist assignment.
     
  20. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    6,843
    Location:
    Norway
    There's an issue with some old improvements being stuck in an unupgradable state when updating to the changes I made to the improvement upgrade mechanic.
    I believe all new improvements built after the update will upgrade as they should.

    It's a small save compatibility issue.
    If you remove and then place the improvements again in world builder, or if a worker builds another improvement on the plot, the issue will go away.
     
    Last edited: Apr 15, 2020

Share This Page