• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

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

Can you post a save please
Normal ranged bombardment should not be causing the potential for destruction of terrain... hmm...
 
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.
 

Attachments

it doesn't affect terrain only the improvements.
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.
 
Not sure if this is a bug or not. Space stations located outside borders cannot be improved. That is, the unit is wasted, but there is no improvement. For some maps, this is critical, because it is impossible to place a city near the northern edge of the map (3+- tiles). Given that culture is very poorly distributed on space tiles. Space exploration becomes impossible, for example, on most @Snofru1 maps.

It seems to me that the construction of the station should create the territory of the created player under it. If you do this through the editor, the territory disappears the next turn.
Get latest SVN: https://github.com/caveman2cosmos/Caveman2Cosmos/wiki/Using-SVN
It shouldn't depend on culture at all.
Otherwise someone broke it.
 
Not sure if this is a bug or not. Space stations located outside borders cannot be improved. That is, the unit is wasted, but there is no improvement. For some maps, this is critical, because it is impossible to place a city near the northern edge of the map (3+- tiles). Given that culture is very poorly distributed on space tiles. Space exploration becomes impossible, for example, on most @Snofru1 maps.

It seems to me that the construction of the station should create the territory of the created player under it. If you do this through the editor, the territory disappears the next turn.

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
 
Upload save

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

Attachments

Last edited:
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...

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.
 
@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:
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
 
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

 

Attachments

  • upload_2020-7-16_9-18-52.png
    upload_2020-7-16_9-18-52.png
    1.4 MB · Views: 69
Despite that space station got upgraded.

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:
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?
 
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?
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...
 
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.
 
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.
 
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.
 
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.
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?
 
Back
Top Bottom