[BNW] Adding global yields with Lua scripts?

The_Space_Cows

Chieftain
Joined
Mar 18, 2023
Messages
19
Hello, I am relatively new to Civ V modding and the Lua programming language, but I am familiar with XML and coding in other languages.

For a mod I am making I am adding a Founder Belief that gives science per some number of followers of your religion, but only in your own cities not counting other civilizations. My first thought is to add an XML table perhaps called Belief_YieldChangesPerXDomesticFollowers and write a lua script to add dummy buildings to cities to give extra yield.

But this comes with an issue, if you add to a city's base yield with a dummy building, the yield is affected by modifiers of other buildings in the city, for example universities give a 33% science modifier.

The yields from the Tithe and World Church founder Beliefs are global, and not attributed to any city for them to be affected by building and social policy yield modifiers.

How can I add flat science (or any yield) to a whole civilization using a lua script?
 
Top Bottom