Wrong game, Lord Xia.
eltharion70, to create a spell that is accessible to everyone in a faction, but only to that faction, you will need to first create a spellbook.
See CoreSpellbooks.xml, example below
<Spellbook InternalName="InternalNameOfYourSpellbookHere">
<DisplayName>Terraforming</DisplayName>
<Icon>Terraform_Dot.png</Icon>
<SpellbookNode InternalName="Node_L1_Raiseland">
<SpellDef>RaiseLand</SpellDef>
<StartingResearch>1</StartingResearch>
</SpellbookNode>
<SpellbookNode InternalName="Node_L1_LowerLand">
<SpellDef>LowerLand</SpellDef>
<StartingResearch>1</StartingResearch>
<StartingKnown>1</StartingKnown>
</SpellbookNode>
</Spellbook>
then, create a custom technology that only one faction can unlock. For example, you could make it unlock from faction bonusability. See AbilityBonuses.xml for examples;
<AbilityBonus InternalName="ExplorationBonus">
<AbilityBonusOption InternalName="ExplorationBonus1">
<DisplayName>Wanderlust</DisplayName>
<Description>Faction starts with Exploration technology, which reveals a random world resource on the map.</Description>
<Bonus>10</Bonus>
<Cost>2</Cost>
<GameModifier>
<ModType>Player</ModType>
<Attribute>UnlockTech</Attribute>
<StrVal>Exploration_Amarian</StrVal>
</GameModifier>
</AbilityBonusOption>
</AbilityBonus>
Of course, unless you want to use an existing tech, you'll need to create a new tech as well. Example:
<TechDef InternalName="Spellbook_Earth_Amarian">
<DisplayName>Book of Earth</DisplayName>
<Description>This breakthrough allows our Kingdom to use spells from the Book of Earth.</Description>
<Image>EarthCrystal_Medallion.png</Image>
<Rarity>100</Rarity>
<Category>Put a Funny Name here to hide it from the existing categories</Category>
<Infinite>0</Infinite>
<AppearanceChance>100</AppearanceChance>
<AIData AIPersonality="AI_General">
<AIPriority>50</AIPriority>
<AITradeToGetValue>75</AITradeToGetValue>
<AITradeOutValue>90</AITradeOutValue>
<AIAtWarMultiplier>1</AIAtWarMultiplier>
<AIEarlyBuildUpMultiplier>1</AIEarlyBuildUpMultiplier>
</AIData>
<GameModifier>
<ModType>Player</ModType>
<Attribute>UnlockSpellbook</Attribute>
<StrVal>EarthSpellbook</StrVal>
<Value>0</Value>
</GameModifier>
</TechDef>
The chain goes:
Abilitybonusoption unlocks tech unlocks spellbook unlocks spell