Food in ocean?

lemonjelly

Modding For Ethne
Joined
Jan 5, 2008
Messages
864
Location
UK
In base BtS, any ocean tile that's not adjacent to a coast tile has no yield at all, and I've been looking in the DLL for a way to disable this, but I can't find anything, can anybody help?
 
(never mind)
 
The planetfall mod allows sea cities to be built, which requires yields in ocean terrain, so the DLL from that mod may be useful. (Unless you got the idea and already looked there.)
 
I think you want void CvPlot::updatePotentialCityWork(), bool CvPlot::isPotentialCityWork() const. (The first does the calculation, storing the result in CvPlot::m_bPotentialCityWork, which the second returns.)

Btw, bool CvPlot::isPotentialCityWorkForArea(CvArea* pArea) const tests if any plot in a theoretical city's BFC centred on this plot is in the same area as the caller's area (city calls with its area) - if so the plot's culture is affected by the city in question. (This is a case where it would be good if Firaxis had left developer's comments in :))
 
Nope, this doesn't seem to do what I want either, even though I know that it can cause plots to lose their yield :p

I'm talking about these plots:

OOCL
OOCL
OOCL

The left-most O's have no yield at all, whereas the other tiles will. I'm looking for a way to disable the non-yieldiness of ocean tiles that aren't adjacent to a coastal or land tile.
 
Actually Carboniferous is right. CvPlot::updatePotentialCityWork() is what you're looking for.
It goes over the surrounding plots and looks for a non-water one. If it finds one, then this plot can produce yields. Otherwise - it can't.
 
So, changing the actual function doesn't seem to affect anything at all, but changing
Code:
m_bPotentialCityWork = false;
to
Code:
m_bPotentialCityWork = true;
at the very top of the file, has the exact effect I was looking for, even when I revert my changes to CvPlot::updatePotentialCityWork()
 
You may need to create a new map - the only place I can see where updatePotentialCityWork() is called is from setPlotType, which is called during map building. (Which makes sense, since nothing in the game would normally change the result)
 
Should opening the WB not be enough?
Because you can change the terrain there, so the values have to be re-evaluated.

Edit: And again i learned something new :goodjob:.
Was first a bit worried about the terraforming effect in my mod (turning land into water), but only the contrary change would be problematic.
 
I was making a new map every time I tested it, which is what confused me the most.
 
It works now, I know it was picking up my change, as I somehow disabled yields on every tile..

I changed a value from true to false at the top of the file, and it works fine now.
 
m_bPotentialCityWork = false;
got changed to
m_bPotentialCityWork = true;

and now the code works fine..
 
Back
Top Bottom