Jump to content

Home

[WIP] Improved Dueling + Bonus Feats


beancounter

Recommended Posts

In the Star Wars Universe the majority of the Saber Masters were Single Saber Duelist, yet in KOTOR the Dueling Feats are far inferior to the Two Weapon Feats. So I have been working on a series of scripts that would make the Dueling Feats a much better choice. While I was developing this I also decided to change some other feats that were weak and add four new feats while I was at it.

 

Here is a list of my planned changes:

 

Dueling 1: +1 THAC0, +1 Defense, +1 DMG

Dueling 2: +2 THAC0, +3 Defense, +3 DMG

Dueling 3: +3 THAC0, +5 Defense, +5 DMG

 

Weapon Profiency: +1 THAC0, +2 DMG

Weapon Specialization: +2 THAC0, +4 DMG

Advanced Specialization 1: +3 THAC0, +6 DMG

Advanced Specialization 2: +4 THAC0, + 8 DMG

Advanced Specialization 3: +5 THAC0, +10 DMG

 

Lightsaber Finese 2: Dexiterity will grant a damage bonus if it is higher then the characters strength

Accurate Shot: Dexiterity will be added on to Weapon Damage when using Blasters

 

Expert Heavy Weapons: The user will gain in extra shot when using Blaster Rifles

Master Heavy Weapons: The user will gain in extra two shots when using Blaster Rifles

 

This mod is using a series of custom spells and the heartbeat script to make the adjustments. So far I am about 50% done and I have not noticed any impact on game speed so far.

 

If anyone has an idea for a new feat I would be open to adding it to the scripts. Also, I am curious if anyone thinks the changes are too weak or too strong.

Link to comment
Share on other sites

i doubt this will work, given how this power/feat looks, but-

 

force jump with melee weapons?

 

another idea for the weapon specialisation - keen? i mean, if its your specialty, you should be able to be reasonably accurate with the thing. Not sure if thats a weapon property specificly, or if i can add that in or not.

 

One thing that always bugged me, the counsulars are more intouch with the force, or at the very least, willing to use it more then your average force user - yet thier bonus feats never seemed to do much compared to the other classes. Maybe tweak the force focus feats?

 

Dunno, just ideas, which u asked for ;)

 

love your work btw

 

*waves*

Link to comment
Share on other sites

Beancounter,

 

Sounds very interesting. I'm working on something similar for the d20 adaptation mod (only at the 'figuring out where on earth to begin'-stage, though), giving master duelling the following progression:

 

duelling: +1 attack, +1 defense
imp. duelling: +2 attack, +2 defense
master duelling: +2 attack, +2 defense, +1 extra attack

 

If the mechanism is a general one, might I suggest also adding the extra attack to master rapid shot for repeating weapons? This is advertised, but not actually implemented for the repeaters - I only have a lame hack for it.

 

At any rate, I'm VERY interested in how you did this. I've gathered that one needs to EffectModifyFoo(Bar) to add effects, but where in <insert favourite deity here>'s name did you actually *DO* it? Edit: re-reading your 1st post, I see that you mention the heartbeat script and custom spells. Unfortunately, that is beyond my level of expertise atm. But I'd like to learn ;)

 

"Inquiring minds would like to know"

Link to comment
Share on other sites

I never really used blaster extensively because they couldn't compare to a lightsaber, maybe if you made the dexterity damage bonus with higher levels it would be worth it to have rangers in the party.

 

And I don't know if it would even be possible, but could you make some way of comboing a blade and a blaster...Saber in the main, Gun in the off for blade duelers who want to use a gun, and Gun in the main, Saber in the off for rangers who want to reflect hostile fire.

Even less possible...Engage target one handed with saber, while fending off other targets with a blaster (multi target attack possible?)

 

And what about the ability to throw a saber, and while it's in flight attack with a blaster or grenade.

 

Make a demolitionist feat that gives all grenades "special abilities";)

maybe even a sith demolitionist feat "vampiric grenades" they don't explode, they sit for several turns, using low powered drain life to replenish you, jedi demolitionist would be similar but your party would heal and get small attribute bonuses.

 

You're sick of me now I bet:lol:

 

One more...Sabers with blaster capability, as you close on a target you will fire several shots from the hilt, either damaging or stunning, to soften them up or wear down shields (I made one for the fanart section if you need an example)

Link to comment
Share on other sites

Never played AD&D oldflash?

:D

 

LoneFerret

 

Sorry, no. If you mean board table game. Otherwise I have played only 4 RPG's.

One single request if is possible. Adjust force power to be useless for force sensitive and always "hit" common npc, beasts and droids. Remember battles betwen jedi in movies. Great show of powers but the true battle is with lightsabers.

Link to comment
Share on other sites

Beancounter,

 

After reading some tutorials and posts here at HL (and nwnlexicon) I noticed that on several occasions you advise against adding/modifying feats in the heartbeat scripts. I'm wondering what made you change your mind - did you have some sort of revelation? ;)

 

In your hardcore mod, you include your hardcore script at the top of k_ai_master and call a function in the appropriate place. Where do you call your AdjustFeats(oSelf) function? k_def_heartbt01 / k_hen_heartbt01? Both?

 

Master Rapid Shot Extra Attack?

 

Regarding the master rapid shot feat, I understand that most modders agree that it is not possible to directly change it. But would it be possible to augment it by checking whether some sort of repeating blaster is equipped, and if so, add an extra attack only if the current object is actually using the master rapid shot feat(talent?) in the current round on the current target?

 

(I hope the code illustrates what I mean by the above. Feel free to educate me if I'm completely off track... :) )

 

// return true if oObject currently has a repeating weapon equipped
int GetIsRepeaterEquipped(object oObject = OBJECT_SELF)
{
   object oWeap = GetItemInSlot(INVENTORY_SLOT_RIGHTWEAPON, oObject);
   if ( GetIsObjectValid(oWeap) )
   {
       int nBaseType = GetBaseItemType(oWeap);
       if ( nBaseType == BASE_ITEM_HEAVY_REPEATING_BLASTER ||
            nBaseType == BASE_ITEM_REPEATING_BLASTER )
       { 
           return TRUE;
       }
   }
   return FALSE;
}

// I currently don't know how to implement this, thus this will be 
// a vague hand-waving pseudo code exercise to say the least...
// The general idea is to add an extra attack to the current object,
// if and only if the following is true:
// a repeating weapon is equipped &&
// the current object has the master rapid shot feat &&
// the right talent (FEAT_MULTI_SHOT) was the last attack action
// applied to the current target by the current object 
// (did I misunderstand how this last part works in the engine?)
void AdjustMasterRapidShot(object oSelf = OBJECT_SELF)
{
   if (GetIsRepeaterEquipped(oSelf))
   {
       if(GetHasFeat(FEAT_MULTI_SHOT, oSelf))
       {
           if(IsUsingMasterRapidShotOn(oCurrentAttackTarget, oSelf))
           {
           // Apply the extra attack, unless it has already been added
           // how is this done in an elegant way? Via the available spell
           // functions? Via local object variables? A combination?
           }
       }
   }
} 

 

Master Dueling:

 

Finally, I'm all for giving master dueling an extra attack (and replacing the extra attacks from the speed force powers with different boni - +2 attacks from master speed is IMHO way overpowered!) With one extra attack from dueling, dueling becomes a viable alternative to dual wield for both jedi and non-jedi.

Link to comment
Share on other sites

Thanks for the comments. Some of the suggestions sound really cool, but unfortunately there is no way to implement them through scripting. So, sorry there is no way to get your character to use a blaster in one hand and a lightsaber in another.

 

Also, I am not aware of how to detect that you are using Rapid Shot, so you can not give an extra attack when you use just that feat. So instead I am giving the extra attacks to using Blasters. Even though it would be easy to modify the script to only give the extra attacks when you are using a Repeating Blaster Rifle.

 

Ermo - my inital goal was to make a new feat called Dueling 4 which gave an extra attack, but (there always seems to be a but) the game is hardcoded to limit the maximum number of attacks with a single saber to three. You can get another attack with Flurry and and another with the Juyo form, but three is the limit otherwise. So instead I added the extra Defense and damage to make Dueling more competive with Two Weapons.

 

Emperor Devan - no revelations - I just got sick of how worthless Dueling was. I am still not a big fan of using the heartbeat script and I have been trying to find a good alternative. I am probably going to stick a random number check at the beginning so the script will only run once every 3 heartbeats. I am not actually modifying the normal heartbeat script, but instead only k_hen_heartbt01 - which is used by the PC and your party.

 

If anyone is curious here is a beta script to modify Dueling. Spells 303 to 301 are custom spells that apply the bonus. Also the script needs to be modified to not run during combat, otherwise it will totally screw up combat.

 

   object vMainHand = GetItemInSlot(INVENTORY_SLOT_RIGHTWEAPON, OBJECT_SELF);
   object vOffHand  = GetItemInSlot(INVENTORY_SLOT_LEFTWEAPON, OBJECT_SELF);
   int vMainType    = GetBaseItemType(vMainHand);


   if(GetHasFeat(113, OBJECT_SELF) || GetHasFeat(112, OBJECT_SELF) || GetHasFeat(111, OBJECT_SELF))
   {

     if(vOffHand == OBJECT_INVALID 
     && vMainType != BASE_ITEM_QUARTER_STAFF              
     && vMainType != BASE_ITEM_DOUBLE_BLADED_SWORD        
     && vMainType != BASE_ITEM_VIBRO_DOUBLE_BLADE         
     && vMainType != BASE_ITEM_DOUBLE_BLADED_LIGHTSABER   
     && vMainType != BASE_ITEM_ION_RIFLE                  
     && vMainType != BASE_ITEM_BOWCASTER                  
     && vMainType != BASE_ITEM_BLASTER_CARBINE            
     && vMainType != BASE_ITEM_DISRUPTER_RIFLE            
     && vMainType != BASE_ITEM_SONIC_RIFLE                
     && vMainType != BASE_ITEM_REPEATING_BLASTER          
     && vMainType != BASE_ITEM_HEAVY_REPEATING_BLASTER    
     && vMainType != BASE_ITEM_BLASTER_RIFLE              
     && vMainType != BASE_ITEM_GHAFFI_STICK               
     && vMainType != BASE_ITEM_WOOKIE_WARBLADE            
     && vMainType != BASE_ITEM_GAMMOREAN_BATTLEAXE        
     && vMainType != BASE_ITEM_FORCE_PIKE)                 
     {

       if(GetHasFeat(113, OBJECT_SELF) && !GetHasSpellEffect(303, OBJECT_SELF))
       {

         ActionCastSpellAtObject(303, OBJECT_SELF, 0 , TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, FALSE);

       }

       else if(GetHasFeat(112, OBJECT_SELF) && !GetHasSpellEffect(302, OBJECT_SELF))
       {

         ActionCastSpellAtObject(302, OBJECT_SELF, 0 , TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, FALSE);

       }

       else if(GetHasFeat(113, OBJECT_SELF) && !GetHasSpellEffect(301, OBJECT_SELF))
       {

         SendMessageToPC(OBJECT_SELF, GetName(OBJECT_SELF) + " - uses Dueling1");
         ActionCastSpellAtObject(301, OBJECT_SELF, 0 , TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, FALSE);

       }

     }  


     else 
     {

       int vSpellId;
       effect eBuff = GetFirstEffect(OBJECT_SELF);
       while(GetIsEffectValid(eBuff))
       {
         vSpellId = GetEffectSpellId(eBuff);

         if(vSpellId == 303 || vSpellId == 302 || vSpellId == 302)
         {

           RemoveEffect(OBJECT_SELF, eBuff);

         }

         eBuff = GetNextEffect(OBJECT_SELF);

       }
     }
   }

Link to comment
Share on other sites

Also, I am not aware of how to detect that you are using Rapid Shot, so you can not give an extra attack when you use just that feat. So instead I am giving the extra attacks to using Blasters. Even though it would be easy to modify the script to only give the extra attacks when you are using a Repeating Blaster Rifle.

Thanks for replying! I thought I'd gone completely off on a limb for a moment there. :)

 

Anway, I did some research on how to figure out what your last attack was and this is the code I ended up with (untested):

 

// if a repeater is equipped this function should add an extra attack
// in the current round. I hope. If not, then a check could be
// made to see if we have the same target as last round and add
// the extra attack anyway, using the first round as a 'warm-up'
// round. Or something.
void AdjustMasterRapidShot(object oTarget = OBJECT_SELF)
{
   int nBaseType, nMode;
   float fDuration;

   object oWeap = GetItemInSlot(INVENTORY_SLOT_RIGHTWEAPON, oTarget);

   if ( GetIsObjectValid(oWeap))
   {
       nBaseType = GetBaseItemType(oWeap);
       if ( nBaseType == BASE_ITEM_HEAVY_REPEATING_BLASTER ||
            nBaseType == BASE_ITEM_REPEATING_BLASTER )
       { 
           nMode = GetLastAttackMode(oTarget);
           if (nMode == FEAT_MULTI_SHOT)
           {
               // should we check whether we've already added an attack this way?
               fDuration = 6.0; // one round
               effect eExtraAttack = EffectModifyAttacks(1);
               Sp_ApplyEffects(FALSE, oTarget, 0.0, 1, eExtraAttack, fDuration, eInvalid, 0.0);
           }
       }
   }
}

Ermo - my inital goal was to make a new feat called Dueling 4 which gave an extra attack, but (there always seems to be a but) the game is hardcoded to limit the maximum number of attacks with a single saber to three. You can get another attack with Flurry and and another with the Juyo form, but three is the limit otherwise. So instead I added the extra Defense and damage to make Dueling more competive with Two Weapons.

Ok, let me see if I understood this part correctly: I can deal 5 attacks with my main hand of which:

  • 1 is my normal attack
  • 2 can be granted via EffectModifyAttacks(nInt) (master speed for instance)
  • 1 is reserved for the flurry feats
  • 1 is reserved for the Juyo form

In contrast, is it correct that someone wielding two sabers would have a total of 6 attacks (the 6th attack being the off-hand attack) when using master speed+flurry+juyo? Or are the 5 attacks a hard limit regardless?

 

I find the 2 extra attacks of Master Speed daft (I've removed them from k_force_inc.nss as it happens), But I'll take an extra attack from dueling any day. ;) However, someone (thanks Cobra) kindly pointed out to me that adding an extra attack to dueling would make dueling more effective than dual-wield (one extra attack with bonuses vs dual wield w/penalties to the extra attack). So perhaps your solution is the best after all.

Link to comment
Share on other sites

Anway, I did some research on how to figure out what your last attack was and this is the code I ended up with (untested):

(SNIP!)

 

The problem with this approach is that you have no good place to fire such a script. There is no OnAttacking event, so you would at best be able to detect that the player has already used Rapid Shot last time attacking, but you don't know if they still are using it. You'd only be able to react what had been done in the last combat round, not what they're doing now.

 

For AI controlled characters it's much easier if you are willing to use a workaround and modify the combat AI. Then you could just check if the currently selected talent that's going to be used is Rapid Shot, and if so you could briefly add an extra attack before using the talent. The scripted effect won't stack with Master Speed though, making that power less useful.

 

Ok, let me see if I understood this part correctly: I can deal 5 attacks with my main hand of which:

  • 1 is my normal attack
  • 2 can be granted via EffectModifyAttacks(nInt) (master speed for instance)
  • 1 is reserved for the flurry feats
  • 1 is reserved for the Juyo form

In contrast, is it correct that someone wielding two sabers would have a total of 6 attacks (the 6th attack being the off-hand attack) when using master speed+flurry+juyo? Or are the 5 attacks a hard limit regardless?

 

You can at most do 5 attacks/round, even if you should get 6 attacks when you dual-wield. This is hardcoded in the game engine.

 

A dual wielder using Master speed and Juyo would get no benefit from using Flurry at all, since the extra attack is lost. (Which would be a benefit in itself though since you can use Power Attack with the full number of attacks instead, unlike single-wielders).

Link to comment
Share on other sites

One more...Sabers with blaster capability, as you close on a target you will fire several shots from the hilt, either damaging or stunning, to soften them up or wear down shields (I made one for the fanart section if you need an example)

 

Hmmm..........This would require new animations (I might be mistaken) unless all of the sudden blaster bolts would just come out of you :p Now granted, JdNoa and cchargin just made an awesome discovery about new animations, but I honestly don't know much about it :p

Link to comment
Share on other sites

Well folks I hate to say it but I have ran into a wall on this mod. I can make the game recognize new feats and buff your character but - the game seems to be limited with EffectDamageIncrease. It will take only a max of +5 bonus or a random bonus of 2 to 12 points of damage. Anything over that will not be recognized by the game engine. The sad thing is I ran into the same problem with Kotor I, but I forgot about it. So I could release the mod with dueling bonus only, but there is no way to do make your dex increase your damage over +5 points. Bummer.

Link to comment
Share on other sites

Beancounter,

 

I second Achilles and Griffman: Release it as is. I for one can't wait to see what you did and, more importantly, how you did it :D

 

I hacked together a (mostly working) repeating blaster master rapid shot fix, but it's rather ugly since it relies on temporary effects + local booleans:

 

   
int D20_MULTISHOT_FIX = 128; // index of local boolean 

if( GetIsRepeaterEquipped() &&
   GetHasFeat(FEAT_MULTI_SHOT, OBJECT_SELF) )
   {
       // determine if extra attack, -2 attack penalty has already been applied
       if( GetLocalBoolean(OBJECT_SELF, D20_MULTISHOT_FIX) != TRUE )
       {
           DebugMessage(": Fixing MRS, D20_MULTISHOT_FIX = " +
                           IntToString(GetLocalBoolean(OBJECT_SELF, D20_MULTISHOT_FIX)) );
           float fDuration = 6.0; // Make effects last approx. one round (vulnerable to fluctuations)

           effect eMultiShot = EffectAttackDecrease(2);
           eMultiShot = EffectLinkEffects(eMultiShot, EffectModifyAttacks(1));
           ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eMultiShot, OBJECT_SELF, fDuration);

           SetLocalBoolean(OBJECT_SELF, D20_MULTISHOT_FIX, TRUE);

           DebugMessage(": Fixed MRS! D20_MULTISHOT_FIX = " +
                           IntToString(GetLocalBoolean(OBJECT_SELF, D20_MULTISHOT_FIX)) );

           // reset local variable to FALSE to signal expiration of effects
           DelayCommand(fDuration - 0.1, SetLocalBoolean(OBJECT_SELF, D20_MULTISHOT_FIX, FALSE));
       }
       else // abandon fixes - heartbeat script was called before effects expired
       {
           DebugMessage(": Already fixed MRS, D20_MULTISHOT_FIX = " +
                           IntToString(GetLocalBoolean(OBJECT_SELF, D20_MULTISHOT_FIX)) );
       }

Link to comment
Share on other sites

  • 1 year later...
Well folks I hate to say it but I have ran into a wall on this mod. I can make the game recognize new feats and buff your character but - the game seems to be limited with EffectDamageIncrease. It will take only a max of +5 bonus or a random bonus of 2 to 12 points of damage. Anything over that will not be recognized by the game engine. The sad thing is I ran into the same problem with Kotor I, but I forgot about it. So I could release the mod with dueling bonus only, but there is no way to do make your dex increase your damage over +5 points. Bummer.

 

I'm not entirely sure if this would work, but couldn't you just apply the +5 Damage repeatedly? I know weapons have the same bonus damage limit(or it might just be imposed by KotOR Tool, but I don't think that's it), but you can apply it multiple times

 

You could do something like(warning: I don't know the actual variable names, and I'm not so great at C so some of this will follow Java syntax)

 

for(dexMod=character_DexMod; dexMod>0; dexMod-1){

if(dexMod>5){

damageDealt=damageDealt+5;

dexMod=dexMod-4//One is already taken by the loop

}

else{

damageDealt=damageDealt+dexMod;

dexMod=0;

}

}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...