GEM 1.11.6/CivUp v2.2.8 WonderProductionModifier

skodkim

Deity
Joined
Jan 16, 2004
Messages
2,497
Location
Denmark
Hi

Using GEM 1.11.6/CivUp v2.2.8 I've found that the WonderProductionModifier field from the Buildings table does not work. I actually think it may have been like that for a couple of releases now.

If you look at the screenshot you can see that the city gets 9 base production and 5%modifier totalling 9.5 (9.45) production. The 15% modifier from the Wonder in the city does not work. The wonder uses the WonderProductionModifier field from the Buildings table

\Skodkim
 
Thanks for bringing this up. I hadn't written code to use that field since I think it's not used in the mod, but it should be easy to add. Should it be a city-specific or nationwide effect? I could do either one or both.

In this file:
Civup\2_ModTools_Trunk\YieldLibrary\YieldLibrary.lua

Around line 1044 of City_GetWonderConstructionModifier add this code with the other wonder production modifiers:
Code:
        for buildingInfo in GameInfo.Buildings("WonderProductionMod != 0") do
            if city:IsHasBuilding(buildingInfo.ID) then
                yieldMod = yieldMod + buildingInfo.WonderProductionMod
            end
        end
 
Hi Thal

You seem to have truncated the text a it in the sample code (which doesn't work). It should probably go
Code:
	        for buildingInfo in GameInfo.Buildings("WonderProductionMod[B]ifier[/B] != 0") do
	            if city:IsHasBuilding(buildingInfo.ID) then
	                yieldMod = yieldMod + buildingInfo.WonderProductionMod[B]ifier[/B]
	            end
	        end

Then it works.

\Skodkim
 
Back
Top Bottom