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. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,914
    Gender:
    Male
    Location:
    Las Vegas
    Normal ranged bombardment should not be causing the potential for destruction of terrain... hmm...
     
  2. irishhombre

    irishhombre Prince

    Joined:
    Oct 29, 2014
    Messages:
    493
    Gender:
    Male
    Location:
    Rannoch, Perseus Veil
    I'm not sure which save it might be, these 3 should hopefully demonstrate. I'm not very good at remembering to save, I end up often relying on autosaves. It only happens when enemy is close enough to the city, like an animal. I've noticed it only happens in the late game when units become more powerful, it doesn't affect terrain only the improvements.

    Edit: Realized saves were from 5 days ago, had to reupload the closest save I could find to the date and time of posting the first post.
     

    Attached Files:

  3. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,914
    Gender:
    Male
    Location:
    Las Vegas
    That's what I meant. Ranged bombardment should not be destroying improvements. There may be a remnant of some old programming that got turned back on somewhere.
     
  4. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,689
    Location:
    Poland
    Get latest SVN: https://github.com/caveman2cosmos/Caveman2Cosmos/wiki/Using-SVN
    It shouldn't depend on culture at all.
    Otherwise someone broke it.
     
  5. TPEHEP

    TPEHEP Prince

    Joined:
    Jul 15, 2011
    Messages:
    364
    Location:
    Ukrain, Kharkiv
    Use 11196

    Reporting - someone broke it :)
     
  6. raxo2222

    raxo2222 Time Traveller

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

    Snofru1 Emperor

    Joined:
    Dec 29, 2005
    Messages:
    1,220
    Location:
    Germany
    I have successfully upgraded space stations that are not on my territory, look at the attached screenshot. I have to admit that this was done at least one month ago... SpaceStation.jpg
     
  8. TPEHEP

    TPEHEP Prince

    Joined:
    Jul 15, 2011
    Messages:
    364
    Location:
    Ukrain, Kharkiv
    Through the editor, I assigned the territory of the station to my own, and only then did I upgrade the station. Now the situation will have to be emulated from scratch. If it helps - try to place a station on this save and improve it - I couldn't improve it if the station is outside your territory and is not adjacent to it or other areas of the earth (see already placed stations - one of them is just unimproved).
     

    Attached Files:

    Last edited: Jul 16, 2020
  9. TPEHEP

    TPEHEP Prince

    Joined:
    Jul 15, 2011
    Messages:
    364
    Location:
    Ukrain, Kharkiv
    Maybe since then something has broken down, or maybe the point is that the station is adjacent to the territory. I tried to do this at a distance of several tiles from the territory.
     
  10. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,689
    Location:
    Poland
    @Toffer90 or @MattCA
    You poked code bit too hard recently somewhere.
    Got this error when I tried to upgrade space station.
    Code:
    ASSERT FAILED
    =====================
    File:        d:\modstuff\caveman2cosmos_git\sources\CvPlayerAI.h
    Line:        81
    Expression:  ePlayer != NO_PLAYER
    =========================
    MESSAGE:
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Player is not assigned a valid value
    =======================
    PYTHON CALLSTACK:
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    UpgradeSS2.py (9): doOutcome
    ========================
    DLL CALLSTACK:
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    git\sources\cvplayerai.h (81): CvPlayerAI::getPlayer
    git\sources\cvplot.cpp (7783): CvPlot::setImprovementType
    git\build\deps\boost-1.32.0\include\boost\python\detail\caller.hpp (199): boost::python::detail::caller_arity<2>::impl<void (__thiscall CyPlot::*)(int),boost::python::default_call_policies,boost::mpl::vector3<void,CyPlot &,int> >::operator()
    1000EA8D (boost_python-vc71-mt-1_32): (filename not available): boost::python::objects::function::call
    1E1AE378 (python24): (filename not available): PyTuple_Type
    
    ASSERT FAILED
    ==============================================================================================================================================================================
    File:        d:\modstuff\caveman2cosmos_git\sources\CvPlayerAI.h
    Line:        81
    Expression:  ePlayer != NO_PLAYER
    ==============================================================================================================================================================================
    MESSAGE:
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Player is not assigned a valid value
    ==============================================================================================================================================================================
    PYTHON CALLSTACK:
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    UpgradeSS3.py (9): doOutcome
    ==============================================================================================================================================================================
    DLL CALLSTACK:
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    git\sources\cvplayerai.h (81): CvPlayerAI::getPlayer
    git\sources\cvplot.cpp (7783): CvPlot::setImprovementType
    git\build\deps\boost-1.32.0\include\boost\python\detail\caller.hpp (199): boost::python::detail::caller_arity<2>::impl<void (__thiscall CyPlot::*)(int),boost::python::default_call_policies,boost::mpl::vector3<void,CyPlot &,int> >::operator()
    1000EA8D (boost_python-vc71-mt-1_32): (filename not available): boost::python::objects::function::call
    1E1AE378 (python24): (filename not available): PyTuple_Type
    
    Despite that space station got upgraded.
    Spoiler :

    Civ4BeyondSword 2020-07-16 08-54-32-39.png
    Civ4BeyondSword 2020-07-16 08-54-36-47.png
    Civ4BeyondSword 2020-07-16 08-57-45-31.png

    Civ4BeyondSword 2020-07-16 09-00-23-15.png
    Civ4BeyondSword 2020-07-16 09-00-26-59.png
    Civ4BeyondSword 2020-07-16 09-01-01-37.png
     
    Last edited: Jul 16, 2020
  11. irishhombre

    irishhombre Prince

    Joined:
    Oct 29, 2014
    Messages:
    493
    Gender:
    Male
    Location:
    Rannoch, Perseus Veil
    Modern mill no longer provides flour. Before anyone asks, I have grains. Screenshot attached. Running 11196.
    Spoiler Screenshot :
    upload_2020-7-16_7-9-48.png
     
  12. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,689
    Location:
    Poland
    It provides flour, I guess text is broken.
     
  13. irishhombre

    irishhombre Prince

    Joined:
    Oct 29, 2014
    Messages:
    493
    Gender:
    Male
    Location:
    Rannoch, Perseus Veil
    No it doesn't, any resources that are dependent on flour are missing. There is no bread or pasta.
    Spoiler Screenshots :
    upload_2020-7-16_9-18-28.png
     

    Attached Files:

  14. TPEHEP

    TPEHEP Prince

    Joined:
    Jul 15, 2011
    Messages:
    364
    Location:
    Ukrain, Kharkiv
    I have no "pre-upgrade" sevs left. I tried to do it in this scenario here - click - with a heavy rocket. They are available from the start in one of the cities. Perhaps - am I doing something wrong?

    UPD - I checked it with the shuttle and the station you indicated - it doesn't work for me :(
     
    Last edited: Jul 16, 2020
  15. MattCA

    MattCA Prince

    Joined:
    Jan 25, 2019
    Messages:
    321
    Gender:
    Male
    No idea about the crash Toffer. Sorry.

    That assert Raxo posted makes sense tho.
    Here's line 7783 in CvPlot

    GET_PLAYER(getOwner()).changeGold(-GC.getImprovementInfo(eNewImprovement).getHighestCost());

    It's charging a player money using the owner of the plot. These guys are talkin about upgrading on unowned plots.
    Is that supposed to be possible now or will that not happen if space station is working right?
     
  16. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    7,141
    Location:
    Norway
    Improvements only upgrade when they are inside owned borders.
    I reworked the improvement upgrade coding a while back (Edit: 10. april).
    Before that rework, an improvement also had to be worked by a city to upgrade, a city can only work plots that are inside cultural borders, so all I did was expand the area that improvements are allowed to upgrade in.
    That code has afaik always used plot owner to change the player gold to account for the upgrade cost.

    Edit: I'll look into it a bit more...
     
    MattCA likes this.
  17. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    7,141
    Location:
    Norway
    Yeah, I think I see the problem, the upgrade cost may kick in if a worker builds the upgrade of an improvement on top of the improvement, which it really shouldn't, the upgrade cost should be done in the place that triggers the setImprovementType call when upgrading. Or alternatively a new parameter bIsUpgrade needs to be passed as an argument to it.

    From a quick glance I think it needs to be done in CvPlayer::upgradePlot() and the CvPlot::doImprovementUpgrade(const ImprovementTypes eType) depending on if it is human or AI that does the upgrade.
    I'll fix up this issue tomorrow.
     
  18. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    7,141
    Location:
    Norway
    Should upgrading improvement cost gold at all?
    It represent a natural incremental improvement "improvement" process happening over a long time, by the time you upgrade it it is already ready to yield higher profits.
    A bit like how cities don't really get a population boom the turn it grows in pop size, that it was an incremental process happening over many turns, and this was just the turn it caused the city to yield more from its population even though its population didn't grow more this turn than it did the last 50 turns without a pop increase...
    It's pretty cheap stuff too, pennies to the player really, so I'm thinking we should just get rid of it.
    I don't think the popup where you select what to upgrade to tells the player how much gold each upgrade cost even...
    When a worker build an improvement it doesn't cost gold, and the upgrade mechanic is usually slower than workers at getting the upgrade done anyway.
    It just feels a bit gimmicky.
     
    ingvarr777 likes this.
  19. ecawilson

    ecawilson Warlord

    Joined:
    Oct 9, 2014
    Messages:
    126
    Location:
    Indiana, GMT-4
    The improvement pop up's lack of information drives me crazy in general (going as far back as seasonal camp auto-upgrades), and I would love to see that fixed someday.

    I can certainly see where gold to trigger a certain improvement path would be useful (a fancy way to do road improvements, I have some ideas on how they might interact with pathfinding between active trade route cities and generate additional commerce if worked, and fall into disrepair if the trade route or that path falls into disuse, whether the growth of towns in your own nation like Route 66 or something like the Silk Road a thousand years ago, as an example of a mechanic where investing gold into improvements makes sense), but it's hard to justify fixing the code here for the space station if it has little gameplay or realism benefit.

    I guess I am just voting to comment it out with a note to fix someday, instead of throw away completely.
     
  20. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,914
    Gender:
    Male
    Location:
    Las Vegas
    I suppose I'm a bit ambivalent about it - there are numerous small costs adding to large costs throughout the whole game. When a restaurant or home owner renovates it doesn't cost nothing. I see the event as a renovation. That said, I didn't create the effect, just allowed it to continue as it was. I've always somewhat felt it was an appropriate small drain but we've had a lot of gold overages too.

    Curious, since I don't recall - does this cost go back to vanilla or was it introduced in RoM or something?
     

Share This Page