Aller au contenu

Photo

Faster Ranged Combat - Possible? trying to change via combat_h.nss, itemstats.erf etc etc, but no dice


  • Veuillez vous connecter pour répondre
7 réponses à ce sujet

#1
orgo.love

orgo.love
  • Members
  • 33 messages
Hello there. I am an unfortunate soul that's been looking for the solution to this problem throughout the entire holiday season. :(


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 .


#2
orgo.love

orgo.love
  • Members
  • 33 messages
bump? Please help... :(

#3
orgo.love

orgo.love
  • Members
  • 33 messages
Sigh... If not, can someone at least link the actual scripts that use those range combat scripts? I was told that for changes in the combat_h and other header files to take effect, I have to compile the script that actually uses them. But I can't find it...

#4
Naggarok

Naggarok
  • Members
  • 12 messages
itemstats.xls



where is it located ?

Cant find it.

#5
orgo.love

orgo.love
  • Members
  • 33 messages
it's within bitm. It's one of the worksheets.

#6
Naggarok

Naggarok
  • Members
  • 12 messages
Ah, i see. I thought you were referring to actual itemstats.xls within windows.

Do you know how the modifers work ?
i.e. dspeed is negative for longsword and dagger, neutral for most, postive for big wpns.

longsword -0.1
dagger -0.5
maul +0.005

have you figured what it actually refers to ? What exactly does -0.5 indicate ?

have to tried editing the baseaimdelay ? Its only on ranged weapons, perhaps it delays the attack speed.

Modifié par Naggarok, 28 décembre 2009 - 07:19 .


#7
orgo.love

orgo.love
  • Members
  • 33 messages
... I've done that easily man. i know what the variables mean. But even if I set them to a negative value or zero, the attack speed of ranged weapons do not go below a certain value.



Can someone please help?

#8
ladydesire

ladydesire
  • Members
  • 1 928 messages
It might be animation speeds that are limiting it.