Skip to content

[Tool] QDMULTI: A Library for Multiclass Kits

AquadrizztAquadrizzt Member Posts: 1,069
edited November 2017 in General Modding
QDMULTI is a library for mods that install multiclass kits in the Enhanced Infinity Engine (v2.0+).

The newest version of this library is available on GitHub.

Background

Beamdog released the Enhanced Infinity Engine (v2.0) with the release of their original game, Siege of Dragonspear. Among numerous other functionality changes, this patch enabled the character creation menus to display multiclass kits. Unfortunately, any kit that would appear in the multiclass menus would not gain any of its unique class bonuses, due to the way that the engine handled multiclass kits.

This library fixes that problem, and enables multiclass kits to both appear properly in character creation and apply the appropriate bonuses during character advancement.

Usage

If you would like to tie your mod's multiclass kits into the qdmulti framework, then you first need to download the latest version of qdmulti and include it somewhere in your mod's installation files. After adding this file to your mod structure, you can enable the functionality in your mod's compenents by adding the following code to your mod's installation files (either .tp2 or .tpa).

This line should be included before you use the ADD_KIT function (if you are adding a new kit).
INCLUDE ~your/folders/here/qd_multiclass.tpa~ 
This line should be included after you use the ADD_KIT function (if you are adding a new kit).
LAF qd_multiclass
STR_VAR
kit_name = ~kitname~ //the internal name for your kit (e.g. QDMAGUS)
kit_clab = ~kitclab~ //the internal name of your kit's clab file, without the .2da extension
base_class = ~X~ // this can take 6 values: [F]ighter, [P]riest, [D]ruid, [R]anger, [M]age, [T]hief
END
Of the parameters utilized, the only one that I feel needs further explanation is the "base_class" parameter. This parameter handles which class the kit abilities will be tied to; if you say that a multiclass kit's base class is fighter ("base_class = F"), then it will gain the assigned kit bonuses from increases in its fighter level.

Limitations

Note that this library is only designed to handle class benefits that are granted through the class' clab file; it will not handle specialist mages' school restrictions, specific kit's item restrictions, or other effects tied to the kit's usability flags.

Furthermore, due to the length restrictions on internal names, the library can only include abilities that have internal names of 7 characters or less. Abilities with internal names of 8 characters (or more) will not be converted during the qd_multiclass function.

Applications

This library is very versatile, and can be used in a variety of scenarios. Some of the things it can do include:
- giving a kit to a multiclass character at character creation (e.g. Swashbuckler/Mage).
- allowing a multiclass character to have one kit for each of their classes (e.g. a Berserker/Priest of Talos).
- allowing modders to implement their own multiclass kits that have abilities tied to each of the base classes (e.g. the Bladesinger Fighter/Mage kit).
- allowing a single- or multiclass character to gain the benefits of multiple kits of the same class.

QDMULTI in Action

Mods that make use of QDMULTI include:
- Eldritch Magic by @Abdel_Adrian
- Might and Guile by @subtledoctor

Permissions and Support

I am publishing QDMULTI so that other modders may make multi-class kits more reliably and efficiently. I do not require nor expect modders to contact me requesting permission to use this library. If you encounter errors while using this library, please contact me so that I may provide fixes and updates.
Post edited by Aquadrizzt on
«1345678

Comments

  • The user and all related content has been deleted.
  • AquadrizztAquadrizzt Member Posts: 1,069
    edited June 2016
    @subtledoctor , if your Ranger/Mage is just a Thief with a bunch of granted abilities in a CLAB, then it should work. I haven't found kit issues that can't be coded around (e.g. backstab progression defaults to the base Thief's for multiclasses, but opcode 263 applied at specific levels fixes that.) Obviously this is a work in progress and I'll refine it more as time goes on.

    I'll post a more thorough guide on how to use this and how to work with various engine limitations at some point. Now that I've coded this, I need to actually get back to work on updating the mod that lead me to make this in the first place...
  • The user and all related content has been deleted.
  • OlvynChuruOlvynChuru Member Posts: 3,079
    edited June 2016
    A kensai/swashbuckler would be insane. At level 30/30 in Icewind Dale they would have +9 AC and +16 damage and THAC0.
  • Abdel_AdrianAbdel_Adrian Member Posts: 430
    edited June 2016
    @subtledoctor I will admit you absolutely did this first post-2.0 and were gracious enough to share your code with me, BUT I did try it just about as soon as BGEE came out! Even made my own K_X_Y.2da's like we have now. Just wasn't possible then without the scroll bars in character creation. Same with creating selectable tieflings, but @rapsam2003 and I figured that out post-2.0.
    I can't wait for IWDEE to update.
  • The user and all related content has been deleted.
  • The user and all related content has been deleted.
  • AquadrizztAquadrizzt Member Posts: 1,069
    @subtledoctor , the very first thing the main function does is add a blank CLABMA01.2da if it doesn't exist.
  • The user and all related content has been deleted.
  • rapsam2003rapsam2003 Member Posts: 1,636

    @subtledoctor I will admit you absolutely did this first post-2.0 and were gracious enough to share your code with me, BUT I did try it just about as soon as BGEE came out! Even made my own K_X_Y.2da's like we have now. Just wasn't possible then without the scroll bars in character creation. Same with creating selectable tieflings, but @rapsam2003 and I figured that out post-2.0.
    I can't wait for IWDEE to update.

    I was not following things; been busy with work. Is it possible now? (My gut says "no", because why make it easy?)
  • The user and all related content has been deleted.
  • Abdel_AdrianAbdel_Adrian Member Posts: 430
    edited June 2016
    @rapsam2003 Yeah, we discussed it in your thread while I was helping you figure it out - doesn't mean it's necessarily a "new race" the way you can achieve with scripts, but I could have sworn I posted an image of selectable tieflings. It's just an elf, blame Haer'dalis.
    I've got vampires in BG2EE too, out of necessity, but there are no classes attached to the race.ids file so it's just a placeholder to prevent a bug that would appear without it there.
    But this is off topic. Multiclass kits are now possible for the same reason as my tieflings and vampires: scroll bars.

  • Abdel_AdrianAbdel_Adrian Member Posts: 430
  • The user and all related content has been deleted.
  • inethineth Member Posts: 746

    Man I can't even imagine the amount of super-powered multiclass kit cheese people are going to produce with this... :tongue:

    Kensai/Assassin/WildMage triple-class playthrough confirmed! :P
  • ScrybeScrybe Member Posts: 13
    Hey man; signed up just so I could thank you!

    Awesome to see something like this finally come around! I've been playing BG for about 13 years now, and I always wanted to mix and match the classes like this. Just what I wanted to be rekindle my desire to play.

    I do have a slight problem with it so far though; all the descriptions seem to be messed up for me on the two installed kits. Getting a placeholder for Kensai/Thief and a random text string for the Berserker/Priest of Talos. Any ideas on why this might be happening?
  • AquadrizztAquadrizzt Member Posts: 1,069
    @Scrybe , that's strange that the descriptions are messed up. I can't seem to find a reason why these wouldn't work properly. As an aside, the mod isn't an officially supported mod so much as an example of how to add kits to multiclasses.
  • Abdel_AdrianAbdel_Adrian Member Posts: 430

    Actually it's not just a matter of scroll bars. It's that, in 2.0+, when you click a multiclass, if the game detects a K_MC_R.2da file with more than one entry, it kicks you into the kit selection screen. That doesn't happen in 1.4 or lower.

    True, it's not just the one thing I mentioned. Either way, 2.0 has brought some amazing mod capabilities to the engine...and now I have an excuse on the delay of all my multiclass kits lol.
  • ScrybeScrybe Member Posts: 13

    @Scrybe , that's strange that the descriptions are messed up. I can't seem to find a reason why these wouldn't work properly. As an aside, the mod isn't an officially supported mod so much as an example of how to add kits to multiclasses.

    It's really bizarre. Everything seems to work apart from the descriptions. It's definitely compiling them in the .TRA file and applying it to the correct location...just when I boot the game it has random text for the classes and descriptions.
  • The user and all related content has been deleted.
  • GrammarsaladGrammarsalad Member Posts: 2,582
    okay, so a gnome illusionist/priest of x is now possible? Great to know!
  • rapsam2003rapsam2003 Member Posts: 1,636
    edited June 2016

    Actually it's not just a matter of scroll bars. It's that, in 2.0+, when you click a multiclass, if the game detects a K_MC_R.2da file with more than one entry, it kicks you into the kit selection screen. That doesn't happen in 1.4 or lower.

    Ok, so...pardon me if I seem slow...

    Do we actually have the capability to make new K_MC_R.2da file that actually get picked up by the Game Engine? Because if that's actually the case, then that changes "everything"!

    When I tried this stuff for my mod, I recall that creating a new K_MC_R.2da file did jack all, because the Engine didn't pick up the file.
  • AquadrizztAquadrizzt Member Posts: 1,069
    @Grammarsalad , yes. The only problem with this method is that it requires every kit combination to be installed as a new kit.
  • AquadrizztAquadrizzt Member Posts: 1,069
    @rapsam2003 , the game will let you define kit tables for existing races and existing classes using KITTABLE.2da. It will not, however, let you define kit tables for new classes or new races. I just tried this and couldn't get anything to appear during class selection.
  • [Deleted User][Deleted User] Posts: 0
    edited June 2016
    The user and all related content has been deleted.
  • AquadrizztAquadrizzt Member Posts: 1,069
    @subtledoctor , the "qd_multiclass_tables" function initializes the tables and adds any tables that might be missing; it will not overwrite existing multiclass kit tables. Any component that includes a multiclass kit should run that function at the beginning of the component.
  • rapsam2003rapsam2003 Member Posts: 1,636
    edited June 2016

    @rapsam2003 , the game will let you define kit tables for existing races and existing classes using KITTABLE.2da. It will not, however, let you define kit tables for new classes or new races. I just tried this and couldn't get anything to appear during class selection.

    I want new classes/races to be "kittable". :'(
  • The user and all related content has been deleted.
  • The user and all related content has been deleted.
  • AquadrizztAquadrizzt Member Posts: 1,069
    @subtledoctor , one thing I would specify is whether its Rogue or Fighter levels that determines an ability, because it now could be either.
Sign In or Register to comment.