Jump to content

Home

Ok need some force power scripting help


Seprithro

Recommended Posts

ok i need some help on editing the force power scripts, i have read as many past threads as i can find, but still need som ehelp, i want to do only a few select things, there are some powers where i want to edit the damage taken, an da few where i want to change the animations, examples

 

i want to add falling effect of force push, to all the force lightning powers, so when you get shocked, you fly back ward

 

another one i want to change, is to alter force kill, so that if you dont get a save, you just die instantly

 

if any one can help, me with this it would be greatly welcome

Link to comment
Share on other sites

Of all the things you listed, editing the damage and changing the effects of Force-Killl are the easiest.

 

For instance if you want to change the damage caused by Force Power Shock you need to do the following:

 

1. Extract k_inc_force and k_sp1_generic using KOTOR Tool

2. Go to the shock section, look for

"case FORCE_POWER_SHOCK"

3. The damage is set by the following line:

SWFP_DAMAGE = Sp_CalcDamage( oTarget, nDice, 6 );

This causes the spell to do 1-6 pts of damage per level.

4. Change the "6" to "10". This will cause the spell to 1-10 pts of damage per level. Valid entries are 2, 3, 4, 6, 8, 10, 12, 20, 100.

5. Save your changes to k_inc_force - make sure you save it in the root directory of SWKOTOR2.

6. Compile k_sp1_generic and move it to your override directory

 

Hope that helps get you started

Link to comment
Share on other sites

to add falling back effect for power shock:

 

- follow steps 1 and 2 above.

- find the line:

effect eDamage2 = EffectDamage(SWFP_DAMAGE/2, DAMAGE_TYPE_ELECTRICAL);

 

below that add the line:

effect eKO = EffectKnockdown();

 

Now scroll down and find chunk:

ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink1, oTarget, fLightningDuration);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_PRO_LIGHTNING_S), oTarget);

 

below that add the line:

 

ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eKO, oTarget, 3.0f);

 

follow beancounter's steps 4 and 5 above.

 

Note this will only add falling back to force shock. You'll also need to similarly modify code for force lightning and force.. what was it again?.. force storm so that affects all lightning powers.

Link to comment
Share on other sites

ok thanks guys, i got the effect to work on shock, looks quite nice too i cant get kill yet the damage line reads differnt than the shock damage line

a few questions:

 

can i change the dc level required to make a save?

 

can i change casting animations(with existing ones)?

 

how do i alter how long the effects last?

Link to comment
Share on other sites

I could be wrong about this, since I've only just started looking at the scripting side of things, but here goes nothing.

 

Question 1

 

I believe the Sp_MySavingThrows() function holds the value for the DC save in the following way:

 

Sp_MySavingThrows(oTarget, DClevel)

 

Now the default DClevel is set to 0, which would make the default DC the value of Sp_GetJediDCSave().

 

So in theory, you should be able to simply do something like this instead of the default method:

 

int DClevel = some_value;
int nSaves = Sp_MySavingThrows(oTarget, DClevel);

 

Question 2

 

Not sure whether you mean the graphics animations or the character casting animations.

 

Question 3

 

With ApplyEffectToObject(), you should just be able to change the 4th section:

 

ApplyEffectToObject(nDurationType, eEffect, oTarget, fDuration);

 

The nDurationType is the duration type (temporary, instant).

 

The eEffect is the effect to apply.

 

I'm certain you already know that oTarget is the target, but it won't hurt typing a little extra.

 

The fDuration is how long (in seconds) that the effect lasts. So take the knockdown effect from Xcom's post for example:

 

ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eKO, oTarget, 3.0f);

 

the 3.0f means it will last 3 seconds.

 

I believe thats how this syntax works anyway.

 

Also, about the damage, would the EffectDeath() function work?

Link to comment
Share on other sites

Originally posted by tk102

Yes. That is the effect you want. DURATION_TYPE_PERMANENT of course.

 

Edit: I wish I had more time to help with this.

 

You could but that is a little boring - they just fall over dead instantly. Not very satisfying. I would prefer that they suffer a little bit. Just change the following line under force power kill:

 

nDamage = (GetMaxHitPoints(oTarget))/2;

 

to

 

nDamage = GetMaxHitPoints(oTarget)+10;

 

This way they will die after three rounds of choking. :D

Link to comment
Share on other sites

what i mean by animations, is the casting animation, like change heal animation form a stuck out hand, to the sit and meditate animation. there are alot of usefully animation already in-game, and teh animations.2da is mod friendly, it gives a description of every line in it. by tweaking it i have already made a walking mod, so you dont have to hold down "b" all the time

Link to comment
Share on other sites

ok i have spent the past few hours going over and over the replies, and i am sorry, but i just dont understand what grimshadow is saying, can you guys offer anymore help? keep in mind i have ZERO experience in scripting :D so use baby words. i kinda understand the duration, but i need a little more...please

 

btw let me clear up what i am trying to do, since i want kill more powerfull, i thought the save should be up'ed to balance it out,

 

also i just had a few mods in mind when i started, but as i work on this i get more and more ideas, if anyone wants to help with this mod, it'd be welcome

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...