mrdefender Posted February 3, 2006 Share Posted February 3, 2006 I was wondering if someone could make me a mod that would make the force crush force power do 100% damage (or 50% damage on some save of some sort) when used. Probably something that uses that "get maximum health points" I've seen in scripts while working on my wrist console. Still trying to figgure out the whole force power script thing I've been looking for one that only modifies the force crush power but all I can find are mods that modify other powers too... At the moment I can walk up to any room with alot of bad guys and use for storm, everyone dies instantly and I'm using the "Hard" mode of the Hardcore mod... All I want is force crush to actually "crush" people... This is Force Crush, Not Force Pinch :| Link to comment Share on other sites More sharing options...
stoffe Posted February 3, 2006 Share Posted February 3, 2006 I was wondering if someone could make me a mod that would make the force crush force power do 100% damage (or 50% damage on some save of some sort) when used. All I want is force crush to actually "crush" people... This is Force Crush, Not Force Pinch :| Here is one variant that I think might work... you'll need this include file in the same folder as nwnnsscomp.exe to compile it. Then put the resulting NCS file in override and change the impactscript column in spells.2da to point to the resref of your script instead for the Force Crush row (line 177): #include "st_inc_force" void main() { object oTarget = GetSpellTargetObject(); // Set damage to max hitpoints of the target. int nDmg = GetMaxHitPoints(oTarget); // Make an exception to prevent insta-killing force using "bosses" // Force users of equal or greater level "only" take 75% health as dmg. if ((GetHitDice(oTarget) >= GetHitDice(OBJECT_SELF)) && ((GetLevelByClass(CLASS_TYPE_JEDIGUARDIAN, oTarget) + GetLevelByClass(CLASS_TYPE_JEDICONSULAR, oTarget) + GetLevelByClass(CLASS_TYPE_JEDISENTINEL, oTarget) + GetLevelByClass(CLASS_TYPE_JEDIWEAPONMASTER, oTarget) + GetLevelByClass(CLASS_TYPE_JEDIMASTER, oTarget) + GetLevelByClass(CLASS_TYPE_JEDIWATCHMAN, oTarget) + GetLevelByClass(CLASS_TYPE_SITHMARAUDER, oTarget) + GetLevelByClass(CLASS_TYPE_SITHLORD, oTarget) + GetLevelByClass(CLASS_TYPE_SITHASSASSIN, oTarget)) > 0)) { nDmg -= (nDmg / 4); } // Adjust damage to take Force Forms into account. nDmg = ST_CalcDamage(oTarget, 0, 0, nDmg); effect eInvalid; effect eCrush = EffectCrush(); effect eDrop = EffectForcePushed(); effect eDamage = EffectDamage(nDmg, DAMAGE_TYPE_ACID); // Signal target that they got hit by an offensive force power... SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), TRUE)); // Check if the target managed to resist the power.... if(!ST_BlockingChecks(oTarget, eCrush, eDamage, eInvalid)) { // Allow a saving throw for half damage. if(!ST_SavingThrows(oTarget, SAVING_THROW_FORT)) { ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eCrush, oTarget, 2.0); DelayCommand( 1.64, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget)); DelayCommand( 2.00, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDrop, oTarget)); } else { eDamage = EffectDamage(nDmg/2, DAMAGE_TYPE_ACID); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eCrush, oTarget, 2.0); DelayCommand( 1.64, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget) ); DelayCommand( 2.00, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDrop, oTarget) ); } DelayCommand( 0.5, PlaySound("v_imp_crush")); } else { ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectForceFizzle(), OBJECT_SELF); } } I think that should do pretty much what you asked, i.e. deal 100% damage to the victim unless they make their saving throw, in which case they take 50% of their full health as damage instead. I did make one exception though, to avoid instakilling bosses. Force-users of equal or greater level than the user will "only" take 75% damage if they fail their save. Link to comment Share on other sites More sharing options...
mrdefender Posted February 6, 2006 Author Share Posted February 6, 2006 Shoot. It doesn't work properly. I often have to use force crush 4-5 times to destroy droids and I'm only on Peragus... Does the hard core mod have anything to do with this? I experienced another problem too but I fixed it, the "Delay 0.5 v_im_crush" thing had to be commented-out. Not sure why but kotor would play the crush sound twice. Once during the actual animation then another time right after... Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted February 6, 2006 Share Posted February 6, 2006 ^^^^ If you replaced the 'impactscript' for the in-game Force Crush, then the game already knows to play that sound, as (I think) there is a column in spells.2da to list what sound to play when the FP is cast. Link to comment Share on other sites More sharing options...
stoffe Posted February 6, 2006 Share Posted February 6, 2006 Shoot. It doesn't work properly. I often have to use force crush 4-5 times to destroy droids and I'm only on Peragus... Does the hard core mod have anything to do with this? I experienced another problem too but I fixed it, the "Delay 0.5 v_im_crush" thing had to be commented-out. Not sure why but kotor would play the crush sound twice. Once during the actual animation then another time right after... If the Hardcore mod applies any form of damage resistance or damage immunity to creatures, that could well be the cause. The EffectDamage effect sets the damage that is dealt before any resist-checks are done. Unfortunately you can't check for resist/immunity amounts through scripting as far as I remember. Haven't noticed any problems with the amount of damage dealt, but I don't use the hardcore mod (since I'm not that hardcore myself ). Though, if you wish them to die from one Crush, you could apply EffectDeath() rather than EffectDamage() to them. Then they'd always die no matter what damage resistance and how much vitality they have. Link to comment Share on other sites More sharing options...
Shem Posted February 7, 2006 Share Posted February 7, 2006 I do hope this mod gets made and released. Maybe there can be a regular version and one to be compatible with the hardcore mod. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.