Bug? PlotCultureCostModifier not hooked up in DLL

ls612

Deity
Moderator
Joined
Mar 10, 2008
Messages
8,116
Location
America
I was working on making a building which would increase the rate at which the city it was in gained plots via culture for New Horizons. When I was looking to see if I needed to add this functionality to the DLL or not I saw that the PlotCultureCostModifier tag existed and was used for the Russian UB. It claims to give a reduction to the cost needed to get plots with culture in that city.

However, I did not notice this until after I had already gone and made a duplicate tag for this. The reason being that this function isn't hooked up anywhere!



I double-checked and the code that handles that tag/column isn't used anywhere else in the DLL. It only gets forwarded to CvCity in ProcessBuilding() and then is unused. Am I missing something or is this a bug that has been around since vanilla and was never fixed?

BTW, the fix is really simple, just make the changes commented as New Horizons in this code (from GetJONSCultureThreshold)

PHP:
	// New Horizons: Local modifiers
	int iLocalModifier = getPlotCultureCostModifier();

	// -50 = 50% cost
	int iModifier = GET_PLAYER(getOwner()).GetPlotCultureCostModifier() + m_iPlotCultureCostModifier + iReligionMod + /*New Horizons*/ iLocalModifier;
 

Attachments

  • Capture.PNG
    Capture.PNG
    13 KB · Views: 193
Report it in the bugs forum.
 
Top Bottom