Need help

So i decided to make myself a little spellmod

It didnt go so well, I went trough the entire spells.xml and modified spells as such

<SpellDef InternalName="FlameDart">

        <DisplayName>Flame Dart</DisplayName>
        <Description>A fiery dart strikes for double the caster's level (+2 per fire shard) in fire damage.</Description>
        <FormattedDescription>A fiery dart strikes for %d fire damage.</FormattedDescription>
        <Image>T_FlameDart_Painting.png</Image>
        <IconFG>T_FlameDart_Icon.png</IconFG>
        <IconBG>T_FlameDart_Icon_BG.png</IconBG>
        <IconColor>255,158,6</IconColor>
        <AutoUnlock>1</AutoUnlock>
        <Cooldown>2</Cooldown>
        <SpellBookSortCategory>Unit</SpellBookSortCategory>
        <SpellBookSortSubCategory>UnitDamage</SpellBookSortSubCategory>
        <SpellType>Tactical</SpellType>
        <SpellClass>Offensive</SpellClass>
        <SpellSubClass>Damage</SpellSubClass>
        <SpellTargetType>EnemyUnit</SpellTargetType>
        <IsResistable>1</IsResistable>
        <Prereq>
            <Type>AbilityBonusOption</Type>
            <Attribute>Fire2</Attribute>
        </Prereq>
        <SpellResourceCost>
            <Resource>Mana</Resource>
            <Amount>24</Amount>
        </SpellResourceCost>
        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>DefendableDamage</Attribute>
            <AttackStat>UnitStat_Attack_Fire</AttackStat>
            <IsForFormattedDescription>1</IsForFormattedDescription>
            <Calculate InternalName="Calc" ValueOwner="CastingUnit">
                <Expression><![CDATA[[UnitOwner_GetNumFireShards] * 2]]></Expression>
            </Calculate>
            <Calculate InternalName="Calc2" ValueOwner="CastingUnit">
                <Expression><![CDATA[[Unit_GetLevel] * 2]]></Expression>
            </Calculate>
            <Calculate InternalName="Value">
                <Expression><![CDATA[[Calc] + [Calc2]]]></Expression>
            </Calculate>
            <Calculate InternalName="ValueForFormattedDescription">
                <Expression><![CDATA[[Calc] + [Calc2]]]></Expression>
            </Calculate>
        </GameModifier>
        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>DefendableDamage</Attribute>
            <AttackStat>UnitStat_Attack_Fire</AttackStat>
            <IsForSpellResist>1</IsForSpellResist>
            <Calculate InternalName="Calc" ValueOwner="CastingUnit">
                <Expression><![CDATA[[UnitOwner_GetNumFireShards]]]></Expression>
            </Calculate>
            <Calculate InternalName="Calc2" ValueOwner="CastingUnit">
                <Expression><![CDATA[[Unit_GetLevel]]]></Expression>
            </Calculate>
            <Calculate InternalName="Value">
                <Expression><![CDATA[[Calc] + [Calc2]]]></Expression>
            </Calculate>
        </GameModifier>
        <AIData AIPersonality="AI_General">
            <AIPriority>40</AIPriority>
        </AIData>
        <HitSoundFX>Spell_FlameDart_01</HitSoundFX>
        <SpellCastSoundFX>Spell_FlameDartTravel_01</SpellCastSoundFX>
        <SpellCastEffectName>T_FlameDart_Particle</SpellCastEffectName>
        <SpellCastEffectScale>0.30</SpellCastEffectScale>
        <SpellCastProjectile>1</SpellCastProjectile>
        <SpellCastProjectileSpeed>800</SpellCastProjectileSpeed>
        <SpellDefEffect>
            <EffectName>E_FlameDartImpact_Particle</EffectName>
            <LocalPosition>0,0,0</LocalPosition>
            <EffectScale>1</EffectScale>
            <EffectDelay>0</EffectDelay>
            <SnapToTerrain>1</SnapToTerrain>
        </SpellDefEffect>
    </SpellDef>
and changed to
<SpellDef InternalName="EmpoweredFlameDart">
        <DisplayName>Empowered Flame Dart</DisplayName>
        <Description>A fiery dart strikes for quadruple the caster's level (+4 per fire shard) in fire damage.</Description>
        <FormattedDescription>A fiery dart strikes for %d fire damage.</FormattedDescription>
        <Image>T_FlameDart_Painting.png</Image>
        <IconFG>T_FlameDart_Icon.png</IconFG>
        <IconBG>T_FlameDart_Icon_BG.png</IconBG>
        <IconColor>255,158,6</IconColor>
        <AutoUnlock>1</AutoUnlock>
        <Cooldown>2</Cooldown>
        <SpellBookSortCategory>Unit</SpellBookSortCategory>
        <SpellBookSortSubCategory>UnitDamage</SpellBookSortSubCategory>
        <SpellType>Tactical</SpellType>
        <SpellClass>Offensive</SpellClass>
        <SpellSubClass>Damage</SpellSubClass>
        <SpellTargetType>EnemyUnit</SpellTargetType>
        <IsResistable>1</IsResistable>
        <Prereq>
            <Type>AbilityBonusOption</Type>
            <Attribute>Fire2</Attribute>
        </Prereq>
        <SpellResourceCost>
            <Resource>Mana</Resource>
            <Amount>64</Amount>
        </SpellResourceCost>
        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>DefendableDamage</Attribute>
            <AttackStat>UnitStat_Attack_Fire</AttackStat>
            <IsForFormattedDescription>1</IsForFormattedDescription>
            <Calculate InternalName="Calc" ValueOwner="CastingUnit">
                <Expression><![CDATA[[UnitOwner_GetNumFireShards] * 4]]></Expression>
            </Calculate>
            <Calculate InternalName="Calc2" ValueOwner="CastingUnit">
                <Expression><![CDATA[[Unit_GetLevel] * 4]]></Expression>
            </Calculate>
            <Calculate InternalName="Value">
                <Expression><![CDATA[[Calc] + [Calc2]]]></Expression>
            </Calculate>
            <Calculate InternalName="ValueForFormattedDescription">
                <Expression><![CDATA[[Calc] + [Calc2]]]></Expression>
            </Calculate>
        </GameModifier>
        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>DefendableDamage</Attribute>
            <AttackStat>UnitStat_Attack_Fire</AttackStat>
            <IsForSpellResist>1</IsForSpellResist>
            <Calculate InternalName="Calc" ValueOwner="CastingUnit">
                <Expression><![CDATA[[UnitOwner_GetNumFireShards]]]></Expression>
            </Calculate>
            <Calculate InternalName="Calc2" ValueOwner="CastingUnit">
                <Expression><![CDATA[[Unit_GetLevel]]]></Expression>
            </Calculate>
            <Calculate InternalName="Value">
                <Expression><![CDATA[[Calc] + [Calc2]]]></Expression>
            </Calculate>
        </GameModifier>
        <AIData AIPersonality="AI_General">
            <AIPriority>40</AIPriority>
        </AIData>
        <HitSoundFX>Spell_FlameDart_01</HitSoundFX>
        <SpellCastSoundFX>Spell_FlameDartTravel_01</SpellCastSoundFX>
        <SpellCastEffectName>T_FlameDart_Particle</SpellCastEffectName>
        <SpellCastEffectScale>0.30</SpellCastEffectScale>
        <SpellCastProjectile>1</SpellCastProjectile>
        <SpellCastProjectileSpeed>800</SpellCastProjectileSpeed>
        <SpellDefEffect>
            <EffectName>E_FlameDartImpact_Particle</EffectName>
            <LocalPosition>0,0,0</LocalPosition>
            <EffectScale>1</EffectScale>
            <EffectDelay>0</EffectDelay>
            <SnapToTerrain>1</SnapToTerrain>
        </SpellDefEffect>
    </SpellDef>
 
SO basically i changed all spells i felt relevant to double their power and copy pasted the changes at the end of Corespell.xml with their new names. So i should now have ''Flame dart'' and ''Empowered Flame Dart'' in the game and it added about 40 pages worth of data in the corespells.xml
 
Now the game crashes after about 4 turn of a new game even once in the menu still and not only does it crash the game it also manages to delete my video card drivers while it crashes.... no idea how it does that.
Any clue why its doing that or what i have to change to stop it? seems a simple enough change
 
awaiting answers thanks

 

2,506 views 3 replies
Reply #1 Top

Since you are adding new spells you can create a seperate .xml file and put it in your mods folder in your documents.

Not sure about your video card thing though.

Reply #2 Top

I have no idea.

Reply #3 Top

Thanks for the replies guys,

The mod works perfect, turns out my video card decided to die on me the first time i launched this mod.