Skip to content

Feint feat possible ?

i read somewhere there is no chance to change sneak attack/crit immunity cuz it is hardcoded.

I was thinking to create custom feat which gives you spell or ability to use.
Using this spell/ability is full action
DC would be 1d20 or static 8 + bluff skill vs Will save enemy
If enemy fail it will take 1d6 dmg per 2 levels of rogue class ala sneak attack + 1d6 + str
If enemy is immune to critical dmg he is immune to this spell/ability

or maybe someone have better idea ?

Comments

  • TerrorbleTerrorble Member Posts: 190
    Can you commandeer one of the player tool feats to target a melee combatant and make a full attack action animation? I think so!? You'd have to check out ~probably~ feat.2da and see. (I'd try to mimic the entries of disarm or knockdown for starters.)

    Otherwise, you can script the DC, Save, immunity check, damage and feedback into the associated player tool script. You could try to attach the feat to the player via scripting or by making it a class feat and add it to their radial menu in the iprp_feat.2da (I forget, it's been a while.)
  • QuilistanQuilistan Member Posts: 202
    Sounds awesome!

    If there are cool downs on knockdown and hide in plain sight. This would make a really fun addition.
    knockdown, stab, feint, stab, stealth...

    feat and good playing needed to get around the cooldowns.

    I have not delved into adjusting/creating feats yet, but If you figure this out PLEASE post.

    I have always wanted to see a "Charge" feat for fighter types.

    Good Luck!
  • TerrorbleTerrorble Member Posts: 190
    FWIW, I made this a long time ago. It allowed me to use player tool 1 as a limited HiPS for the panther and to simulate a charge for the boar and minotaur shapes. The charge can be activated in the middle of doing things which makes it wonky, but it's fun. (you have to add player tool 1 to custom skins for each shape and edit shifter.2da so the shapes use those skins. also, I used custom shifting scripts from Iznoghoud i.e. I think, ScanForPolymorphEffect() )

    #include "ws_inc_shifter"
    void main()
    {
        object oPC = OBJECT_SELF;
        object oTarget = GetSpellTargetObject();
    
        //Limit uses
        if( GetLocalInt(oPC,"PLTOOL1") ) {
            SendMessageToPC(oPC,"You cannot activate this ability yet.");
            return;
        }
    
    
        //Disallow use if not in a shape
        if( ScanForPolymorphEffect(oPC) == -2 ) {
            SendMessageToPC(oPC,"Only usable while polymorphed.");
            return;
        }
    
    
        //-------------------------------------------------------------------------
        //LIMITED HIPS FOR PANTHER
        //-------------------------------------------------------------------------
    
        if( GetAppearanceType(oPC) == 202 /*APPEARANCE_TYPE_CAT_PANTHER*/ )
        {
            SetLocalInt(oPC,"PLTOOL1",1);
            DelayCommand(18.0,DeleteLocalInt(oPC,"PLTOOL1"));
    
            object oSkin = GetItemInSlot(INVENTORY_SLOT_CARMOUR,oPC);
            itemproperty ipHIPS = ItemPropertyBonusFeat(IP_CONST_FEAT_HIDE_IN_PLAIN_SIGHT);
            IPSafeAddItemProperty(oSkin,ipHIPS,1.0f,X2_IP_ADDPROP_POLICY_IGNORE_EXISTING,FALSE,FALSE);
    
            DelayCommand(0.1,SetActionMode(oPC,ACTION_MODE_STEALTH,TRUE));
        }
    
    
        //-------------------------------------------------------------------------
        //BOAR CHARGE
        //The boar can charge someone from 10 to 25 meters away
        //It jumps you to their location and grants +1AB for a few seconds.  Squeel!
        //(This is more for fun than anything. It's possible you can jump to a spot you cannot return from.)
        //-------------------------------------------------------------------------
    
        else if( GetAppearanceType(oPC) == 21 /*APPEARANCE_TYPE_BOAR*/ ||
                 GetAppearanceType(oPC) == 22 /*APPEARANCE_TYPE_BOAR_DIRE*/ ||
                 GetAppearanceType(oPC) == 120 /*APPEARANCE_TYPE_MINOTAUR*/ ||
                 GetAppearanceType(oPC) == 121 /*EPIC MINO*/)
        {
    
            //---------------------- condition 1
            if( oTarget == oPC ) { //Should require the target to be hostile!?
                SendMessageToPC(oPC,"Select a target to charge other than yourself.");
                return;
            }
    
            //---------------------- condition 2
            float fDist = GetDistanceBetween(oPC,oTarget);
            if( fDist > 25.0 ) {
                FloatingTextStringOnCreature("Get closer to charge.",oPC,FALSE);
                return;
            }
            if( fDist < 10.0 ) {
                FloatingTextStringOnCreature("You are too close to charge.",oPC,FALSE);
                return;
            }
            fDist = fDist - 3.0; //subtract 3 so that we don't end up teleporting on top of the target
    
    
            //---------------------- condition 3
            vector vTarget = GetPosition(oTarget);
            vector vPC     = GetPosition(oPC);
    
            if( !LineOfSightVector(vPC,vTarget) ) {
                FloatingTextStringOnCreature("You must have line of sight to charge.",oPC);
                return;
            }
    
            //======================
            SetLocalInt(oPC,"PLTOOL1",1);
            DelayCommand(12.0,DeleteLocalInt(oPC,"PLTOOL1"));
    
    
            ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(460),oPC);
            string sOink;
            switch( d3() )
            {
                case 1: sOink = "Oink!"; break;
                case 2: sOink = "Snort!"; break;
                default: sOink = "Squeel!"; break;
            }
            FloatingTextStringOnCreature(sOink,oPC);
    
            SetFacingPoint(vTarget);
            float fFacing = GetFacing(oPC);
    
            location lTarget = GetLocation(oTarget);
            location lTarget1;
            float fDelay = 0.0;
            effect eHaste = EffectVisualEffect(VFX_IMP_HASTE);
    
            int denom = FloatToInt(fDist/3);//I want a haste visual to appear every 3 units between the player and target
    
            //fDist is the distance to the target - 4.0.
            //Determine the X and Y components of that direction and set its magnitude to 1/3 of fDist
            float fX = cos(fFacing)*fDist/denom;
            float fY = sin(fFacing)*fDist/denom;
    
            do
            {
                fDelay += 0.25;
    
                vPC.x = vPC.x + fX;
                vPC.y = vPC.y + fY;
                lTarget1 = Location( GetAreaFromLocation(lTarget), vPC, fFacing );
                DelayCommand(fDelay,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eHaste,lTarget1));
    
                denom--;
            }
            while( denom > 0 );
    
            ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectAttackIncrease(1),oPC,6.0);
    
            DelayCommand(fDelay-0.1,ActionJumpToLocation(lTarget1));
    
            DelayCommand(fDelay+0.1,ActionAttack(oTarget));
    
            //DelayCommand(fDelay+0.1,ActionDoCommand(SetCommandable(TRUE)));
            //SetCommandable(FALSE);
        }
    }
    
  • ForSeriousForSerious Member Posts: 521
    edited August 29
    I'm not finding a shifter.2da—at least, not in what I extracted last time. I thought I pulled everything though.
    EDIT: I think I found it: polymorph.2da
  • TerrorbleTerrorble Member Posts: 190
    polymorph.2da, yep, that's it! It's been a while since I've been in the toolset.
  • zymciozymcio Member Posts: 6
    edited November 9
    Edit: Below new version
    Post edited by zymcio on
  • TerrorbleTerrorble Member Posts: 190
    I have questions:

    Wasn't your original reason for this to allow a sort of sneak attack on sneak/crit immune targets? Or, was it to grant a bonus to hit on your next attack? (sort of like True Strike)

    Also, how does this script get called/run?


    Regarding the DC: an alternative idea is to do a contested skill check between your bluff skill and the target's concentration or discipline. (e.g. 1d20 + bluff skil vs 1d20 + target conc or disc)

  • zymciozymcio Member Posts: 6
    edited November 9
    Terrorble wrote: »
    I have questions:

    Wasn't your original reason for this to allow a sort of sneak attack on sneak/crit immune targets? Or, was it to grant a bonus to hit on your next attack? (sort of like True Strike)

    Also, how does this script get called/run?


    Regarding the DC: an alternative idea is to do a contested skill check between your bluff skill and the target's concentration or discipline. (e.g. 1d20 + bluff skil vs 1d20 + target conc or disc)

    Nope. The reason why i wanted semi-feint was for 1vs1 situation. For example during typical combat u cannot do sneak attack damage alone (without hiding , invi etc) but if u feint target you can SA if enemy is not immune.

    I run this script from custom spell which is connected to custom feat and it must be connected to cls_feat_rog file after that in game when u have feat u will have option to cast it on enemy.

    DC is ok it takes bluff skill and roll 1d20 but enemy roll should be 1d20 + BAB + WIS. No clue how to get info about enemy BAB.
    Post edited by zymcio on
  • zymciozymcio Member Posts: 6
    Today i made some changes overall looks ok but need tweaks.

    No idea how to Get info about current player damage , hit and crit range
    void main()
    {
    	//Player stats
    	int pRogueLevel = GetLevelByClass(CLASS_TYPE_ROGUE, OBJECT_SELF);
    	int pSneakAttack = d6(((pRogueLevel - 1) /2 ) + 1);
    	int pRoll = d20(1);
    	int pRollCrit = d20(1);
            //Manual setting
    	int pBaseDamage = d6(1) + 1;
    	int pHit = pRoll + 1;
    	int pHitCrit = pRollCrit + 1;
    	int pCrit = 2;
    	int pCritRange = 19; // From where it start
    	
    	//Monster stats
    	object oTarget = GetSpellTargetObject();
    	int mDex = GetAbilityScore(oTarget, ABILITY_DEXTERITY, FALSE);
    	int mInt = GetAbilityScore(oTarget, ABILITY_INTELLIGENCE, FALSE);
    	int mWis = GetAbilityScore(oTarget, ABILITY_WISDOM, FALSE);
    	int mAC = GetAC(oTarget, 0);
    	int mRT = GetRacialType(oTarget);
    	int mHD = GetHitDice(oTarget); // Future
    	int mPenalty;
    	
    	//Check if target is immune
    	int mImmune = GetIsImmune(oTarget, IMMUNITY_TYPE_CRITICAL_HIT, OBJECT_INVALID);
    	if(mImmune == 1)
    	{
    		SendMessageToPC(OBJECT_SELF, "Immunity to Sneak attack");
    		pSneakAttack = 0;
    		pCrit = 1;
    	}
    	
    	if(mDex > 11)
    	{
    		mDex = (mDex - 10) / 2;
    	}
    	else
    	{
    		mDex = 0;
    	}
    	
    	// When feinting in this way against a nonhumanoid you take a -4 penalty. Against a creature of animal Intelligence (1 or 2), you take a -8 penalty. Against a nonintelligent creature, it’s impossible. 
    	if (mRT != 7 && mRT != 8 && mRT != 9 && mRT != 10 && mRT != 11 && mRT != 16 && mRT != 17 && mRT != 19 && mRT != 20 && mRT != 23 && mRT != 24 && mRT != 25 && mRT != 29)
    	{
    		SendMessageToPC(OBJECT_SELF, "humanoid");
    		if (mInt <= 3)
    		{
    			SendMessageToPC(OBJECT_SELF, "low INT");
    			mPenalty = -8;
    		}
    		else
    		{
    			SendMessageToPC(OBJECT_SELF, "high INT");
    			mPenalty = 0;
    		}
    	}
    	else
    	{
    		SendMessageToPC(OBJECT_SELF, "nonhumanoid");	
    		if (mInt <= 3)
    		{
    			SendMessageToPC(OBJECT_SELF, "low INT");
    			mPenalty = -12;
    		}
    		else
    		{
    			SendMessageToPC(OBJECT_SELF, "high INT");
    			mPenalty = -4;
    		}	
    	}
    	
    	int pDC = mPenalty + d20(1) + GetSkillRank(SKILL_BLUFF, OBJECT_SELF, FALSE);
    	int mWill = d20(1) + GetWillSavingThrow(oTarget);
    	if (pDC > mWill)
    	{
    		SendMessageToPC(OBJECT_SELF, "Feint Success");
    		// do special attack
    		if(pHit + mDex >= mAC && pRoll >= 2 || pRoll == 20)
    		{
    			if(pRoll >= pCritRange && pHitCrit + mDex >= mAC)
    			{
    			SendMessageToPC(OBJECT_SELF, "Critical Feint Hit Target");
    			effect tDamage = EffectDamage((pCrit * pBaseDamage) + pSneakAttack, DAMAGE_TYPE_BASE_WEAPON);
    			effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M);
    			ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
    			ApplyEffectToObject(DURATION_TYPE_INSTANT, tDamage, oTarget);
    			}
    			else
    			{
    			SendMessageToPC(OBJECT_SELF, "Feint Hit Target");
    			effect tDamage = EffectDamage(pBaseDamage + pSneakAttack, DAMAGE_TYPE_BASE_WEAPON);
    			effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M);
    			ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
    			ApplyEffectToObject(DURATION_TYPE_INSTANT, tDamage, oTarget);
    			}
    		}
    		else
    		{
    			SendMessageToPC(OBJECT_SELF, "Miss");
    		}
    	}
    	else
    	{
    		SendMessageToPC(OBJECT_SELF, "Feint Fail");
    		// do normal attack
    		if(pHit >= mAC && pRoll >= 2 || pRoll == 20)
    		{
    			if(pRoll >= pCritRange && pHitCrit >= mAC)
    			{
    			SendMessageToPC(OBJECT_SELF, "Critical Hit Target");
    			effect tDamage = EffectDamage(pCrit * pBaseDamage, DAMAGE_TYPE_BASE_WEAPON);
    			effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M);
    			ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
    			ApplyEffectToObject(DURATION_TYPE_INSTANT, tDamage, oTarget);
    			}
    			else
    			{
    			SendMessageToPC(OBJECT_SELF, "Normal Hit Target");
    			effect tDamage = EffectDamage(pBaseDamage, DAMAGE_TYPE_BASE_WEAPON);
    			effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M);
    			ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
    			ApplyEffectToObject(DURATION_TYPE_INSTANT, tDamage, oTarget);
    			}
    		}
    		else
    		{
    			SendMessageToPC(OBJECT_SELF, "Miss");
    		}
    	}
    }
    
  • TerrorbleTerrorble Member Posts: 190
    I see, the feint ability allows a 1v1 sneak attack (that's a cool idea). Also, allows you to grant bonuses to hit and damage how you please.

    It would be easy to perform a Feint, and if they fail the save, then add a bonus to hit for 6 seconds. It's like trading a round of attack actions to have a round with higher AB - but that doesn't allow the 1v1 sneak attack.

    Here's something you might consider:

    When I cast Blackstaff, it adds OnHit Bane on the magic staff/quarterstaff. I then edit x0_s0_bane to do what I want when the player hits them. This way, you don't have to calculate your AB and their AC and damages and feats and immunities and all that.
  • zymciozymcio Member Posts: 6
    Terrorble wrote: »
    I see, the feint ability allows a 1v1 sneak attack (that's a cool idea). Also, allows you to grant bonuses to hit and damage how you please.

    It would be easy to perform a Feint, and if they fail the save, then add a bonus to hit for 6 seconds. It's like trading a round of attack actions to have a round with higher AB - but that doesn't allow the 1v1 sneak attack.

    Here's something you might consider:

    When I cast Blackstaff, it adds OnHit Bane on the magic staff/quarterstaff. I then edit x0_s0_bane to do what I want when the player hits them. This way, you don't have to calculate your AB and their AC and damages and feats and immunities and all that.

    Yea i was first thinking about this that could solve a lot of issue but if u cast something in 0s u still wait full 6s for attack which mean u lose 2 turns... another bigger problem is dmg buff on low lvl no issue but at high lvl you can do 30d6 sneak attack this can be like 180 extra dmg with luck and no clue how to give buff for that. Even if i give somehow 180 dmg buff i guess critical dmg will multiple this :(
    // Create a Damage Increase effect
    // - nBonus: DAMAGE_BONUS_*
    // - nDamageType: DAMAGE_TYPE_*
    // NOTE! You *must* use the DAMAGE_BONUS_* constants! Using other values may
    //       result in odd behaviour.
    effect EffectDamageIncrease(int nBonus, int nDamageType=DAMAGE_TYPE_MAGICAL);
    

    But it have limit max 20 any idea ?
Sign In or Register to comment.