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.
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.