Caveman 2 Cosmos

Thanks!

Actually, I just cherry-picked the changes from CyGameUtils.py, and indeed it's no longer possible for Great Farmers to build over resources; however, when I tried to plant Prime Timber on an Ancient Forest tile, the Farmer completed his job, but the Prime Timber actually wasn't placed.
 
Thanks!

Actually, I just cherry-picked the changes from CyGameUtils.py, and indeed it's no longer possible for Great Farmers to build over resources; however, when I tried to plant Prime Timber on an Ancient Forest tile, the Farmer completed his job, but the Prime Timber actually wasn't placed.
You have to do so from two python files.
 
Thanks! I merged changes from CvEventManager.py, and that helped; however, I ran into one more problem.

When placing Cocoa on a tile, the GF gets consumed, but no Cocoa resource is placed. Instead the tile says "Bonus - Cocoa" in place where the resource usually is mentioned. I'll check out locally, perhaps there's a naming mismatch; but it looks like a bug, or something else needs to be merged...

Update: apparently there's a code bug --
# Worker placed bonus
szType = GC.getImprovementInfo(iImprovement).getType()
if szType[:18] == "IMPROVEMENT_BONUS_":
if CyPlot.getBonusType(-1) > -1:
return # Bonus was discovered while the farmer was working.
iBonus = GC.getInfoTypeForString(szType[12:])
if iBonus > -1:
CyPlot = GC.getMap().plot(iX, iY)
CyPlot.setImprovementType(-1)
CyPlot.setBonusType(iBonus)

Apparently, the if CyPlot.getBonusType(-1) > -1: statement references a variable that hasn't been defined yet

Update#2: yes, placing CyPlot = GC.getMap().plot(iX, iY) above the first if-block fixes it.
 
Last edited:
Thanks! I merged changes from CvEventManager.py, and that helped; however, I ran into one more problem.

When placing Cocoa on a tile, the GF gets consumed, but no Cocoa resource is placed. Instead the tile says "Bonus - Cocoa" in place where the resource usually is mentioned. I'll check out locally, perhaps there's a naming mismatch; but it looks like a bug, or something else needs to be merged...

Update: apparently there's a code bug --
# Worker placed bonus
szType = GC.getImprovementInfo(iImprovement).getType()
if szType[:18] == "IMPROVEMENT_BONUS_":
if CyPlot.getBonusType(-1) > -1:
return # Bonus was discovered while the farmer was working.
iBonus = GC.getInfoTypeForString(szType[12:])
if iBonus > -1:
CyPlot = GC.getMap().plot(iX, iY)
CyPlot.setImprovementType(-1)
CyPlot.setBonusType(iBonus)

Apparently, the if CyPlot.getBonusType(-1) > -1: statement references a variable that hasn't been defined yet

Update#2: yes, placing CyPlot = GC.getMap().plot(iX, iY) above the first if-block fixes it.
Funny thing that bug, I tested the changes I recently made there in game and it worked, but while I was doing that test it occurred to me that improvements might discover a bonus on the plot while the great farmer was working there, which would be after the canBuild check has passed. So I added in that extra "is bonus on plot" check in the code that place then bonus there when the great farmer finished his work. I must have been tired to place the check using CyPlot before CyPlot was defined in the code.
So when fixing the issue that GF could not plant 3-4 of the 65 bonuses (due to an underscore in their type name), which I did fix, kinda, I ended up creating a worse bug so that the GF could not place any bonuses whatsoever. lol,

Thanks for spotting it so fast so that it could be fixed proper right away.
 
Funny thing that bug, I tested the changes I recently made there in game and it worked, but while I was doing that test it occurred to me that improvements might discover a bonus on the plot while the great farmer was working there, which would be after the canBuild check has passed. So I added in that extra "is bonus on plot" check in the code that place then bonus there when the great farmer finished his work. I must have been tired to place the check using CyPlot before CyPlot was defined in the code.
So when fixing the issue that GF could not plant 3-4 of the 65 bonuses (due to an underscore in their type name), which I did fix, kinda, I ended up creating a worse bug so that the GF could not place any bonuses whatsoever. lol,

Thanks for spotting it so fast so that it could be fixed proper right away.

Well, I got lucky to run into it :) But that's one of the reasons I don't like scripting languages -- too easy to screw up sometimes :D
 
Small request -- would it be possible to add a different icon for Shaft Mines? Currently there is no option to turn off obsolete worker actions, and mine and shaft mine look the same, which sometimes adds confusion regarding which improvement you want, cause you have to hover over the tile / worker action to actually find out what's already built (or going to be built).
 
Has Emancipation Proclamation been fixed btw? I just reached it, but it appears it only removes the world-view, but it doesn't remove slave specialists.
 
Has Emancipation Proclamation been fixed btw? I just reached it, but it appears it only removes the world-view, but it doesn't remove slave specialists.
@Toffer90 was meant to add python effect for that, I guess he never did it.
 
Ok, thanks, I also noticed one more minor issue -- female Corporation Executives don't count toward the National Unit limit set for corporate executives (at least for Creative Constructions).
 
There was a percentage indicator for the number of turns that have passed depending on game speed. Now there's a turn counter. What's the supposed length of an Eternity game (on Alternate Earth Map, if that matters)?
 
There was a percentage indicator for the number of turns that have passed depending on game speed. Now there's a turn counter. What's the supposed length of an Eternity game (on Alternate Earth Map, if that matters)?
There is percentage counter, click on BUG settings (green bug on top left) and click on clock tab.
Eternity is 20 000 turns.
 
This is not really a bug but more of an annoyance, so I will post it here. The keyboard shortcut for seasonal camp is the same as the center on active unit key, so if I lose focus on worker and try to recenter I build a seasonal camp.
 
This is not really a bug but more of an annoyance, so I will post it here. The keyboard shortcut for seasonal camp is the same as the center on active unit key, so if I lose focus on worker and try to recenter I build a seasonal camp.
I reused same shortcut as it was on other build actions.
 
I cannot get over how much of a limit the 32 bits it's the development, especially for anything related to space travel and map size.
You can only do so much with 4GB of RAM.
Isn't it possible to create a workaround to solve this?
 
I cannot get over how much of a limit the 32 bits it's the development, especially for anything related to space travel and map size.
You can only do so much with 4GB of RAM.
Isn't it possible to create a workaround to solve this?
No sir. Not without programming a new game from scratch.
 
Top Bottom