Skip to content

BG EE v1.2 and Custom Kits

KeryvianKeryvian Member Posts: 14
Disclaimer: I am hardly an expert modder and this is just based on my observations, which may be wrong.

The 1.2 patch has new .2DA files for some things that used to be hard-coded, including some that apply to classes/kits. One of these new files is CLASTEXT.2DA, which includes the name and descriptions for the class/kit. Another is CLSRCREQ.2DA, which lists the valid races for the class/kit. There are others.

Weidu, as of 234, does not cover these files with the ADD_KIT command. Kit mods created before v1.2 will need to be updated to include the new files.

In addition, there appears to be a limit to the number of kits that can be added without getting sql errors. Two kits seems to work fine. A third kit will generate an sql error for the 25STWEAP.2DA file.

Comments

  • XavioriaXavioria Member Posts: 874
    I've had that issue when trying to install my custom bard kit... Been driving me nuts lol
  • DeeDee Member Posts: 10,447
    You'll also want to add a column for your kit to clascolr.2da and assign default colors, or you'll end up with a whole lot of green.
  • StoneSwordsStoneSwords Member Posts: 180
    So is there going to be a hotfix for this issue, or is it just up to the modders of the individual mods to make the appropriate changes to their mods? I kept getting an SQL error last night, which from what I've seen on the boards seems to be a result of more than 2 custom kits being installed
  • IsayaIsaya Member, Translator (NDA) Posts: 752
    @Sylvus_Moonbow The issue is that it's usually WeiDU that hides most of the work to edit the various files required to add a new kit into the game. So ideally that's WeiDU that would need to be updated to take into account the new files, then the mod can be updated (they will need to tell WeiDU which color, etc. to use).
    Updating WeiDU itself will probably take more than 3 days, considering the interface change required to specify the new parameters without breaking compatibility with other games (BG II).
  • StoneSwordsStoneSwords Member Posts: 180
    So custom kits are pretty much out for the time being then?
  • RhaellaRhaella Member, Developer Posts: 178
    I'm expecting that there will need to be another update of weiDU (or at least instructions from the maintainers on how we're supposed to deal with these new issues) before this problem is going to be fixed.
  • IsayaIsaya Member, Translator (NDA) Posts: 752
    @StoneSwords Actually the kit creator could make the necessary patches for the new files themselves, but that wouldn't be a long term solution, in my opinion, as they would need to remove them when WeiDU is updated. At least that's how I see things.

    @Wisp most probably has a much better insight on what could and should be done.
  • WispWisp Member Posts: 1,102
    Based on the presently available information, this (sql syntax errors and overflows) is not a WeiDU problem and cannot fairly be called a mod problem.
  • IsayaIsaya Member, Translator (NDA) Posts: 752
    @Wisp Please allow me to clarify why I tagged your name: I was only referring to the ability to update the new 2DA files automatically when adding a kit through ADD_KIT.
  • EntropyXIIEntropyXII Member Posts: 656
    Has anybody made any decent kits they're willing to share?
  • smeagolheartsmeagolheart Member Posts: 7,963
    Wisp said:

    Based on the presently available information, this (sql syntax errors and overflows) is not a WeiDU problem and cannot fairly be called a mod problem.

    So Beamdog has to act before Custom mod Kits are working like they were before BGEE
  • WispWisp Member Posts: 1,102
    edited November 2013

    So Beamdog has to act before Custom mod Kits are working like they were before BGEE

    Seems like it. The modder may voluntarily change the internal kit name to something strictly alphanumerical to avoid the syntax errors, but the overflow error places a cap on the number of concurrent kits you can currently have installed.

    Edit: oh, yes, ADD_KIT will (eventually) support the new 2DA files etc. Perhaps in the next WeiDU version.
  • XavioriaXavioria Member Posts: 874
    @EntropyXII depends on what you mean by decent
  • RhaellaRhaella Member, Developer Posts: 178
    @Wisp - do you know how to keep the game from rewriting a kit's name and description, or is that something that would need to wait for the next weiDU update?
  • WispWisp Member Posts: 1,102
    @Rhaella
    IIRC, this is clastext, one of the new 2DA files.

    It is possible (as in, not complicated beyond general 2DA patching), to add a row to the file manually, but saying that makes it sound like doing it yourself is some sort of adequate alternative to having things work like it should.
  • RhaellaRhaella Member, Developer Posts: 178
    @Wisp - haha, indeed.

    I wouldn't know what to even add in the row, though, since all I'm seeing is string references, and I have no idea what numbers any given kit's name and description would be anyway!.
  • IsayaIsaya Member, Translator (NDA) Posts: 752
    This discussion explains how to add the necessary modifications to the extra 2DA files in order to get kits properly added. It gives some code to include in the kit mods.
  • RhaellaRhaella Member, Developer Posts: 178
    @Isaya - I've been using @CamDawg's tph. It makes the kit playable, but doesn't solve the name and description problem. Unless I've missed something, but I don't think I have.
  • IsayaIsaya Member, Translator (NDA) Posts: 752
    The key point resides in the part sentence I'm highlighting:
    class is just the name of the parent class (fighter, cleric, ranger, etc.) and kitname is your kit's internal name. This function will go through all of the new 2das and add an entry for your kit where appropriate with the same values as the parent class. In the example provided, an entry for m#ambkit will be added to any of the new EE 2da files that already has an entry for the base FIGHTER class, and with the same values.
    So yes, basically, what this does is copy everything (text, color, restrictions, etc.) from the parent class you specify.
    If you want to do otherwise, you have adapt the code and do things a bit differently when you want to differentiate from the parent class.
  • smeagolheartsmeagolheart Member Posts: 7,963
    Wisp is the expert on Weidu and this. I'll take his word for what's going on and have to wait for Beamdog to address this bug unless you want a workaround which doesn't appear to fully work.
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    I haven't tried at all to verify, but the old-school trick to get variable-numbered custom text entries into a 2DA was to add a bogus (yet unique) entry, followed by a REPLACE command. something like:

    APPEND ~clastext.2da~ ~[mykitname] 99901 99902 99903~

    COPY_EXISTING ~clastext.2da~ ~override~
    REPLACE_TEXTUALLY ~99901~ @1001 // (your tp2 file entry)
    REPLACE_TEXTUALLY ~99902~ @1002
    REPLACE_TEXTUALLY ~99903~ @1003
    BPSeries relies heavily on this procedure, to give you the custom script names & descriptions you can see in-game. I'm sure the upcoming automated WeiDu procedure will be far superior, but this might get you by for now.
  • RhaellaRhaella Member, Developer Posts: 178
    edited November 2013
    @horredtheplague -- that looked like it would work, but I'm getting nowhere with it.

    But now I've tried to just append lines from anything that isn't bard for this kit, to no avail. Append the full paladin line, and it tosses me back to bard. Append Blade's line, back to bard.

    I don't know if there's a new file that hasn't been taken into consideration or something? =/ I'm definitely getting the 2da file showing up with lines of numbers that don't match up with the vanilla Bard's, but there's no difference in game. Unless my copy has become schizophrenic.

    [EDIT] Okay, Liam told me to put 41 as the KITID for the moment, which FINALLY got the appends working properly.
    Post edited by Rhaella on
  • AlkaluropsAlkalurops Member Posts: 269
    edited November 2013

    I haven't tried at all to verify, but the old-school trick to get variable-numbered custom text entries into a 2DA was to add a bogus (yet unique) entry, followed by a REPLACE command. something like:


    APPEND ~clastext.2da~ ~[mykitname] 99901 99902 99903~

    COPY_EXISTING ~clastext.2da~ ~override~
    REPLACE_TEXTUALLY ~99901~ @1001 // (your tp2 file entry)
    REPLACE_TEXTUALLY ~99902~ @1002
    REPLACE_TEXTUALLY ~99903~ @1003
    BPSeries relies heavily on this procedure, to give you the custom script names & descriptions you can see in-game. I'm sure the upcoming automated WeiDu procedure will be far superior, but this might get you by for now.

    I didn't know this. Is there any reason why you should do this instead of
    OUTER_SET label = RESOLVE_STR_REF(@1001)
    APPEND ~CLASTEXT.2da~ ~kitname %label%~ UNLESS ~kitname~
  • WispWisp Member Posts: 1,102



    I didn't know this. Is there any reason why you should do this

    APPEND + REPLACE is much older, from before the days of RESOLVE_STR_REF.

Sign In or Register to comment.