Save Warping is a glitch in GoldSRC, and Old Engine Half-Life 2 based games based on Changelevel Delay that allows the player to load into a map, using a save which was made in a completely separate place. It can be abused to teleport across maps, shaving minutes off of runs.
Save warping was found by Rama, a few days after the release of Half-Life 2: Done Quicker, a run that heavily utilized CLD.
It is highly reccomended to understand CLD. before trying to understand Save Warping, as SW is a variant of CLD.
First, Let's break down how the changelevel2 command works.
The syntax for the command looks like this:
changelevel2 TARGETMAP LANDMARKNAME
Landmarks are entities present on each map which let the level transition calculate the player's coordinates when transitioning.
Let's say that we are on Map A, transitioning to Map B.
Both maps will need to contain a landmark with the same name, and the game will use this landmark to move the player between the maps.
The relative position of the player in relation to the landmark will be stored in Map A, and then the player will be placed on Map B relatively to Map B's landmark with the same name.
This is needed because the actual place in 3D space where the maps are, is often different between maps.
If the game is unable to find the requested landmark on the map the changelevel2 command is executed from, but CAN find it in the destination map, It will pretend the landmark from the first map is at coordinates 0 0 0.
This means that if the player is at 0 0 0 in the first map, they will spawn exactly at the landmark specified in the command on the second map.
For this part, we will add a 3rd map to our explanation, Map C.
In addition, we will add landmarks named "AB" and "BC".
Landmark "AB" Exists only on maps A and B, while "BC", only on maps B and C.
in Changelevel delay, we can delay the changelevel 2 command so that our command queue looks like this:
"wait;wait;wait;wait;wait;changelevel2 map landmark"
however, we may exploit this further by loading a save after hitting the changelevel trigger, but before the changelevel 2 command occurs.
we can do so with a bind like this:
"w100;load save;w10"
the additional wait between loading the save and the changelevel 2 command is required, as otherwise the game will freeze.
Let's assume that the save is on Map A, and we are warping from map A to map B.
in the command queue, this will look like this:
"wait;wait...;load save;wait;wait...;changelevel2 MapB LandmarkAB"
after hitting the changelevel trigger, the game will wait, then load the save, then transition maps.
The save can be as far away from the transition trigger as we want, we will end up in Map B, with the coordinates of our save, relatively to LandmarkAB.
The explanation above did not do much with Map C for a reason, as it will happen here.
Wrong Warping Exploits the game hallucinating a landmark at 0 0 0.
Let's say that our save is on Map A, but we use it to warp from map B to map C.
the changelevel command will looks like this:
changelevel2 MapC LandmarkAB
Since LandmarkAB doesn't exist on the destination map, map C, this will fail, and we will be thrown to the menu.
This makes sense, as there is no way to directly transition from MapA to MapC.
However, something curious would happen if we warp from MapA to MapB, when our save is in MapC.
changelevel2 MapB LandmarkAB
Now, LandmarkAB does exist on our Destination map. Not only that, but a transition from MapC to MapB does exist.
The trick here, is that while all of the transitions are possible, and allowed by the game, LandmarkAB doesn't exist on MapC, which is the map where our save is.
This will cause the game to hallucinate LandmarkAB in MapC at coordinates 0 0 0, and will warp the player relative to these coordinates in MapC, and LandmarkAB in MapB.
It works backwards as well, with a save on MapA, and transitioning from MapC to MapB:
changelevel2 MapB LandmarkBC
Abusing this mechanic to reach coordinates that would usually be unobtainable is called Wrong Warping.
Now, Let's add a 4th map, Map D and, Following the previously established naming, Landmark CD, which only exists on MapC and MapD.
Let's say that we want to reach a specific place in mapD, from mapA.
We have already reached the desired coordinates on map A, and just want to get to mapD.
simply warping from mapC, to mapD using a save from MapA wouldn't work.
changelevel2 MapD LandmarkCD
This is because no transition exists between map A and map D. the game will be unable to find one and throw us to the menu.
It is however, still possible to execute this.
First, let's transition from MapA to MapB using our save from MapA.
changelevel2 MapB LandmarkAB
Now, let's make a new save in the place where we ended up.
After that, let's reach the map of MapB, and do this again.
changelevel2 MapC LandmarkBC
Since our save is now on MapB, this works.
We can repeat it one more time to reach map D.
changelevel2 MapD LandmarkCD
.
This isn't all there is to Warp Chaining though.
It is possible to incorporate Wrong Warps Inside of warp chains, in order to manipulate our coordinates.
Since Wrong Warps are calculated differently from regular warps, executing a lot of them will drastically change our position.
Routing long Wrong Warps is nearly impossible to be done humanly, but tools that help with it do exist, those being Save Warp Tool and Save Warp Finder