I've been trying to make ranged combat faster. No, not "rapid shot with shortbow" fast or even "staff" fast. I mean changing it so that you shoot multiple arrows in a second, multiple staff shots in a second, etc etc.
I know that it's easily possible with melee weapons by simply changing the "dspeed" value of the itemstats.xls.
So, I began by trying to change the dspeed and aimloopdelay values of the itemstats.xls. Unfortunately, the speed of the ranged attack barely changed. I then tried changing the "speed" column within bitem.xls into "3," but it also had barely any affect.
I then decided to carefully look at all the combat related scripts. The closest I could find was in line 841 in combat_h.nss:
stRet.fAttackDuration = GetCreatureRangedDrawSpeed(oAttacker, oWeapon);
}
else
{
float fSpeed = CalculateAttackTiming(oAttacker, oWeapon);
if (fSpeed>0.0f)
{
stRet.fAttackDuration = fSpeed;
}
}
and line 1293 in core_h.nss:
float GetCreatureRangedDrawSpeed(object oCreature, object oWeapon = OBJECT_INVALID)
{
float fRet = 0.0f;
// -- Get Total Draw Speed
float fTotal = GetCreatureProperty(oCreature, PROPERTY_ATTRIBUTE_RANGED_AIM_SPEED, PROPERTY_VALUE_TOTAL);
// -- Get Mod (for debug output only)
float fMod = GetCreatureProperty(oCreature, PROPERTY_ATTRIBUTE_RANGED_AIM_SPEED, PROPERTY_VALUE_MODIFIER );
// -- GetWeapon Draw Speed (can't be negative)
float fWeapon = 0.0f;
if (IsObjectValid(oWeapon))
{
fWeapon = MaxF(GetM2DAFloat(TABLE_ITEMSTATS, "BaseAimDelay", GetBaseItemType(oWeapon)), 0.0f);
}
fRet = fTotal + fWeapon;
#ifdef DEBUG
Log_Trace(LOG_CHANNEL_CHARACTER,"core_h.GetCreatureRangedDrawSpeed","DrawSpeed on " + GetTag(oCreature) + " is " + ToString(fRet) + " modifier is: " + ToString(fMod) + " Weapon (" + ToString(oWeapon) + "):" + ToString(fWeapon));
#endif
return MaxF(fRet,0.0f);
}
float GetAttributeModifier (object oCreature, int nAttribute);
float GetAttributeModifier (object oCreature, int nAttribute)
{
float fValue = GetCreatureProperty(oCreature, nAttribute) - RULES_ATTRIBUTE_MODIFIER;
return MaxF(fValue,0.0f);
I've been trying to tinker with the scripts, the item stats gda, and core combat files to have my desired effect. But I've so far been unsuccessful.
Can someone please lend me a hand? Is it impossible to have a machine-gun type ranged combat?
Modifié par orgo.love, 28 décembre 2009 - 05:15 .





Retour en haut






