temnix Posted March 31, 2020 Share Posted March 31, 2020 I found myself having to make a kit, and quickly. I'm sure people have been doing it for ages, but not me. I'm making this wizard kit available to half-orcs and dwarves, and enabling MAGE in CLSRCREQ.2DA has the unfortunate side effect of opening Mage to them, too. Is it possible to tuck away Mage but keep other kit options on the list? Plus, to make changes to permitted classes and kits I have to REPLACE_TEXTUALLY a line of CLSRCREQ with my own values. But if others have already put 0s and 1s there in different places, nothing will be replaced. I thought I could insert my MAGE line down on the bottom, hoping it would override what comes above, but no. Any suggestions? Quote Link to comment
Jarno Mikkola Posted April 1, 2020 Share Posted April 1, 2020 12 hours ago, temnix said: Is it possible to tuck away Mage but keep other kit options on the list? Yeah, just don't put a zero into the actual kit list file, no it's not CLSRCREQ.2DA, it's the one K_<class>_<race>.2da, so for Half orc mage, it's K_M_HO.2da . Yes, installing the kit with ADD_KIT weidu function, you normally will append the file, and yes, apparently the Beamdog minions have places the zero's into the files for cheese reasons, so your best option is to either rewrite the file or patch the zero with a rewrite of your own kits number. The kit number is the very first constant you set in: ADD_KIT ~this~ ~this 1 1 1 ... So the kits number would be %this% . Dwarves use the K_M_D.2da . Here's a reference for the 4th part of the kit making tutorial, from which you can find some of that info. Quote Link to comment
temnix Posted April 1, 2020 Author Share Posted April 1, 2020 (edited) - Edited April 1, 2020 by temnix Quote Link to comment
Jarno Mikkola Posted April 1, 2020 Share Posted April 1, 2020 Making a kit won't require a new component... actually there's no new starts for ADD_KIT... it's just a set number of strings... the LAF fl#add_kit_ee is a new functionality added-in later. I thing you might have had just an extra END at somewhere, which ends the component, and messes things, if you actually made an attempt. .. and I won't mess with the INSTALL_BY_DEFAULT... it's a horrible, for multiple reasons. Quote Link to comment
subtledoctor Posted April 2, 2020 Share Posted April 2, 2020 (edited) I get lost, as usual, in Jarno's verbiage. But here is my code for eliminating the trueclass kit from a particular menu in character generation: ACTION_FOR_EACH race IN ~D~ ~E~ ~G~ ~H~ ~HE~ ~HL~ ~HO~ BEGIN ACTION_IF FILE_EXISTS_IN_GAME ~K_M_%race%.2da~ BEGIN COPY_EXISTING ~K_M_%race%.2da~ ~override~ COUNT_2DA_COLS cols COUNT_2DA_ROWS cols rows PATCH_IF (rows > 2) BEGIN READ_2DA_ENTRIES_NOW rows cols SET rows_removed = 0 FOR (row = 1; row < rows; ++row) BEGIN READ_2DA_ENTRY_FORMER rows row 1 kit PATCH_IF (%kit% = 0) BEGIN REMOVE_2DA_ROW (row - rows_removed) cols SET rows_removed += 1 END END END BUT_ONLY END END The "rows_removed" variable is useless here, but it is necessary if you want to expand the (%kit% = 0) condition to include a bunch of different kits. But 0 is the trueclass, so in this case that's the one you want to remove. Edited April 2, 2020 by subtledoctor Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.