Skip to content
cccskills
FreePublished on GitHub

blitz3d-decomp

Use this skill to inspect Blitz3D game code with B3DDecomp, understand runtime behavior and animated models, and port eligible content to another engine. It also explains when protected builds or usage rights mean the work must stop.

OriginalShow the original description

Decompile a Blitz3D game to readable Blitz source with B3DDecomp and port what it does to another engine. Covers SCP - Containment Breach-era and other .bb games, B3DDecomp, Blitz3D runtime behaviour (fixed tick, Animate, CurveValue, Euler angles, quaternions, Rnd), animated .b3d models (viewmodels with bones and keyframes) into Roblox, and where to stop (builds protected against decompiling, games and assets the user has no rights to). Use when a Blitz3D game's code or animated models are needed.

rehan-remade/universal-modder9,190 stars(GitHub 9,190 + cccskills 0)

Run score Not tested

See how to install

Good for

  • Inspecting a Blitz3D game's compiled source
  • Porting game behavior to another engine
  • Converting animated .b3d models for Roblox
  • Checking decompiled behavior against the original game

Files included (8)

  • SKILL.md5.2 KB
  • references/b3d-to-roblox.md4.4 KB
  • references/b3ddecomp-skip-failures.patch3.7 KB
  • references/blitz-runtime.md4.8 KB
  • scripts/roblox/b3d_skin.py5.9 KB
  • scripts/roblox/vm_anim_data.py5.1 KB
  • scripts/roblox/vm_build.py6.6 KB
  • scripts/roblox/vm_render.py1.0 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Blitz3D decompile and port

Blitz3D games ship as one exe: the runtime in .text and the compiled game in a resource module that the runtime links at load. Ghidra on the exe shows only the runtime. The route that works: B3DDecomp disassembles the module and decompiles it to Blitz source. Then the source is the spec for the port, and the original game stays the oracle.

Keep every disassembly and decompile outside any repo (convention: ~/<game>-decomp/), and never publish them; the scripts here are fine to keep. Leave proprietary DLLs that forbid decompiling alone: their export names in the exe are enough. Journal in the mod's MODLOG.md.

Read the source when there is one: SCP: Containment Breach (Regalis11/scpcb) and its Ultimate Edition Reborn fork (Jabka666/scpcb-ue-my) are open source under CC BY-SA 3.0.

What a port may use. A port that re-expresses a game's logic, or converts its models, keyframes, textures or sounds, redistributes that game once it is published or uploaded (to Roblox too). Port only what the user has the rights to: their own game, or an openly licensed one on its terms (SCP: Containment Breach: credit it and keep the port under CC BY-SA 3.0, and check each asset's credits, since fan games mix licences). Anything else stays a private study: nothing from it is uploaded or published.

1. Tools

  • B3DDecomp (juanjp600/B3DDecomp, C#, GPL-3): clone outside the repo, then dotnet build Blitz3DDecomp.sln -c Release. It needs a .NET 8 SDK; a user-local one installs without admin (dotnet-install.ps1 -Channel 8.0 -InstallDir <dir>). Run with DOTNET_ROLL_FORWARD=Major and bin/Release/net8.0 on PATH: the decompiler starts Blitz3DDisasm by name.
  • If one function aborts the whole run, apply references/b3ddecomp-skip-failures.patch (git apply; made on commit 2b3148b): the decompiler then skips a function it can't finish, with a step5 failed line, instead of stopping.

Done when Blitz3DDecomp.exe and Blitz3DDisasm.exe build.

2. Disassemble and decompile

Blitz3DDecomp.exe <copy of game.exe> writes <game>_disasm/ (Code/ per function, Type/, Strings.txt, BuiltIn/, Libs/, BuiltInSymbols.txt), then decompiles it to <game>_decomp/. Games built from SCP: Containment Breach's code need the game's fmod.decls as a second argument (B3DDecomp's README: the shipped decls drop a parameter from FSOUND_Stream_Open).

When it still aborts, the exception names the construct. Never make a type setter silently ignore writes to get past one: the type propagation then loops forever with no output.

Protected builds: stop. Some builds are protected against this step: a modified compiler and runtime hash every function, type and builtin name (B3DDecomp stops with Unrecognized function: @_builtIn_f<garbled>; SCP: Containment Breach 2's client is built this way), or the module is encrypted. Those are protections the developer added against decompiling. Don't reverse them: tell the user and stop (skills/mod-any-game/references/safety.md). Current B3DDecomp undoes one of them by itself, without saying so: an XOR on a .b3dmod section. List the exe's sections first (objdump -h, or any PE viewer) and stop if it has one.

Done when <game>_decomp/ holds Main.bb, Functions/, Types/ and Decls/ and the run prints at most a handful of step5 failed lines.

3. Find the system

  • Strings first: an asset path or sound the system loads (grep -l StringConstant_<n> Code/*).
  • Data-driven templates: the init function stores constants into a template per item. If the game has an addon/JSON loader, it names every field.

Done when every number the port will use is traced to the line that sets it and the line that reads it.

4. Port

Read references/blitz-runtime.md before writing port code: Blitz3D's clock, Animate, CurveValue, Euler angles, Rnd and entity calls behave in ways a straight transcription gets wrong. For animated .b3d models (viewmodels, rigs, keyframes) into Roblox, follow references/b3d-to-roblox.md; its scripts are in scripts/roblox/.

Port step for step: same order, same constants, same tick. Mark every deviation in a comment with the reason. The rights rule above covers the code as much as the models.

5. Verify against the oracle

Measure the port against the decompiled numbers in the engine, not by eye: rates (shots per second at the fixed tick), durations (frames / speed / ticks per second), aim (the sight's dot on the screen centre), ammo on the server. Record each check and its result in the journal.

Done when every ported behaviour has a measured number next to the decompiled one.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

asset-pipeline

FreeSummary

Prepare generated or hand-drawn artwork for a game's required file layout, dimensions, colors, and transparency. Create sprite sheets, assemble animation frames, and render 3D models into consistent views for use as game images.

  • Prepare artwork for a game's required sprite dimensions
  • Assemble animation frames into a sprite sheet
  • Render a 3D unit from multiple directions
rehan-remade/universal-modder9.2KUpdated Oct 29, 2026

fal-assets

FreeSummary

Create game assets through fal.ai, including sprites, textures, 3D models, sound effects, music, voices, and video clips. Guides consistent visual variations, file conversion, model selection, and generation records so assets can be traced and regenerated.

  • Create transparent sprites and icons for a mod
  • Generate seamless textures and material maps
  • Build and rig a 3D character from an image
rehan-remade/universal-modder9.2KUpdated Oct 29, 2026

game-automation

FreeSummary

Launch and control a real game to verify mods through screenshots and logs. Automate menus, keyboard and mouse input, and repeatable test scenes, with guidance for connecting an agent to game state through a JSON bridge.

  • Verify a mod inside the running game
  • Automate menu navigation and keyboard or mouse input
  • Build a repeatable test or demo scene
rehan-remade/universal-modder9.2KUpdated Oct 29, 2026

game-recon

FreeSummary

Investigate an installed game before making a mod. Identify its engine, available mod loaders, save locations, anti-cheat protection, and compatibility issues, then record a practical approach and unresolved questions in MODDING_PLAN.md.

  • Check whether an installed game can be modded
  • Identify a game's engine and available mod loaders
  • Investigate Windows game compatibility on macOS or Linux
rehan-remade/universal-modder9.2KUpdated Oct 29, 2026

Research game modding methods and tools across public websites and archived pages. Recover information from dead forum links, compare reports, and produce findings with source URLs, version details, credibility notes, and clearly identified gaps.

  • Find earlier modding work for a game
  • Recover information from dead forum links
  • Check reports about a tool's supported versions
rehan-remade/universal-modder9.2KUpdated Oct 29, 2026

mashup-mods

FreeSummary

Build mods that combine content or gameplay from different games. Choose between content ports, two games exchanging data, embedded game engines, or rewritten rules, with clear integration plans and checks against the original behavior.

  • Bring an enemy or weapon from one game into another
  • Connect two running games through shared state
  • Rebuild another game's rules inside a host game
rehan-remade/universal-modder9.2KUpdated Oct 29, 2026

See all skills by rehan-remade

Report a problem with this skill