Jump to content

Home

Mass Invisibility spell for Kotor


WRFan

Recommended Posts

I've ported the Mass Invisibility spell from NWN2 to Kotor. Now you may wonder why you've never seen this spell in NWN2 - the reason is the spell was cut from the game by Obsidian. In fact, Obsidian never bothered to even write the script, even if the spell has some entries in NWN2 dialog.tlk and spells.2da. Some time ago I fixed this spell using NWN2 toolset, and now I've ported it to Kotor. The advantages over the standard Stealth function used in Kotor are obvious:

 

1) Harmless spells will not cancel invisibility (meaning you can buff yourself right in front of enemies, no concentration checks, no defensive mode necessary, lol). Harmless spells are defined like this in k_inc_force.nss:

 

http://www.nwnlexicon.com/compiled/function.eventspellcastat.html

 

2) You can stealth run now in Kotor 1! Cool! No more sneaking for hours at low speed, it's annoying.

 

3) No more wearing of stupid stealth belts. Instead, equip a useful Qel-Droma belt or Jal Shey Mentor belt that increase your Wis/Char (basically increasing the SpellSaveDC for your spells)

 

4) Your entire party gets affected by the spell as long as they are withing the spell's radius(SHAPE_SPHERE, RADIUS_SIZE_LARGE, centered on oCaster). Cast it on Jolee, Mission, whoever, let Mission stealth run, searching for traps and disarming them!

 

Here's the script. Range has to be set to "S" (sphere) in spells.2da. Universal power, force points cost: 20. Up to you though:

 

case 135: //FORCE_POWER_INVISIBILITY
{

int nDuration = GetCasterLevel(OBJECT_SELF);
effect eInvis = EffectInvisibility(INVISIBILITY_TYPE_NORMAL);
effect eVis = EffectVisualEffect(8000);
effect eLink1 = EffectLinkEffects( eInvis, eVis );

//ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink1, OBJECT_SELF, TurnsToSeconds(nDuration));

location lCenter = GetLocation(OBJECT_SELF);
SWFP_HARMFUL = FALSE;
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), SWFP_HARMFUL));

object oTarget = GetFirstObjectInShape( SHAPE_SPHERE, RADIUS_SIZE_LARGE, lCenter );


while(GetIsObjectValid(oTarget))
{
int oIsObjectPartyMember = IsObjectPartyMember(oTarget);	
if ( oIsObjectPartyMember  )
	{ 	

     		ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eLink1, oTarget, TurnsToSeconds(nDuration) );		
	}
	oTarget = GetNextObjectInShape( SHAPE_SPHERE, RADIUS_SIZE_LARGE, lCenter );
}

SetSoloMode( TRUE );

}
break;

 

I suggest setting ForceFriendly column in spells.2da to 0, then it will appear first in the friendly power list and you only have to click on it to activate invisibility. Just as easy as hitting the Stealth button, but with obvious advantages as described above.

 

Btw, the original NWN2 spell was meant as a lvl7 Wiz/Sorc spell.

 

The spell lasts for a number of turns (1 turn =60sec) equal to the caster's caster level

Link to comment
Share on other sites

Beware that if you try to enter the Ebon Hawk while any of your party members have the invisibility effect on them, the game will crash. So before entering the ship interior, you need to remove the invisibility effect from the entire party. The easiest way to do this is to remove the effect using an existing spell, possibly "Heal." Open k_inc_force.nss, find the Heal script, find the line

Sp_RemoveSpecificEffect(EFFECT_TYPE_POISON, oParty);

 

and add the following coderight after this line:

 

Sp_RemoveSpecificEffect(EFFECT_TYPE_INVISIBILITY, oParty);

Link to comment
Share on other sites

  • 3 weeks later...

There are certain situations in TSL where the game specifically checks if the player is invisible, for example, when you try to infiltrate the Sith Camp on Dxun. Here's a small mod that will check not only for stealth, but for invisibility as well. If the party is invisible, whether by common stealth or through the invisibility effect, the alarm will not be triggered:

 

http://home.arcor.de/wrfan/files/kotor/stealth_invisibility.zip

 

Still need to fix some scripts for Nar Shaadaa in TSL that also check for the stealth effect

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...