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!

[Tool] QDMULTI: A Library for Multiclass Kits

2456

Comments

  • mf2112mf2112 Member, Moderator Posts: 1,919
  • AquadrizztAquadrizzt Member Posts: 878
    mf2112 said:

    Dragon Disciple Druid

    Unfortunately this isn't an option as Sorcerers cannot multiclass.

    mf2112
  • mf2112mf2112 Member, Moderator Posts: 1,919

    mf2112 said:

    Dragon Disciple Druid

    Unfortunately this isn't an option as Sorcerers cannot multiclass.
    Doh! Forgot about that, yep.

  • subtledoctorsubtledoctor Member Posts: 9,698
    edited June 2016
    Okay, so I took a closer look at the function and decided to see how easy this could really be. I decided to see how long it would take me to adapt my Ranger/Mage to use this system.

    Umm, in less than 25 minutes it is working :astonished: Honestly the hardest part was renaming the kit ability spells to be 7 letters long.

    If anyone wants to see this in action, install the Might & Guile multiclass kits component from v2.6.2:
    https://github.com/subtledoctor/Might_and_Guile/releases/tag/2.6.2

    To see what this involves, take a look at:
    /lib/
    /lib/qd_mc/
    /components/500_multiclass_kits.tpa, at lines 721 and 727, and the block from 763 to 772

    As you can see, what you actually put in your mod is extremely small and easy to implement.

    Now, @Aquadrizzt here is a bug report... but not really for you! My Ranger/Mage could allocate 40 skill points at level 1 instead of 30, as specified in my ADD_KIT code. I think the fl#add_kit_ee function probably doesn't take multiclass kits into account. It needs more testing but this is my suspicion. If it is correct, we should mention it to @Wisp.

    Grammarsalad
  • AquadrizztAquadrizzt Member Posts: 878
    edited June 2016
    @subtledoctor , it is curious that you are reporting it not granting the appropriate amount of skill points, because when I changed THIEFSKL.2da for my kensai thief using NI, it worked just fine. However, when I used the thiefskl line in fl#add_kit_ee, it gave me an installation warning and didn't install it. Weird.

    Okay, having looked through fl#add_kit_ee, it does something a bit annoying where if you try to give a class other than thief a line on a thief skill table, it gives you an installation exception and instead goes back to the default value. Commenting out lines 135 through 139 in fl#add_kit_ee will stop it from forcing the default values onto your kit, but I'm sure @Wisp had a good reason to include that so caveat emptor.

  • kjeronkjeron Member Posts: 1,389
    Here were my findings back when I looked into this:

    Limitations of the EE Engine(General): BACKSTAB.2DA, CRIPPSTR.2DA, AND SNEAKATT.2DA
    - The game only respects new entries to these files for Single-class Theif kits.
    - Non-thieves and multiclasses must resort to the relevant opcodes(which do not show up on the record screen).

    Limitations of the EE Engine(Multiclass Specific): CLABxxxx.2DA, HPCLASS.2DA
    - Multiclasses (Kitted and un-Kitted) use the files of each of its respective base classes instead of their own entries.

    Limitations of the EE Engine(Vanilla Kits): Trial and Error
    - Repurposing the vanilla kits as Multiclass kits has varied results, as some aspects of them are still hard-coded.
    - Some of them respect entries to files that new kits will not.
    - Some of them do not respect entries to files that new kits will.

    Limitations of Weidu's "ADD_KIT": KITTABLE.2DA
    - Kit_Class_Race.2da files for Multiclasses are defined, but do not exist, and ADDKIT will not create them, so this must be done before using ADDKIT.

    Limitations of Weidu's "fl#add_kit_ee" function: THIEFSKL.2da AND TRAPLIMT.2DA
    - This function only respects entries to these files for Single-class Thief kits.
    - Monks, Bards, and Multiclasses are not supported by the function.

    Limitations of Weidu's "ADD_KIT": KITLLIST.2DA
    - ADD_KIT does not properly add a Multiclass Kit's IDS value.
    - The last 2 columns(Class ID and KIT ID) get combined with no spacing:
    "130x00004027" instead of: " 13 0x00004027"

    Custom HLA tables do work for Multi-class kits.

  • AquadrizztAquadrizzt Member Posts: 878
    @kjeron , in order (all of this was done in v2.2 or v2.3 SoD):

    BACKSTAB.2da, etc. still do not work, even if you add them using NI.
    CLABxxxx.2da is disregarded, but this system reads a CLAB file provided to figure out what abilities should be granted. This is actually the main fix that my library provides.
    HPCLASS.2da seems to be working for multiclass kits in SoD v2.3.

    Vanilla Kits: A couple of the hardcoded features (e.g. Shadowdancer's Hide in Plain Sight) don't convey, and you have to be a bit creative with bonuses applied outside of a CLAB file (e.g. specialist bonus spell, mage school bonuses), but this is mostly doable.

    KITTABLE.2da defines the multiclass tables. One of the functions included in my mod is "qd_multiclass_tables", which generates all missing multiclass tables.

    fl#add_kit_ee has a couple of lines that slap you on the wrist and reset your thief table lines if the base class of your kit isn't single class thief. Waiting to hear from @Wisp if that is necessary. I don't recall having any issues with THIEFSKL for monks with my Monastic Orders mod, but I could be wrong.

    KITLIST.2da doesn't seem to be displaying that behavior for me.

    I haven't checked HLA tables yet, but I'll look into it.

  • subtledoctorsubtledoctor Member Posts: 9,698
    edited June 2016
    kjeron said:

    Here were my findings back when I looked into this:

    Thanks! I must say, while I claimed that I did it first (the M&G Bladesinger is the first shipping true multiclass kit mod AFAIK), it was discussions with Kjeron that put the possibility on my radar, and led me to create some code to add them to the 2.0 menus, and work with Aquadrizzt on code to patch .EFFs for their kit abilities into the trueclass clab table. Kjeron is really to be credited here. And as always, has lots of incredibly useful information. Some specific notes below.
    kjeron said:

    BACKSTAB.2DA, CRIPPSTR.2DA, AND SNEAKATT.2DA
    - The game only respects new entries to these files for Single-class Theif kits.
    - Non-thieves and multiclasses must resort to the relevant opcodes(which do not show up on the record screen).

    Good to know. This presumably means that these kits follow the vanilla thief progression...? Which would mean I will have to use the opcode to continually set backstab to 1x for my ranger/mage.
    kjeron said:

    CLABxxxx.2DA, HPCLASS.2DA
    - Multiclasses (Kitted and un-Kitted) use the files of each of its respective base classes instead of their own entries.

    Yes: Aquadrizzt's function here appends abilities to the trueclass clab tables with .eff files targeting the added kit. It's quite elegant, way easier than creating them by hand.
    kjeron said:

    - Kit_Class_Race.2da files for Multiclasses are defined, but do not exist, and ADDKIT will not create them, so this must be done before using ADDKIT.

    Very good to know. I missed this when testing the ranger/mage because my Spellfilcher kit creates the tables immediately prior. @Aquadrizzt this probably means that multiclass kits should just be coded with ~~ in the K_X_Y section of ADD_KIT, and then the function should use the code I discussed with you and @Abdel_Adrian to create or extend the .2da files. Easy enough... but it means you would want to add race-based variables to the function so the modder can determine which tables the kit should be added to.
    kjeron said:

    Limitations of Weidu's "fl#add_kit_ee" function: THIEFSKL.2da AND TRAPLIMT.2DA
    - This function only respects entries to these files for Single-class Thief kits.

    I think commenting out the lines Aquadrizzt mentioned above should cure this. Dangerous it may be, but then again each mod ships with its own version of this function, so if the modder knows what they are doing, they can edit it locally for this purpose.
    kjeron said:

    Limitations of Weidu's "ADD_KIT": KITLLIST.2DA
    - ADD_KIT does not properly add a Multiclass Kit's IDS value.
    - The last 2 columns(Class ID and KIT ID) get combined with no spacing:
    "130x00004027" instead of: " 13 0x00004027"

    Good to know. Should be easy enough to fix.
    kjeron said:

    Custom HLA tables do work for Multi-class kits


    Single-class kits on multiclass characters have the same issue. You only ever get the base multiclass HLA issue. (Still, it's better than the pre-EE situation where this could lead to a hard CTD!) The HLA system in general is pretty inflexible, though I've tried to open it up to easier modding.

  • kjeronkjeron Member Posts: 1,389

    Single-class kits on multiclass characters have the same issue. You only ever get the base multiclass HLA issue. (Still, it's better than the pre-EE situation where this could lead to a hard CTD!) The HLA system in general is pretty inflexible, though I've tried to open it up to easier modding.

    I think you misread me there - Multi-class kits get to use their own HLA tables, they are not forced to use the base Multiclass table.

    KITLIST.2da doesn't seem to be displaying that behavior for me.

    I am curious as to why this would be different. My Weidu is up-to-date (same results with v2.39 and beta2.3901, is v2.40 out?) , from an unmodded KITLIST.2DA:
    Tried 2.1: "130x00004027" instead of: " 13 0x00004027"
    Tried 2.2: "130x00004027" instead of: " 13 0x00004027"
    Tried 2.3: now I get "13 0x000040270x00004027" instead of: " 13 0x00004027"

  • subtledoctorsubtledoctor Member Posts: 9,698

    One of the functions included in my mod is "qd_multiclass_tables", which generates all missing multiclass tables.

    Yeah but if the function is only called after fl#add_kit_ee, then they won't exist yet when the first ADD_KIT runs.

    Unless you are saying the .tpa file generates missing tables outside the DEFINE_ACTION_FUNCTION command... then including the .tpa in a mod's ALWAYS block would ensure the tables exist before the first ADD_KIT runs.
    kjeron said:

    The HLA system in general is pretty inflexible, though I've tried to open it up to easier modding.

    I think you misread me there - Multi-class kits get to use their own HLA tables, they are not forced to use the base Multiclass table.
    Oh. Awesome.

  • ScrybeScrybe Member Posts: 13
    I did a fresh install and managed to get it working fine (no description errors any more, yay!).

    However, when I try to modify the setup.tra to include a new kitted multiclass, I get a LEXOR error in the installation. Am I doing something drastically wrong here? Totally new to this, so just trying to get a feel for what I need to do.

  • AquadrizztAquadrizzt Member Posts: 878
    @subtledoctor , there are two functions in qd_multiclass. The first (qd_multiclass) is the function that handles the multiclass abilities rows. The second (qd_multiclass_tables) can be called independently of the first and initializes any multiclass kit tables that don't exist; the second function exists separately to enable the ability to initialize tables before the kit is installed.

    @Scrybe , my first guess would be that your kit name includes a weidu regexp character. Post your code or send it to me and I'll see if I can find why its throwing an error.

    @kjeron , I'll look into this as well. This is almost certainly an issue with ADD_KIT, so a fix would require a request sent to the people maintaining WeiDu. It still seems strange that this would occur, given that SORCERER (class id = 20) has no such issues and I can't imagine they explicitly coded it to not work with multiclass kits.

  • AquadrizztAquadrizzt Member Posts: 878
    @kjeron , I tried installing a Cleric/Mage (class id = 13) kit and found no such issues. Are you sure you are entering them correctly into ADD_KIT (e.g. kit flag then class id, rather than class id then kit flag)?

  • kjeronkjeron Member Posts: 1,389
  • AquadrizztAquadrizzt Member Posts: 878
    @kjeron , mind sending me your code so I can see if I get the same result when I install it?

  • kjeronkjeron Member Posts: 1,389
    @Aquidrizzt I tried again in v2.3 and KITLIST is appending correctly now (I'm guessing I had a broken uninstall remaining).
    But, it still omits the KitIDS column on v2.2 and earlier every time. Oh well, don't look back I guess.

  • subtledoctorsubtledoctor Member Posts: 9,698
    edited June 2016
    Again using my ranger/mage for testing, using this function, on BGEE v2.2, it seems to patch kitlist perfectly:
    41    D5RANMAGE    35092    35093    34113    D5_RAMA    63    0x00004000    13    0x00004029
    File under "cannot reproduce."

  • ScrybeScrybe Member Posts: 13
    @aquadrizzt thing is, I can simply enter a new paragraph (with no text whatsoever) into the setup.tra provided, and it shows the following error:



    Even if I delete it and change the file back to exactly the same as it was before, it will still give me that error...

  • kjeronkjeron Member Posts: 1,389
    Scrybe said:

    @aquadrizzt thing is, I can simply enter a new paragraph (with no text whatsoever) into the setup.tra provided, and it shows the following error:
    Even if I delete it and change the file back to exactly the same as it was before, it will still give me that error...

    What program are you using to edit the file? I think that's a result of it not supporting the utf-8 character encoding.

    Abdel_Adrian
  • Abdel_AdrianAbdel_Adrian Member Posts: 427
    Scrybe said:

    @aquadrizzt thing is, I can simply enter a new paragraph (with no text whatsoever) into the setup.tra provided, and it shows the following error:



    Even if I delete it and change the file back to exactly the same as it was before, it will still give me that error...

    What text editor are you using? I'd recommend ConTEXT for this. Your problem seems to be that unusual character that looks like an "n"
    Using the wrong program will convert characters into an invalid format unrecognizable by WeiDU.

  • ScrybeScrybe Member Posts: 13
    I settled for simply writing the text and not calling to the .tra file. Worked fine then ^^. But thank you very much for the help :).

  • AquadrizztAquadrizzt Member Posts: 878
    @Scrybe , glad to hear you figured it out. As an aside, if you plan on making mods, you should figure out why your setup isn't .TRA file friendly.

    Grammarsalad
  • ScrybeScrybe Member Posts: 13
    @Aquadrizzt Yeah, I agree I should look into it. Not sure at the moment, but I just wanted to try out a kitted multiclass :P. Having fun with it so far!

    Thanks again for making this and for all the advice :)

  • DjinnDjinn Member Posts: 57
    Just wanted to add that it looks like a Unix/Linux End Of Line character read by Windows/DOS, and not a character encoding problem. I get this issue when I forget to convert scripts written on a Linux or OS X machine to Windows/DOS EOL and try to execute them, and vice versa.
    Not sure about how to change it in ConTEXT, as I use NotePad++ on Windows and vim/gedit on Linux/OS X. In NotePad++, you have to change the EOL conversion of the file to Windows/DOS under the Edit menu.

  • Abdel_AdrianAbdel_Adrian Member Posts: 427
    @Aquadrizzt I just wanted to say how incredible this is, and thank you. This is definitely the best method yet of applying kits to multiclasses. Haven't found any other limitations with my brief tests yet, just been able to confirm most of what's been discussed. :smile:
    My F/M Bladesinger with fully-functioning CLAB:

    mf2112Grammarsalad
  • AquadrizztAquadrizzt Member Posts: 878
    @Abdel_Adrian , glad to see that someone (other than me) is finding use for this. I've actually refined it a bit, I'll post an updated version once I make sure that I haven't inadvertently broken something.

    Abdel_Adrian
  • kensaikensai Member Posts: 216
    is it possible to change spell progression for multi-class kits?

  • AquadrizztAquadrizzt Member Posts: 878
    @kensai , in what way? Multiclass characters use the exact same spell progression as single class casters, they just progress through it slower.

  • Abdel_AdrianAbdel_Adrian Member Posts: 427

    @kensai , in what way? Multiclass characters use the exact same spell progression as single class casters, they just progress through it slower.

    They follow the progression of (multiclass) specialist mages, regardless of whether the mage is kitted or not. Just like Fighter/Illusionist, but even if it were Berserker/Mage, for example.

  • AquadrizztAquadrizzt Member Posts: 878
    @Abdel_Adrian, oh right. That is a good point. This is easily fixable though (just add a -1 spell per level effect at 1st level and you're good to go.) I'll add that to the mental list of things to mention when I write a more formal guide.

Sign In or Register to comment.