Skip to content

Sorcerer Kit Won't Appear

RaduzielRaduziel Member Posts: 4,714
edited January 2018 in General Modding
Ok, here's something that's making me bang my head against the wall:

I'm creating a Sorcerer kit inside the I Hate Undead Kitpack.

When I install this kitpack only everything works wonderfully, but when I try to combine it will my other mods (Charlatan, Mercenary, Bodyguard, Universal Spells, Relieve Wizard Slayer) the Sorcerer kit won't appear at character creation.

Did the test in IWDEE, BGEE, BG2EE, and all had the same problem.

All my mods can be found on my Github. Ignore the I Hate Undead folder in there and use the attached one instead.

Thanks and help ._.

PS: Not a single time I got any kind of error installing any of the mods.

Comments

  • kjeronkjeron Member Posts: 2,367
    Looks like an issue with the fl#add_kit_ee function, because when installed after those other mods, the clsrcreq.2da part is getting skipped.

    The bodybuilder kitlabel, RABODY is matching the Binded One's kitlabel, RABO, in its regexp to detect if the kit is already added. Not sure why though, the regexp looks correct.
    You can easily solve this by renaming the Binded One's kitlabel as something else, like RABQ.
    Raduziel
  • RaduzielRaduziel Member Posts: 4,714
    kjeron said:

    Looks like an issue with the fl#add_kit_ee function, because when installed after those other mods, the clsrcreq.2da part is getting skipped.

    The bodybuilder kitlabel, RABODY is matching the Binded One's kitlabel, RABO, in its regexp to detect if the kit is already added. Not sure why though, the regexp looks correct.
    You can easily solve this by renaming the Binded One's kitlabel as something else, like RABQ.

    @kjeron I'll try it. If it works I swear we will someday ride towards the sun listening to country music and drinking whiskey.
  • kjeronkjeron Member Posts: 2,367
    edited January 2018
    Found the issue in fl#add_kit_ee:
    DEFINE_ACTION_FUNCTION fl#add_kit_ee#add_row
      STR_VAR
        kit_name = ""
        input = ""
        file = ""
        clone = ""
    BEGIN
      ACTION_IF "%input%" STR_CMP "" BEGIN
        OUTER_SPRINT append "%kit_name% %input%"
        APPEND "%file%.2da" "%append%" UNLESS "%kit_name%"
      END ELSE ACTION_IF "%clone%" STR_CMP "" BEGIN
        LAF fl#add_kit_ee#get_row
          STR_VAR
            file
            row_name = EVAL "%clone%"
          RET
            row
        END
        OUTER_SPRINT append "%kit_name% %row%"
        APPEND "%file%.2da" "%append%" UNLESS "%kit_name%"
      END
    END

    Fails if the kitlabel exists in the file as part of another kitlabel, ignoring case (RABody contains RABO). It should be something like this (I don't know if this will work for all files it modifies, so I wouldn't use it yet, you may even just have an old version of fl#add_kit_ee):
    DEFINE_ACTION_FUNCTION fl#add_kit_ee#add_row
      STR_VAR
        kit_name = ""
        input = ""
        file = ""
        clone = ""
    BEGIN
      ACTION_IF "%input%" STR_CMP "" BEGIN
        OUTER_SPRINT append "%kit_name% %input%"
        APPEND "%file%.2da" "%append%" UNLESS "^[ %TAB%]*%kit_name%[ %TAB%]+"
      END ELSE ACTION_IF "%clone%" STR_CMP "" BEGIN
        LAF fl#add_kit_ee#get_row
          STR_VAR
            file
            row_name = EVAL "%clone%"
          RET
            row
        END
        OUTER_SPRINT append "%kit_name% %row%"
        APPEND "%file%.2da" "%append%" UNLESS "^[ %TAB%]*%kit_name%[ %TAB%]+"
      END
    END
    RaduzielGrammarsalad
  • RaduzielRaduziel Member Posts: 4,714
    I changed the kit internal name from RABO to RABin. I never had this kind of problem with other kits (one called RAUM, other RAUP, other RAUR, other RAUT, other RAUS), so I think that up to the third letter I'm safe.

    I'll make a test anytime soon and report back. I won't mess with the fl#add_kit_ee until I minimally understand what this thing does.

    Thanks, @kjeron !
  • RaduzielRaduziel Member Posts: 4,714
    @kjeron Altering the kit's internal name solved the issue. About the f#add_kit_ee I'll wait for someone who understands it more than I do (like you or @argent77 ) give an official update to this file.

    Again, thanks :)
  • argent77argent77 Member Posts: 3,431
    Another option to solve this issue would be to match words only. Replace all instances of
    UNLESS "%kit_name%"
    by
    UNLESS "\b%kit_name%\b"
    Raduziel
  • RaduzielRaduziel Member Posts: 4,714
    Yay! My stupidity helped the community somehow!
    Grammarsalad
  • CamDawgCamDawg Member, Developer Posts: 3,438
    edited January 2018
    argent77 said:

    Another option to solve this issue would be to match words only. Replace all instances of

    UNLESS "%kit_name%"
    by
    UNLESS "\b%kit_name%\b"
    \b is unreliable in my experience; I'd stick with @kjeron's suggestion of [ %TAB%]. Wes posted waaaaay back explaining why OCaml's \b regexp worked slightly differently than expected, but I think it was on the old (and now lost) FW forums.

    edit: And posted for Wisp.
    Arunsun
  • WispWisp Member Posts: 1,102
    OCaml has changed its implementation of \b since then. I still think defining your own character class is more intuitive, since you know exactly what's in it and not, but I believe the caveat of old against \b is no longer applicable.

    A fix has been pushed, btw.
  • RaduzielRaduziel Member Posts: 4,714
    edited January 2018
    I don't wanna act like a thirteen years old girl in a Hanson concert but...

    FRICKING WISP COMMENTED ON MY THREAD.

    I love my ignorance <3

    @Wisp Pushed where?
    Post edited by Raduziel on
  • The user and all related content has been deleted.
    Raduziel
Sign In or Register to comment.