How to affect city Governor is in?

Atlas627

Deity
Joined
Aug 25, 2011
Messages
2,930
Hello, I've run into a modding issue with Modifiers. Some Effects are empire-wide, some are city or building based, and others are adaptable. I know how to create my own Modifier Types by combining different Collections with different Effects. However, Governors have thrown me for a loop.

Normally, for elements that are placed in cities (tiles, buildings, wonders, etc), the "Owner" Collection will affect the city. The "Owner" of a city is an Empire. In this way I can get things to go up the tree and affect the correct level.

But Governors seem to sometimes follow this rule and sometimes not. I think the problem is that the types of Effects they use are a mish-mash, where some of them are hard-coded to be at the Empire level or the City-level, and thus using the "Owner" collection causes them to skip to the Empire level in cases of the former. Thus it is difficult for me to figure out how Governors usually work by looking at Firaxis' code for examples. What level are Governors, really? What "owns" them?

Right now I'm trying to make an ability for Victor that makes all Walls in his city provide +1 Diplomatic Favor. But I think the Diplomatic Favor From Buildings effect is automatically Empire-wide? Any idea how I can make this just affect the local city?

Am I supposed to use the "Owner City" collection? That didn't seem to work either.
 
Have you tried using a requirement that uses this requirement type ? REQUIREMENT_CITY_HAS_SPECIFIC_GOVERNOR_PROMOTION_TYPE

Yes, I tried having the Promotion give all cities a modifier which had the requirement that the city have the governor with that promotion. Still gave the effect to all buildings in the empire.

I suspect that that type of Effect is simply an empire-wide effect no matter what I do, but I'm still not sure how the Governor is assigning it. I would expect, in such a case, for the ability to simply not work at all.
 
I had this same issue. Are you are familiar with the old pantheon "Goddess of the Harvest"? I tried giving that bonus to one of Moksha's promotions but I absolutely could not get it to only work JUST with the city he was governor of. It was always empire-wide. Same thing for districts culture bombing. These effects, regardless of collection type and subject requirements, apply empire-wide. I'm confident in the statement because I literally spent days working on it and couldn't get it to work. I'd be happy if someone proved me wrong though...
 
I had this same issue. Are you are familiar with the old pantheon "Goddess of the Harvest"? I tried giving that bonus to one of Moksha's promotions but I absolutely could not get it to only work JUST with the city he was governor of. It was always empire-wide. Same thing for districts culture bombing. These effects, regardless of collection type and subject requirements, apply empire-wide. I'm confident in the statement because I literally spent days working on it and couldn't get it to work. I'd be happy if someone proved me wrong though...

Yeah, I guess both ability effects say "adjust player" so that must be why. Extremely annoying. This is supposed to be moddable ffs
 
Top Bottom