Yes, but the xml is not going to work exactly the same as normal shard powers because those are hardcoded. The functionality will be the same in-game.
First you need a continuous resource. A continuous resource functions like food did in E:wom - world resources produce X each turn, no stockpile is gathered. If you have one, it will say that you have 1 all the time.
<ResourceType InternalName="rivermod_magmatype_spellres">
<DisplayName>Magma Forge</DisplayName>
<Type>MagmaForge</Type>
<IconColor>0,0,0</IconColor>
<Icon>Stat_AttackFire_Icon.png</Icon>
<ClothIcon>gfx\\TacticalIcons\\MetalOre_1.png</ClothIcon>
<ModelColor>0,0,0</ModelColor>
<Worth>5</Worth>
<Global>1</Global>
<Rarity>0.0</Rarity>
<Stored>0</Stored>
<TradedByCaravans>0</TradedByCaravans>
<ShownInGlobalDisplay>1</ShownInGlobalDisplay>
<Medallions InternalName="Ration_Res_Medallions">
<All>Res_Ores_Plains.png</All>
</Medallions>
</ResourceType>
then you need a world resource
<ResourceType InternalName="Resource_IronOre">
<DisplayName>Iron Ore</DisplayName>
<Type>IronOre</Type>
<Description>Build a Mine here to produce Metal.</Description>
<LongDescription>The ground here has been ripped asunder by the cataclysm; rubble is strewn everywhere, some of it rock shot through with veins of reddish and purple stone. This is iron ore in its raw form. Build a mine here, and extract it to forge powerful weaopns and armor. </LongDescription>
<BarredTerrain>River</BarredTerrain>
<BarredTerrain>HillsTerrain</BarredTerrain>
<PreferredTerrain>Category:Land</PreferredTerrain>
<MinPerPlayer>3</MinPerPlayer>
<Rarity>400</Rarity>
<NeedsToBeUnlocked>0</NeedsToBeUnlocked>
<HarvestType>Mining</HarvestType>
<Production>1</Production>
<Worth>5</Worth>
<Global>0</Global>
<Stored>0</Stored>
<RummagedPerTurn>0.75</RummagedPerTurn>
<OnSelectSFX>Click_Iron_Mine</OnSelectSFX>
<GameModifier>
<ModType>Resource</ModType>
<Attribute>TileYieldMaterials</Attribute>
<Value>5</Value>
<PerTurn>1</PerTurn>
</GameModifier>
<AIData AIPersonality="AI_General">
<AIPriority>3</AIPriority>
</AIData>
<Medallions InternalName="">
<All>Res_Ores_Plains.png</All>
</Medallions>
<Icon>Resource_IronOre.png</Icon>
<IconColor>0,0,0</IconColor>
<ClothIcon>Resource_IronOre.png</ClothIcon>
<TileDesign>R_Iron_Ore_01</TileDesign>
<TileDesignForTerrain>DesertTerrain:R_Lombard_Iron_01</TileDesignForTerrain>
<TileDesignForTerrain>Imperium:R_Iron_oar_Imperium_01</TileDesignForTerrain>
<TileDesignForTerrain>Scrapyard:R_Scrapyard_Iron_01</TileDesignForTerrain>
<ModelColor>0,0,0</ModelColor>
</ResourceType>
then you need an improvement on the resource. Note below how the <SupportedResourceType>IronOre</SupportedResourceType> in the improvement matches the <Type>IronOre</Type> in the Resourcetype just above this one. Also note that the resource being created (<Attribute>MagmaForge</Attribute>) has to match the <Type>MagmaForge</Type> from the resource definition (the first Resourcetype at the beginning of the post).
<ImprovementType InternalName="IronMine">
<DisplayName>Iron Mine</DisplayName>
<Description>Iron Mines can be built on Iron Ore to produce 1 Metal.</Description>
<IgnoreDuplicateImpLimit>1</IgnoreDuplicateImpLimit>
<RequiresResource>1</RequiresResource>
<SupportedResourceType>IronOre</SupportedResourceType>
<PreferredTerrain>Category:Land</PreferredTerrain>
<GameModifier>
<ModType>ConstructionResourceCost</ModType>
<Attribute>Gold</Attribute>
<Value>-10</Value>
</GameModifier>
<LaborToBuild>100</LaborToBuild>
<GameModifier>
<ModType>Resource</ModType>
<Attribute>MagmaForge</Attribute>
<Value>1</Value>
<PerTurn>1</PerTurn>
<Provides>+1 Metal</Provides>
</GameModifier>
<AIData AIPersonality="AI_General">
<AIPriority>5</AIPriority>
<AITag>Mining</AITag>
</AIData>
<ArtDef>Art_IronMine</ArtDef>
</ImprovementType>
Now for the final trickery - we also need to be able to use nature shard powers like normal shard powers. That's not possible, so we need to make a work-around.
First, we create a new unitstat. It is going to be default to 1. That means everyone is always going to be walking around with 1 in this (unless you control nature shards - more on that after the unitstat).
<UnitStatType InternalName="UnitStat_AvalonCalling">
<DisplayName>ISMdfasasdfOUNTED</DisplayName>
<DisplayNameShort>DGE</DisplayNameShort>
<Description>The chance to dodge an attack in battle.</Description>
<Icon>Stat_Dodge_Icon.png</Icon>
<Hidden>1</Hidden>
<UnitStatGrouping>CombatStat</UnitStatGrouping>
<UnitStatGrouping>UnitDetailsCombatStat</UnitStatGrouping>
<DefaultValue>1.0</DefaultValue>
</UnitStatType>
Then, we need to create a way to globally buff this unitstat for all your controlled units. Enabling global buffing of unitstats requires its own xml. Note how the internalname mirrors the internalname of the UnitStatType but with an added "A_", essentially "A_*".
<PlayerAbilityType InternalName="A_UnitStat_AvalonCalling">
<DisplayName>Unit Hit Point Bonus</DisplayName>
<Description>Provides a bonus to the hit points of all units.</Description>
<Icon>Kingdom_Crest_02.png</Icon>
</PlayerAbilityType>
Now we go back to the improvement above and add the following:
<GameModifier>
<ModType>Player</ModType>
<Attribute>AbilityBonus</Attribute>
<StrVal>A_UnitStat_AvalonCalling</StrVal>
<Value>100</Value>
</GameModifier>
The end result is that all units start with 1 in your unitstat. But for each improvement controlled, that value is increased by 100%. If you control 2, it is increased by 200%. So a unit with 5 controlled improvements will have 6 in the unitstat. Then you can use that unitstat for all calculations in spells.
As you have probably figured out by now, the continuous resource we introduced above is actually not used for anything except to give a visual count of how many of that shard is controlled.
PS. You'll need to change a bunch of stuff not to conflict with vanilla game (or my mods), obviously.
PS 2. Since the world resource is not technically a true shard, Corruption spell and Consume spell will not work on them.