{"id":25604126,"url":"https://github.com/argent77/a7-add_kit_ex","last_synced_at":"2026-02-18T06:32:13.486Z","repository":{"id":61922048,"uuid":"204978075","full_name":"Argent77/A7-add_kit_ex","owner":"Argent77","description":"A WeiDU function that aims at unifying WeiDU's built-in ADD_KIT and COPY_KIT as well as the complementary function fl#add_kit_ee.","archived":false,"fork":false,"pushed_at":"2026-01-12T21:22:52.000Z","size":225,"stargazers_count":6,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-01-13T01:52:16.272Z","etag":null,"topics":["kit","library","weidu"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Argent77.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-08-28T16:39:19.000Z","updated_at":"2026-01-12T21:22:56.000Z","dependencies_parsed_at":"2024-02-06T14:45:09.461Z","dependency_job_id":"9b176b57-62a0-47cc-b846-daa28dca67ab","html_url":"https://github.com/Argent77/A7-add_kit_ex","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/Argent77/A7-add_kit_ex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Argent77%2FA7-add_kit_ex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Argent77%2FA7-add_kit_ex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Argent77%2FA7-add_kit_ex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Argent77%2FA7-add_kit_ex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Argent77","download_url":"https://codeload.github.com/Argent77/A7-add_kit_ex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Argent77%2FA7-add_kit_ex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29570334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T06:19:27.422Z","status":"ssl_error","status_checked_at":"2026-02-18T06:18:44.348Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kit","library","weidu"],"created_at":"2025-02-21T17:30:43.076Z","updated_at":"2026-02-18T06:32:13.478Z","avatar_url":"https://github.com/Argent77.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# WeiDU functions: ADD_KIT_EX and GET_KIT_EX\n\nThis project aims at unifying WeiDU's built-in functions **ADD_KIT** and **COPY_KIT** as well as the complementary functions **[fl#add_kit_ee](https://github.com/WeiDUorg/fl-add_kit_ee)** and **[qd_multiclass](https://github.com/subtledoctor/QDMULTI)**.\n\n## ADD_KIT_EX\n\n### Overview\n\nADD_KIT_EX allows you to add new kits to the game or create copies of existing kits. In both cases it is possible to alter selected attributes of the kit and let the function derive the remaining information either from a specified source kit or the kit's parent class. The function provides full support for both classic and EE games.\n\nThe following games are currently supported: BG2 (with or without ToB), Tutu, BGT, BG:EE (with or without SoD), BG2:EE, EET, IWD:EE and PST:EE*. TobEx and GemRB are considered when detected.\n\n*(\\*) PST:EE does theoretically support kits, but lacks the necessary files.*\n\n**Notes:**\u003cbr/\u003e\nAdding the kit name to any of the specified 2DA strings is optional. It will be included automatically if needed.\n\nUnless stated otherwise, if no value is provided for one or more of the optional parameters, the corresponding value of a given source kit or the parent class (in that order) will be copied and used for this kit if needed.\n\nMissing entries in specified 2da strings will be filled with sane default values if needed.\n\n**Important:**\u003cbr/\u003e\nADD_KIT_EX requires WeiDU version 247 or later to work correctly.\n\nParameter | Description\n---|---\nSTR_VAR\u0026nbsp;kit_name  | *(required)* The internal name of your kit. This name is used throughout all relevant IDS and 2DA files to reference your kit.\nINT_VAR visible        | *(optional)* Indicates whether the kit will be selectable during character creation. Set to 0 to make it unselectable for player characters. Default: 1\nINT_VAR kit_class      | *(required, unless \"source_kit\" is specified)* Parent class ID added to kitlist.2da.\nINT_VAR mixed          | *(required, unless \"source_kit\" is specified)* Mixed name strref of your kit, added to kitlist.2da.\nINT_VAR lower          | *(optional)* Lower name strref of your kit, added to kitlist.2da. A lower-cased version of \"mixed\" is generated if this parameter is not available.\u003cbr/\u003e***Note:** Auto-generation may not work correctly if the name contains non-ASCII characters.*\nINT_VAR help           | *(optional)* Description string of your kit, added to kitlist.2da.\nINT_VAR biography      | *(optional, EE-only)* The biography strref of your kit, added to clastext.2da.\nINT_VAR briefdesc      | *(optional, EE-only)* Short class or kit description strref added to clastext.2da.\nINT_VAR fallen         | *(optional, EE-only)* 0 or 1. Indicates whether the kit is a \"fallen\" variant. This parameter is only relevant for ranger and paladin kits. Added to clastext.2da.\nINT_VAR fallen_notice  | *(optional, EE-only)* Fallen notice strref. Notice is shown in combat log when the fallen status is applied to the character. Added to clastext.2da.\nINT_VAR can_fall       | *(optional, EE-only)* 0 or 1. Indicates whether the kit is allowed to \"fall\". This parameter is only relevant for ranger and paladin kits. Added to fallen.2da. Default: 1\nINT_VAR prettify       | *(optional)* 0 or 1. A purely cosmetic option that can be used to properly align data in tables that are modified by this function. Set to non-zero to activate. Default: 1\nSTR_VAR source_kit     | *(optional, unless \"kit_class\" is omitted)* Name of an existing kit to copy information from for all omitted parameters. Specify this parameter and set \"visible\" to 0 to imitate behavior of the original WeiDU function \"COPY_KIT\".\nSTR_VAR unusable       | *(optional)* Unusability code added to kitlist.2da. Must be a positive number in decimal or (preferrably) hexadecimal notation. Omit to inherit usability of source kit or parent class.\u003cbr/\u003e***Note:** Defined as string parameter to work around WeiDU restrictions.*\nSTR_VAR clasweap       | *(optional)* 2DA string added to clasweap.2da.\nSTR_VAR weapprof       | *(optional)* 2DA string added to weapprof.2da.\nSTR_VAR abclasrq       | *(optional)* 2DA string added to abclasrq.2da.\nSTR_VAR abclsmod       | *(optional)* 2DA string added to abclsmod.2da.\nSTR_VAR abdcdsrq       | *(optional)* 2DA string added to abdcdsrq.2da.\nSTR_VAR abdcscrq       | *(optional)* 2DA string added to abdcscrq.2da.\nSTR_VAR alignmnt       | *(optional)* 2DA string added to alignmnt.2da.\nSTR_VAR dualclas       | *(optional)* 2DA string added to dualclas.2da.\nSTR_VAR luabbr         | *(optional)* 2DA string added to luabbr.2da.\nSTR_VAR stweap         | *(optional)* 2DA string added to 25stweap.2da.\nSTR_VAR clab_path      | *(optional)* Path to the CLAB-style 2DA file of your kit. File is installed and reference is added to kitlist.2da. Specify filename without path to use an existing game resource instead. Omit this parameter for single class kits to inherit the CLAB of the specified source kit or parent class. Omit this parameter for multiclass kits if `base_class` is omitted as well.\nSTR_VAR kittable       | *(optional)* List of which class and race combinations the kit should be available for, as per kittable.2da. Omit to make kit available for all races. Use parameter \"visible\" instead if you want to make the kit unavailable for all races during character creation.\nSTR_VAR base_class     | *(optional, EE-only, multiclass kits only)* This parameter indicates which class the kit abilities will be tied to by default. See more details in the \"Multiclass Kits\" chapter below. The following single-letter class tokens are supported: [F]ighter, [P]riest, [D]ruid, [R]anger, [M]age and [T]hief.\nSTR_VAR\u0026nbsp;clab_base_f\u003cbr/\u003eSTR_VAR\u0026nbsp;clab_base_p\u003cbr/\u003eSTR_VAR\u0026nbsp;clab_base_d\u003cbr/\u003eSTR_VAR\u0026nbsp;clab_base_r\u003cbr/\u003eSTR_VAR\u0026nbsp;clab_base_m\u003cbr/\u003eSTR_VAR\u0026nbsp;clab_base_t  | *(optional, EE-only, multiclass kits only)* The clab_base_X parameters allow you to specify paths to CLAB-style 2DA files for individual base classes. X indicates the base class token for [f]ighter, [p]riest, [d]ruid, [r]anger, [m]age and [t]hief. It is also possible to use the parameters `base_class` and `clab_path` to set or override one of the clab_base_X parameters.\nSTR_VAR clsrcreq       | *(optional, EE-only)* 2DA string added to clsrcreq.2da.\nSTR_VAR clswpbon       | *(optional, EE-only)* 2DA string added to clswpbon.2da.\nSTR_VAR hpclass        | *(optional, EE-only)* 2DA string added to hpclass.2da. If this string references a custom 2DA file, it needs to be copied into the game separately.\u003cbr/\u003e***Note:** Because of engine limitations this parameter is ignored for multiclass kits.*\nSTR_VAR numwslot       | *(optional, EE-only)* 2DA string added to numwslot.2da.\nSTR_VAR clascolr       | *(optional, EE-only)* 2DA string added to clascolr.2da.\nSTR_VAR clasiskl       | *(optional, EE-only)* 2DA string added to clasiskl.2da.\nSTR_VAR clasthac       | *(optional, EE-only)* 2DA string added to clasthac.2da.\nSTR_VAR thiefscl       | *(optional, EE-only)* 2DA string added to thiefscl.2da.\nSTR_VAR backstab       | *(optional, EE-only)* 2DA string added to backstab.2da. Missing columns are filled with copies of the last specified value.\nSTR_VAR sneakatt       | *(optional, EE-only)* 2DA string added to sneakatt.2da. Missing columns are filled with copies of the last specified value.\nSTR_VAR crippstr       | *(optional, EE-only)* 2DA string added to crippstr.2da. Missing columns are filled with copies of the last specified value.\nSTR_VAR thiefskl       | *(optional, EE-only)* 2DA string added to thiefskl.2da.\nSTR_VAR traplimt       | *(optional, EE-only)* 2DA string added to traplimt.2da.\nSTR_VAR bdstweap       | *(optional, EE-only)* 2DA string added to bdstweap.2da.\nSTR_VAR x\\-clserg      | *(optional, EEex-only)* 2DA string added to x\\-clserg.2da.\nRET kit_id             | The numeric value generated for the specified kit. This value is exactly 0x4000 less than the number your kit is assigned in kit.ids. Returns -1 if the kit couldn't be installed.\n\n#### Diagnostic parameters for general use:\nParameter | Description\n---|---\nINT_VAR suppress_warnings  | (optional) 0 or 1. Warnings will be printed as regular messages if set to non-zero. Default: 0\n\n#### Experimental parameters for testing purposes only:\nParameter | Description\n---|---\nINT_VAR \\_\\_kits_limit_override  | Maximum number of supported kit entries. Default: 0 (autodetect)\nINT_VAR \\_\\_kits_base_value      | The kit base value added to \"kit_id\" when added to kitlist.2da or kit.ids. *Default: 0x4000*\n\n### Multiclass Kits\n\nEnhanced Edition games since version 2.0 allow you to create true multiclass kits. However, the way how multiclass kits are handled by the game engine requires additional effort to properly deal with kit-specific abilities.\n\nADD_KIT_EX provides two ways to control which class aspect of a multiclass kit is used to apply kit-specific abilities:\n\n1) Specify parameters `base_class` and `clab_path`:\u003cbr/\u003e\n`base_class` controls the class aspect used to apply the kit abilities defined in the table specified by `clab_path`.\nFor this reason it is necessary to specify a class aspect that is covered by the kit's parent multiclass.\u003cbr/\u003e\nThe following single-letter class tokens are supported by `base_class`: `F` (for Fighter class), `P` (for Priest class), `D` (for Druid class), `R` (for Ranger class), `M` (for Mage class) and `T` (for Thief class). Alternatively, specify one of the symbolic class names: `FIGHTER`, `CLERIC`, `DRUID`, `RANGER`, `MAGE` or `THIEF`. Numeric class values are supported as well.\n\n2) Specify any of the clab_base_X parameters:\u003cbr/\u003e\nThe clab_base_X parameters can be used to set a class ability table for a specific base class. That way it is possible to assign different ability tables to individual class aspects of a multiclass kit. \"X\" indicates the base class token for [f]ighter, [p]riest, [d]ruid, [r]anger, [m]age and [t]hief.\u003cbr/\u003e\nFor example, for a kit based on the Fighter/Mage/Thief class you can use `clab_base_f`, `clab_base_m` and `clab_base_t` to assign individual ability tables to the fighter, mage and thief class aspect respectively.\n\nAlternatively, it is also possible to override the base class by preceding CLAB table entries with a class token. This token allows you to fine-tune which ability will be applied by which class at level up. For example, to specifically assign the CLAB entry `GA_SPCL423` to the thief class aspect (e.g. of a multiclass Fighter/Thief kit), precede it with `T` to create `TGA_SPCL423`.\n\nThis feature is very versatile, and can be used in a variety of scenarios. Some of the things it can do include:\n* giving a kit to a multiclass character at character creation (e.g. Swashbuckler/Mage).\n* allowing a multiclass character to have one kit for each of their classes (e.g. a Berserker/Priest of Talos).\n* 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).\n* allowing a single- or multiclass character to gain the benefits of multiple kits of the same class.\n\n#### Limitations:\nOnly benefits granted by the class ability table are considered. Item restrictions, inherent abilities of specialist mages or other effects tied to the kit's usability flags are not covered.\n\nDue to the length restrictions on internal names, **ADD_KIT_EX can only include abilities that have internal names of 7 characters or less**. Abilities with internal names of 8 characters (or more) will be skipped with warnings.\n\n### Usage\n\nLaunch `ADD_KIT_EX` via `LAUNCH_ACTION_FUNCTION` and specify the parameters you want to have set or changed.\n\nExample of a minimalistic kit definition:\n```\nLAUNCH_ACTION_FUNCTION ADD_KIT_EX\n  INT_VAR\n    kit_class = 4   // Parent class: Thief\n    mixed     = RESOLVE_STR_REF(~Adventurer~)\n    lower     = RESOLVE_STR_REF(~adventurer~)   // Not strictly necessary: will be auto-generated if omitted\n    help      = RESOLVE_STR_REF(~ADVENTURER: A jack-of-all-trades...~)  // Not strictly necessary: Parent class\n                                                                        // description will be used if omitted\n  STR_VAR\n    kit_name  = \"ADVENTURER\"\n  RET\n    kit_id\nEND\n```\nThis function call will install a new Thief kit called \"Adventurer\". Omitted attributes will be derived from the kit's base class if needed. At successful execution the kit will be installed and can be identified by the numeric value returned by the \"kit_id\" parameter.\n\n## GET_KIT_EX\n\nSee function description here: [readme-get_kit_ex.txt](https://raw.githubusercontent.com/Argent77/A7-add_kit_ex/master/a7-add_kit_ex/readme-get_kit_ex.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fargent77%2Fa7-add_kit_ex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fargent77%2Fa7-add_kit_ex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fargent77%2Fa7-add_kit_ex/lists"}