This is something completely new in FE that we couldn't do in E:wom. Production rules basically allow us to attach one kind of production to something else. That's how tech, production and gildar work in cities; population produces those things.
For more examples, see CityResourceEffectDefs.xml in the installation directory.
To set up a new production rule, there are three steps that need to be taken. Below, you will find the XML to produce 1 metal for every earth shard connected to, or in the city.
<DisplayName>Base Research Per Earth Mana</DisplayName>
<Description>How much Metal each unit of Earth mana produces.</Description>
<DisplayName>Metal per Earth mana</DisplayName>
<Description>Amount of Metal each unit of Earth Mana produces.</Description>
The steps are in no particular order.
The CityResourceEffectDef is what defines which productions are linked. As you can see in the example, we are linking EarthMana to Metal. This creates a "go-between" production of "MetalPerEarthMana".
The PlayerAbilityType allows us to globally modify this "MetalPerEarthMana". The default value is set to 1; 1 metal for each earth shard. If it was 2, there would be 2 metal for each earth shard. The internalname is crucial, it has to be A_Additive_*. If this wasn't a mod example, I wouldn't set it to default 1.
The ResourceType is also needed. Even though we are just creating a go-between of two different resources, we still need to create this kind of resourcetype. Note that the Internalname is not important here, rather the <Type> is what is important.
All put into action:
After this rule has been set up, we can also modify the values using different things. For example, a building that can only be built in a city with an earth shard, and produces 1 metal, might have this:
<Provides>+1 metal per earth shard</Provides>
or we might globally affect it like other similar things, for example in a faction bonus or a high-level earth spell (this gives 1 metal per earth shard faction-wide):
The game also has support for making one type of production lower another one by a percentage (like Unrest lowers production). See CityResourceEffectDefs.xml in the installation directory.