├── .gitattributes ├── .gitignore ├── .vscode └── settings.json ├── changelog.MD ├── compile.py ├── LICENSE └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | *gsc text=auto eol=crlf 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /compiled 2 | /parsed 3 | *.exe 4 | *.dll 5 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.detectIndentation": false 3 | } -------------------------------------------------------------------------------- /changelog.MD: -------------------------------------------------------------------------------- 1 | # Version 4.4 2 | 3 | - Added Purist mode to enable playing No Jug games without persistent jug (minijug) for Plutonium 4 | - Added ability to manage custom splits file via chat messages for Modern Plutonium (4516+) 5 | - Changed the behavior of permaperk system to prevent possible stat/script state mismatch 6 | - Custom splits file can now be managed via `splits` chat message on Plutonium 7 | - Backspeed can now be set via `bs` chat message on Plutonium 8 | - Fix custom dvars on Redacted & Ancient 9 | 10 | # Version 4.3 11 | 12 | - Added integration for strat tester mods for Modern Plutonium (4516+) 13 | - New dvar anticheat version (less allocations) for new Plutonium update (5162+) 14 | - Changed watermarks to be a bit more readable 15 | - Changed fps limiter for new Plutonium update (5162+) 16 | - Fixed rare occurrence of false detection of duplicated patch which can terminate the game 17 | 18 | # Version 4.2 19 | 20 | - Added print with current key setting at the beginning of the game 21 | - Network frame fix now isn't applied on Pluto versions >2905 22 | - Restore change from 3.7 with `ai_corpseCount`, it's now again set to 5 23 | * For a bit of context, the DVAR game definition does set it to 8, but in another place the game adjusts it to 5 (specifically during the first launch process), so effectively all record games are historically played on 5. This setting will not apply after Plutonium update R5140 as they'll adjust their DVAR logic to this discovery and GSC adjustment won't be necessary. 24 | 25 | # Version 4.1 26 | 27 | - **[PLUTONIUM ONLY]** Added `key` dvar/chat command for overriding key position 28 | - Moved Origins tank depatch to the main patch file (standalone fix can still be used, check README for more details) 29 | - Fixed a crash related to box tracking on Farm & Depot 30 | 31 | # Version 4.0 32 | 33 | - Added system for tracking trades on survival maps 34 | - Added UTC timestamp to split print for versions that don't have game identifier 35 | - Added link to WaW communtiy patch to the readme 36 | - Fixed first box module race condition that could cause incorrect behavior 37 | - Fixed first box queue breaking when one of the codes isn't correct 38 | - Deprecated Redacted and Ancient versions 39 | - Changed structure of welcome prints and added bunch of info about game state 40 | - Locked client FPS (it's set to 332, as in-game limiter is highly inaccurate, this allows people to go up to 250 via their own locker, which is currently max fps allowed) 41 | - Anticheat now triggers Plutos cheat state (star) as well as the watermark 42 | - Removed all remaining hooks for B2 extensions 43 | - Added option to define custom splits via text file 44 | - Added viewmodel customization (independend from setting characters, it only changes character hands but allows for use mid game and has no conflicts in coop games) 45 | 46 | # Version 3.8 47 | 48 | - Add enabling `cg_drawIdentifier` dvar for future Pluto update 49 | 50 | # Version 3.7 51 | 52 | - Restore correct default value for `ai_corpseCount` dvar 53 | 54 | # Version 3.6 55 | 56 | - Additional fix to 3.5 change regarding `lb` command adding fire sale to Origins dig spots drop cycle 57 | 58 | # Version 3.5 59 | 60 | - Changed implementation of the character system (after old one was found to cause issues with some in-game elements, such as Origins challenge crates) and re-enabled it 61 | - Fixed `lb` command adding fire sale to Origins dig spots drop cycle 62 | - Added `kill_hud` dvar to allow for complete removal of all B2 hud for the entire game (details in readme) 63 | - Fixed accuracy of splits (will now show exact time of red round number at any round) 64 | 65 | # Version 3.4 66 | 67 | - Fixed `fridge` dvar 68 | - Adjusted patch logic to make dvar management comaptibile with Plutonium R4542 69 | 70 | # Version 3.3 71 | 72 | - Reduced frequency and simplified logic for flashing patch checksums 73 | - Temporarily disabled character system 74 | - Fixed potential logic error when players input incorrect box location for `lb` 75 | 76 | # Version 3.2 77 | 78 | - Fixed perma jug protection taking the health away alongside the permaperk itself 79 | 80 | # Version 3.1 81 | 82 | - Fixed various issues related to new character system 83 | - Fixed patch misbehaving after a fast restart (player related functionalities failed to initialize) 84 | - Fixed fridge thread not terminating properly 85 | - Fixed crash on Ancient that happened in coop after permaperks were awarded 86 | - Decreased rate of displaying GSC checksums during early rounds 87 | - Removed the hook for Fridge plugin (it has become the standard for players to just use binds for the `fridge` command) 88 | - Changed fridge logic in DVAR method, it now supports both `fridge` and `fridge all` commands and works same way as chat method 89 | - Added `whoami` chat message listener to show player current preset 90 | 91 | # Version 3.0 92 | 93 | - Preprocessor directives refactor (not affecting the gameplay directly) 94 | - Improvements to compilation script (not affecting the gameplay directly) 95 | - Patch now shows currently detected Plutonium version on load (may be inaccurate in older Plutonium versions) 96 | - On Plutonium R4516+, the patch no longer applies the trap fix, instead enabling Plutonium fix. For older versions (R2905) the fix is still enabled. 97 | - On Plutonium 4522+, the patch manages automatic display of patch and memory checksums (beginning of the game and end of every even round 20+) 98 | - Added tank prepatch GSC file to the repository `b2op_tomb.gsc` 99 | - Added some optimizations to variable and thread allocations 100 | - Enabled live DVAR protection (similar to B2FR) 101 | - Added new system for setting playable character (check readme for details) 102 | 103 | # Version 2.9 104 | 105 | - Fixed death machine shortcode `dm` 106 | 107 | # Version 2.8 108 | 109 | - Fixed patch not working on Redacted 110 | 111 | # Version 2.7 112 | 113 | - Patch will now attempt to detect usage of the wrong file and inform players about it 114 | - Bank now only fills up at the beginning of the game 115 | - Added explicit removal of RayGun permaperk 116 | - Added platform identifiers to welcome prints 117 | - Various changes to the compilation script and the patch itself for easier development process 118 | 119 | # Version 2.6 120 | 121 | ## Distribution 122 | 123 | - [Ancient] Version for Ancient is now compiled with new compiler which *should* remove most of the issues with it. 124 | - [Redacted] Version for Redacted is now distributed as uncompiled code (which simplifies development process). That being said, it is still required to use file from releases. 125 | - [Development] gsc-tool version requirement went up to 1.4.0 + improvements to the compilation script 126 | 127 | # Version 2.5 128 | 129 | - [Pluto only] Added `scr_skip_devblock` dvar to mitigate dev prints problem in Pluto R3904 130 | 131 | # Version 2.4 132 | 133 | - Removed Mob lighting fix 134 | - Increased frequency of round splits 135 | - Fixed split prints (again) 136 | - Adjusted weapon verification for first box module in coop 137 | - Added queueing to first box module, multiple guns can be queued now via a single message 138 | - Added separate dvar for toggling splits on and off (`splits` 0/1) 139 | - Changed round timer to appear on screen when lobby timer does (similar to b2fr) 140 | 141 | # Version 2.3 142 | 143 | - Fixed delayed split prints 144 | - Updated repository url in welcome print 145 | 146 | # Version 2.2 147 | 148 | - Removed Velocity Meter 149 | - Disabled DOF (visual) 150 | 151 | # Version 2.1 152 | 153 | - Hud scaling based on Aspect Ratio is now solo only 154 | - It's now possible to turn off backspeed fix by setting dvar `steam_backspeed` to 1 and restarting the match 155 | - Network frame hud used for debugging can now be used in released patch via getting `b2_plugin_network.gsc` plugin 156 | - Added feature from First Room Fix that allows for debugging drops glitching out using console prints via plugin `b2_powerup_tracking.gsc` 157 | 158 | # Version 2.0 159 | 160 | Major version update 161 | 162 | ## Changes 163 | 164 | - Added mob lighting fix (by [JezuzLizard](https://github.com/JezuzLizard/)) 165 | - Fixed an issue that'd cause box location override to not work properly [#5](https://github.com/B2ORG/T6-B2OP-PATCH/issues/5) 166 | - Info about First Box is now displayed alongside splits (watermark remains as it was) 167 | - Prevented infinite restarting on Tranzit if players kill zombie before permaperk function initialize 168 | - Prevented inifnite restarting caused by launching maps in offline mode 169 | - Fixed conflict that caused First Box to misbehave on maps that have permaperks 170 | - Added handling for HUD element alignment on Ultra Wide monitors 171 | 172 | ## Distribution 173 | 174 | - Versions from all launchers will now be available in the release as oppose to having to download code directly from code section, furthermore using uncompiled patch is no longer possible (unless future versions of plutonium add certain features to it's compiler) 175 | - Added back support for Ancient Plutonium (with huge aesterix) 176 | 177 | # Version 1.8 178 | 179 | - Fixed an error that prevented the patch from being usable on Irony based launchers (Redacted) 180 | 181 | # Version 1.7 182 | 183 | - Fixed Buildable tracker zeroing after one of the players disconnected from the game 184 | - Removed redundant includes 185 | - Network frame fix - Now network frame fix will create prints about it's presents if used without B2OP 186 | 187 | # Version 1.6 188 | 189 | - Fixed HUD being cut off on aspect ratios 4:3 5:4 and 16:10 190 | - Fixed HUD plugin causing timer and round timers to overlap 191 | - Fixed patch safety functions not ending the game properly 192 | 193 | # Version 1.5 194 | 195 | - Players can no longer move after safety from using conflicting patches triggered end game 196 | - Patch now actively removes minijug after round 15 instead of only on connect 197 | - Restored restart enforcement (at least for now) after permaperk award 198 | - Network frame evaluation no longer generates watermark on failure. Instead it checks again next round (effectively if game is on wrong network frame, at the beginning of each round there will be a print about bad network frame) 199 | - Added handle for splits plugin + created a template 200 | 201 | # Version 1.4 202 | 203 | - Watermarks refactor - watermarks now align horizontally. Introduced temporal watermarks that dissapear after X amount of time (to address users complaining about First Box watermark being permanent, it will now dissapear at the end of round 19) 204 | - Fixed moving box locations with DVAR method 205 | 206 | # Version 1.3 207 | 208 | - Permaperks 209 | * Added sniper points to award sequence 210 | * Added pistol points to award sequence 211 | * Added instakill to award sequence 212 | * Added double points to award sequence 213 | 214 | # Version 1.2 215 | 216 | - Permaperks 217 | * Fixed assignment logic for launchers using Irony compiler (Redacted & Ancient) 218 | * Autorestart is no longer forced on launchers using Irony and New Pluto solo 219 | * Added Cash Back & Teddy permaperks to assignment sequence 220 | - Info messages are no longer affected by playernames containing color codes 221 | 222 | # Version 1.1 223 | 224 | - Restricted trap fix to only apply on maps that it is needed on (to prevent issues with Frozen rounds on Origins) 225 | -------------------------------------------------------------------------------- /compile.py: -------------------------------------------------------------------------------- 1 | from traceback import print_exc 2 | from copy import copy, deepcopy 3 | import subprocess, sys, os, zipfile, re, binascii, shutil 4 | from typing import Callable, Optional 5 | 6 | 7 | # Config 8 | CWD = os.path.dirname(os.path.abspath(__file__)) 9 | B2OP = "b2op.gsc" 10 | B2OP_TOMB = "b2op_tomb.gsc" 11 | GAME_PARSE = "t6" 12 | GAME_COMP = "t6" 13 | MODE_PARSE = "parse" 14 | MODE_COMP = "comp" 15 | COMPILER_GSCTOOL = "gsc-tool.exe" 16 | PARSED_DIR = "parsed/" + GAME_PARSE 17 | COMPILED_DIR = "compiled/" + GAME_COMP 18 | ZMUTILITY_DIR = "maps/mp/zombies" 19 | FORCE_SPACES = True 20 | BAD_COMPILER_VERSIONS: set["Version"] = set() 21 | COMPILE_TANK_PATCH = False 22 | STRICT_FILE_RM_CHECK = int(os.environ.get("B2_STRICT_CHECK", True)) 23 | 24 | class Version: 25 | UNKNOWN = [-1, -1, -1] 26 | """Signature of an unknown version""" 27 | 28 | 29 | def __init__(self) -> None: 30 | self._version: list[int] 31 | 32 | 33 | def __eq__(self, __object) -> bool: 34 | return self._version == __object._version 35 | 36 | 37 | def __ne__(self, __object) -> bool: 38 | return self._version != __object._version 39 | 40 | 41 | def __lt__(self, __object) -> bool: 42 | if self._version[0] < __object._version[0]: 43 | return True 44 | if self._version[0] <= __object._version[0] and self._version[1] < __object._version[1]: 45 | return True 46 | if self._version[0] <= __object._version[0] and self._version[1] <= __object._version[1] and self._version[2] < __object._version[2]: 47 | return True 48 | return False 49 | 50 | 51 | def __gt__(self, __object) -> bool: 52 | if self._version[0] > __object._version[0]: 53 | return True 54 | if self._version[0] >= __object._version[0] and self._version[1] > __object._version[1]: 55 | return True 56 | if self._version[0] >= __object._version[0] and self._version[1] >= __object._version[1] and self._version[2] > __object._version[2]: 57 | return True 58 | return False 59 | 60 | 61 | def __le__(self, __object) -> bool: 62 | return self == __object or self < __object 63 | 64 | 65 | def __ge__(self, __object) -> bool: 66 | return self == __object or self > __object 67 | 68 | 69 | def __str__(self) -> str: 70 | return ".".join([str(v) for v in self._version]) 71 | 72 | 73 | def __hash__(self) -> int: 74 | return hash(f"{self._version[0]}|{self._version[1]}|{self._version[2]}") 75 | 76 | 77 | @staticmethod 78 | def parse(_version: str): 79 | version = Version() 80 | version._version = [int(v) for v in _version.split(".")] 81 | version.trim() 82 | return version 83 | 84 | 85 | def trim(self): 86 | if len(self._version) > 3: 87 | self._version = self._version[:3] 88 | return self 89 | 90 | 91 | class UnknownVersion(Version): 92 | def __init__(self) -> None: 93 | super().__init__() 94 | self._version = self.UNKNOWN 95 | 96 | 97 | class Chunk: 98 | def __init__(self, header: str | None = None) -> None: 99 | self.header = header 100 | 101 | 102 | def __enter__(self): 103 | if self.header is not None: 104 | print(self.header) 105 | print("-" * 100) 106 | 107 | 108 | def __exit__(self, *args): 109 | print("-" * 100, "\n") 110 | 111 | 112 | class GscToolException(Exception): 113 | def __init__(self, *args): 114 | super().__init__(*args) 115 | 116 | 117 | class CodeStyleException(Exception): 118 | def __init__(self, *args): 119 | super().__init__(*args) 120 | 121 | 122 | class Gsc: 123 | REPLACEMENTS: dict[str, str] = { 124 | "#define RAW 1": "#define RAW 0", 125 | "#define ANCIENT 1": "#define ANCIENT 0", 126 | "#define REDACTED 1": "#define REDACTED 0", 127 | "#define PLUTO 1": "#define PLUTO 0" 128 | } 129 | def __init__(self, skip_changes: bool = False) -> None: 130 | self._code: str 131 | self._skip_changes: bool = skip_changes 132 | 133 | 134 | def load_file(self, path: str) -> "Gsc": 135 | with open(path, "r", encoding="utf-8") as gsc_io: 136 | self._code = gsc_io.read() 137 | return self 138 | 139 | 140 | def check_whitespace(self) -> "Gsc": 141 | tab: int = self._code.find("\t") 142 | if tab != -1: 143 | line: int = self._code.count("\n", 0, tab) 144 | print(f"TAB found in line {line + 1}. Make sure to use 4 spaces instead of a tab!") 145 | if FORCE_SPACES: 146 | raise CodeStyleException(f"Found TABs in line {line + 1}") 147 | return self 148 | 149 | 150 | def check_debug(self) -> "Gsc": 151 | self.debugger = self._code.find("#define DEBUG 1") != -1 152 | return self 153 | 154 | 155 | def save(self, path: str, local_changes: dict[str, str]) -> "Gsc": 156 | changes: dict[str, str] = deepcopy(Gsc.REPLACEMENTS) | local_changes 157 | changed: str = copy(self._code) 158 | if not self._skip_changes: 159 | for old, new in changes.items(): 160 | changed = changed.replace(old, new) 161 | with open(path, "w", encoding="utf-8") as gsc_io: 162 | gsc_io.write(changed) 163 | return self 164 | 165 | 166 | def edit_in_place(path: str, **replace_pairs) -> None: 167 | with open(path, "r", encoding="utf-8") as gsc_io: 168 | gsc_content = gsc_io.read() 169 | 170 | for old, new in replace_pairs.items(): 171 | if old in gsc_content: 172 | print(f"Replacing '{old}' with '{new}'") 173 | gsc_content = gsc_content.replace(old, new) 174 | 175 | with open(path, "w", encoding="utf-8") as gsc_io: 176 | gsc_io.write(gsc_content) 177 | 178 | 179 | def wrap_subprocess_call(*calls: str, timeout: int = 5, cli_output: bool = True, eval_callback: Optional[Callable[[subprocess.CompletedProcess, str], subprocess.CompletedProcess]] = None, **sbp_args) -> subprocess.CompletedProcess: 180 | call: str = " ".join(calls) 181 | try: 182 | print(f"Call: {call}") 183 | process: subprocess.CompletedProcess = subprocess.run(call, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True, timeout=timeout, **sbp_args) 184 | except Exception: 185 | print_exc() 186 | sys.exit(1) 187 | else: 188 | if callable(eval_callback): 189 | return eval_callback(process, call) 190 | print("Output:") 191 | print(process.stdout.strip() if cli_output else "suppressed") 192 | return process 193 | 194 | 195 | def check_gsc_error(process: subprocess.CompletedProcess, cmd: str) -> subprocess.CompletedProcess: 196 | if "[ERROR]" in process.stdout: 197 | raise GscToolException(f"Command: '{cmd}'\n{process.stdout.strip()}") 198 | return process 199 | 200 | 201 | def arg_path(*paths: str) -> str: 202 | return f'"{os.path.join(*paths)}"' 203 | 204 | 205 | def file_rename(old: str, new: str) -> None: 206 | if os.path.isfile(new): 207 | os.remove(new) 208 | if os.path.isfile(old): 209 | if not os.path.isdir(os.path.dirname(new)): 210 | os.makedirs(os.path.dirname(new)) 211 | os.rename(old, new) 212 | 213 | 214 | def clear_files(dir: str, pattern: str) -> None: 215 | if not os.path.isdir(dir): 216 | return 217 | file_list: list[str] = os.listdir(dir) 218 | if STRICT_FILE_RM_CHECK or len(file_list) >= 16: 219 | input(f"You're about to remove {len(file_list)} files. Press ENTER to continue, or abord the program\n\t{"\n\t".join([os.path.basename(f) for f in file_list])}") 220 | 221 | for file in file_list: 222 | if re.match(pattern, file): 223 | path_to_file = os.path.join(dir, file) 224 | os.remove(path_to_file) if os.path.isfile(path_to_file) else shutil.rmtree(path_to_file) 225 | 226 | 227 | def flash_hash(file_path: str) -> str: 228 | with open(file_path, "rb") as file_io: 229 | # Convert to uINT and represent as uppercase hex 230 | hash: str = format(binascii.crc32(file_io.read()) & 0xFFFFFFFF, "08X") 231 | print(f"Hash of {os.path.basename(file_path)}: '0x{hash}'") 232 | return hash 233 | 234 | 235 | def create_zipfile(zip_target: str, file_to_zip: str, file_in_zip: str) -> None: 236 | try: 237 | with zipfile.ZipFile(zip_target, "w", compression=zipfile.ZIP_DEFLATED, compresslevel=9) as zip: 238 | zip.write(file_to_zip, file_in_zip) 239 | except FileNotFoundError: 240 | print("WARNING! Failed to create zip file due to missing compiled file") 241 | 242 | 243 | def verify_compiler() -> Version | bool: 244 | return verify_compiler_version() if os.path.isfile(os.path.join(CWD, COMPILER_GSCTOOL)) else False 245 | 246 | 247 | def verify_compiler_version() -> Version: 248 | compiler: subprocess.CompletedProcess = wrap_subprocess_call(COMPILER_GSCTOOL, cli_output=False) 249 | lines: list[str] = compiler.stdout.split("\n") 250 | if not lines: 251 | print("Could not verify compiler version") 252 | return UnknownVersion() 253 | 254 | version: list[str] = re.compile(r"([\d.]+)").findall(lines[0]) 255 | if len(version) != 1: 256 | print("Could not verify compiler version") 257 | return UnknownVersion() 258 | 259 | ver: Version = Version.parse(version[0]) 260 | if ver < Version.parse("1.4.0") or ver in BAD_COMPILER_VERSIONS: 261 | input(f"WARNING! Potentially incompatibile version of the compiler ({str(ver)}) was found. Press ENTER to continue") 262 | return ver 263 | 264 | 265 | def main() -> None: 266 | os.chdir(CWD) 267 | print(f"\nSet CWD to: {os.getcwd()}\n") 268 | 269 | # Util 270 | compiler: Version | bool = verify_compiler() 271 | if compiler is False: 272 | print(f"'{COMPILER_GSCTOOL}' compiler executable not found in '{CWD}'") 273 | sys.exit(1) 274 | print() 275 | 276 | # Clear up all previous files 277 | clear_files(os.path.join(CWD, PARSED_DIR), r".*") 278 | clear_files(os.path.join(CWD, COMPILED_DIR), r".*") 279 | 280 | gsc: Gsc = (Gsc() 281 | .load_file(os.path.join(CWD, B2OP)) 282 | .check_whitespace() 283 | .check_debug() 284 | ) 285 | 286 | # New pluto 287 | with Chunk("PLUTONIUM:"): 288 | gsc.save( 289 | os.path.join(CWD, B2OP), {"#define PLUTO 0": "#define PLUTO 1"} 290 | ) 291 | wrap_subprocess_call( 292 | COMPILER_GSCTOOL, "-m", MODE_PARSE, "-g", GAME_PARSE, "-s", "pc", B2OP, eval_callback=check_gsc_error 293 | ) 294 | wrap_subprocess_call( 295 | COMPILER_GSCTOOL, "-m", MODE_COMP, "-g", GAME_COMP, "-s", "pc", arg_path(CWD, PARSED_DIR, B2OP), eval_callback=check_gsc_error 296 | ) 297 | file_rename( 298 | os.path.join(CWD, PARSED_DIR, B2OP), os.path.join(CWD, PARSED_DIR, "b2op_precompiled_pluto.gsc") 299 | ) 300 | file_rename( 301 | os.path.join(CWD, COMPILED_DIR, B2OP), os.path.join(CWD, COMPILED_DIR, "b2op-plutonium.gsc") 302 | ) 303 | 304 | flash_hash(os.path.join(CWD, COMPILED_DIR, "b2op-plutonium.gsc")) 305 | 306 | if COMPILE_TANK_PATCH: 307 | gsc_origins: Gsc = Gsc().load_file(os.path.join(CWD, B2OP_TOMB)).check_whitespace() 308 | 309 | gsc_origins.save( 310 | os.path.join(CWD, B2OP_TOMB), {} 311 | ) 312 | wrap_subprocess_call( 313 | COMPILER_GSCTOOL, "-m", MODE_COMP, "-g", GAME_COMP, "-s", "pc", B2OP_TOMB, eval_callback=check_gsc_error 314 | ) 315 | file_rename( 316 | os.path.join(CWD, COMPILED_DIR, B2OP_TOMB), os.path.join(CWD, COMPILED_DIR, "b2op-tomb.gsc") 317 | ) 318 | create_zipfile( 319 | os.path.join(CWD, COMPILED_DIR, "b2op-tomb.zip"), 320 | os.path.join(CWD, COMPILED_DIR, "b2op-tomb.gsc"), 321 | os.path.join("zm_tomb", "b2op-tomb-plutonium.gsc") 322 | ) 323 | 324 | flash_hash(os.path.join(CWD, COMPILED_DIR, "b2op-tomb.gsc")) 325 | 326 | # Redacted 327 | with Chunk("REDACTED:"): 328 | gsc.save( 329 | os.path.join(CWD, B2OP), {"#define REDACTED 0": "#define REDACTED 1"} 330 | ) 331 | wrap_subprocess_call( 332 | COMPILER_GSCTOOL, "-m", MODE_PARSE, "-g", GAME_PARSE, "-s", "pc", B2OP, eval_callback=check_gsc_error 333 | ) 334 | file_rename( 335 | os.path.join(CWD, PARSED_DIR, B2OP), os.path.join(CWD, COMPILED_DIR, "b2op-redacted.gsc") 336 | ) 337 | 338 | flash_hash(os.path.join(CWD, COMPILED_DIR, "b2op-redacted.gsc")) 339 | 340 | # Ancient 341 | with Chunk("ANCIENT:"): 342 | gsc.save( 343 | os.path.join(CWD, B2OP), {"#define ANCIENT 0": "#define ANCIENT 1"} 344 | ) 345 | wrap_subprocess_call( 346 | COMPILER_GSCTOOL, "-m", MODE_PARSE, "-g", GAME_PARSE, "-s", "pc", B2OP, eval_callback=check_gsc_error 347 | ) 348 | wrap_subprocess_call( 349 | COMPILER_GSCTOOL, "-m", MODE_COMP, "-g", GAME_COMP, "-s", "pc", arg_path(CWD, PARSED_DIR, B2OP), eval_callback=check_gsc_error 350 | ) 351 | file_rename( 352 | os.path.join(CWD, PARSED_DIR, B2OP), os.path.join(CWD, PARSED_DIR, "b2op_precompiled_ancient.gsc") 353 | ) 354 | file_rename( 355 | os.path.join(CWD, COMPILED_DIR, B2OP), os.path.join(CWD, COMPILED_DIR, "b2op-ancient.gsc") 356 | ) 357 | create_zipfile( 358 | os.path.join(CWD, COMPILED_DIR, "b2op-ancient.zip"), 359 | os.path.join(CWD, COMPILED_DIR, "b2op-ancient.gsc"), 360 | os.path.join(ZMUTILITY_DIR, "_zm_utility.gsc") 361 | ) 362 | 363 | flash_hash(os.path.join(CWD, COMPILED_DIR, "b2op-ancient.gsc")) 364 | 365 | # Warn if release has debugger enabled 366 | if gsc.debugger: 367 | print(f"WARNING!!! Debugger is enabled") 368 | 369 | # Reset file 370 | gsc.save(os.path.join(CWD, B2OP), {"#define RAW 0": "#define RAW 1"}) 371 | 372 | 373 | if __name__ == "__main__": 374 | main() 375 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # T6-B2OP-PATCH 2 | 3 | Patch for playing world record games in Black Ops II Zombies. Made based on community decision to create an official community patch from March 2023. What makes this patch stick out from among countless patches that have come before it, is focus on optimization, stability, and user freedom. Stuff like box, fridge overrides or characters are fully optional and invoked in-game by the players. 4 | 5 | Patch has already proved itself in multiple top games, including, but not limited to: 6 | - Town [100](https://x.com/Slewya/status/1837385114940022888) No Jug WR by Slewya 7 | - Town [29:14](https://youtu.be/jkJhQG_dsK0) 30sr WR by TheBrokenHead115 8 | - Die Rise [120](https://youtu.be/N0D1UieRNgM) coop WR by Issuez & NoMoleMan 9 | - Mob of the Dead [31:09](https://www.twitch.tv/videos/1918422380) 30sr WR by Becca 10 | - Buried [255](https://www.twitch.tv/videos/2023305226) WR by Blasteress 11 | - Buried [210](https://www.twitch.tv/videos/2241796423) coop WR by Blasteress & notway 12 | - Buried [150](https://www.twitch.tv/videos/1866405878) No Power coop WR by Astrox & Nessquik 13 | - Origins [173](https://www.twitch.tv/videos/2546264620) WR by Vengiix 14 | - Origins [131](https://youtu.be/w2_WvEB6KSs) coop WR by DestroyeR and NoMoleMan 15 | 16 | # Informations 17 | 18 | Please inform me about any issues you may encounter with the patch, so they can be fixed, preferably with decent amount of information in what circumstances an issue occured. The main channel for issues is GitHubs Issues section, although it won't hurt to ask about it on [Discord](https://b2.wtf/discord/) first 19 | 20 | I'm currently the sole developer for B2OP, but the person making almost all important decisions is [Astrox](https://twitter.com/lAsTroXl). The best way to talk to both of us about the patch is joining the Discord from the link above and talk in the dedicated B2 section 21 | 22 | Before reporting a problem, please check out the [FAQ section down below](#faq), you may find answers you're looking for there 23 | 24 | [Also check out a B2 website with useful tools and data](https://b2.wtf/) 25 | 26 | # Categories 27 | 28 | This patch is meant to be used during games of Highrounds, No Powers & Round Speedruns. Below you can see alternatives for other categories 29 | 30 | | Category| Patch | Creator | Link | 31 | | --- | --- | --- | --- | 32 | | First Room | B2FR | Zi0 | [GitHub](https://github.com/B2ORG/T6-B2FR-PATCH) | 33 | | EE Speedrun | Easter Egg GSC Timer | HuthTV | [GitHub](https://github.com/HuthTV/BO2-Easter-Egg-GSC-timer) | 34 | | Song Speedruns | B2SONG | Zi0 | [GitHub](https://github.com/B2ORG/T6-B2SONG-PATCH) | 35 | 36 | > [!TIP] 37 | > For World at War you can check [Evelyn's community patch](https://gitlab.com/EvelynYuki/WAW-Community-Patch/) 38 | 39 | > [!TIP] 40 | > For Black Ops I you can check [Evelyn's CT5 mod](https://gitlab.com/EvelynYuki/Competitive-T5/), in that game patching is NOT allowed, however you can use a plugin (which is similar as you'd use a tool like TIM or LiveSplit with game hooks) 41 | 42 | > [!TIP] 43 | > For Black Ops III you can check [oJumpy's community patches](https://steamcommunity.com/profiles/76561199211441639/myworkshopfiles/?appid=311210) 44 | 45 | # Installation 46 | 47 | Since version 2.0, all scripts that are meant to be used by players are available in [releases](https://github.com/B2ORG/T6-B2OP-PATCH/releases) section. Downloading raw code from code section will not work! 48 | 49 | > [!TIP] 50 | > I've created a video on [how to install these patches](https://youtu.be/yjNbmlya6ik) in case instructions here are unclear 51 | 52 | > [!WARNING] 53 | > Redacted and Ancient Plutonium versions are now DEPRECATED. It means they're no longer guaranteed to receive new features and in the future I'll stop supporting them completely. Black Ops II is at the stage where by using older launchers for record games is pointless and is reducing the competitive integrity of the community, and maintaining the patch for 4 versions (realistically 2905 is already quite different from live) is an extra overhead. 54 | > End of life time for these versions isn't currently set in stone, from my perspective the sooner the better. Currently planning it for the next major release. 55 | 56 | > [!CAUTION] 57 | > Whenever there's a new major patch release (eg. 2.* to 3.0 or 3.* to 4.0), please note that a lot of internal logic changes, therefore stability may not be up to the full standard. While we recommend you update your patch as we fix issues and add new features, we acknowledge increased risk with new major versions, which is why we usually leave most recent release of last major version in releases for some time, so players can access it until new version was battletested and issues have been fixed. We appreciate early adopters, who by reporting any problems help us provide the stable experience. 58 | 59 | ## Plutonium 60 | 61 | Download script `b2op-plutonium.gsc` from releases section, and put it in your Plutonium folder, by default it's located in: 62 | 63 | ``` 64 | %LOCALAPPDATA%\Plutonium\storage\t6\raw\scripts\zm 65 | ``` 66 | 67 | > [!TIP] 68 | > You can press CTRL + R on your keyboard and paste this string there. Assuming you haven't changed any Plutonium paths, directory with scripts should open right away. 69 | 70 | > [!WARNING] 71 | > Prior to patch version 4.0, the directory we recommended here was `Plutonium\storage\t6\scripts\zm` (the only difference is that `raw` folder in the middle), you should still use that directory if you want to use the patch in 2905. On modern Plutonium, it is recommended to start using the new location (remove the patch you currently have in the old location and place the updated version in the new directory specified above) 72 | 73 | For previous versions, network frame fix script was separate, but now it is built into the patch version for Plutonium (for this reason make sure not to use version for Redacted or Ancient on Plutonium) 74 | 75 | ## Redacted LAN 76 | 77 | Download script `b2op-redacted.gsc` from releases section, and put it in script folder in your Redacted directory. 78 | 79 | ``` 80 | .\data\scripts 81 | ``` 82 | 83 | > [!WARNING] 84 | > Please do not use `fast_restart` on Redacted, as the patch will not load afterwards. It can also cause the game to just crash outright. 85 | 86 | ## Plutonium - Ancient (r353 and similar) 87 | 88 | To install, download `b2op-ancient.zip` from releases section, and inject it the same way as other patches for Ancient. Do note, zip contains a directory structure and filename that you're suppose to inject without changing it, so far people always injected files called `_clientids.gsc`, but in this case it would not work. 89 | 90 | > [!CAUTION] 91 | > I have found a way of "fixing" the problem with network frame on Ancient Plutonium. In order to do that i need to ship B2OP for that launcher alongside existing 3arc code, which we obtained by decompiling game scripts. Because of it, they many not 100% reflect the proper game logic, we believe it's accurate but it's only as good as the decompiler. Because of that fact, **I CAN NOT** guarantee the game integrity to the extent i can do that with other versions of this patch, use at your own risk! 92 | 93 | > [!TIP] 94 | > Ancient Plutonium injection oftentimes fail, it can sometimes take multiple attempts to successfully inject. A good indicator is, after an injection try to open the console, if it opens the patch has been injected. 95 | 96 | ## B2OP Features 97 | 98 | A high level overview what features are available in each of the versions. 99 | 100 | | Feature | Plutonium | Plutonium (2905) | Redacted | Ancient | 101 | | :--- | :---: | :---: | :---: | :---: | 102 | | Plutonium anticheat integration | ✓ | ✗ | ✗ | ✗ | 103 | | Basic anticheat | ✓ | ✓ | ✓ | ✓ | 104 | | Network frame fix | ✓ | ✓ | ✗ | ✓ | 105 | | Automatic Permaperks & Bank | ✓ | ✓ | ✓ | ✓ | 106 | | Backspeed (with option to adjust) | ✓ | ✓ | ✓ | ✓ | 107 | | Trap / JetGun fix | ✗ | ✓ | ✓ | ✓ | 108 | | HUD timers | ✓ | ✓ | ✓ | ✓ | 109 | | HUD buildable counter | ✓ | ✓ | ✓ | ✓ | 110 | | HUD visibility toggling | ✓¹ | ✓¹ | ✓¹ | ✓¹ | 111 | | Showing time splits on key rounds | ✓ | ✓ | ✓ | ✓ | 112 | | Customizing key rounds for time splits | ✓¹ | ✗ | ✗ | ✗ | 113 | | First Box (configurable) | ✓ | ✓ | ✓¹ | ✓¹ | 114 | | Fridge weapon (configurable) | ✓ | ✓ | ✓¹ | ✓¹ | 115 | | Characters & Viewmodels (configurable) | ✓ | ✓ | ✓ | ✓ | 116 | | Simple trade tracker | ✓ | ✓ | ✓ | ✓ | 117 | | FPS Limiter | ✓ | ✓ | ✓ | ✓ | 118 | | DOF Disabled | ✓ | ✓ | ✓ | ✓ | 119 | | Toogleable Purist no jug mode | ✓ | ✓ | ✓ | ✓ | 120 | 121 | 1. Configuration only as host 122 | 123 | # Patch checksum 124 | 125 | Starting on Plutonium version R4516, the launcher is able to show checksum of each of the patches you have as well as the entire game memory (i'm massively oversimplifying here, geeks give me a break). [Here as an article about what a checksum is](https://www.howtogeek.com/363735/what-is-a-checksum-and-why-should-you-care/). Every file has a different signature, and changing as much as a single letter in the patch changes it's signature entirely. 126 | 127 | ![checksum example](https://b2.wtf/images/checksum-img-example.jpg) 128 | 129 | As you can see on the screenshot above, each of the GSC files you have loaded into the game is listed by the game. Occurance of this data is navigated by `cg_flashScriptHashes` DVAR (do not worry, the patch will set this DVAR for you automatically, no action required). 130 | 131 | ## Checksum example screenshot breakdown 132 | 133 | Each line represents a different GSC file. At the beginning there are 2 checksums, we're using the 2nd one in parenthesis for validation (the highlighted one). Afterwards comes the file name (if the patch is not compiled) or `(raw (source))` if patch is compiled. In case of B2OP it'll be the latter. You may use tool [mentioned here](#how-can-i-use-checksums-to-validate-patch-in-my-own-or-someone-elses-game) to validate the file using that checksum. 134 | 135 | > [!NOTE] 136 | > Checksums on the screenshots are used for example purposes, they're not representative of currently valid GSC files, do not use those values for validation. 137 | 138 | ## Game memory checksum 139 | 140 | Again, i use this term to help people understand the concept, please do not get mad. Those are checksums generated from the game memory and represent the factual state of your game. This is a combination of patches/mods you loaded and internal game stuff. Those can only be generated by the game and whether or not they'll be useful for checking legitimacy is to be seen. They are not part of this screenshot and are managed by a different DVAR `cg_drawChecksums` (also managed by the patch). 141 | 142 | ## How does B2 ecosystem interact with this new verification process 143 | 144 | Checksum of each new B2 patch version will be attached to the release, which will allow you to verify whether a valid patch is used yourself. In terms of what the patch do, it force enables displaying those checksums certain rounds (details on that below). They are only shown for few seconds and not on milestone rounds (to not ruin screenshots etc.) 145 | 146 | ## How can i use checksums to validate patch in my own or someone elses game 147 | 148 | I've [created a tool](https://b2.wtf/gsc/hash) for doing just that, type in the checksum (one highlighted on the screenshot above) and press `Check`. If checksum is registered in the system, you'll see all the relevant details about the file. Altenatively, you can drag the file itself into the page to see it's checksum (and details if the system has them). 149 | 150 | ## For game verificators 151 | 152 | You should expect checksums to be displayed at the end of following rounds (for version 3.3 onwards) 153 | 154 | End of 18, 28, 38 onwards up to the end, and additionally 155 | 156 | | Type of game | Start of additional displays | 157 | | :--- | :--- | 158 | | Survival Maps Solo | End of .3 rounds from 83 onwards | 159 | | Survival Maps Coop | End of .3 rounds from 73 onwards | 160 | | Survival Maps 3p/4p | End of .3 rounds from 63 onwards | 161 | | Normal Maps Solo | End of .3 rounds from 153 onwards | 162 | | Normal Maps Coop | End of .3 rounds from 103 onwards | 163 | | Normal Maps 3p/4p | End of .3 rounds from 63 onwards | 164 | 165 | # FAQ 166 | 167 | 1) My game is restarting automatically, how do i fix it? 168 | 169 | - You don't, that's intended behavior of the system that's giving you permaperks to prevent a rare bug where permaperks were not taken away from players sometimes. How it works is you load into the game, each player is scanned for missing permaperks, if anyone is missing something, they're awarded missing permaperks, and then the game will force a restart. After the restart you are free to carry on. Do note, most of the time you are going to lose some of the perks almost instantly, so restarts few minutes in will require the process to repeat. Since version 2.0, if you restart on round 1, the permaperk awarding system will not be initiated to prevent issues like infinite restarts on Tranzit, where players would kill a zombie too fast and game would just keep giving them perma headshot damage back. 170 | 171 | 2) I put the patch in the right folder but it does not work 172 | 173 | - Make sure you downloaded right version from [releases section](https://github.com/B2ORG/T6-B2OP-PATCH/releases) (do not download the zip file called Source code, it is added to the release automatically by github and contains raw code, that is not going to work). Failing to do so may result in the patch not working at all, or misbehaving, which in some situations can cause your game to not be legit. Always match names of released files with the launcher you're using. Read Installation instructions above. 174 | 175 | 3) It says the patch gives players first box, which is not legit. How come this patch is deemed an official patch for BO2 records? 176 | 177 | - That's because in order for weapons in the box to be changed, you have to explicitly execute the right command (or chat message, details below in [Overriding box location](#overriding-box-location) section). If you don't do that, the box will remain untouched. 178 | 179 | 4) Is there anything i need to worry about regarding legitimacy of my game while using this patch? 180 | 181 | - Do not use First Box or Box Location modifiers while playing Highrounds, those are OK only for round speedruns (and other categories that explicitly allow it). Make sure you're using the correct version of the patch in relation to your launcher (for example, Redacted version will not fix Network Frame problem on Plutonium, etc.). Also do not use this patch for categories it's not meant for. I've linked alternatives to other categories in a table above in [Categories](#categories) section 182 | 183 | 5) I heard this patch may cause early errors 184 | 185 | - B2OP was built with optimizations for this kind of things in mind. But yes, technically any patch you load (even something so simple that has 5 lines of code and does only one thing) is an additional overhead for the game. From what we've seen so far from players using it, the patch does not directly contribute to any errors. One thing i can recommend is disabling HUD elements, because from what we've been able to measure, that has the biggest overhead from all of the things this patch does. See [HUD](#hud) section to check how to do that 186 | 187 | 6) Why version for Ancient is so different 188 | 189 | - Ancient has an internal bug that's causing something called **network frame** to have a wrong values on coop. What it does, is it's causing certain scripts to execute at different rates. In order to fix it on Ancient specifically, B2OP has to contain a big chunk of the 3arc code that it's replacing (alongside the function that has to be changed in order to fix the flawed network frame behavior). This is causing the file to be distributed as a zip (so you can extract the directory inside of it and it's ready for injection) and is noticeably bigger in size. 190 | 191 | 7) What is a DVAR 192 | 193 | - DVAR is a variable that player can (usually) modify from the game console. DVARs mentioned in this document are all changeable. In order to set a DVAR, press `~` button, then type in dvar name, and value you want to assign to it, like so 194 | 195 | ``` 196 | cg_drawReset 1 197 | ``` 198 | 199 | 8) Network Frame Fix file is missing from this repository 200 | 201 | - As it's not something i naturally expect players to use (B2OP includes that fix), i moved this file from this repository to [this gist](https://gist.github.com/Zi0MIX/2b9fb6c049111c72d3f9945a45b4c2b1), so you can still use it if you for example develop your own BO2 script 202 | 203 | 9) There is a bunch of text showing up on my screen while playing on Plutonium with this patch 204 | 205 | - Yes, most of it is either Plutonium anticheat stuff that the patch triggers, or data about the game that is useful for both you the player and also people who watch/validate your game. Even tho it may look like a lot, the patch was built to show as little as possible while providing all important info. 206 | 207 | 10) I'm getting an error about having 2 patches loaded at the same time. 208 | 209 | - Plutonium have changed their go-to directory for scripts, but they maintain them for backwards compatibility. Try the following 210 | - Check if you still have a `t6r` folder in your Plutonium directory, if so, just remove it (it's a leftover from earliest versions of Plutonium) 211 | - Check if you have anything in `Plutonium\storage\t6\scripts\zm`, if so, just remove it. The patch should be in `Plutonium\storage\t6\raw\scripts\zm` alongside `ranked.gsc` file according to current Plutonium guidelines. 212 | 213 | 11) I want to play No Jug category without persistent jug 214 | 215 | - There is a dedicated setting to it, a description can be found below, but tl;dr is send `purist 1` chat message as a host and restart the map 216 | 217 | # Steps for basic troubleshooting 218 | 219 | - Make sure you're using correct and up to date version downloaded from releases section on this page. 220 | - Remove other patches. B2 Plugins should not cause any issues, but if you are using any, for the sake of troubleshooting remove them as well. 221 | - Check if the directory the patch is in is correct. Perhaps you have multiple instances of Plutonium or Redacted and you put it in the directory belonging to another instance. 222 | 223 | # HUD 224 | 225 | All HUD elements are toogleable (with the exception of watermarks), below is the table with DVARs that can be used to hide and show them. Change DVAR state by invoking the in-game command line (`~` button by default), enter name of the DVAR and value following the spacebar. 226 | 227 | > [!TIP] 228 | > Disabling hud elements reduces variable allocations of the patch, so if you're a fan of optimizations, toggle all of these off by pasting following line into your console. 229 | 230 | ``` 231 | timers 0;splits 0;buildables 0 232 | ``` 233 | 234 | | HUD element | DVAR | Default | 235 | | --- | --- | --- | 236 | | Timers | `timers` 0/1 | Enabled | 237 | | SPH print | `splits` 0/1 | Enabled | 238 | | Buildables HUD | `buildables` 0/1 | Enabled | 239 | 240 | ## Kill hud 241 | 242 | You can also permanently disable all B2 hud for the entire game, which will additionally remove some allocations from the script itself. This shouldn't really be necessary, but for a situation where every single child variable counts it can be useful. To do that set the following DVAR 243 | 244 | ``` 245 | kill_hud 1 246 | ``` 247 | 248 | > [!WARNING] 249 | > Once HUD is killed, you won't be able to re-enable it without restarting the game, normally just hiding it using the method shown above should be enough. 250 | 251 | ## Split display accuracy 252 | 253 | Prior to version 3.5 splits were not fully accurate. Starting on 3.5, B2OP emulates the logic used by original code to calculate the accurate red number moment (end of fade-in transition). Below is a table showing time difference for each split between the actual red number time and time displayed by split message. 254 | 255 | | Round split | Offset (+ seconds) | 256 | | :--- | :---: | 257 | | 30 | -0.25 | 258 | | 50 | -1.25 | 259 | | 70 | -2.25 | 260 | | 100 | -4.25 | 261 | 262 | ## Customizing splits 263 | 264 | On Plutonium version R4516+ you can customize on which rounds splits are going to be shown, in order to do that 265 | 266 | ### Direct file edit 267 | 268 | ``` 269 | %localappdata%\Plutonium\storage\t6\raw\scriptdata 270 | ``` 271 | 272 | Or wherever your Plutonium is installed. If some part of this path is missing on your pc, just create empty folders. 273 | 274 | Then proceed to create a `b2op` folder inside of scriptdata, create `splits.txt` file inside. You can specify all splits you want displayed there, for example, writing the following contents to the file, will cause splits to show on rounds 15, 18, 21, 24, 27 and 30. 275 | 276 | ``` 277 | 15 278 | 18 279 | 21 280 | 24 281 | 27 282 | 30 283 | ``` 284 | 285 | ### Chat message 286 | 287 | As of B2OP version 4.4, you can set splits using chat messages as host. Under the hood, the patch will just overwrite contents of the file described above. 288 | 289 | - To check current custom splits settings type `splits` in chat 290 | - To remove custom splits settings and revert to default, type `splits 0` 291 | - To define new set of custom splits, type `splits 2 3 4 5`, which will cause the splits to show on rounds 2, 3, 4 and 5. Adjust round numbers accordingly 292 | 293 | > [!WARNING] 294 | > If the `splits.txt` file is not empty, default splits rounds used by the patch no longer apply, so you need to specify ALL of the rounds you want it to show up yourself. 295 | 296 | > [!NOTE] 297 | > In a coop game, splits defined by the host player will apply to all players. 298 | 299 | > [!WARNING] 300 | > Splits customization (much like any other feature based on file IO) won't work if you have `scr_allowFileIo` dvar set to 0 301 | 302 | # Box / Fridge / Mob key 303 | 304 | This patch has the following capabilites regarding setup: 305 | 306 | - Overriding weapon in the box (First Box Patch) 307 | - Overriding starting box location 308 | - Overriding weapon in the fridge (Fridge Patch) 309 | - Overriding Mob of the Dead key position 310 | 311 | > [!NOTE] 312 | > None of the modules specified above will do anything to your game, unless specific actions described in following sections are taken. 313 | 314 | > [!TIP] 315 | > All 3 modules normally work by host inserting the correct DVAR in the console. However specifically in Plutonium (2905 and live versions) you can also do it via a chat message. Chat command is exactly the same as the console one, unless otherwise specified in the specific section below, this functionality allows offhost players to perform these actions as well. 316 | 317 | ## Managing modules via binds 318 | 319 | On Plutonium you can invoke these commands without typing/copying them in every time by using binds. Binds need to be set in the bind config file. 320 | 321 | Bind config default location 322 | 323 | ``` 324 | %localappdata%\Plutonium\storage\t6\players\bindings_zm.bdg 325 | ``` 326 | 327 | For example following bind will input the command `fb mk2|galil` after you press `p` 328 | 329 | ``` 330 | bind P "fb mk2|galil" 331 | ``` 332 | 333 | You can also add `say` in front of the command to make it output chat command for you 334 | 335 | ``` 336 | bind P "say fb mk2|galil" 337 | ``` 338 | 339 | ## Overriding box location 340 | 341 | Player is allowed to change box location until either round 11 or until box is used. 342 | To change box location, a DVAR `lb` has to be set to the right value. Below is table with values that can be used to set the box. 343 | 344 | | Map | DVAR value | Corresponding location | 345 | | --- | --- | --- | 346 | | Town | `dt` | Double Tap cage | 347 | | Town | `qr` | Quick Revive room | 348 | | Nuketown | `yellow` | Behind yellow house | 349 | | Nuketown | `green` | Behind green house | 350 | | Mob of the Dead | `cafe` | Cafeteria | 351 | | Mob of the Dead | `warden` | Warden's Office | 352 | | Origins | `2` | Generator 2 | 353 | | Origins | `3` | Generator 3 | 354 | 355 | For example: 356 | 357 | ``` 358 | lb dt 359 | ``` 360 | 361 | ## Overriding box weapon 362 | 363 | Player is allowed to override weapons in the box until round 11, as long as he would be able to get specified weapon under normal conditions. 364 | 365 | Note, in a coop game there are scenarios where first box could give players guns they shouldn't be getting, players are responsible for using the module responsibly. Here is an [example](https://youtu.be/5Tvlf50d6Ec) of something like this happening. 366 | 367 | Player can still get a teddy bear from the box, despite overriding the weapon. If that happens, weapon has to be set again after box appeared in the new spot. 368 | 369 | To set weapon in the box, a DVAR `fb` bas to be set to the right value. Below is table with values that can be used to override weapon. It is also possible to put actual weapon code instead of the key below, assuming players know weapon codes. 370 | 371 | | Weapon | DVAR value | 372 | | --- | --- | 373 | | Ballistic Knife | `bk` | 374 | | Blundergat | `blunder` | 375 | | EMP | `emp` | 376 | | Monkeys | `monk` | 377 | | Paralyzer | `paralyzer` | 378 | | RayGun | `mk1` | 379 | | RayGun MK2 | `mk2` | 380 | | Sliquifier | `sliq` | 381 | | Time Bomb | `time` | 382 | | AK47 | `ak47` | 383 | | AK74u | `ak74` | 384 | | AN94 | `an94` | 385 | | B23R (wall) | `b23r` | 386 | | B23R (box) | `b23re` | 387 | | Chicom CQB | `chic` | 388 | | Death Machine | `dm` | 389 | | DSR50 | `dsr` | 390 | | Executioner | `exe` | 391 | | Fal | `fal` | 392 | | Five-Seven | `57` | 393 | | Five-Seven DW | `257` | 394 | | Galil | `galil` | 395 | | HAMR | `hamr` | 396 | | KAP-40 | `kap` | 397 | | KSG | `ksg` | 398 | | LSAT | `lsat` | 399 | | M1216 | `m1216` | 400 | | M1927 | `tommy` | 401 | | M14 | `m14` | 402 | | M16 | `m16` | 403 | | M27 | `m27` | 404 | | M82A1 Barret | `barret` | 405 | | M8A1 | `m8` | 406 | | MG08 | `mg` | 407 | | MP5 | `mp5` | 408 | | MP40 | `mp40` | 409 | | MTAR | `mtar` | 410 | | Olympia | `oly` | 411 | | PDW57 | `pdw` | 412 | | Python | `pyt` | 413 | | Remington 870 | `remington` | 414 | | RNMA | `rnma` | 415 | | RPD | `rpd` | 416 | | RPG | `rpg` | 417 | | Saiga | `s12` | 418 | | Scar | `scar` | 419 | | Skorpion EVO | `evo` | 420 | | SVU AS | `svu` | 421 | | Tommy Gun | `tommy` | 422 | | Type 25 | `type` | 423 | | War Machine | `wm` | 424 | 425 | For example: 426 | 427 | ``` 428 | fb mk2 429 | ``` 430 | 431 | Additionally, players can chain multiple weapons via a single message with both methods, following example will yield the first box module triggering 3 times 432 | 433 | ``` 434 | fb mk2|monk|galil 435 | ``` 436 | 437 | ## Overriding fridge weapon 438 | 439 | Player is allowed to override weapons for himself and his team in the fridge until either round 11 or first use of the fridge. This functionality does not allow for inserting weapons that are not normally allowed to be put in the fridge by the game. 440 | To override fridge weapon, a DVAR `fridge` has to be set to the right value. 441 | 442 | Values from this DVAR can be seen above (in the [Overriding box weapon](#overriding-box-weapon) section), but in order to put upgraded weapon in the fridge, a `+` has to be added in front of the weapon key. 443 | 444 | Example for normal weapon: 445 | 446 | ``` 447 | fridge m16 448 | ``` 449 | 450 | Example for upgraded weapon: 451 | 452 | ``` 453 | fridge +m16 454 | ``` 455 | 456 | Example of player setting weapons for everyone (host only): 457 | 458 | ``` 459 | fridge all m16 460 | ``` 461 | 462 | Example of player setting upgraded weapons for everyone (host only): 463 | 464 | ``` 465 | fridge all +m16 466 | ``` 467 | 468 | ## Overriding key location 469 | 470 | > [!NOTE] 471 | > This feature is available only on Plutonium 4516+ 472 | 473 | Host can override key position on Mob of the Dead. Once changed, the setting persists across game launches as it's saved using stats system (much like character changing). After changing this setting, host must restart the game (as it's only read at the beginning of the game during the normal key spawning logic). 474 | 475 | Set by DVAR or chat message, to set the key to be in Warden's Office, Cafeteria or randomized (default behavior) respectively 476 | 477 | ``` 478 | key warden 479 | key cafe 480 | key reset 481 | ``` 482 | 483 | Or while in main menu by directly modifying stats, use these commands 484 | 485 | Cafeteria: 486 | 487 | ``` 488 | statwriteddl playerstatsbymap zm_prison weaponlocker clip 1;uploadstats 489 | ``` 490 | 491 | Warden's Office 492 | 493 | ``` 494 | statwriteddl playerstatsbymap zm_prison weaponlocker clip 2;uploadstats 495 | ``` 496 | 497 | Default (random) 498 | 499 | ``` 500 | statwriteddl playerstatsbymap zm_prison weaponlocker clip 0;uploadstats 501 | ``` 502 | 503 | # Basic trade tracker 504 | 505 | Basic trade tracker is a small utility available in survival maps, it prints stats as players pick up RayGuns, and can also be triggered by chat commands. 506 | 507 | ## Chat commands 508 | 509 | - Use `box {weapon}` chat command to display current stats about a weapon (Plutonium only) 510 | 511 | ## Stop trade tracker 512 | 513 | - If you wish to stop the tracker (you don't like it / for allocation purposes), you can use DVAR `kill_box_tracker 1`, this will permanently clear all the logic from the tracker from the game. WARNING! Once disabled, it won't work again in that game. 514 | 515 | # Backspeed 516 | 517 | The patch automatically fixes strafe and backspeed scales to console levels, however since version 4.4 (Plutonium only) it is possible to adjust the value (without having to use cheat protected dvar). In order to change between steam and console backspeed, use following chat messages accordingly 518 | 519 | ``` 520 | bs steam 521 | bs fix 522 | ``` 523 | 524 | You can also set custom values (between 0.1 and 1). This setting will persist across game launches. 525 | 526 | > [!TIP] 527 | > You can send `bs` in the chat to see the current values. 528 | 529 | For Redacted and Ancient, by default backspeed is fixed. You can change it by settings `steam_backspeed` dvar to `1` and restart the match. 530 | 531 | # Permaperks 532 | 533 | Patch does award players with permaperks on connect, but only at the beginning of the game. Players joining in progress will not be given any permaperks. Every player joining the game past round 15 will have PermaJug taken away from him. 534 | List of permaperks awarded by B2OP 535 | 536 | | Perk | Notes | 537 | | --- | --- | 538 | | Revive | - | 539 | | Better Headshots | - | 540 | | Tombstone | - | 541 | | Mini-Jug | Will not be awarded if game starts past round 15, will also actively be taken from players past round 15 | 542 | | Flopper | Only on Buried | 543 | | Better Box | Given only on Die Rise and Buried. Taken away on Tranzit. Will be forcibly taken away if First Box is used | 544 | | Cash Back | - | 545 | | Sniper Points | - | 546 | | Insta Kill | - | 547 | | Pistol Points | - | 548 | | Double Points | - | 549 | 550 | > [!NOTE] 551 | > The game will restart automatically after awarding players with permaperks, when the sitution allows for it (all launchers solo and Plutonium coop). Otherwise it'll just end, as restarting would cause the crash. In unsupported configurations, all players are recommended to get into a solo game to get their permaperks before starting the coop. 552 | 553 | ## No jug games 554 | 555 | Purist mode enables you to play out a No Jug game without persistent jug permaperk. In order to enable this mode, you can either use this command BEFORE the game, or send a chat text message in game and restart 556 | 557 | - Command to enable purist before the game 558 | ``` 559 | statwriteddl playerstatsbymap zm_prison weaponlocker stock 1;uploadstats 560 | ``` 561 | 562 | - Chat message to enable purist in game (requires a restart) 563 | ``` 564 | purist 1 565 | ``` 566 | 567 | - Command to disable purist before the game 568 | ``` 569 | statwriteddl playerstatsbymap zm_prison weaponlocker stock 0;uploadstats 570 | ``` 571 | 572 | - Chat message to disable purist in game (requires a restart) 573 | ``` 574 | purist 0 575 | ``` 576 | 577 | > [!TIP] 578 | > To check current status of purist (whether it's enabled or not), just send `purist` in the chat 579 | 580 | > [!CAUTION] 581 | > Changing this option mid game technically applies instantly, but your game may not be possible to classify as either with or without perma jug if you toggle it mid game and then carry on. Always restart after changing the mode. If purist was enabled but someone disabled it, an appropriate watermark is displayed (as it enables violations by reconnecting with permajug before r15). 582 | 583 | > [!INFO] 584 | > Aside from status message, a watermark is generated to show that the game is played on the purist mode. This watermark will be removed from the screen after round 15 to not interrupt with the game, the status message will work throught the entire game. 585 | 586 | # Tank fix 587 | 588 | On Plutonium R4516+, the tank has been changed to match how it works on Steam and Console. Prior to B2OP Version 4.1 the fix to that was it's own file, but now it's integrated right into the main patch. The implementation is backwards compatibile, which means you can keep using the file, only if file does not exist, the new implementation is used. 589 | 590 | New version can be toggled at any time, to do that, simply put following message in the game chat (host only). 591 | 592 | ``` 593 | tank depatch 594 | ``` 595 | 596 | > [!NOTE] 597 | > The toggle does not work for the standalone file, if it's loaded by the game, depatch is always active. 598 | 599 | > [!TIP] 600 | > You can hear about this topic [in this video](https://youtu.be/p8s-4b4D1J8) 601 | 602 | # Characters 603 | 604 | Up until version 3.0, it was possible to set characters via Plugins system, but it's not particulary easy nor user friendly, so a new version of this system has been created. 605 | 606 | > [!NOTE] 607 | > You don't need to have the patch in for character selections to work if you're the off-host player, as long as the host has it, it'll work. 608 | 609 | > [!NOTE] 610 | > If in a coop game a player does not use any preset, it is possible for him to take a character before player with that character set. In that case preset will not work. In order for the system to work properly, have all players in the game set their presets. 611 | 612 | > [!NOTE] 613 | > Character settings are the same for B2FR & B2OP, which means you don't need to change the settings between these 2 patches 614 | 615 | > [!TIP] 616 | > When using fast_restart, characters for off-host players are evaluated before host (that's how the game does it). I've decided to not change this behavior as it'd require further changes of the existing game logic. Instead, in order to preserve priority of character selection, use map_restart command. 617 | 618 | ## Character commands 619 | 620 | In order to set a character, paste the right command into the console in the main menu before the game actually begins, or use chat message method on Plutonium. For survival maps, host setting applies to all players. Please note, if a character is already taken, your setting will not be applied. 621 | 622 | - CIA 623 | 624 | ``` 625 | statwriteddl playerstatsbymap zm_highrise weaponlocker lh_clip 2;uploadstats 626 | ``` 627 | 628 | - CDC 629 | 630 | ``` 631 | statwriteddl playerstatsbymap zm_highrise weaponlocker lh_clip 1;uploadstats 632 | ``` 633 | 634 | - Misty 635 | 636 | ``` 637 | statwriteddl playerstatsbymap zm_highrise weaponlocker clip 3;uploadstats 638 | ``` 639 | 640 | - Russman 641 | 642 | ``` 643 | statwriteddl playerstatsbymap zm_highrise weaponlocker clip 1;uploadstats 644 | ``` 645 | 646 | - Stuhlinger 647 | 648 | ``` 649 | statwriteddl playerstatsbymap zm_highrise weaponlocker clip 2;uploadstats 650 | ``` 651 | 652 | - Marlton 653 | 654 | ``` 655 | statwriteddl playerstatsbymap zm_highrise weaponlocker clip 4;uploadstats 656 | ``` 657 | 658 | - Weasel 659 | 660 | ``` 661 | statwriteddl playerstatsbymap zm_highrise weaponlocker stock 4;uploadstats 662 | ``` 663 | 664 | - Billy 665 | 666 | ``` 667 | statwriteddl playerstatsbymap zm_highrise weaponlocker stock 3;uploadstats 668 | ``` 669 | 670 | - Sal 671 | 672 | ``` 673 | statwriteddl playerstatsbymap zm_highrise weaponlocker stock 2;uploadstats 674 | ``` 675 | 676 | - Finn 677 | 678 | ``` 679 | statwriteddl playerstatsbymap zm_highrise weaponlocker stock 1;uploadstats 680 | ``` 681 | 682 | - Dempsey 683 | 684 | ``` 685 | statwriteddl playerstatsbymap zm_highrise weaponlocker alt_clip 1;uploadstats 686 | ``` 687 | 688 | - Nikolai 689 | 690 | ``` 691 | statwriteddl playerstatsbymap zm_highrise weaponlocker alt_clip 2;uploadstats 692 | ``` 693 | 694 | - Takeo 695 | 696 | ``` 697 | statwriteddl playerstatsbymap zm_highrise weaponlocker alt_clip 4;uploadstats 698 | ``` 699 | 700 | - Richtofen 701 | 702 | ``` 703 | statwriteddl playerstatsbymap zm_highrise weaponlocker alt_clip 3;uploadstats 704 | ``` 705 | 706 | ## Reset character presets 707 | 708 | In order to disable presets (to restore randomized characters) use following commands 709 | 710 | - Survival maps 711 | 712 | ``` 713 | statwriteddl playerstatsbymap zm_highrise weaponlocker lh_clip 0;uploadstats 714 | ``` 715 | 716 | - Tranzit / Die Rise / Buried 717 | 718 | ``` 719 | statwriteddl playerstatsbymap zm_highrise weaponlocker clip 0;uploadstats 720 | ``` 721 | 722 | - Mob of the Dead 723 | 724 | ``` 725 | statwriteddl playerstatsbymap zm_highrise weaponlocker stock 0;uploadstats 726 | ``` 727 | 728 | - Origins 729 | 730 | ``` 731 | statwriteddl playerstatsbymap zm_highrise weaponlocker alt_clip 0;uploadstats 732 | ``` 733 | 734 | ## Chat commands on Plutonium 735 | 736 | On Plutonium you can use chat commands to manage characters. After changing the settings, the game will have to be restarted to take effect (that's the recommended way to change characters in game, as stat command may not always work). The patch will only listen for the chat messages about characters for first two rounds. Enter following message into the chat: 737 | 738 | ``` 739 | char 740 | ``` 741 | 742 | Where is the name of the character. Following values are accepted: 743 | 744 | ``` 745 | misty russman stuhlinger marlton weasel billy sal finn dempsey nikolai takeo richtofen cia cdc 746 | ``` 747 | 748 | You can also reset character presets by typing in 749 | 750 | ``` 751 | char reset 752 | ``` 753 | 754 | > [!TIP] 755 | > You can check which preset you currently have set by entering `whoami` in the chat 756 | 757 | ## Redacted offline mode 758 | 759 | Because this system is based on player stats that are not available, when in Redacted offline mode, characters are operated differently. You need to enter the match, set the character via a DVAR and use `map_restart` command. As oppose to using stats system, this will not persist across game launches. 760 | 761 | For characters use following DVARs 762 | 763 | - CDC, Russman, Finn, Dempsey 764 | 765 | ``` 766 | set_character 1 767 | ``` 768 | 769 | - CIA, Stuhlinger, Sal, Nikolai 770 | 771 | ``` 772 | set_character 2 773 | ``` 774 | 775 | - Misty, Billy, Richtofen 776 | 777 | ``` 778 | set_character 3 779 | ``` 780 | 781 | - Marlton, Weasel, Takeo 782 | 783 | ``` 784 | set_character 4 785 | ``` 786 | 787 | - Random character 788 | 789 | ``` 790 | set_character 0 791 | ``` 792 | 793 | ## Viewmodel swapping 794 | 795 | As a response to drawbacks in the character system, we added additional functionaltiy that allows you to swap only the viewmodel (hands in first person), as oppose to the entire character. Changes here will apply instantly and have no effect to any game logic (as far as the game is concerned, the character has not been changed). You may swap viewmodels either by using `view` chat message or `viewmodel` dvar, followed by one of these values 796 | 797 | ``` 798 | misty russman stuhlinger marlton weasel billy sal finn dempsey nikolai takeo richtofen cia cdc 799 | ``` 800 | 801 | or 802 | 803 | ``` 804 | reset 805 | ``` 806 | 807 | to set viewmodel back to what it should be with your original character. 808 | 809 | # Strat tester mode 810 | 811 | Since version 4.3, the patch natively supports running alongside strattester mods on modern Plutonium clients, if that happens many functionalities can be disabled, such as 812 | - First box module 813 | - HUD 814 | - Checking DVARs (anticheat) 815 | - Permaperk system 816 | 817 | Please note, in strat tester mode the patch is not suitable for competitive games. 818 | 819 | ## For developers 820 | 821 | In order to enable integration, you should set one of the following to true `level.strat_tester` or `level.b2_strat_tester` 822 | 823 | If you set `level.strat_tester` to true, all modules listed above are disabled. If you set `level.b2_strat_tester` to true, you'll be able to define which modules you wish to disable via flags (table below). 824 | 825 | > [!WARNING] 826 | > Make sure to set the variable and flags very early on, either at the top of `init()` or in `main()` function, B2OP will check for them in the init sequence already 827 | 828 | | Flag | Module | Since | 829 | | :---: | :---: | :---: | 830 | | `b2_strattester_fb` | First Box | 4.3 | 831 | | `b2_strattester_hud` | HUD | 4.3 | 832 | | `b2_strattester_anticheat` | Dvar scanner | 4.3 | 833 | | `b2_strattester_pers` | Perma perks | 4.3 | 834 | 835 | # Contributions 836 | 837 | If you'd like to contribute to the code, please fork this repository, apply changes / fixes and open a pull request. If the change is in line with rules and the purpose of this patch, it'll be merged and a new version of the patch will be released. 838 | 839 | Since version 2.0, it's become a bit harder to work on the patch (natural progression i suppose), following things are required: 840 | 841 | - [Python](https://www.python.org/downloads/windows/) 3.12 or newer 842 | - [gsc-tool](https://github.com/xensik/gsc-tool/releases) 1.4.0 or newer 843 | 844 | Install Python (and make sure to check adding it to the system PATH while doing so). Download gsc-tool, do not change the name of the program. Put everything in the patch main directory. 845 | 846 | After applying desired changes, run script `compile.py` while in the patch main directory (press on address bar in the folder view, put `cmd` and press enter. A command line will open with that folder already set). Run script by putting in `python compile.py`. If you did everything right, script should compile everything for you and put stuff in right folders. 847 | 848 | > [!NOTE] 849 | > Please note, as the modding scene for BO2 is still very young, stuff and tech is changing rapidly. Above description may not always be up to date, but i will try to not let that happen too often. 850 | 851 | # Weaponlocker stats allocations for B2 patches 852 | 853 | Here is a list of weaponlocker stats B2 patches use to persist settings. Note, Tranzit stats are all used by the game, all the other maps are available to use by modders. 854 | 855 | | Map | Stat | Component | Effect | 856 | | :---: | :---: | :---: | :--- | 857 | | zm_highrise | clip | Characters | Controls character preset on Victis maps | 858 | | zm_highrise | stock | Characters | Controls character preset on MOTD | 859 | | zm_highrise | alt_clip | Characters | Controls character preset on Origins | 860 | | zm_highrise | lh_clip | Characters | Controls character preset on survival maps | 861 | | zm_prison | clip | RNG | (B2OP) Controls MOTD key position overrides | 862 | | zm_prison | stock | Permaperks | (B2OP) Controls Purist mode | 863 | | zm_prison | alt_clip | Gameplay | (B2OP) Controls strafespeed scale | 864 | | zm_prison | lh_clip | Gameplay | (B2OP) Controls backspeed scale | 865 | | zm_tomb | clip | Gameplay | (B2OP) Controls tank depatching | 866 | --------------------------------------------------------------------------------