How would I create a Heal spell that either uses Death or Life shards?

Was working on Talents and what not so wanted to do a Medic type Talent that gives a Heal spell that will work for either side about the same strength as the Life heal but more costly mana wise (so yeah for a Kingdom player the Life Spell is still the way to go but as I said this will be unlocked via a talent so if you dont wanna take Life you pay more mana to use it)

 

So anyways..  I dug out the Heal spell code, copy and pasted it to a empty file to look at it.  I am seeing the calculation for the Life Shards...

            <Calculate InternalName="Calc" ValueOwner="CastingUnit">
                <Expression><![CDATA[[UnitOwner_GetNumLifeShards] * 2]]></Expression>
            </Calculate>
            <Calculate InternalName="Value">
                <Expression><![CDATA[[Calc] + 4]]></Expression>
            </Calculate>
            <Calculate InternalName="ValueForFormattedDescription">
                <Expression><![CDATA[[Calc] + 4]]></Expression>

now is it as simple as addint another Expression line telling it to GetNumDeathShards?

or do i need to change something else?

2,203 views 2 replies
Reply #1 Top

You are basically right, just make sure to keep the syntax right.

            <Calculate InternalName="Calc" ValueOwner="CastingUnit">
                <Expression><![CDATA[[UnitOwner_GetNumLifeShards] + [UnitOwner_GetNumDeathShards]]]></Expression>
            </Calculate>

 

            <Calculate InternalName="Calc2" ValueOwner="CastingUnit">
                <Expression><![CDATA[[Calc] * 2]]></Expression>
            </Calculate>

 

 


            <Calculate InternalName="Value">
                <Expression><![CDATA[[Calc2] + 4]]></Expression>
            </Calculate>
            <Calculate InternalName="ValueForFormattedDescription">
                <Expression><![CDATA[[Calc2] + 4]]></Expression>

 

Reply #2 Top

ah got it :-)  new to xml and new to modding in general but loving this game and just messing around changing/adding stuff is just as fun :-)

my computer language skills is pretty much Green Screen days... JCL, COBOL, etc...  personally this xml is far easier once ya start getting the nuances.  :-) thanks for the help there Heaven