Skip to main content
Universal Modder
Menu

How to Mod Portal 2 with Universal Modder

To mod Portal 2 with AI, begin with one test chamber and one intended solution. Let Universal Modder help you describe the puzzle, inspect the available tools and track changes, then play the compiled result yourself. The built-in Puzzle Maker is a practical first route; a cross-game rendering bridge is a later engineering project.

Start with agent installation if the Universal Modder skill is not available yet.

Can Universal Modder mod Portal 2?

Portal 2 uses the Source engine. There are distinct routes for a puzzle map, deeper map editing and custom runtime behavior. Puzzle Maker and Workshop sharing arrived with Valve's Perpetual Testing Initiative; the Authoring Tools add Hammer, example maps and compiling tools for more involved work.

Universal Modder's Portalcraft project is a working advanced Windows passthrough that renders a running Minecraft game inside Portal 2. It runs on Portal 2 Steam build 10090, a 32-bit D3D9 renderer, ReShade 6.8.0 and Minecraft Java 26.3 with Fabric. Those are that project's conditions, not general requirements for making a chamber. Read the full build notes on GitHub.

Test your first project in local single player. The normal editor route does not need Portalcraft's runtime hooks; co-op design and custom rendering each need their own checks.

Choose a route

GoalAppropriate starting point
One chamber using familiar puzzle elementsThe built-in Puzzle Maker
More detailed geometry, art or scripted map behaviorPortal 2 Authoring Tools and Hammer
A multi-map original campaignFirst prove one map, then plan progression and packaging
Minecraft rendered inside Portal 2Study Portalcraft as an advanced, version-specific project

For a first chamber, choose a cube holding down a floor button to open the exit. A small room is easier to review than a map containing lasers, gels, moving platforms and several dependencies at once. The general modding tutorial explains the same small-change loop across other games.

The Age of Empires II DE guide offers another built-in editor exercise, using one scenario trigger. If Portalcraft drew your interest to the embedded game's own modding tools, begin with Minecraft's edition and loader choices. Use the game guide directory to choose between an editor task and a code-based project.

What you need

Use your own PC Portal 2 installation and confirm that the normal game and editor start. Record the platform and game build, save a uniquely named chamber, and keep a backup of your work before larger changes.

For Puzzle Maker, use its built-in elements initially. You do not need Blender, a paid asset service or a native-code compiler for the proposed room. Valve provides editor controls and hints, including surface portalability and item connections.

If you choose Hammer, install the Portal 2 Authoring Tools through Steam's Tools library and use that game's tool configuration. Preserve both the editable map source and its compiled output; those serve different purposes. The first chamber below stays with Puzzle Maker.

Step-by-step

1. Start a small chamber

Open the game's chamber-creation interface and create a new single-player puzzle. Keep the starting entry and exit arrangement, give the chamber a unique name, and save a baseline. Rebuild and try that baseline before introducing your puzzle logic.

Write down the intended outcome in one sentence: “The player places a cube on the floor button, leaving the exit open while walking through it.”

2. Ask the agent for a plan

Use this suggested prompt:

text
Select code
Use Universal Modder to plan one Portal 2 Puzzle Maker chamber.
Use only built-in elements: one room, one cube, one floor button and an exit door.
Describe the item connection, intended player route and a fresh-start test.
Identify any required portal surfaces and ways the player could get trapped.
Keep the first version small and do not add a loader or rendering mod.

You can select the code to copy it manually.

An agent without access to the running editor can still help with the design and a checklist. Treat its placement instructions as a plan until you apply and verify them. Do not record an imagined editor action as completed work.

3. Place and connect one element

Place the button, then connect it to the exit through the editor's item-connection controls. Add a reachable cube that can hold down the button. Valve's basic chamber example demonstrates the button-to-door connection and rebuilding the map. Its control reference documents right-click properties and the connection shortcut.

Keep the button reachable, inspect the connection indicator and save the source. If a placement shows an error, resolve it before adding another element. Rebuild the chamber after changing the connection so the playable version includes your edit.

4. Play the intended solution

Start from the chamber entrance. Check that the exit begins closed, that placing the cube on the button opens it, and that the player can walk to the exit while the cube remains in place. Then remove the cube and verify that the connection returns to its initial state.

Repeat from a fresh start rather than relying on the previous session's position or item state. Record the revision and result. A connection line in the editor only shows the wiring; play the room to confirm it is solvable.

5. Test failure paths

Try leaving the button too early, approaching the door from another angle and placing portals on every allowed surface. If you add a cube, test what happens when it is lost or placed out of reach. Adjust one rule or placement at a time, rebuild, and repeat the same checks.

Ask the agent to explain the consequence of each proposed change. Decorative complexity can wait until the chamber has a clear solution and recoverable mistakes.

6. Preserve and share deliberately

Keep the editable chamber and a brief description of the intended solution. When you choose to publish through Workshop, review its visibility and description first. Do not treat an automatic agent action as permission to publish a draft.

For a later Hammer map, follow Valve's separate Workshop compatibility instructions. They document the required map instance and completion relay; they are not extra steps that must be manually inserted into this basic Puzzle Maker exercise.

Example prompts for Portal 2

These are suggested prompts for your own puzzle:

text
Select code
Review this chamber's intended solution step by step.
List the surfaces the player must reach and where each portal can be placed.
Find an unintended shortcut or trapped state before suggesting decoration.

You can select the code to copy it manually.

text
Select code
The new door connection works in the editor but not in the played chamber.
Check the saved revision, rebuild result, item connection and trigger state.
Propose one diagnostic change and a repeatable test from the entrance.

You can select the code to copy it manually.

Use the prompt collection for planning and debugging patterns. The CLI reference is useful later for recording a real solution or preparing your own assets.

Mods people built for Portal 2

Portalcraft composites Minecraft blocks and mobs into Portal 2, with camera, damage and interaction integration. It has been played through the campaign alongside automated checks in its documented setup.

Its known limits are significant: Minecraft content is not rendered through a portal's alternate viewpoint, some physics objects pass through its blocks, and moving geometry is not fully represented to Minecraft mobs. The installer has only run on one PC, so expect to adjust it on another machine. Those limits make it a useful engineering case study, not a substitute for the simpler editor workflow above.

For another two-game route, read the Minecraft inside GTA V example. The two projects look similar but use different loaders; do not swap their setups.

Known issues and fixes

SymptomFirst check
An editor change is absent in playConfirm the saved chamber revision and that rebuilding completed
An item shows an invalid placementInspect nearby surfaces and the item's required space
A connection exists but the goal is unreachableTest the button state, player path and required portalable surfaces
A cube can be lost permanentlyAdd a recovery path or revise the room before expanding it
A Hammer map's Workshop completion failsCheck Valve's documented compatibility instance and end relay
A Portalcraft feature fails in another setupCompare its exact build and renderer conditions; do not apply its runtime instructions to an ordinary map

Keep source backups so a failed layout change can be reverted without deleting other chambers or subscriptions. For a problem finding the agent skill or toolkit command, begin with Universal Modder troubleshooting.

Frequently asked questions

Do I need a plugin loader to make a Portal 2 test chamber?

No. The built-in Puzzle Maker is the starting route for this guide. Hammer in the Portal 2 Authoring Tools supports more detailed map work. A rendering add-on is a separate advanced route.

Can the agent prove a puzzle is solvable from its plan?

No. A proposed solution must be played in the compiled chamber. Test from a fresh start, check the required portal surfaces and consider how a player can lose a cube or get trapped.

Does Portalcraft have the same requirements as a normal chamber?

No. Portalcraft needs a specific Windows, 32-bit D3D9, ReShade and Minecraft setup. Its rendering bridge and known limitations do not apply to an ordinary Puzzle Maker chamber.