Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Neverwinter Nights: Enhanced Edition has been released! Visit nwn.beamdog.com to make an order. NWN:EE FAQ is available.
Soundtracks for BG:EE, SoD, BG2:EE, IWD:EE, PST:EE are now available in the Beamdog store.
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Question: Regarding mechanics of Opcode #1 Stat: Attacks Per Round Modifier

ReddbaneReddbane Member Posts: 218
So I’m planning on making a mod where each class gains base APR as they level, similar to the default fighter, albeit at different rates; and moreover make weapon proficiency APR gain universal in the standard method by editing the WSPATCK.2da and the CLSWPBON.2DA files. Now, as such, all class APR should be granted with innate effects granted per certain levels using Opcode 1 (Stat: Attacks Per Round Modifier) via the CLAB tables. Now I should like to make sure that these Opcodes do not stack in the case of Multi/Dual classes (where the two classes would each have their own APR bonuses). I am correct in assuming that the Opcode’s type value should be set to 1 (Flat Value Modifier) rather than 0 (Cumulative Modifier)? Thus the opcodes will set the base APR and not stack, that is, as far as I’ve tested, the APR Opcode with the highest APR value will override the others, rather than, as with a cumulative type, all add together?

This is my hypothetical understanding of how the Flat Value Modifier would work:
There is a Fighter / Cleric whose Fighter level makes their Base APR 2 (essentially a + 1 bonus) and whose Cleric level makes their Base APR 1.5 (essentially a +0.5 bonus). Using the Flat Value Modifier this Fighter/Cleric’s base APR with be 2, whereas if I used the Cumulative Modifier it would be 2.5.

Is my understanding correct? Moreover is there any potential problems (anyone can foresee) using this method for APR progression will cause with any of the already existing mechanics of the game? Like, for example Whirlwind Attack?

Comments

  • subtledoctorsubtledoctor Member Posts: 10,711
    edited April 5
    You could make multiple versions of your APR spell:
    - apr_1.spl
    - apr_2.spl
    - etc.

    And give each one a 206 effect protecting against itself, with timing mode 9, as its last effect.

    So you might start as a fighter, gain an APR bonus at level 5*, then at level 6 you dual-class to thief. At Thief level 5* you should get an APR bonus, but because you've already been affected by that spell, nothing happens. Later, at level 10, you get the next APR bonus, and this one actually works. From there you progress as normal.

    * (Or whatever level you will use.)

    Reddbane
  • kjeronkjeron Member Posts: 1,853
    Reddbane wrote: »
    Thus the opcodes will set the base APR and not stack, that is, as far as I’ve tested, the APR Opcode with the highest APR value will override the others, rather than, as with a cumulative type, all add together?
    The most recent will override the previous, it's not a "Best of" modifier.
    If a multiclass reaches a point where a lower APR threshold is attained by one class after a higher APR threshold was attained by the other, APR would be effectively reduced.

    Example:
    Fighter gains .5 per 3 level
    Thief gains .5 per 4 level

    At 2.25M exp:
    Fighter is level 17, last applied SET APR = 3.5 at level 15.
    Thief is level 16, just applied SET APR = 3 at level 16.
    Result: 3 APR

    I would use what @subtledoctor suggested.

    You'll also have to update all non-party creatures in the game that normally get APR from proficiency so they get their proper APR.

    Reddbane
  • ReddbaneReddbane Member Posts: 218
    @kjeron
    kjeron wrote: »
    You'll also have to update all non-party creatures in the game that normally get APR from proficiency so they get their proper APR.

    Could you explain more about this? To be clear I'm still planning on having APR bonuses granted by weapon Proficiency (ranging from 0.5 to 2, as it in the base game), but also adding smaller bonuses added incrementally according to Class. Does this have anything to do with the various monster/creature classes?

    @subtledoctor
    In regards to the above question, did you encounter this problem (non-party creatures losing APR) with your "APR on Spec" mod?

  • kjeronkjeron Member Posts: 1,853
    Reddbane wrote: »
    Could you explain more about this? To be clear I'm still planning on having APR bonuses granted by weapon Proficiency (ranging from 0.5 to 2, as it in the base game), but also adding smaller bonuses added incrementally according to Class. Does this have anything to do with the various monster/creature classes?
    There are still a lot of creatures that use PC classes - they won't receive these bonuses automatically, as they do not level up.

  • subtledoctorsubtledoctor Member Posts: 10,711
    edited April 5
    I assumed the level-up APR bonuses would increment APR, not set it. But what I wrote probably still holds true.
    Reddbane wrote: »
    subtledoctor
    In regards to the above question, did you encounter this problem (non-party creatures losing APR) with your "APR on Spec" mod?

    I don't think I considered it. There was a time when I would have read something like "You'll also have to update all non-party creatures in the game" and found it extremely daunting. Whereas now my reaction is "sure, easy-peasy." I think I wrote the APR on Spec mod in the former era. it was designed solely to replicate the "Taimon's WSPATCK for all" component of TB#Tweaks, which (as far as I could tell) did not address non-joinable NPCs.

    You can grab the code here to identify non-joinable NPCs, i.e. all the .CRE files that will not get the benefit of your level-based APR bonuses. Then you:
    ACTION_PHP_EACH NON_JOINABLE_NPC_ARRAY AS cre => dv BEGIN
      COPY_EXISTING ~%cre%~ ~override~
        PATCH_IF (SOURCE_SIZE > 0x2d3) BEGIN
          READ_BYTE 0x273 npc_class
          READ_BYTE 0x234 npc_level
          PATCH_IF (npc_class = 2) BEGIN
            PATCH_IF (npc_level > 4) BEGIN
              LPF ADD_CRE_EFFECT INT_VAR opcode = 1 target = 1 parameter1 = ...etc.
    

  • ReddbaneReddbane Member Posts: 218
    @subtledoctor
    When ever I played with APR on Spec (which has been my last several playthroughs) I didn't notice any major changes to the enemy difficulty.

  • subtledoctorsubtledoctor Member Posts: 10,711
    The difference would be minor. Only enemies with the fighter class and high levels would be (are) affected, and their APR is only slightly reduced.

    But you have inspired me to imrpove it! :smiley:

Sign In or Register to comment.