Dimitian

Extra attacks with heavy weapons

Recommended Posts

I read in a very old post that the extra attack feature with heavy weapons could theoritically be restored by means of editing the k_ai_master.ncs and k_def_combend01.nss files, but no specifics were listed. What would need to be changed, and with what programs?

Share this post


Link to post
Share on other sites

I've been thinking about it, and I don't think there's a way to do it. Yes, it's possible to attach extra damage to the combat round script. However, there are two hurdles preventing the desired effect here.

 

First, the combat round script fires at the end of every combat round. You don't want it to fire all the time, only when you're using the weapon, and not when you're using a Force power or item or such. And I don't believe there are any script functions that can check that. So that script would fire, and the extra damage dealt, on every round - even when you're not firing the weapon.

 

Second, let's assume you were able to resolve the above, with the script only firing when it's supposed to fire. Then there's the matter of writing the script. There is no script function to simply make an extra attack, so you'd have to write  a new one based on the formula the game uses, which is, I believe:

 

Attack Roll (d20 + base attack bonus + Dexterity modifier + weapon modifiers) vs Armor Class (10 + armor bonus + dexterity modifier)

 

And the problem is there isn't a way to check every one of those variables with script functions.

Share this post


Link to post
Share on other sites

@JC: I'm not saying to go out and do it, but I'll address your post in the order you wrote it:

 

You can get an item in a slot and then get the baseitem.2da row using the GetBaseItemType function, so you are able to check for only certain weapons.

 

You are correct that we can't slip in an extra attack, as the only way to do that is to add it to the action queue. As to your math on the "fake" attack, we can do the d20, Dexterity Modifier, and the weapon modifiers (assuming you're referring to the weapon focus and weapon specialization feats). We can also get the Armor Class, though we'd need to run tests to see if it includes all three pieces of info when using the GetAC function.

 

The only part we couldn't get would be the base attack bonus, but we could "softcode" that into the script based on the vanilla .2da values and a class check.

Share this post


Link to post
Share on other sites

You can get an item in a slot and then get the baseitem.2da row using the GetBaseItemType function, so you are able to check for only certain weapons.

That's not the problem. The problem is checking whether you are using that weapon during the combat round as opposed to casting a Force power or using another item such as a medpac. Yes, you can check the base item type of an equipped weapon, but that only tells you that it's equipped. I don't know of any script function to check whether it's actually being fired at the moment.

 

As to your math on the "fake" attack, we can do the d20, Dexterity Modifier, and the weapon modifiers (assuming you're referring to the weapon focus and weapon specialization feats). We can also get the Armor Class, though we'd need to run tests to see if it includes all three pieces of info when using the GetAC function.

 

The Dexterity modifier I'm not sure about. That might only be checking the character's actual dexterity modifier and not the one adjusted due to armor. It seems more logical that it would check the adjusted modifier, but you never know. As for the weapon modifiers, no, I meant modifiers on the weapon item itself from either the item properties or upgrade items on it. There's no way to check for that.

Share this post


Link to post
Share on other sites

Yeah, the weapon modifiers would be an issue in that case, but as to the current action, we can use the GetCurrentAction function and this list from nwscript.nss:

int ACTION_MOVETOPOINT        = 0;
int ACTION_PICKUPITEM         = 1;
int ACTION_DROPITEM           = 2;
int ACTION_ATTACKOBJECT       = 3;
int ACTION_CASTSPELL          = 4;
int ACTION_OPENDOOR           = 5;
int ACTION_CLOSEDOOR          = 6;
int ACTION_DIALOGOBJECT       = 7;
int ACTION_DISABLETRAP        = 8;
int ACTION_RECOVERTRAP        = 9;
int ACTION_FLAGTRAP           = 10;
int ACTION_EXAMINETRAP        = 11;
int ACTION_SETTRAP            = 12;
int ACTION_OPENLOCK           = 13;
int ACTION_LOCK               = 14;
int ACTION_USEOBJECT          = 15;
int ACTION_ANIMALEMPATHY      = 16;
int ACTION_REST               = 17;
int ACTION_TAUNT              = 18;
int ACTION_ITEMCASTSPELL      = 19;
int ACTION_COUNTERSPELL       = 31;
int ACTION_HEAL               = 33;
int ACTION_PICKPOCKET         = 34;
int ACTION_FOLLOW             = 35;
int ACTION_WAIT               = 36;
int ACTION_SIT                = 37;
int ACTION_FOLLOWLEADER       = 38;

Share this post


Link to post
Share on other sites

Oh, I forgot about those. Assuming those are still valid at the end of the combat round, that could work.

 

And I suppose even if one can't account for all the variables, it's at least better than nothing. Assuming Dexterity and everything else works out, then it would essentially amount to an extra attack without accounting for any of the weapon's modifications. Which is possibly better for balancing anyway.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.