Howdy, Stranger!

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

Categories

We need your feedback on the new forum text editor switch.
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!

[Tool] QDMULTI: A Library for Multiclass Kits

1235

Comments

  • AquadrizztAquadrizzt Member Posts: 869
    @Raduziel, what version do you have listed in your setup? I am quite positive that the version I uploaded works, and I see no references to "mc_dir' in my live code, which was the variable I used to refer to the file directory in the last version.

    The currently updated version is 0.3, and should not require any other files. However, if it seems to be missing the required spells, then consider deleting qd_multi_spls and letting it reinstall. Note that this will reset any multiclass kits currently implemented, but given that it seems to be broken for you, I doubt that's important.

    Raduziel
  • RaduzielRaduziel Member Posts: 3,179
    Currently I have v0.2 - but that's the one GitHub gave me when I downloaded it some days ago.

  • AquadrizztAquadrizzt Member Posts: 869
    @Raduziel, wow that's quite strange. I've published a release on the github page for v0.3. It should work. Please let me know if it doesn't.

    Raduziel
  • RaduzielRaduziel Member Posts: 3,179

    @Raduziel, wow that's quite strange. I've published a release on the github page for v0.3. It should work. Please let me know if it doesn't.

    Don't worry about that. I got it covered by respectfully stealing the required folders and files from another mod (M&G IIRC).

    I can test the file you uploaded if you want to, but only by Monday - I'm on the road at the moment.

    Thanks for caring :)

  • RaduzielRaduziel Member Posts: 3,179
    @Aquadrizzt

    I was trying to update this tool for Deities of Faerûn.

    This is what happens when I try to install:



    The related .tpa and the version of this tool that I'm using (downloaded today from Github) are in the zip file attached.

    The .tpa file related to this tool was located in DeitiesofFaerun\Lib.

    Version 0.2 with the subfolder works fine, I'm rolling back to it for now.

    Thanks!

  • AquadrizztAquadrizzt Member Posts: 869
    edited March 7
    Hmmm curious... Might have to recode the part that generates the bass effects from scratch x.x.

    Thank you for bringing this to my attention, not entirely sure why its happening at all though... it worked fine on my local installs...

    EDIT: It might be some kind of interference between different versions... idk.

    Raduziel
  • subtledoctorsubtledoctor Member Posts: 9,347
    edited March 7
    Yeah that thought occurred to me... if one mod uses v0.3 and then a later mod tries to use v0.2, maybe that's no bueno.

    Each mod carries its own version so it should be portable and independent, but one of two things might happen:

    1) The abilities or .EFFs get doubled up and the installer freaks out somehow

    2) The later install finds and defers to the earlier one, but if something like filenames have changed then it will crap out when trying to patch them.

    I haven't looked into it in any more detail. But you could try something like, install a mod with 0.3 (latest MOoF?) and then install one with 0.2 (MnG).

  • RaduzielRaduziel Member Posts: 3,179
    Calling the deities: @Aquadrizzt @subtledoctor @kjeron @argent77

    Maybe one of you guys can help me...

    I'm making some multiclass kits ATM and I'm using one randomly chosen to serve as a control group.

    This is the single-class kit that is installed together with the multi-class kit:

    https://github.com/Raduziel/Deities-Of-Faerun/blob/master/DeitiesOfFaerun/Components/Auril-Kit.tpa

    As you can see here (lines 240 to 243):

    https://github.com/Raduziel/Deities-Of-Faerun/blob/master/DeitiesOfFaerun/DeitiesOfFaerun.tp2

    This is the Cleric-Mage multiclass kit:

    https://github.com/Raduziel/Deities-Of-Faerun/blob/master/DeitiesOfFaerun/Components/Auril-KitCM.tpa

    This is the kit's CLAB:

    https://github.com/Raduziel/Deities-Of-Faerun/blob/master/DeitiesOfFaerun/Tables/RAAuriCM.2da

    Ok, what are the problems:

    1) On character creation, the kit is considered a Cleric/Abjurer what means that no Alteration spells are available at character creation.

    1.1) The character is receiving the extra spell slot from specialists (I know this is a known issue with IE and I know how to fix it).

    1.2) During the game I can use and copy Alteration scrolls to the spellbook without problems, but the "Abjurer" still appearing on the Character Sheet.

    2) A permanent effect that should be applied on Lv 1 is not being applied.

    2.2) Despite that, all the other spells are being given normally and works perfectly.

    3) [ToB] on level 25, the kit is receiving the Holy Symbol of Talos instead of the one the mod provides. The single-class kit receives the proper HS correctly.

    Putting 2 and 3 together I imagine that it is a problem with the AP_ kind of spells (as both the lv 1 effects and the spell that gives the HS are AP_ and all the others that are working properly are GA_).

    Any ideas?

    Thanks!

  • subtledoctorsubtledoctor Member Posts: 9,347
    @Raduziel what is the kit's IDS number on the far right side of kitlist.2da?

    Gonna go out on a limb and guess it's about the 13th mod kit installed, and is 0x00004040.

  • RaduzielRaduziel Member Posts: 3,179
    edited March 15
    @subtledoctor It is the 24th kit installed and the value in kitids is 0x00004040 indeed.

  • subtledoctorsubtledoctor Member Posts: 9,347
    So, note the IDS value of the Abjurer: 0x00000040. Whichever mod kit is installed in sequence to be assigned to 00004040 will have bit-equality with 00000040 and the engine will read it as "Abjurer = true."

    This is an unfortunate quirk of the engine and there's no getting around it. Best players can do is hope that whatever mod kit they install there is not a wizard kit. Notice, the same issue will happen 40 kits later when 00004080 is bit-equal to 00000080 (what is that one, lllusionist? Transmuter? I forget.)

    Modders could, theoretically, include code for a dummy kit in a .tpa file, and before each and every kit is installed, check whether the bottom-most value in the 9th column of kitlist.2da is 00004039, and if so, INCLUDE the dummy kit installer, and then move on, making the next real kit 00004041.

    I was about to say that's a lot of work do deal with an issue that rarely crops up... but now that I wrote it down it seems like something I should actually do. But to really address the isssue, every mod that adds any kits would have to implement it. And unfortunately that's not something I expect to happen.

  • RaduzielRaduziel Member Posts: 3,179
    edited March 15
    Well, that explains #1. If all kits from DoF are installed I don't think that the players will bump into that.

    Any ideas about issues number #2 and #3?

    Thanks, @subtledoctor

  • subtledoctorsubtledoctor Member Posts: 9,347
    I'm guessing the .SPLs you are AP_'ing have 8 letters, whereas SPLs applied via qd_multi will only work with 7 letters or less.

  • RaduzielRaduziel Member Posts: 3,179
  • RaduzielRaduziel Member Posts: 3,179
    @subtledoctor Reporting back to say that I was able to fix everything with your insights. Thanks again!

  • RaduzielRaduziel Member Posts: 3,179
    One question:

    I have a Cleric kit that gains d10 as HD.

    The problem is: the F/C version of this kit is gaining d9 (as any common F/C receive).

    Is there any way to make this F/C Kit in particular receive d10?

    Thanks.

  • AquadrizztAquadrizzt Member Posts: 869
    Uhhh, best I can offer is giving bonus HP via the CLAB?

    I'm pretty sure they won't utilize the right HP tables. :/

  • RaduzielRaduziel Member Posts: 3,179

    Uhhh, best I can offer is giving bonus HP via the CLAB?

    I'm pretty sure they won't utilize the right HP tables. :/

    I'm trying this, but the CLAB apparently is not applying the HP bonus at level 1 and IDK why.

    So at level 7 those F/C have 69 HP instead of 70.

  • ArunsunArunsun Member Posts: 1,571
    edited April 5
    Hello @Aquadrizzt
    I had an issue installing a multiclass kit using your library, quite similar to that of @Raduziel (if by any chance you solved your problem) . Here's the debug part that concerns it.

    Copying 1 file ...
    Creating file QD_MC_AP.eff; 272 bytes
    Copying and patching 1 file ...
    Copied [.../fl-inlined/tmp] to [override/QD_MC_AP.eff]

    Creating file QD_MC_GA.eff; 272 bytes
    Copying and patching 1 file ...
    Copied [.../fl-inlined/tmp] to [override/QD_MC_GA.eff]
    DELETE_BYTES out of bounds - file is long 114, point given is 114, bytes were 200


    And the Weidu bit I used:

    ADD_KIT ~zkwwn~


    ~zkwwn 1 1 1 1 1 1 1 1~


    ~zkwwn 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0~


    ~zkwwn 9 0 9 0 0 0~


    ~zkwwn 0 0 0 0 0 0~


    ~zkwwn 0 0 15 15 0 15~


    ~zkwwn 0 0 0 0 0 0~


    ~zkwwn 1 1 1 1 1 1 1 1 1~


    ~zkwwn 0 0 0 0 0 0~


    ~WitcherKits/2da/zkwwn.2da~


    ~K_F_H~



    ~0x00004000 2~


    ~ZKwwn~


    ~* * * BAG29 RING06 RING40 * BOOT01 AMUL21 BRAC15 BELT10 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 SLNG05 DAGG05,20 STAF20~


    SAY ~Dearg Ruadhri~
    SAY ~Dearg Ruadhri~
    SAY ~Filler Description~


    LAF fl#add_kit_ee
    INT_VAR
    biography = 29492
    briefdesc = RESOLVE_STR_REF (~Filler Description~)
    fallen = 0
    fallen_notice = RESOLVE_STR_REF (~Caranthir's path: from golden child to common criminal~)
    STR_VAR
    kit_name = ~zkwwn~
    clswpbon = ~1 0 2~
    numwslot = ~4~
    clascolr = ~35 67 67 25 80~
    hpclass = ~HPFM~
    clsrcreq = ~1 0 0 0 0 0 0~
    clasthac = ~0~

    END

    LAF qd_multiclass
    STR_VAR
    kit_name = ~zkwwn~ //the internal name for your kit (e.g. QDMAGUS)
    kit_clab = ~zkwwn~ //the internal name of your kit's clab file, without the .2da extension
    base_class = ~M~ // this can take 6 values: [F]ighter, [P]riest, [D]ruid, [R]anger, [M]age, [T]hief
    END



    EDIT: I ended up using an older version of your library (the one used by @subtledoctor in MnG) and it works fine)


    Still have one issue: on my multiclass kit I apparently can't use a custom HLA table. It uses the standard one instead. But I guess that's beyond what modding can easily do so I'm gonna tweak the class instead :smile: ...


    Concerning that last issue by the way, I could make a module for your library to override the multiclass HLA table make them void, and use a dialog to provide the HLAs, with options appearing based on kit. This could allow using custom HLAs.

    Post edited by Arunsun on
  • DurendalDurendal Member Posts: 31
    As someone who's mucked around with trying to add kits, but never quite succeeded, how is this actually used? If, say, all I wanted was a multi-class using existing kits that has it's own title on the character sheet, how would that be accomplished?

  • subtledoctorsubtledoctor Member Posts: 9,347
    Arunsun said:

    Still have one issue: on my multiclass kit I apparently can't use a custom HLA table. It uses the standard one instead. But I guess that's beyond what modding can easily do so I'm gonna tweak the class instead :smile: ...

    Concerning that last issue by the way, I could make a module for your library to override the multiclass HLA table make them void, and use a dialog to provide the HLAs, with options appearing based on kit. This could allow using custom HLAs.

    Sorry, this is a bit old, but you can definitely have custom HLA tables with multiclass kits. But the kit's class must match the character's class for it to work. So for example, a fighter/thief with the MnG Tomb Runner kit (a F/T kit) can have a custom HLA table, but a fighter with the Tomb Runner kit or a fighter/thief with the Berserker kit cannot.

  • Artemius_IArtemius_I Member Posts: 2,598
    edited May 24
    I've recently been working on multiclass kits for joinable NPCs and there is an bug where kit abilities duplicate each time a party member is kicked out and recruited again due to the way the QD_MCx##.spl files add abilities. In case anyone else runs into this problem, I made a very small modification to qd_multiclass.tpa which appears to resolve it without any issues that I've seen so far.

    Never mind, not quite. There is actually an issue I need to sort out. This fixes the duplication but it only reapplies one of each individual ability when a party member is recruited. Any ideas?

    EDIT: Thinking of applying a Protection from Spell [206] opcode to the very end of the QD_MCx##.spl files to fix this. However, I need a way to make sure the effect is always applied last.

    Post edited by Artemius_I on
  • subtledoctorsubtledoctor Member Posts: 9,347
    edited May 24

    This fixes the duplication but it only reapplies one of each individual ability when a party member is recruited. Any ideas?

    What is the actual change you made?

    EDIT: Thinking of applying a Protection from Spell [206] opcode to the very end of the QD_MCx##.spl files to fix this. However, I need a way to make sure the effect is always applied last.

    That shouldn't be difficult...

  • Artemius_IArtemius_I Member Posts: 2,598
    @subtledoctor

    Original change: Apply opcodes 321 and 172 at the start of each spell file to remove the pre-existing spells before adding new ones. My brain must have died because I didn't immediately realize the obvious 'only one of each' effect this would cause.

    This was the part which got changed:
    PATCH_IF (~%string_length%~ <= 7) BEGIN 
    							//passive bonuses
    							PATCH_IF (~%abil_type%~ STRING_EQUAL ~AP_~) BEGIN 
    								//PATCH_PRINT ~%ability% > %abil_new% , LVL %col%~
    								INNER_ACTION BEGIN 
    									COPY ~%mc_dir%/QD_MC_AP.eff~ ~override/%abil_new%#.eff~
    										WRITE_EVALUATED_ASCII 0x30 ~%abil_new%~
    										SET col_length = STRING_LENGTH ~%col%~
    									ACTION_IF (%col_length% = 1) BEGIN 
    										COPY_EXISTING ~override/QD_MC%base_class%0%col%.spl~ ~override~ 
    											LPF ADD_SPELL_EFFECT INT_VAR opcode = 321 target = 1 timing = 9 resist_dispel = 0 power = 0 STR_VAR resource = EVAL ~%abil_new%~ END  
    											LPF ADD_SPELL_EFFECT INT_VAR opcode = 177 target = 1 timing = 9 resist_dispel = 0 power = 0 parameter1 = %kit_code% parameter2 = 9 STR_VAR resource = EVAL ~%abil_new%#~ END  
    									END 
    									ACTION_IF (%col_length% = 2) BEGIN
    										COPY_EXISTING ~override/QD_MC%base_class%%col%.spl~ ~override~ 
    											LPF ADD_SPELL_EFFECT INT_VAR opcode = 321 target = 1 timing = 9 resist_dispel = 0 power = 0 STR_VAR resource = EVAL ~%abil_new%~ END  
    											LPF ADD_SPELL_EFFECT INT_VAR opcode = 177 target = 1 timing = 9 resist_dispel = 0 power = 0 parameter1 = %kit_code% parameter2 = 9 STR_VAR resource = EVAL ~%abil_new%#~ END  
    									END 
    								END 
    							END
    							
    							//granted abilities
    							PATCH_IF (~%abil_type%~ STRING_EQUAL ~GA_~) BEGIN 
    								//PATCH_PRINT ~%ability% > %abil_new% , LVL %col%~
    								INNER_ACTION BEGIN 
    									COPY ~%mc_dir%/QD_MC_GA.eff~ ~override/%abil_new%#.eff~
    										WRITE_EVALUATED_ASCII 0x30 ~%abil_new%~
    										SET col_length = STRING_LENGTH ~%col%~
    									ACTION_IF (%col_length% = 1) BEGIN 
    										COPY_EXISTING ~override/QD_MC%base_class%0%col%.spl~ ~override~ 
    											LPF ADD_SPELL_EFFECT INT_VAR opcode = 172 target = 1 timing = 9 resist_dispel = 0 power = 0 STR_VAR resource = EVAL ~%abil_new%~ END  
    											LPF ADD_SPELL_EFFECT INT_VAR opcode = 177 target = 1 timing = 9 resist_dispel = 0 power = 0 parameter1 = %kit_code% parameter2 = 9 STR_VAR resource = EVAL ~%abil_new%#~ END  
    									END 
    									ACTION_IF (%col_length% = 2) BEGIN
    										COPY_EXISTING ~override/QD_MC%base_class%%col%.spl~ ~override~ 
    											LPF ADD_SPELL_EFFECT INT_VAR opcode = 172 target = 1 timing = 9 resist_dispel = 0 power = 0 STR_VAR resource = EVAL ~%abil_new%~ END  
    											LPF ADD_SPELL_EFFECT INT_VAR opcode = 177 target = 1 timing = 9 resist_dispel = 0 power = 0 parameter1 = %kit_code% parameter2 = 9 STR_VAR resource = EVAL ~%abil_new%#~ END  
    									END 
    								END 
    							END

  • subtledoctorsubtledoctor Member Posts: 9,347
    Any reason why the function can't add effects with INSERT_POINT = 0 ? Then the 206 protection can be added at the end, and every time the function is run later on, the 177 effects will be inserted prior to it.

    So add "INSERT_POINT = 0" into the ADD_SPELL_EFFECT in four places, instead of your 172 effects; and then add this at the bottom of the .tpa file:
    ACTION_FOR_EACH class IN ~F~ ~T~ ~D~ ~M~ ~P~ ~R~ BEGIN
    ACTION_FOR (level = 0 ; level < 50 ; ++level) BEGIN
    ACTION_IF FILE_EXISTS_IN_GAME ~QD_MC%class%%level%.SPL~ BEGIN
    COPY_EXISTING ~QD_MC%class%%level%.SPL~ ~override~
    LPF ADD_SPELL_EFFECT INT_VAR opcode = 206 target = 1 parameter1 = (0 - 1) timing = 9 STR_VAR resource = EVAL ~%SOURCE_RES%~ END
    BUT_ONLY
    END
    END
    END
    Note: as yet untested. (Actually the "FJ_SPL_ITM_REINDEX" function failed in my modded game, so I'm still using v0.2 of this library...)

  • Artemius_IArtemius_I Member Posts: 2,598
    @subtledoctor

    That will work, I think... there's another problem though. Opcode 206 being added directly to the QD_MC spell files won't really solve the issue since the protection gets removed as a kit ability during the kicking/recruiting process. It'll have to use opcode 146 to cast another spell which then applies the protection via 206, which won't be removed. I'm going to see how that turns out.

  • subtledoctorsubtledoctor Member Posts: 9,347
    edited May 24
    I'm pretty sure if you apply 206 with timing mode 9, it remains in effect. I use it like that a bunch. (Though there's always a chance it hasn't been working right this whole time and I just never noticed... :lol: )

  • Artemius_IArtemius_I Member Posts: 2,598
    edited May 25
    @subtledoctor

    Timing mode 9 has never worked like that for me. It keeps effects from being removed via death and even CTRL-R, but it still gets affected by things like opcode 321 and when NPCs get kicked out. I think I've gotten it to work now though via the method above, using opcode 146 to cast a separate spell that isn't removed.

    Post edited by Artemius_I on
  • RaduzielRaduziel Member Posts: 3,179
    edited July 11
    Hello :)

    A player is getting a problem that I can't reproduce when installing DoF. I was able to pinpoint it to the multiclass component:
    [DeitiesOfFaerun\Lib\Multiclass/QD_MC_AP.eff] loaded, 272 bytes
    Copied [DeitiesOfFaerun\Lib\Multiclass/QD_MC_AP.eff] to [override/RASHARF#.eff]
    Copying and patching 1 file ...
    [override/QD_MCP01.spl] loaded, 154 bytes
    ERROR: cannot convert kit_code or %kit_code% to an integer
    ERROR: [override/QD_MCP01.spl] -> [override] Patching Failed (COPY) (Not_found)
    Stopping installation because of error.
    Stopping installation because of error.
    ERROR: [RASharCM.2da] -> [override] Patching Failed (COPY) (Not_found)
    Stopping installation because of error.
    Stopping installation because of error.
    Stopping installation because of error.

    ERROR Installing [Install kit: Nightcloak of Shar], rolling back to previous state
    Unable to Unlink [DeitiesOfFaerun/Backup/5/OTHER.5]: Unix.Unix_error(1, "unlink", "DeitiesOfFaerun/Backup/5/OTHER.5")
    [DeitiesOfFaerun/Backup/5/UNSETSTR.5] SET_STRING uninstall info not found
    Similar errors are happening in every MC component.

    Do you guys have any insight? Never had this problem with DoF and it started happening with 2.5 for the player. But I have 2.5 and, as I said, never had this problem and no other player reported a similar issue.

    The player's SETUP.DEBUG and Weidu.log are attached.

    Thanks!

    Post edited by Raduziel on
Sign In or Register to comment.