Page 1 of 1
Which script for archery?
Posted: Fri Jan 26, 2007 8:00 am
by Terryl
Hey!
Which are the scripts and includes used to calculate archery damage? The problem is im trying to take away the tactics bonus from archery but I cannot find the file where this bonus is added. in include/hitscriptinc there is nothing.
I heard this has something to do with the core, it is 095 :p Know any way to take away the tactics bonus?
Posted: Fri Jan 26, 2007 10:18 am
by tekproxy
What distro are you using?
Posted: Fri Jan 26, 2007 11:53 am
by Terryl
tekproxy wrote:What distro are you using?
Running polversion 095 :p
Posted: Sat Jan 27, 2007 6:08 am
by Tritan
What script base are you running?
Posted: Thu Feb 01, 2007 8:55 am
by Terryl
No one know how to fix this? :/ Running Pol095 with a remade zh script release... Cmon guys help me out :p
Posted: Thu Feb 01, 2007 10:44 am
by Tritan
I have never looked at those combat scripts but I would think it would be someplace in a hitscript or something. Take a look at your archery package and your combat scripts to see how they are connected.
Posted: Thu Feb 01, 2007 1:17 pm
by Yukiko
To be honest, I have looked through the versions of ZH scripts that I have and I cannot find any reference to archery weapons.
My guess is that the ZH scripts you have probably left archery to tyhe core to handle. Now I could be wrong ofcourse but as I recall, the developers removed most if not all attack functions from the core some time ago. If that is the case then you'll hjave to script your own archery hitscript.
WoD scripts had done something similar with archery and it gave me a pain when I was running that scriptset because I wasn't getting any archery hits at all.
Posted: Fri Feb 02, 2007 3:06 am
by Terryl
Yukiko wrote:To be honest, I have looked through the versions of ZH scripts that I have and I cannot find any reference to archery weapons.
My guess is that the ZH scripts you have probably left archery to tyhe core to handle. Now I could be wrong ofcourse but as I recall, the developers removed most if not all attack functions from the core some time ago. If that is the case then you'll hjave to script your own archery hitscript.
WoD scripts had done something similar with archery and it gave me a pain when I was running that scriptset because I wasn't getting any archery hits at all.
Actually the zh scripts handle archery unless im mistaken, this is taken from the include file "hitscriptinc" in the scriptversion im trying to fix:
Code: Select all
function ModByDist( attacker, defender, weapon, basedamage )
if( weapon.attribute == "Archery" )
basedamage := basedamage *
( 2.0 * GetEffectiveSkill( attacker, SKILLID_ARCHERY ) + GetDexterity(attacker) + 55.0 ) /
( 270.0 + (( 2.0 * GetEffectiveSkill( attacker, SKILLID_ARCHERY ) + GetDexterity(attacker) ) / 5 ) );
var dist := Distance( attacker, defender );
if( (dist <= 1) or (dist > 10) )
basedamage := basedamage * 0.25;
endif
if( IsRanger(attacker) )
basedamage := basedamage * ClasseBonus( attacker, CLASSEID_RANGER ) * 1.5;
endif
else
if( defender.isA(POLCLASS_NPC) )
basedamage := basedamage * ClasseBonus( attacker, CLASSEID_WARRIOR );
else
var level := GetObjProperty( attacker, CLASSEID_WARRIOR );
if( level )
level := level - 2;
if( level >= 1 )
basedamage := basedamage * ClasseBonusByLevel( level );
endif
endif
endif
endif
if( GetObjProperty( attacker, CLASSEID_MAGE ) )
if( !GetObjProperty( attacker, CLASSEID_WARRIOR ) )
basedamage := basedamage / ClasseBonus( attacker, CLASSEID_MAGE );
endif
endif
if( GetObjProperty( defender, CLASSEID_MAGE ) )
if( !GetObjProperty( defender, CLASSEID_WARRIOR ) )
basedamage := basedamage * ClasseBonus( defender, CLASSEID_MAGE );
endif
endif
return basedamage;
endfunction
One fault in this is the * 1.5 up at when classebonus is calculated for rangers, but thats just a small problem. The biggest problem is that somehow after this is calculated the core takes over and adds tactics bonus. And I cannot see why the core would take over. What I need help with is finding the script or include file that monitors what is calculated in the core, if there even is one. Otherversions of releases I worked with does not let the core handle anything, so it can be done, just that I cannot come up with a way.