Sign in to follow this  
CapitaineSpoque

[FIXED] Attribute damage effect script ?

Recommended Posts

So i'm currently doing a Shock Arm for T3 that replicates the one from TSL. I wanted to try some variations. With this one i want to reduce wisdom attribute if the fortitude save is not passed by the target

// T3-M4 Shock arm
// Modified stun droid script by ZobiZob
// K1
#include "k_inc_force"

void main ()
        {

	object oTarget = GetSpellTargetObject();
    	effect eLink1;
    	effect eInvalid;

	
        SWFP_HARMFUL = TRUE;
	int nDamage = (GetHitDice(OBJECT_SELF))/2;
	SWFP_DAMAGE = d6(nDamage);
	SWFP_DAMAGE_TYPE= DAMAGE_TYPE_ELECTRICAL;
       int DCSAVE = (5 + (GetHitDice(OBJECT_SELF)));

        eLink1 = EffectBeam(2066, OBJECT_SELF, BODY_NODE_HAND);
        eLink1 = EffectLinkEffects(eLink1, EffectVisualEffect(VFX_PRO_LIGHTNING_S));
        effect eDamage;
        effect eAdamage = EffectAbilityDecrease(ABILITY_WISDOM, 1);

        SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), SWFP_HARMFUL));

        ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink1, oTarget, fLightningDuration);

        	     if((FortitudeSave(oTarget, DCSAVE, 8, OBJECT_SELF)) == 0)  {	
                        eDamage = EffectDamage(SWFP_DAMAGE, DAMAGE_TYPE_ELECTRICAL);
                        ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAdamage, oTarget, 30.0);
                        ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget);
                       
                    	}
                else
                    	{
                        eDamage = EffectDamage(SWFP_DAMAGE/2, DAMAGE_TYPE_ELECTRICAL);
                        ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget);
                        DisplayFeedBackText(oTarget, 2);
                    	}

}

However the attribute damage effect does not seem to be displayed in the feedback text in game.I tried to make a "SendMessageToPC" that would say "-1 to wisdom" but it does not display either.

Is it possible to display the effect in the feedback ? I tied the script to a droid and it does reduce the wisdom.

Share this post


Link to post
Share on other sites

I think there is already a mod that adds this feature.

"1. Separate parts of T3-M4 are adapted to the first part of the game.  For the shock limb of the droid T3-M4, the nature of the damage has been changed: now it stuns the enemy, and the stunning power is one of the strongest in the game."

Not sure if this helps or not, I believe there are some things that don't get properly displayed in the feedback logs though I am not certain of the specifics.

37 minutes ago, CapitaineSpoque said:

Is it possible to display the effect in the feedback ? I tied the script to a droid and it does reduce the wisdom.

I think SendMessageToPC goes to a specific feedback and not the combat log but I cannot remember.

What you probably ought to do is set up an empty test room with a character, some dialog and some scripts to tinker with to ensure you can get something properly showing somewhere, perhaps you have used the function incorrectly.

  • Like 1

Share this post


Link to post
Share on other sites

Thx for the reply ! Gonna try things out.

 

EDIT So now the message displays properly with SendMessageToPc, i most likely mistargeted the thing, it works in the feedback now. Ty tho !

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this