|
|
Fiddlin' around with the games data files I came across the code for valkyrie's javelin and this interesting section within it.
<damage effecttype="Magic" amount="90,180,270,360" />
<condition test="distance lt 300" source="target_entity" target="proxy_entity">
<applystate name="State_Stunned" duration="500"/>
</condition>
<condition test="distance ge 300" source="target_entity" target="proxy_entity">
<applystate name="State_Stunned" duration="1000"/>
</condition>
<condition test="distance ge 450" source="target_entity" target="proxy_entity">
<applystate name="State_Stunned" duration="1500"/>
</condition>
<condition test="distance ge 600" source="target_entity" target="proxy_entity">
<applystate name="State_Stunned" duration="2000"/>
</condition>
<condition test="distance ge 750" source="target_entity" target="proxy_entity">
<applystate name="State_Stunned" duration="2500"/>
</condition>
<condition test="distance ge 900" source="target_entity" target="proxy_entity">
<applystate name="State_Stunned" duration="3000"/>
</condition>
<condition test="distance ge 1050" source="target_entity" target="proxy_entity">
<applystate name="State_Stunned" duration="3500"/>
</condition>
<condition test="distance ge 1300" source="target_entity" target="proxy_entity">
<applystate name="State_Stunned" duration="4000"/>
</condition>
<condition test="distance ge 1450" source="target_entity" target="proxy_entity">
<applystate name="State_Stunned" duration="4500"/>
</condition>
<condition test="distance ge 1500" source="target_entity" target="proxy_entity">
<applystate name="State_Stunned" duration="5000"/>
</condition>
There are a few curious things there. First one being the way the ability has been coded; why not use a simple function instead of such horrendously large and unnecesarily complicated wall of text? Stuntime = distance/300 would allow for much more precision and simplicity.
Edit: Actually the target- and proxy-entity dependent script could be replaced with one that calculates the distance based on the time javelin has existed.
The second curiosity regards the distance dependency. The four last values are 1050, 1300, 1450, 1500. (250, 150, 50 being the differences) So what I'm wondering is wether this is just a mistake or is it intentional?
Last edited by DDKL; 09-05-2009 at 06:02 PM.
Every 150 distance the Javelin travels, 0.5 seconds of stun is added. 1500 distance for 5 second stun time.
Elune's Arrow Code from Tales' Triggered Skill guide:
Based on this, I believe there is some error in porting Elune's Arrow over to Valkyrie's Javelin of Light. Numbers should be 1050, 1200, 1350, 1500.Originally Posted by Tales
But yeah, I agree your coding suggestion would be more optimal & accurate
S2 Games: Dedicated employees serving dedicated gamers. Continuous development. Never-ending improvement.
-----------------------------
Tech Support and Customer Support: https://www.heroesofnewerth.com/support/
Look for my highlighted text (important information) and grey text (interesting but not required information).
I changed it to 1200 and 1350 for now. That was a typo as someone had their hand one key too far to the right on those keys.
Thanks again Idejder. You're really helpful at communicating S2's changes to the community & we appreciate that very much
S2 Games: Dedicated employees serving dedicated gamers. Continuous development. Never-ending improvement.
-----------------------------
Tech Support and Customer Support: https://www.heroesofnewerth.com/support/
Look for my highlighted text (important information) and grey text (interesting but not required information).