================================================================ FAIR PAZAAK TURN ORDER (Knights of the Old Republic) ================================================================ WHAT IT DOES ------------ In vanilla KOTOR, the player ALWAYS takes the first turn of every Pazaak set. Because the second player gets to act with full knowledge of the first player's move, going first is a real, built-in disadvantage, and you're stuck with it every single set. This mod makes the starting player of each set a 50/50 coin flip between you and the opponent. Now you get the second-move advantage as often as the AI does. Note: Despite how it feels, KOTOR's Pazaak cards dealt are actually fair. It's one shared 40-card deck, properly shuffled. The AI's four cards are dealt randomly from their side deck in the same way as the player's. The only structural unfairness was the fixed turn order. The three 20s in a row is weirdness of luck that the player sometimes gets too. HOW TO INSTALL -------------- 1. Close KOTOR completely (exit to desktop -- the .exe can't be edited while it's running). 2. Copy these three files into your KOTOR folder, next to swkotor.exe: FairPazaak.exe Apply Fair Pazaak Patch.bat Revert Fair Pazaak Patch.bat (Typical location: C:\Program Files (x86)\Steam\steamapps\common\swkotor\ ) 3. Double-click Apply Fair Pazaak Patch.bat 4. It will say "SUCCESS" and create a backup. Launch the game and enjoy. That's the whole install. HOW TO UNINSTALL / REVERT ------------------------- 1. Close KOTOR. 2. Double-click Revert Fair Pazaak Patch.bat This restores swkotor.exe exactly as it was (from the backup it made: swkotor.exe.FairPazaak.bak). SCOPE & COMPATIBILITY --------------------- - Tiny footprint: it changes one instruction in the Pazaak turn code and adds a short routine in unused space at the end of the .exe. Nothing else is touched. - Does NOT edit any .2da or other game files, so it stacks cleanly with other Pazaak mods (e.g. side-deck rebalances), appearance mods, the 4 GB patch, widescreen/UI mods, K1CP, etc. - REQUIREMENT: an UNPACKED swkotor.exe. In practice, the "Editable Executable" that KOTOR widescreen setups use. Almost every modded install already has it (it's also what the 4 GB patch and UniWS need). The stock Steam swkotor.exe is DRM-wrapped: the 4 GB patch breaks it, and this patcher cannot read the code inside it. GOG's exe is DRM-free / unpacked and should work. - SAFE on the wrong exe: the patcher finds everything by code-pattern, so on a DRM-wrapped or otherwise unrecognized exe it finds nothing, changes ZERO bytes, and tells you. It will never corrupt an exe the way a header patch can -- worst case is "does nothing." - Because it pattern-scans, it works on the editable exe whether or not the 4 GB patch and widescreen/UniWS edits are applied (those live in unrelated code). Tested against the editable executable. - Your save games are completely unaffected. ANTIVIRUS NOTE -------------- FairPazaak.exe is a tiny Python program packaged with PyInstaller. Some antivirus tools flag ALL PyInstaller executables as "suspicious" purely because of how they're packed -- this is a known false positive, not malware. If yours complains, allow it, or build it yourself from the included source (src\fairpazaak.py). TROUBLESHOOTING --------------- "swkotor.exe not found" -> the files aren't in your KOTOR folder; move them next to swkotor.exe. "This ... version isn't supported" -> your .exe differs from the Steam build; nothing was changed. Can't apply/revert -> make sure the game is fully closed. HOW IT WORKS (for the curious) ------------------------------ KOTOR tracks "whose turn" as a state number (2 = you, 7 = opponent). At the start of a set the engine hardcodes state 2. This patch redirects that one assignment to a small routine that, only when both players' tables are still empty (i.e. the genuine start of a set), calls the game's own random function and picks state 2 or 7 with equal odds. Per-turn alternation within a set is left completely intact. Open source: see src\fairpazaak.py.