Resource Yields

It's there. look about half way down the file right after the main list of resources. The new XML files are broken up multiple lists, the second one in the resource file has the yields.

</Resources>
<Resource_YieldChanges>
<Row>
<ResourceType>RESOURCE_IRON</ResourceType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>1</Yield>
</Row>
 
Actually in case anyone else has the same question the number to change for unit support is at the end of the CIV5Resources.xml file:

<Resource_QuantityTypes>
<Row>
<ResourceType>RESOURCE_IRON</ResourceType>
<Quantity>6</Quantity>
</Row>
<Row>
<ResourceType>RESOURCE_IRON</ResourceType>
<Quantity>2</Quantity>
</Row>

Not really sure why some resources have two entries. Maybe one is for units and one is for buildings? :confused:
 
Actually in case anyone else has the same question the number to change for unit support is at the end of the CIV5Resources.xml file:

<Resource_QuantityTypes>
<Row>
<ResourceType>RESOURCE_IRON</ResourceType>
<Quantity>6</Quantity>
</Row>
<Row>
<ResourceType>RESOURCE_IRON</ResourceType>
<Quantity>2</Quantity>
</Row>

Not really sure why some resources have two entries. Maybe one is for units and one is for buildings? :confused:
Those entries firstly refer to the amount found in a given resource on the map, not costs. Secondly, they aren't actually use; instead, values are hard-coded into AssignStartingPlots.lua.
 
Then I'm really confused :crazyeye:. The code that Nemesis Rex pointed out is the production yield not units supported. So where is the number to change for units supported?
Well, the table schemata in the vanilla units file contains the following:

Code:
<Table name="Unit_ResourceQuantityRequirements">
    <Column name="UnitType" type="text" reference="Units(Type)"/>
    <Column name="ResourceType" type="text" reference="Resources(Type)"/>
    <Column name="Cost" type="integer" default="1"/>
</Table>

In all of the vanilla examples, there is no row value set for cost - it defaults to one. I do not know if there are any current mods that increase this value or set a higher one for a new unit. It's perfectly possible that the game code doesn't actually pay attention to it, but I wouldn't make that assumption. If you want to change it for existing units, you'd want to use <update> tags, setting Cost="2", say, where UnitType and ResourceType were the relevant values; because all units require no more than one resource, you could set it just based on UnitType, or you could set it in all cases if you wanted to just make all units need 2 (or 3, or whatever) of the relevant resource, as long as they're all the same.
 
Of course, I have gotten confused as to what you're asking by not checking back to the beginning... to change the actual yields on the map, you have to edit AssignStartingPlots.lua in all sorts of strange places. I'm working on making it easier, with the caveat that to make it easier you'll have to use my mod as a basis.
 
Back
Top Bottom