Aller au contenu

Photo

Shadow Dancer and a Shadow Jump ability


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
Doriant_Tell

Doriant_Tell
  • Members
  • 4 messages

Hello everybody,

 

I have the intention to create the shadow jump feat for the Shadow dancer in nwn2 and give some love and flavor to this defensive class. Supposedly a Shadow dancer has the ability to jump from one shadow to another, i'm gonna quote here the DnD Wiki "Shadow Jump (Su): At 4th level, a shadowdancer gains the ability to travel between shadows as if by means of a dimension door spell. The limitation is that the magical transport must begin and end in an area with at least some shadow. A shadowdancer can jump up to a total of 20 feet each day in this way; this may be a single jump of 20 feet or two jumps of 10 feet each. Every two levels higher than 4th, the distance a shadowdancer can jump each day doubles (40 feet at 6th, 80 feet at 8th, and 160 feet at 10th). This amount can be split among many jumps, but each one, no matter how small, counts as a 10-foot increment."

 

I know that the part of "from a shadow to another shadow" could be fairly high to replicate, so my idea to circumvent this is by granting the NWN2 Shadow Dancer a feat with a spell-like ability to teleport once or twice a day. Imagine this: there is a bunch of enemies running towards your party, with a nasty wizard throwing spells from behind. The Shadow dancer teleports behind and start dealing sneak attacks and saves the day (lol). Anyway... The problem is that i have absolutely no experience scripting and thus, absolutely no idea how to do this. 

 

While doing some research i do found a script that allows teleport, the way i think would fit the shadow dancer, as a modification to the warlock's spell >>flee the scene<< in Sealea's Warlock rework:

 

//:://///////////////////////////////////////////////
//:: Warlock Lesser Invocation: Flee the Scene
//:: nw_s0_ifleescen.nss
//:: Copyright © 2005 Obsidian Entertainment Inc.
//::////////////////////////////////////////////////
//:: Created By: Brock Heinz
//:: Created On: 08/12/05
//::////////////////////////////////////////////////
/*
        5.7.2.7 Flee the Scene
        Complete Arcane, pg. 134
        Spell Level: 4
        Class: Misc
 
You instantly transfer yourself from your current location to
any other at short-range. You always arrive at exactly the spot
desired—whether by simply visualizing the area or by stating
direction.
 
*/
 
#include "x2_inc_spellhook" 
 
void main()
{
 
    if (!X2PreSpellCastCode())
    {
   // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
        return;
    }
 
//Declare major variables
    object oCaster = OBJECT_SELF;
int nSpellID = GetSpellId();
location lTeleport = GetSpellTargetLocation();
effect eVis = EffectVisualEffect(VFX_IMP_UNSUMMON);
 
//Fire spellcasting event
SignalEvent(oCaster, EventSpellCastAt(OBJECT_SELF, nSpellID, FALSE));
 
//Apply visual effects
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oCaster));
 
//Make caster jump to the location
SetCommandable(FALSE, oCaster);
DelayCommand(1.0f,JumpToLocation(lTeleport));
DelayCommand(1.0f,ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lTeleport));
DelayCommand(1.0f,SetCommandable(TRUE, oCaster));
 
Now before this post gets any longer, how do i modify this script to make it a Shadow Dancer ability?
 
Thank you all in advance, and sorry for the long post.

 



#2
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

You don't modify the script to make it a Shadow Dancer ability. The script just says what will happen when this particular spell is cast. You can leave it as is if you want it to teleport a target from one place to another.

If you want to give this ability to the Shadow Dancer you have to make a new feat for the Shadow Dancer class (in feat.2da), tied to the spell with this script (in spells.2da), and put this feat in the table of the feats learned by the Shadow Dancer (in cls_feat_shadow.2da).


  • Doriant_Tell aime ceci

#3
Doriant_Tell

Doriant_Tell
  • Members
  • 4 messages

Hi Clangeddin86, thank you for the fast reply, i'll certainly try it. 

 

One more question, how do I set the uses per day, lets say 1 at level 4, and +1 every two levels? 



#4
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

In the feat.2da file there is a column: USESPERDAY. It's used to assign a fixed value that won't scale with levels. If you put 4 (for example) in USESPERDAY you will be able to use the ability 4 times per day and that's it.

To make it scale with level it's a bit tricky, but there's a workaround:
The Shadow Dancer has 10 levels, so that means that you will have 4 uses at level 10, correct?
Then copy your new feat 4 times, then set the USESPERDAY to 1,2,3 and 4 (respectively) and then put the row ID of the next feat in the SUCCESSOR column, this mean that the new feat with 4 times per day uses will replace the old one. (for example, if you have Shadow jump with 1 uses per day at row id 4444, you need to put 4445 in the successor column, if we assume that you copy the next one right below it).

Then you need to assign those feats at level 4/6/8/10 in the cls_feat_shadow.2da of course.


  • GCoyote et Doriant_Tell aiment ceci

#5
Doriant_Tell

Doriant_Tell
  • Members
  • 4 messages

Okay this is what I did: added the spell to the bottom of spells.2da, then went to feat.2da and started creating my brand new FEAT_SHADOW_JUMP. Gradually started panicking to get confused over the columns such as description, category, constant. So then deleted all what i had typed over feat.2da and just changed the spell id of Shadow Evade to the one I added before, copied that feat at the bottom again and added the uses per day progression like you said and everything worked like a charm. it can even teleport behind the counter at the Sunken flagon, but can not bypass walls or rooms, which i think is perfect since it is a jump and not a teleportation  per se.

 

So now my question is (sorry to be such a nuisance): If i do create the new feat, do I need to edit the dialog.tlk? if that is the case, do i need to find lines that correspond to the Shadow Dancer or can i scribble write the description and name at the bottom of that mighty file? 

 

Thanks again. 



#6
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

You may need to edit the dialog.tlk if there is no line in the dialog.tlk that describes accurately what the spell does.

You can go at the bottom of the mighty file, and then you have to reference it properly in the feat.2da of course.

You can also increase the size of the of .tlk, increasing the number of lines, but careful to not overdo it, past 16million or so it's reserved for custom.tlk used by modules in specific ways. (it's also one method for changing the dialog.tlk in multiplayer PW)


  • Doriant_Tell aime ceci

#7
Doriant_Tell

Doriant_Tell
  • Members
  • 4 messages

Alright, thank you very much for all your help. I have never tried a Persistent World before, but i'll try one eventually, so i'll be careful not to mess anything that might conflict. Although i feel a lot more confident to edit nwn2 files.

 

Thanks again.