TheMMN Posted 22 hours ago Posted 22 hours ago View File Kotor script Extender (K1SE)kse-1.0.0.zip K1SE is a script extender for KOTOR 1, in the same tradition as SKSE, OBSE, and NWNX. It is a DLL that loads with the game and gives NWScript functions BioWare never exposed. You write ordinary scripts, compile them with your normal compiler, and add one include line. This is a tool for mod authors. It does not change anything in the game by itself. On its own it is invisible. BEFORE YOU DOWNLOAD: Steam only, and only some Steam builds Every address K1SE uses was derived from one game executable on one machine. At launch it checks your game against eleven fingerprints, and if they do not match it refuses to install and does nothing at all. GOG, retail disc, localized builds, and anything patched have never been tested. Not broken, just never looked at. That refusal is deliberate. K1SE will not run against offsets it cannot confirm, so it cannot quietly corrupt a save on a build it does not recognize. But it does mean the honest supported list right now is a single build. docs/SCOPE.md in the archive lays out exactly what the evidence base is. WHAT IT ADDS Bitwise and integer math. AND, OR, XOR, NOT, three shift variants, popcount, plus min, max, clamp, sign, Euclidean modulo, integer power, and integer square root. NWScript has no bitwise operators at all, so if you have been faking bit flags with arithmetic, that is over. A key-value store. Set and get strings or integers by string key, test existence, delete. In memory only, cleared when the game restarts, 256 entries. Useful for passing state between scripts inside a session. It is not a save system. Feats, skills, and saving throws. Grant or remove a feat, adjust skill ranks, adjust Fortitude, Reflex, and Will base saves. These write into the character and survive save and reload. Utility. A version check, a build id string, an error code you can read after a refused operation, and a logging call so you can drop your own markers into K1SE's log alongside what K1SE did. Full signatures and notes for every function are in docs/API.md. READ THIS IF YOU USE THE FEAT FUNCTIONS A granted feat is permanent. It is written into the creature's feat array and it survives saving and reloading. KOTOR has no engine path that removes an array feat, so K1SE's remover is the only one that exists, and it persists too. Treat every grant as one-way until you have tested removal inside your own mod. Test on a save you do not care about. The same applies to skills and saving throws. INSTALLATION 1. Open your KOTOR folder, the one with swkotor.exe in it. On Steam: right click the game, Manage, Browse local files. 2. Rename the existing binkw32.dll to binkw32_real.dll. 3. Copy K1SE's binkw32.dll into that folder. 4. Copy kse.nss to wherever your script compiler looks for includes. 5. Launch the game. K1SE writes a log to %LOCALAPPDATA%\KSE\kse.log and the top of it tells you whether it loaded. K1SE forwards every call to the real library, so the game behaves normally whether or not K1SE installs itself. UNINSTALLATION Delete K1SE's binkw32.dll and rename binkw32_real.dll back to binkw32.dll. That is the whole uninstall. The only other thing K1SE leaves is its log folder, which you can delete. THE THING THAT WILL CATCH YOU OUT If K1SE is not loaded, K1SE calls do not throw an error. They silently return zero. That is indistinguishable from your mod being broken. Guard every script that uses K1SE: if (KSE_GetVersion() <= 0) return; Use <= 0 and not == 0. An older K1SE returns a negative number rather than zero, and == 0 would let it through. If a K1SE script appears to do nothing, read kse.log. It is the only place that records whether K1SE loaded and, if it refused, which fingerprint failed. COMPATIBILITY Requires the binkw32.dll slot. If you already run another mod that replaces binkw32.dll, the two will conflict and you will have to pick one. KOTOR 2 is not supported and has not been tested. Stability: K1SE ran for 7 hours 10 minutes under sustained script load without crashing or degrading. That is a run length result, not a leak measurement. No leak measurement has been made. WHAT WOULD HELP MOST One read-only check on a non-Steam install. GOG, retail disc, anything that is not the build this was developed against. More testing on my own machine cannot widen the supported list, because it is the same single witness re-attesting itself. One run on a different copy of the game is the contribution that actually changes what this project covers. Come to the Discord if you are willing. PERMISSIONS MIT licensed. Use it, modify it, redistribute it, bundle it inside your own mod, commercial or not. Keep the copyright notice and license text with it. No permission request needed. SUPPORT Discord: https://discord.gg/EqR7uqQy3f Bug reports, questions, and "it will not work on my copy" all welcome. Attach your kse.log. It answers the did-it-load question in about two seconds. Submitter TheMMN Submitted 08/05/2026 Category Modder's Resources Quote
TheMMN Posted 52 minutes ago Author Posted 52 minutes ago This is a more accurate description # K1SE — KOTOR Script Extender Okay, this one's been a long time coming. K1SE lets your KOTOR 1 scripts do things the base game flat-out refused to allow. If you've ever stared at NWScript wondering why you couldn't just hand a character a feat and have it *stick*, welcome aboard. ## The good stuff **Permanently grant or remove feats.** This is the headline. You write a feat right onto a character and it survives saves and reloads. The base game has no way to ever remove an array feat, and K1SE gives you one. It's a one-way road by design, so mess around with it on a junk save before you trust it in a real mod. **Rewrite skills and saving throws on the fly.** Push a creature's skill ranks around, bump their Fortitude, Reflex, or Will base saves, and it all persists. **KOTOR 2 functions, running in KOTOR 1.** GetFeatAcquired, AdjustCreatureSkills, the whole Modify*SavingThrowBase family. That engine code was sitting inside K1 the entire time. K1SE just calls it. **A real data store.** String-keyed key/value storage you make up as you go, instead of wrestling with the game's handful of pre-declared globals. It lives in memory for the session. Want some integer math helpers? You've got min, max, clamp, sign, popcount, integer square root and power, and a proper Euclidean mod. Quick heads up so nobody yells at me later: KOTOR's NWScript already has bitwise operators (&, |, ^, ~, <<, >>) and sqrt/pow/abs baked right in, so the bitwise wrappers here are pure convenience. The character-writing stuff up top is the real magic. There's also a version check and a diagnostic log, so your scripts can tell whether K1SE is even installed, and so bug reports actually mean something. ## What you need KOTOR 1, the Steam version. That's the whole list. K1SE is a single binkw32.dll you drop in. No launcher, no installer wizard, none of that nonsense. ## Read this part, seriously I've only tested K1SE on the Steam build. When it starts up it fingerprints your game, and if it doesn't recognize what it's looking at, it quietly switches itself off and leaves everything alone. Your saves are safe. That's on purpose. So if you're on GOG, a disc copy, a patched exe, or a localized build, it won't run yet. It'll tell you why in the log. If that's you and you want to help, come say hi on the Discord and send that log over. That's genuinely how the supported list grows. And because it matters: the feat, skill, and saving-throw functions change characters permanently and write to your save. Test on a throwaway save first. I mean it. ## Getting it running (takes a minute) 1. Open your KOTOR folder, the one with swkotor.exe. On Steam that's right-click the game, Manage, Browse local files. 2. Find the binkw32.dll that's already there and rename it to binkw32_real.dll. 3. Drop K1SE's binkw32.dll in its place. 4. Toss kse.nss wherever your script compiler looks for includes. 5. Fire up the game. K1SE drops a log at %LOCALAPPDATA%\KSE\kse.log, and the top few lines tell you if it loaded. ## Links and help Everything (downloads, full docs, the source) is up here: https://github.com/Brotaku-Vengeant/Kotor-Script-Extender-Public- Something broken or acting weird? Post in the Discord and paste your kse.log. It tells us what happened almost instantly. I've had it running for a 7+ hour stretch under constant script hammering with zero crashing or slowdown, so go build something ridiculous with it. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.