Fish spawning on top of the Barier Reef?

Joined
Jun 10, 2013
Messages
2,387
So, a weird thing happened last game and I had fish spawned on top of barier reef... Or rather Ramesses had them, but I as Venice with my Great Galeasses couldn't just let him spam and steal more of the wonders I wanted when all his three cities were coastal.

Is this normal? That Barrier Reef gave +1 food, and seemed to benefit from the lighthouse (had 4 food 1 prod 2 science during Ramesses' rule)
 
I seriously don't know if its a bug or a feature. Same thing with Atoll where resources can spawn on top of that and you can't improve.
 
This happens occasionally. Irritating that you can't improve that fish. Lighthouse will still give you an extra food (all it requires is that the fish be "worked"), but you can't get extra hammers, since Lighthouse and Seaport hammers (and God of the Sea hammers) require improved resources.
 
Thanks, guys. I've actually never noticed this happening, and I work a lot with map scripts and generating maps!

I believe I've corrected the problem within NWCustomPlacement():

Code:
SEPlot:SetFeatureType(feature_type_to_place);
-- MOD: This second plot of the Reef was missing impact values. This would rarely cause resources to spawn on top of it.
[COLOR="DarkRed"]self:PlaceResourceImpact(southeastX, southeastY, 1, 1)		-- Strategic layer
self:PlaceResourceImpact(southeastX, southeastY, 2, 1)		-- Luxury layer
self:PlaceResourceImpact(southeastX, southeastY, 3, 1)		-- Bonus layer[/COLOR]

The problem was that the second plot never left an "impact" as the core tile does (and other NW's), so that resources are prevented from being placed there.

Example from AttemptToPlaceNaturalWonder():

Code:
-- Now place this wonder and record the placement.
plot:SetFeatureType(feature_type_to_place)
table.insert(self.placed_natural_wonder, wonder_number);
self:PlaceResourceImpact(x, y, 6, math.floor(iH / 5))	-- Natural Wonders layer
self:PlaceResourceImpact(x, y, 1, 1)					-- Strategic layer
self:PlaceResourceImpact(x, y, 2, 1)					-- Luxury layer
self:PlaceResourceImpact(x, y, 3, 1)					-- Bonus layer
self:PlaceResourceImpact(x, y, 5, 1)					-- City State layer
self:PlaceResourceImpact(x, y, 7, 1)					-- Marble layer
local plotIndex = y * iW + x + 1;
self.playerCollisionData[plotIndex] = true;				-- Record exact plot of wonder in the collision list.

I don't believe the other impact tables are necessary for the second Reef plot.

I've added this to the script I'm working on. I'll also include it in a small mod to NaturalWondersCustomMethods.lua which I'll be publishing soon which enhances/fixes Gibraltar, Reef, and Krakatoa placements (Yes, I made Krakatoa use custom methods now so it also is more likely to spawn near smaller landmasses and islands). :D
 
Top Bottom