Author Topic: EffectModifyAttacks and BAB  (Read 495 times)

Legacy_Huxx

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
EffectModifyAttacks and BAB
« on: June 09, 2011, 06:52:09 am »


               Hello everyone,

This is driving me mad. As I read in the Lexicon, EffectModifyAttacks  should give extra attacks at full BAB. However, I'm trying to give 2 extra attacks to a ghoul (so he has the 3 attacks he should, based on the SRD) and it's not working as expected. The effect is the same as SetBaseAttackBonus; the engine is giving the ghoul 2 extra attacks with a -5 penalty to the first one, and a -10 to the second one, which is not what I wanted.

I've been trying to fix this for 4 hours now, and hell, it's almost 8AM already. We're using Jasperre's AI in our module, and I've read through all the scripts just making sure the BAB isn't changed anywhere or something. I guess it has nothing to do, but I don't know where else to look at this point.

Any ideas? Is EffectModifyAttacks working as stated in the Lexicon?

Thank you <3>

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
EffectModifyAttacks and BAB
« Reply #1 on: June 09, 2011, 07:52:08 am »


               From x2_inc_switches.

//------------------------------------------------------------------------------
// * Set this variable to 1 - 6 to override the number of attacks a creature has based on its BAB
//------------------------------------------------------------------------------
const string CREATURE_VAR_NUMBER_OF_ATTACKS = "X2_L_NUMBER_OF_ATTACKS";


I do not know if that will solve you problem.  But it is worth a try.
               
               

               


                     Modifié par Lightfoot8, 09 juin 2011 - 06:53 .
                     
                  


            

Legacy_Huxx

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
EffectModifyAttacks and BAB
« Reply #2 on: June 09, 2011, 03:03:52 pm »


               Thank you, Lightfoot, but that has the exact same effect as SetBaseAttackBonus(x), being x the number of attacks. The creature gets extra attacks, but those have the "proper" attack penalty (-5, -10, -15...).
               
               

               


                     Modifié par Huxx, 09 juin 2011 - 02:04 .
                     
                  


            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
EffectModifyAttacks and BAB
« Reply #3 on: June 09, 2011, 03:57:22 pm »


               Creature multiple attacks is actually one of the things Bioware implimented completely by the book.  The AB is supposed to drop off for each extra attack, the same as it does for PCs.  Admittedly, that isn't helpful to you in this case.

 What you could try though, is dropping their base movement down a notch and hasting them, if the extra 4 AC isn't unbalancing for the CR they're supposed to end up at.  That would give you two attacks at full amount, and you could alter the number of attacks to give them a third at -5.
 It's a bit of a hacky way around it, but it's the best idea I have for it at the moment.
               
               

               
            

Legacy_Huxx

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
EffectModifyAttacks and BAB
« Reply #4 on: June 09, 2011, 04:19:08 pm »


               Well, this is weird. Adding the haste effect on the ghoul's properties didn't give him a full BAB attack, but just another attack with a -5; I tried giving the effect through a script with the same results. As this is quite strange (Haste shouldn't work like that), I tried creating a new module, just in case this was caused by any other script... but I'm still getting the same problem '<img'> The attack log shows an ugly +2, -3, -7 (??) for the default ghoul with haste and EffectModifyAttacks(1).

Thanks Failed.Bard for your idea, anyway. That should have worked.
               
               

               


                     Modifié par Huxx, 09 juin 2011 - 03:30 .
                     
                  


            

Legacy_Huxx

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
EffectModifyAttacks and BAB
« Reply #5 on: June 09, 2011, 04:23:23 pm »


               Did more testing. Even just applying haste (both through properties and script) I'm getting a -5 to the second attack ':blink:'
               
               

               


                     Modifié par Huxx, 09 juin 2011 - 03:30 .
                     
                  


            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
EffectModifyAttacks and BAB
« Reply #6 on: June 09, 2011, 05:24:53 pm »


               Which effect did you add first, the haste, or the EffectModifyAttacks(1) ?  It may be that the haste is being overridden if that was first.  I'm really not sure why the haste portion of it didn't work at least, it's very strange.
               
               

               
            

Legacy_Huxx

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
EffectModifyAttacks and BAB
« Reply #7 on: June 09, 2011, 05:31:18 pm »


               I've check adding the EffectModifyAttacks effect before and after EffectHaste, with the same result. Also tried with EffectHaste alone, and with the Haste property in the ghoul skin. I did all this in an empty module. I'm thinking it might have something to do with the creature having no weapons equipped. I'll check what happens if I give him a dagger.
               
               

               
            

Legacy_Huxx

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
EffectModifyAttacks and BAB
« Reply #8 on: June 09, 2011, 05:38:18 pm »


               Well, it must be somehow related. With a dagger equipped and EffectModifyAttacks(2), the log shows a (strange) +2, +0, -5 sequence. And of course, the ghoul doesn't use his natural weapons this way.
               
               

               


                     Modifié par Huxx, 09 juin 2011 - 04:39 .
                     
                  


            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
EffectModifyAttacks and BAB
« Reply #9 on: June 09, 2011, 06:09:39 pm »


               

Huxx wrote...

Hello everyone,

This is driving me mad. As I read in the Lexicon, EffectModifyAttacks  should give extra attacks at full BAB. However, I'm trying to give 2 extra attacks to a ghoul (so he has the 3 attacks he should, based on the SRD) and it's not working as expected. The effect is the same as SetBaseAttackBonus; the engine is giving the ghoul 2 extra attacks with a -5 penalty to the first one, and a -10 to the second one, which is not what I wanted.

I've been trying to fix this for 4 hours now, and hell, it's almost 8AM already. We're using Jasperre's AI in our module, and I've read through all the scripts just making sure the BAB isn't changed anywhere or something. I guess it has nothing to do, but I don't know where else to look at this point.

Any ideas? Is EffectModifyAttacks working as stated in the Lexicon?

Thank you <>


Short answer, no, EffectModifyAttacks is not working as stated in the Lexion. It's one of those functions whose operation changed multiple times over the last few updates to NWN. In patch 1.69, it how gives extra attacks at the tail end of the attack progression instead of at full BAB, though haste still gives a full BAB attack.

I would check to see if you're using the version of the lexicon updated to 1.69, though I don't know if they updated that particular function or not.

Funky
               
               

               


                     Modifié par FunkySwerve, 09 juin 2011 - 05:10 .
                     
                  


            

Legacy_Huxx

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
EffectModifyAttacks and BAB
« Reply #10 on: June 09, 2011, 07:02:02 pm »


               Nah, I've checked, and the Lexicon still states the old behavior. Well, thanks for your time, guys '<img'>
               
               

               
            

Legacy_eeriegeek

  • Jr. Member
  • **
  • Posts: 75
  • Karma: +0/-0
EffectModifyAttacks and BAB
« Reply #11 on: June 10, 2011, 05:16:34 am »


               As far as the haste effect goes, check your logs very carefully. It seems that sometimes the extra full AB haste attack is logged at the tail end of the attack sequence right before the next round begins.