mrdefender Posted May 24, 2005 Share Posted May 24, 2005 I can't figgure out why this damned script won't let my force crush mod work properly! ARGH!! What's very frustrating is that everything worked fine a few days ago then I started a new game as the opposing gender and alignment (female DS) Is there anyone who can help me out and tell me why this won't work? // DJS-OEI 1/2/2004 case FORCE_POWER_FORCE_CRUSH: { SWFP_HARMFUL = TRUE; SWFP_PRIVATE_SAVE_TYPE = SAVING_THROW_FORT; int nDice = GetHitDice(OBJECT_SELF); // DJS-OEI 10/7/2004 // Removed damage level cap and changed to d10. /* if(nDice > 10) { nDice = 10; } */ //SWFP_DAMAGE = Sp_CalcDamage( oTarget, nDice, 6 ); SWFP_DAMAGE = Sp_CalcDamage( oTarget, nDice, 10 )*4; //SWFP_DAMAGE = d6(nDamage); // DJS-OEI 8/16/2004 // Damage type is now Unstoppable, although its define is still Acid. //SWFP_DAMAGE_TYPE = DAMAGE_TYPE_UNIVERSAL; SWFP_DAMAGE_TYPE = DAMAGE_TYPE_ACID; effect eCrush = EffectCrush(); effect eDamage = EffectDamage(SWFP_DAMAGE, SWFP_DAMAGE_TYPE); int nResist = Sp_BlockingChecks(oTarget, eCrush, eDamage, eInvalid); int nSaves; SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), SWFP_HARMFUL)); if(nResist == 0) { nSaves = Sp_MySavingThrows(oTarget); if(nSaves == 0) { // Apply the Crush effect for the length of the damage animation. // Also, time the application of damage to the point at which the // crush animation climaxes. ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eCrush, oTarget, 2.0); DelayCommand( 1.64, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget) ); // DJS-OEI 8/16/2004 // Finally, delay application of a Force Push effect with no // fly-back duration to cause the target to fall to the ground // and get back up. effect eDrop = EffectForcePushed(); DelayCommand( 2.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDrop, oTarget) ); } else { // Half damage. eDamage = EffectDamage(SWFP_DAMAGE/2, SWFP_DAMAGE_TYPE); // Apply the Crush effect for the length of the damage animation. // Also, time the application of damage to the point at which the // crush animation climaxes. ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eCrush, oTarget, 2.0); DelayCommand( 1.64, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget) ); // DJS-OEI 8/16/2004 // Finally, delay application of a Force Push effect with no // fly-back duration to cause the target to fall to the ground // and get back up. effect eDrop = EffectForcePushed(); DelayCommand( 2.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDrop, oTarget) ); } } if(nResist > 0) { ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectForceFizzle(), OBJECT_SELF); } } break; Link to comment Share on other sites More sharing options...
stoffe Posted May 24, 2005 Share Posted May 24, 2005 Originally posted by mrdefender I can't figgure out why this damned script won't let my force crush mod work properly! ARGH!! Doesn't work in what way? Does nothing at all happen when you use it, or does it just ignore the instakill damage you changed it to do deal? Check that you have recompiled k_sp1_generic.nss and put the resulting k_sp1_generic.ncs file in the override folder. It's sometimes easy to forget since all the code is in the k_inc_force include file. Link to comment Share on other sites More sharing options...
mrdefender Posted May 24, 2005 Author Share Posted May 24, 2005 It ignores the new damage value The script compilation (sp?) looks fine, it gives me a k_sp1_generic.ncs file. I place it in my override folder under a 'others' folder (i have subfolders, keeps the override folder organised ) The batch file that compiles the scripts looks fine too: nwnnsscomp -c -g 2 .\Compile\*.nss pause I also have the nwscript.nss, I tried it the file and without the file, doesn't do anything constructive in this instance. I'm just at a loss here, In theory it should work but it just doesn't want to work Any thoughts? Link to comment Share on other sites More sharing options...
mrdefender Posted May 25, 2005 Author Share Posted May 25, 2005 I reinstalled kotor 2... and I got some good news and some bad news... The Bad news is, my script still doesn't want to work... The Good news is, another mod (that changes more force powers) seems to work. So I'm going to try to copy and paste the force crush part of the script into my script and see if that works.... Does anyone have any idea why mine doesn't want to work? Other scripts I made work, but for some odd reason this one doesn't work. Granted, I'm still new at this whole scripting thing but... Shouldn't my script be working? I mean it is the only spot in that part of the file that looks like it controls the ammount of damage done. Link to comment Share on other sites More sharing options...
mrdefender Posted May 25, 2005 Author Share Posted May 25, 2005 Very wierd. I'm now almost certain the scripts aren't being compiled properly, cause replacing the original entry with another working script's entry didn't do anything.... Link to comment Share on other sites More sharing options...
mrdefender Posted May 25, 2005 Author Share Posted May 25, 2005 ARGH! The mod doesn't work either, I was just at a low level and now that I'm higher, it doesn't work PS: Seem to be having problems when I edited my previous post. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.