How do I change yields for a civ's city center?

Freeman__

Chieftain
Joined
Jul 19, 2023
Messages
1
I've been trying to make a custom civ that gets plus five science and production and minus five culture and loyalty in every city center, but I don't see any of these modifiers in the common/base files. Solutions?
 
Not having done anything similar before, this was a fun exercise. I literally didn't test this at all but I think this would work. If nothing else, it's a starting point.

Much of what I threw in here, such as the leader stuff, was just a way of keeping track where I was as I went about the best solution. At first, I was thinking about requirement sets in order to apply traits to a city. So some of the Since it's pretty easy to apply multiple modifiers to a civilization trait, that ended up being fairly simple. It did get a little long, though, so I'm attaching the XML file I made instead of putting the whole thing up here.

Edit: Always got to be a typo.

Edit 2: It occurred to me I used a somewhat different layout for my XML in that file. I prefer keeping things to a single line where possible since it makes things easier for me to keep track of. That's also why I usually convert things to SQL but I probably ought to test of this works one of these days.

If you prefer to work in XML, you may need to redo the parts to expand them somewhat. For example, the ModifierArguments would usually look more like this:

XML:
<ModifierArguments>
  <Row>
    <ModifierId>MODIFIER_FREEMAN_CITY_SCIENCE</ModifierId>
    <Name>YieldType</Name>
    <Value>YIELD_SCIENCE</Value>
  </Row>
 
  <Row>
    <ModifierId>MODIFIER_FREEMAN_CITY_SCIENCE</ModifierId>
    <Name>Amount</Name>
    <Value>5</Value>
  </Row>
</ModifierArguments>

If I remember correctly, <Modifiers> & <ModifierArguments> are the only 2 sectiopns of that file which would use the expanded format in the base game files. Since Civ 6 uses a custom XML parser to take XML and convert it into SQL, I'm not sure if it recognizes the otherwise entirely proper format I used in the attached file. If that doesn't work and you have difficulty expanding it, let me know.
 

Attachments

  • Freeman_Modifiers.xml
    3.1 KB · Views: 22
Last edited:
Top Bottom