Gleb Bazov
Warlord
- Joined
- Feb 13, 2017
- Messages
- 176
(1) if not (pOtherOwner ~= pPlayer and pOtherDistrict ~= -1) then -- this requires that (a) there be another owner than pPlayer AND that there be a district type on the tile. If both conditions are satisfied, the tile ownership remains unchanged.
I've updated this line of the code now to read as follows:
if not (pOtherOwner ~= pPlayer and (pOtherDistrict ~= -1 or pOtherWonder ~= -1)) then
this should check for the presence of Districts OR Wonders owned by another civ.
(2) First, why would you want to make sure that the plot is within 3 tiles of a city? That's not a requirement of the Culture Bomb in the original base game mechanics. In fact, the original Culture Bomb mechanics does not care EVEN if the center of the culture bomb is within 3 plots of the city. As long as the acquired plot is within this radius: Global Parameters (PLOT_INFLUENCE_MAX_ACQUIRE_DISTANCE = 8) (I have it set to eight), the culture bomb will trigger for improvements (e.g. for forts). If the plot is beyond that radius, the bomb will not work.
Second, for testing purposes, try separating the two limiters.
local bAddPlot = ((Map.GetPlotDistance(PlotX, PlotY, pPickPlot:GetX(), pPickPlot:GetY()) <= iPlotRadius)
local bMaxPlotDist = (Map.GetPlotDistance(pCity:GetX(), pCity:GetY(), pPickPlot:GetX(), pPickPlot:GetY()) <= 3))
if bAddPlot and bMaxPlotDist then
See if that works. If not, something is wrong with getting Getx() and GetY() from the raw cityID. Maybe you need to get another value for that city. I'll investigate.
Cheers.
I've updated this line of the code now to read as follows:
if not (pOtherOwner ~= pPlayer and (pOtherDistrict ~= -1 or pOtherWonder ~= -1)) then
this should check for the presence of Districts OR Wonders owned by another civ.
(2) First, why would you want to make sure that the plot is within 3 tiles of a city? That's not a requirement of the Culture Bomb in the original base game mechanics. In fact, the original Culture Bomb mechanics does not care EVEN if the center of the culture bomb is within 3 plots of the city. As long as the acquired plot is within this radius: Global Parameters (PLOT_INFLUENCE_MAX_ACQUIRE_DISTANCE = 8) (I have it set to eight), the culture bomb will trigger for improvements (e.g. for forts). If the plot is beyond that radius, the bomb will not work.
Second, for testing purposes, try separating the two limiters.
local bAddPlot = ((Map.GetPlotDistance(PlotX, PlotY, pPickPlot:GetX(), pPickPlot:GetY()) <= iPlotRadius)
local bMaxPlotDist = (Map.GetPlotDistance(pCity:GetX(), pCity:GetY(), pPickPlot:GetX(), pPickPlot:GetY()) <= 3))
if bAddPlot and bMaxPlotDist then
See if that works. If not, something is wrong with getting Getx() and GetY() from the raw cityID. Maybe you need to get another value for that city. I'll investigate.
Cheers.