I had downloaded a script which changed the various overwhelm lengths to be quite short but it doesn't apply to things like the ogre's grab. Seeing how the other script had changed the overwhelm length I tried doing something similiar for ogre grab but it didn't seem to work.
First I went into the monster constants and tried changing it in there saving it and compiling it. That didn't seem to do it. Then I went into monster_talent_ogre.nss and changed every instance of OGRE_GRAB_DURATION that I saw to something like 3. I tried saving/compiling that but that didn't seem to do anything to the length either. I was able to do things like this to change overwhelm lenght but not ogre grab and wonder what I'm doing wrong.
Changing Ogre Grab Time
Débuté par
pizza_steve
, janv. 03 2011 04:52
#1
Posté 03 janvier 2011 - 04:52
#2
Posté 05 janvier 2011 - 02:05
The spellscript for Overwhelm is set as monster_talent_overwhelm.ncs within the abi_base 2da. However, the spellscript for Ogre Grab is set as monster_singletarget.ncs (not monster_talent_ogre.ncs) within the abi_base 2da.
case ABILITY_TALENT_MONSTER_OGRE_GRAB:
{
// first hit is always the grab
if ( stEvent.nHit == 0 )
{
effect eGrabbing;
//----------------------------------------------------------------------
eGrabbing = Effect( EFFECT_TYPE_GRABBING );
//----------------------------------------------------------------------
// Set Grab Variables
eGrabbing = SetEffectEngineInteger( eGrabbing, EFFECT_INTEGER_DISABLE_PHYSICS, TRUE );
eGrabbing = SetEffectObject( eGrabbing, 1, stEvent.oTarget );
eGrabbing = SetEffectEngineInteger( eGrabbing, EFFECT_INTEGER_DONT_INTERPOLATE, TRUE);
// Apply Grab
ApplyEffectOnObject( EFFECT_DURATION_TYPE_TEMPORARY, eGrabbing, OBJECT_SELF,
OGRE_GRAB_DURATION, OBJECT_SELF, stEvent.nAbility );
}
//--------------------------------------------------------------------------
// The following hits are all punches to the face
//--------------------------------------------------------------------------
else
{
int nArraySize;
float fDamage;
effect eGrabbed;
effect eDamage;
effect [] arEffects;
//----------------------------------------------------------------------
arEffects = GetEffects( OBJECT_SELF, EFFECT_TYPE_GRABBING, stEvent.nAbility, OBJECT_SELF );
nArraySize = GetArraySize( arEffects );
object oWeapon = GetItemInEquipSlot(INVENTORY_SLOT_MAIN, stEvent.oCaster);
//----------------------------------------------------------------------
// Only do something if Grabbing Effect exists
if( nArraySize > 0 )
{
arEffects = GetEffects( stEvent.oTarget, EFFECT_TYPE_GRABBED );
nArraySize = GetArraySize( arEffects );
if( nArraySize == 0 )
{
// Generate temporary grabbing effect on who was grabbed
eGrabbed = Effect( EFFECT_TYPE_GRABBED );
eGrabbed = SetEffectEngineInteger( eGrabbed, EFFECT_INTEGER_DISABLE_PHYSICS, TRUE );
eGrabbed = SetEffectObject( eGrabbed, 1, stEvent.oTarget );
ApplyEffectOnObject( EFFECT_DURATION_TYPE_PERMANENT, eGrabbed, stEvent.oTarget,
OGRE_GRAB_DURATION, stEvent.oCaster, stEvent.nAbility );
}
else
{
// Apply Damage
fDamage = Combat_Damage_GetAttackDamage(stEvent.oCaster, stEvent.oTarget, oWeapon, COMBAT_RESULT_HIT,0.0);
effect eImpactEffect = EffectImpact(fDamage, oWeapon);
Combat_HandleAttackImpact(stEvent.oCaster, stEvent.oTarget, COMBAT_RESULT_HIT, eImpactEffect);
PlaySoundSet(stEvent.oTarget, SS_COMBAT_PAIN_GRUNT);
//PlaySound( stEvent.oCaster, "combat/ogre/ogre_punch" );
}
}
}
break;
}
The above code snippet is where Ogre Grab impact is handled. This is where you want to change the grab duration.
case ABILITY_TALENT_MONSTER_OGRE_GRAB:
{
// first hit is always the grab
if ( stEvent.nHit == 0 )
{
effect eGrabbing;
//----------------------------------------------------------------------
eGrabbing = Effect( EFFECT_TYPE_GRABBING );
//----------------------------------------------------------------------
// Set Grab Variables
eGrabbing = SetEffectEngineInteger( eGrabbing, EFFECT_INTEGER_DISABLE_PHYSICS, TRUE );
eGrabbing = SetEffectObject( eGrabbing, 1, stEvent.oTarget );
eGrabbing = SetEffectEngineInteger( eGrabbing, EFFECT_INTEGER_DONT_INTERPOLATE, TRUE);
// Apply Grab
ApplyEffectOnObject( EFFECT_DURATION_TYPE_TEMPORARY, eGrabbing, OBJECT_SELF,
OGRE_GRAB_DURATION, OBJECT_SELF, stEvent.nAbility );
}
//--------------------------------------------------------------------------
// The following hits are all punches to the face
//--------------------------------------------------------------------------
else
{
int nArraySize;
float fDamage;
effect eGrabbed;
effect eDamage;
effect [] arEffects;
//----------------------------------------------------------------------
arEffects = GetEffects( OBJECT_SELF, EFFECT_TYPE_GRABBING, stEvent.nAbility, OBJECT_SELF );
nArraySize = GetArraySize( arEffects );
object oWeapon = GetItemInEquipSlot(INVENTORY_SLOT_MAIN, stEvent.oCaster);
//----------------------------------------------------------------------
// Only do something if Grabbing Effect exists
if( nArraySize > 0 )
{
arEffects = GetEffects( stEvent.oTarget, EFFECT_TYPE_GRABBED );
nArraySize = GetArraySize( arEffects );
if( nArraySize == 0 )
{
// Generate temporary grabbing effect on who was grabbed
eGrabbed = Effect( EFFECT_TYPE_GRABBED );
eGrabbed = SetEffectEngineInteger( eGrabbed, EFFECT_INTEGER_DISABLE_PHYSICS, TRUE );
eGrabbed = SetEffectObject( eGrabbed, 1, stEvent.oTarget );
ApplyEffectOnObject( EFFECT_DURATION_TYPE_PERMANENT, eGrabbed, stEvent.oTarget,
OGRE_GRAB_DURATION, stEvent.oCaster, stEvent.nAbility );
}
else
{
// Apply Damage
fDamage = Combat_Damage_GetAttackDamage(stEvent.oCaster, stEvent.oTarget, oWeapon, COMBAT_RESULT_HIT,0.0);
effect eImpactEffect = EffectImpact(fDamage, oWeapon);
Combat_HandleAttackImpact(stEvent.oCaster, stEvent.oTarget, COMBAT_RESULT_HIT, eImpactEffect);
PlaySoundSet(stEvent.oTarget, SS_COMBAT_PAIN_GRUNT);
//PlaySound( stEvent.oCaster, "combat/ogre/ogre_punch" );
}
}
}
break;
}
The above code snippet is where Ogre Grab impact is handled. This is where you want to change the grab duration.
Modifié par amcnow, 05 janvier 2011 - 03:41 .
#3
Posté 07 janvier 2011 - 01:14
Thank you very much seems odd to have the same code in multiple places but I guess I should have known better when I was editing something which was under a legacy category.





Retour en haut






