All games
THE PORTAL 2 FIELD GUIDE

Can you mod
Portal 2?

Short answer (Moddable offline): Yes. Portal 2 (Source Engine) is a good offline starting point for universal-modder with Claude Code. Start asset-only: swap one texture or sound from portal2/pak01_dir.vpk, or build a small test chamber with Hammer.

Last reviewed · A source-based starting point for universal-modder and Claude Code. Check your exact PC edition and game version before you begin.

YOUR GAME, DECODED

Portal 2

Source Engine · PC / offline assessment

Moddable offline

Yes. Start with the right tools.

  • Valve ships official tooling: the Hammer editor and Steam Workshop are first-party mod channels.
  • An upstream agent workflow already decoded Portal 2's VPK, MDL v49, VVD, VTX and VTF formats end to end.
  • No anti-cheat; work stays in offline single-player or your own published Workshop content.
RECOMMENDED ROUTE

Start asset-only: swap one texture or sound from portal2/pak01_dir.vpk, or build a small test chamber with Hammer.

What you’ll need
  • A licensed Steam copy and a separate save backup
  • Claude Code or another supported coding agent + universal-modder
  • Python 3.10+ and ffmpeg (uv recommended)
  • The Steam build (assets live in portal2/pak01_dir.vpk)
  • Hammer for maps, or VPK/MDL tooling the agent can drive

Only if your idea needs it: fal API key for generated art (billed by fal) · Blender for 3D-to-sprite renders

Your starting prompt

COPY → PASTE → BUILD

Paste this into Claude Code with universal-modder installed.

Use universal-modder to plan a small Portal 2 mod for my own offline single-player PC copy. Design one asset-only change: swap a single texture or sound from portal2/pak01_dir.vpk, or a one-room test chamber built with Hammer. First confirm my exact game build and compatible tools, back up my saves, and explain the files you would change. Ask before installing a loader or changing game files. Search VPKs in this order: portal2_dlc2, portal2_dlc1, portal2, then loose files. Stop if this requires anti-cheat or DRM bypass. Do not connect to multiplayer. Give me a reversible plan and a concrete in-game verification step.
READY FOR YOUR CODING AGENT
New to universal-modder? Start here GO FURTHERThe full Source Engine recipe: pre-flight checklist, prompt chain, log locations and rollback.Recipe Pack · $9.9
⌘ Under the hood Engine details & sources

Source Engine: Valve's Source engine; game assets ship inside VPK archives and maps use the Hammer editor.

Documentation-based assessment, reviewed 2026-10-20; not tested by CanYouMod. Applies only to offline single-player PC use. A documented loader is not a guarantee that your idea or current build will work.

Offline single-player only. Back up your saves.
STEP BY STEP

How to mod Portal 2 with universal-modder

Portal 2 runs on Valve’s Source engine, and its assets ship inside VPK archives that the community has documented for two decades on the Valve Developer Community wiki. There is no anti-cheat, and Valve runs two first-party modding channels: the Hammer editor for maps and Steam Workshop for distribution. An upstream agent workflow has already read Portal 2’s VPK, MDL v49, VVD, VTX and VTF files byte by byte to port the portal gun viewmodel into another engine — which makes Portal 2 one of the best-documented targets an AI agent can work on.

1. Install: confirm your build, then add the tools

Find your install at steamapps/common/Portal 2 and back up your save folder before anything changes. Everything the game ships lives in portal2/pak01_dir.vpk (a VPK v2 index plus ten pak01_NNN.vpk archives).

In Claude Code, run /plugin marketplace add rehan-remade/universal-modder, then /plugin install universal-modder@universal-modder. For a first map, launch Hammer from the game’s tools; for asset work, let the agent read the VPK directly.

2. Run: one asset-only change first

Paste the starter prompt above and ask for a single asset swap: one texture or one sound extracted from portal2/pak01_dir.vpk, or a one-room test chamber built with Hammer. Search VPKs in this order: portal2_dlc2, portal2_dlc1, portal2, then loose portal2/ files.

Have the agent list every file it extracts or writes. Two format quirks matter: Portal 2-era VTX files use extended strip headers that break older parsers, and Portal 2 plays weapon sounds from code, so sequence-based sound events do not exist in its models.

3. Verify: load a test chamber, then roll back once

Launch Portal 2 offline and load a throwaway test chamber. Check that your texture or sound change actually appears, or that your Hammer map loads and is completable.

Delete or restore the changed file and launch again to prove the rollback works. If you want to share the result, Workshop publishing is Valve’s official channel — keep the work to your own offline saves and your own uploads.

Can you mod Portal 2 with Claude Code?

Yes, and Portal 2 is one of the safest games to try it on. It runs on Valve’s Source engine, whose file formats — VPK archives, MDL models, VTF textures — are publicly documented on the Valve Developer Community wiki, and an upstream universal-modder workflow has already decoded Portal 2’s asset pipeline end to end to port the portal gun viewmodel to another engine. Install the plugin in Claude Code with /plugin marketplace add rehan-remade/universal-modder and /plugin install universal-modder@universal-modder, then start with one asset-only change such as a texture swap. There is no anti-cheat, and Valve’s own channels — the Hammer editor and Steam Workshop — are the supported ways to build and share content. Keep the work offline and single-player, back up your saves first, and make the first change one file you can restore in seconds.

Where are Portal 2’s game files located?

Portal 2 installs to steamapps/common/Portal 2, and nearly all game content lives inside portal2/pak01_dir.vpk — a VPK v2 index that points into ten numbered pak01_NNN.vpk archives. When looking for a file, search VPKs in this order: portal2_dlc2, portal2_dlc1, portal2, then loose files under the portal2/ folder, because later DLC overrides earlier content. Inside the archives, models live under models/ as .mdl files with matching .vvd and .dx90.vtx companions, textures under materials/ as .vtf, and sounds under sound/weapons/portalgun/ as PCM16 WAV files. For example, the portal gun viewmodel is models/weapons/v_portalgun.mdl with textures in materials/models/weapons/v_models/v_portalgun/. Back up the save folder separately before you change anything, and have your agent extract copies to work on rather than editing archives in place.

Is Portal 2 Workshop modding the same as universal-modder?

They are complementary, not the same. Steam Workshop is Valve’s official distribution channel: you subscribe, the game downloads the content, and most Workshop items are maps built with the first-party Hammer editor. universal-modder is an agent workflow that plans and builds a mod for you locally — it can read the game’s VPK archives directly, generate assets, and walk through install-and-verify steps that Workshop publishing does not cover. A practical split: build your map or asset change with the agent’s help, then publish finished, original work through Workshop where it gets Steam’s update and subscription handling. Keep universal-modder work to offline single-player testing, back up saves before each experiment, and only upload content you made yourself.

Can I use Portal 2 mods in co-op?

Treat co-op as outside the safe lane even though Portal 2 has no anti-cheat. The assessments on this site cover offline single-player use only: that is the case where nothing you change can affect another player. Portal 2 co-op works fine with custom maps — Workshop chambers are built for it — but the moment you or a partner run modified game files, you are both testing unverified content together, and the polite rule is that everyone in the session installs exactly the same files. Never bring modified files into any public lobby or use them to gain an advantage over strangers. For your own experiments: back up saves first, keep one throwaway save for testing, and remove every file the mod added before you join anyone else’s game.

Documentation-based assessment, reviewed 2026-10-20; not tested by CanYouMod. Applies only to offline single-player PC use. A documented loader is not a guarantee that your idea or current build will work. Unofficial. universal-modder by rehan-remade, MIT.

PORTAL 2 Q&A

Common questions about modding Portal 2

Can you mod Portal 2 with Claude Code and universal-modder?

+

Yes. Portal 2 (Source Engine) is a good offline starting point for universal-modder with Claude Code. Start asset-only: swap one texture or sound from portal2/pak01_dir.vpk, or build a small test chamber with Hammer. Valve ships official tooling: the Hammer editor and Steam Workshop are first-party mod channels. An upstream agent workflow already decoded Portal 2's VPK, MDL v49, VVD, VTX and VTF formats end to end. No anti-cheat; work stays in offline single-player or your own published Workshop content.

What do you need to mod Portal 2?

+

A licensed Steam copy and a separate save backup; Claude Code or another supported coding agent + universal-modder; The Steam build (assets live in portal2/pak01_dir.vpk); Hammer for maps, or VPK/MDL tooling the agent can drive.

Is it safe to mod Portal 2 online or in multiplayer?

+

Keep to offline single-player play with a save backup. This assessment does not cover multiplayer, anti-cheat or DRM-protected sessions.