Jump to content

Having trouble making a spell to create elemental shards


jadebrain

Recommended Posts

Hello, everyone! I'm trying to make a mod for my own use which would allow players to add elemental shards onto the map. So far, I've got it working for the Fire Shard, but for some inexplicable reason, none of the other shard spells work; the spells cost mana, and the sound effect plays, but no shard is added. As far as I can tell, it should work the same for the other shard spells as it works for the Fire Shard spell, since I basically copied and pasted the code for each spell and merely changed the words for the elements. The code for what I've done will be posted in the quote box below (it's not the whole file, since I'm adding these spells onto another mod to make things easier). Any help will be appreciated.

 

 

<SpellDef InternalName="CreateAirShard">
<DisplayName>Create Air Shard</DisplayName>
<Description>Create an Air Shard on a tile.</Description>
<Image>ReviveLand_Painting.png</Image>
<IconFG>S_BirthOfSummer_Icon.png</IconFG>
<SpellBookSortCategory>World</SpellBookSortCategory>
<SpellBookSortSubCategory>Map</SpellBookSortSubCategory>
<SpellType>Strategic</SpellType>
<SpellClass>Terraform</SpellClass>
<SpellSubClass>Other</SpellSubClass>
<SpellTargetType>NeutralGround</SpellTargetType>
<AutoUnlock>1</AutoUnlock>
<CasterMustBeSov>1</CasterMustBeSov>
<SpellResourceCost>
<Resource>Mana</Resource>
<Amount>200</Amount>
</SpellResourceCost>
<GameModifier>
<ModType>Map</ModType>
<Attribute>CreateShard</Attribute>
<StrVal>ElementalAirShard01</StrVal>
</GameModifier>
<ValidTerrainType>Forest</ValidTerrainType>
<ValidTerrainType>Fertile_Land</ValidTerrainType>
<ValidTerrainType>DesertTerrain</ValidTerrainType>
<ValidTerrainType>Land</ValidTerrainType>
<ValidTerrainType>Swamp</ValidTerrainType>
<ValidTerrainType>ArcticTerrain</ValidTerrainType>
<AIData AIPersonality="AI_General">
<AIPriority>5</AIPriority>
</AIData>
<HitSoundFX>Spell_BirthOfSummer_01</HitSoundFX>
<SpellDefEffect>
<EffectName>Revive_Land</EffectName>
<LocalPosition>0,0,0</LocalPosition>
<EffectScale>1</EffectScale>
<EffectDelay>0</EffectDelay>
<SnapToTerrain>1</SnapToTerrain>
</SpellDefEffect>
</SpellDef>
<SpellDef InternalName="CreateDeathShard">
<DisplayName>Create Death Shard</DisplayName>
<Description>Create a Death Shard on a tile.</Description>
<Image>ReviveLand_Painting.png</Image>
<IconFG>S_BirthOfSummer_Icon.png</IconFG>
<SpellBookSortCategory>World</SpellBookSortCategory>
<SpellBookSortSubCategory>Map</SpellBookSortSubCategory>
<SpellType>Strategic</SpellType>
<SpellClass>Terraform</SpellClass>
<SpellSubClass>Other</SpellSubClass>
<SpellTargetType>NeutralGround</SpellTargetType>
<AutoUnlock>1</AutoUnlock>
<CasterMustBeSov>1</CasterMustBeSov>
<SpellResourceCost>
<Resource>Mana</Resource>
<Amount>200</Amount>
</SpellResourceCost>
<GameModifier>
<ModType>Map</ModType>
<Attribute>CreateShard</Attribute>
<StrVal>ElementalDeathShard01</StrVal>
</GameModifier>
<ValidTerrainType>Forest</ValidTerrainType>
<ValidTerrainType>Fertile_Land</ValidTerrainType>
<ValidTerrainType>DesertTerrain</ValidTerrainType>
<ValidTerrainType>Land</ValidTerrainType>
<ValidTerrainType>Swamp</ValidTerrainType>
<ValidTerrainType>ArcticTerrain</ValidTerrainType>
<AIData AIPersonality="AI_General">
<AIPriority>5</AIPriority>
</AIData>
<HitSoundFX>Spell_BirthOfSummer_01</HitSoundFX>
<SpellDefEffect>
<EffectName>Revive_Land</EffectName>
<LocalPosition>0,0,0</LocalPosition>
<EffectScale>1</EffectScale>
<EffectDelay>0</EffectDelay>
<SnapToTerrain>1</SnapToTerrain>
</SpellDefEffect>
</SpellDef>
<SpellDef InternalName="CreateEarthShard">
<DisplayName>Create Earth Shard</DisplayName>
<Description>Create an Earth Shard on a tile.</Description>
<Image>ReviveLand_Painting.png</Image>
<IconFG>S_BirthOfSummer_Icon.png</IconFG>
<SpellBookSortCategory>World</SpellBookSortCategory>
<SpellBookSortSubCategory>Map</SpellBookSortSubCategory>
<SpellType>Strategic</SpellType>
<SpellClass>Terraform</SpellClass>
<SpellSubClass>Other</SpellSubClass>
<SpellTargetType>NeutralGround</SpellTargetType>
<AutoUnlock>1</AutoUnlock>
<CasterMustBeSov>1</CasterMustBeSov>
<SpellResourceCost>
<Resource>Mana</Resource>
<Amount>200</Amount>
</SpellResourceCost>
<GameModifier>
<ModType>Map</ModType>
<Attribute>CreateShard</Attribute>
<StrVal>ElementalEarthShard01</StrVal>
</GameModifier>
<ValidTerrainType>Forest</ValidTerrainType>
<ValidTerrainType>Fertile_Land</ValidTerrainType>
<ValidTerrainType>DesertTerrain</ValidTerrainType>
<ValidTerrainType>Land</ValidTerrainType>
<ValidTerrainType>Swamp</ValidTerrainType>
<ValidTerrainType>ArcticTerrain</ValidTerrainType>
<AIData AIPersonality="AI_General">
<AIPriority>5</AIPriority>
</AIData>
<HitSoundFX>Spell_BirthOfSummer_01</HitSoundFX>
<SpellDefEffect>
<EffectName>Revive_Land</EffectName>
<LocalPosition>0,0,0</LocalPosition>
<EffectScale>1</EffectScale>
<EffectDelay>0</EffectDelay>
<SnapToTerrain>1</SnapToTerrain>
</SpellDefEffect>
</SpellDef>
<SpellDef InternalName="CreateFireShard">
<DisplayName>Create Fire Shard</DisplayName>
<Description>Create a Fire Shard on a tile.</Description>
<Image>ReviveLand_Painting.png</Image>
<IconFG>S_BirthOfSummer_Icon.png</IconFG>
<SpellBookSortCategory>World</SpellBookSortCategory>
<SpellBookSortSubCategory>Map</SpellBookSortSubCategory>
<SpellType>Strategic</SpellType>
<SpellClass>Terraform</SpellClass>
<SpellSubClass>Other</SpellSubClass>
<SpellTargetType>NeutralGround</SpellTargetType>
<AutoUnlock>1</AutoUnlock>
<CasterMustBeSov>1</CasterMustBeSov>
<SpellResourceCost>
<Resource>Mana</Resource>
<Amount>200</Amount>
</SpellResourceCost>
<GameModifier>
<ModType>Map</ModType>
<Attribute>CreateShard</Attribute>
<StrVal>ElementalFireShard01</StrVal>
</GameModifier>
<ValidTerrainType>Forest</ValidTerrainType>
<ValidTerrainType>Fertile_Land</ValidTerrainType>
<ValidTerrainType>DesertTerrain</ValidTerrainType>
<ValidTerrainType>Land</ValidTerrainType>
<ValidTerrainType>Swamp</ValidTerrainType>
<ValidTerrainType>ArcticTerrain</ValidTerrainType>
<AIData AIPersonality="AI_General">
<AIPriority>5</AIPriority>
</AIData>
<HitSoundFX>Spell_BirthOfSummer_01</HitSoundFX>
<SpellDefEffect>
<EffectName>Revive_Land</EffectName>
<LocalPosition>0,0,0</LocalPosition>
<EffectScale>1</EffectScale>
<EffectDelay>0</EffectDelay>
<SnapToTerrain>1</SnapToTerrain>
</SpellDefEffect>
</SpellDef>
<SpellDef InternalName="CreateLifeShard">
<DisplayName>Create Life Shard</DisplayName>
<Description>Create a Life Shard on a tile.</Description>
<Image>ReviveLand_Painting.png</Image>
<IconFG>S_BirthOfSummer_Icon.png</IconFG>
<SpellBookSortCategory>World</SpellBookSortCategory>
<SpellBookSortSubCategory>Map</SpellBookSortSubCategory>
<SpellType>Strategic</SpellType>
<SpellClass>Terraform</SpellClass>
<SpellSubClass>Other</SpellSubClass>
<SpellTargetType>NeutralGround</SpellTargetType>
<AutoUnlock>1</AutoUnlock>
<CasterMustBeSov>1</CasterMustBeSov>
<SpellResourceCost>
<Resource>Mana</Resource>
<Amount>200</Amount>
</SpellResourceCost>
<GameModifier>
<ModType>Map</ModType>
<Attribute>CreateShard</Attribute>
<StrVal>ElementalLifeShard01</StrVal>
</GameModifier>
<ValidTerrainType>Forest</ValidTerrainType>
<ValidTerrainType>Fertile_Land</ValidTerrainType>
<ValidTerrainType>DesertTerrain</ValidTerrainType>
<ValidTerrainType>Land</ValidTerrainType>
<ValidTerrainType>Swamp</ValidTerrainType>
<ValidTerrainType>ArcticTerrain</ValidTerrainType>
<AIData AIPersonality="AI_General">
<AIPriority>5</AIPriority>
</AIData>
<HitSoundFX>Spell_BirthOfSummer_01</HitSoundFX>
<SpellDefEffect>
<EffectName>Revive_Land</EffectName>
<LocalPosition>0,0,0</LocalPosition>
<EffectScale>1</EffectScale>
<EffectDelay>0</EffectDelay>
<SnapToTerrain>1</SnapToTerrain>
</SpellDefEffect>
</SpellDef>
<SpellDef InternalName="CreateWaterShard">
<DisplayName>Create Water Shard</DisplayName>
<Description>Create a Water Shard on a tile.</Description>
<Image>ReviveLand_Painting.png</Image>
<IconFG>S_BirthOfSummer_Icon.png</IconFG>
<SpellBookSortCategory>World</SpellBookSortCategory>
<SpellBookSortSubCategory>Map</SpellBookSortSubCategory>
<SpellType>Strategic</SpellType>
<SpellClass>Terraform</SpellClass>
<SpellSubClass>Other</SpellSubClass>
<SpellTargetType>NeutralGround</SpellTargetType>
<AutoUnlock>1</AutoUnlock>
<CasterMustBeSov>1</CasterMustBeSov>
<SpellResourceCost>
<Resource>Mana</Resource>
<Amount>200</Amount>
</SpellResourceCost>
<GameModifier>
<ModType>Map</ModType>
<Attribute>CreateShard</Attribute>
<StrVal>ElementalWaterShard01</StrVal>
</GameModifier>
<ValidTerrainType>Forest</ValidTerrainType>
<ValidTerrainType>Fertile_Land</ValidTerrainType>
<ValidTerrainType>DesertTerrain</ValidTerrainType>
<ValidTerrainType>Land</ValidTerrainType>
<ValidTerrainType>Swamp</ValidTerrainType>
<ValidTerrainType>ArcticTerrain</ValidTerrainType>
<AIData AIPersonality="AI_General">
<AIPriority>5</AIPriority>
</AIData>
<HitSoundFX>Spell_BirthOfSummer_01</HitSoundFX>
<SpellDefEffect>
<EffectName>Revive_Land</EffectName>
<LocalPosition>0,0,0</LocalPosition>
<EffectScale>1</EffectScale>
<EffectDelay>0</EffectDelay>
<SnapToTerrain>1</SnapToTerrain>
</SpellDefEffect>
</SpellDef>

 

Link to comment
Share on other sites

The Death, Earth, Fire, and Life spells work.

 

The Air and Water won't simply because you have the wrong StrVal.

 

ElementalAirShard02

 

ElementalWaterShard03

 

Huh... That's weird. I could have sworn I tested with the Life and Earth Shards, and they didn't work either. Either way, I'm curious as to why using different versions of the non-working shards would make things work. For now, though, it's time to put your instructions to the test.

 

UPDATE: It works! Thank you!

Edited by jadebrain
Link to comment
Share on other sites

...Either way, I'm curious as to why using different versions of the non-working shards would make things work...

 

ElementalAirShard01 and ElementalWaterShard01 are commented out (e.g. <!-- blahblahblah --> ). They are not used by the game at all since being commented out means they don't even exist from an xml point of view.

Edited by PrimalSavage
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...