Skip to content
Marchand edited this page Dec 3, 2024 · 5 revisions

Preface

I wanted to give people an example of how you can make use of StripperCS2 to fix bad maps, as unfortunately some mappers can't be bothered. The example I will give is surf_aircontrol_ksf. I have attached an example of what I did to add a missing team select, fix the checkpoints (to adhere with the CS2 Surf Trigger Naming Standards), and add missing floor triggers that send you back to spawn.

The file path that this would go in would be addons/StripperCS2/maps/surf_aircontrol_ksf/default_ents.jsonc

Fixing Checkpoints or Stages

First I will talk about the modify function. I used it to modify the existing trigger_multiple entities. You can look these up using Source2Viewer. You will want to go to the vpk file, eg C:\Program Files (x86)\Steam\steamapps\workshop\content\730\3230699916\3230699916.vpk and open it. Once opened in S2V, go to the maps folder, open surf_aircontrol_ksf.vpk and once in that vpk file you will open surf_aircontrol_ksf.vmap_c. You can now move around in the map. In the settings on the left hand side, tick the trigger_multiple box which will allow you to see the orange boxes that are in my screenshot. These are the checkpoints that have been labeled incorrectly as stages. What I did was rename the start zone from s1_start to map_start, and renamed the first checkpoint from s2_start to map_cp1, and did this for all the other incorrect checkpoints. I also changed the spawnflags key from 1 to 4097 so that it matches the map_start trigger, and deleted the filtername key as those aren't necessary for checkpoints.

"modify": [
	{
		"match":
		{
			"classname": "trigger_multiple",
			"targetname": "[PR#]s1_start"
		},
		"replace":
		{
			"targetname": "[PR#]map_start"
		}
	},
	{
		"match":
		{
			"classname": "trigger_multiple",
			"targetname": "[PR#]s2_start"
		},
		"replace":
		{
			"targetname": "[PR#]map_cp1",
			"spawnflags": "4097"
		},
		"delete":
		{
			"filtername": "[PR#]mainmap"
		}
	}
]

Once you've done this, the checkpoints will work correctly with most timers (e.g. SharpTimer).

11_28_24_20-29_Source2Viewer_FzQ0Gd494v

Missing Floor Triggers

This process is a lot more tedious. For this you will want to tick the trigger_teleport box, and in my screenshot you will see that there is an orange box below the start area. This is what teleports the player back to spawn when they touch it. As you can see, there is an area after it where this trigger is missing. What I have done is used the add function to create new floor triggers.

You can re-use the model entity of an already existing trigger, in this case the one next to it is a similar size and orientation. The name of it is maps\surf_aircontrol_ksf\entities\s2_start_2_14936.vmdl which you can find by double clicking on the trigger. While moving around in S2V, you can use the getpos button to find the coordinates of where you're at. Knowing this, you can do a little math to figure out where you need to place your missing floor trigger, aka the origin. I repeatedly re-used these existing entities from the map and pasted them in the areas that were missing triggers, there were 2 areas like this on this map. Here is an example of adding a trigger:

"add": [
	{
		"mirror_player": "False",
		"use_landmark_angles": "False",
		"target": "[PR#]start",
		"spawnflags": "1",
		"StartDisabled": "False",
		"useLocalOffset": "False",
		"classname": "trigger_teleport",
		"origin": "-1856 -1737.5 11778",
		"angles": "0 0 0",
		"scales": "1 1 1",
		"model": "maps//surf_aircontrol_ksf//entities//unnamed_2_14790.vmdl"
	}
]

I've found the plugin cs2-glowing-entities to be helpful in confirming that I've put the trigger in the right spot/angle.

Ldr5X13xdg

Team Select

You will notice on some maps there is an empty team select screen, as the porter didn't add one. To fix this, use the following add, where I have added the classname "team_select". Again, use the getpos button to decide where you want to place this. Here's an example:

"add": [
	{
	 "classname": "team_select",
	 "isPointPrefab": "true",
	 "targetMapName": "prefabs/misc/team_select",
	 "origin": "-1778 -9811 14336.181641",
	 "angles": "0 0 0",
	 "scales": "1.000000 1.000000 1.000000"
	}
]

Missing Weapons

Some maps settings cause the player to not spawn in with a starting pistol/knife. This can be fixed with the following filter:

{
    "filter": [
        {
            "classname": "game_player_equip"
        }
    ],
}

default_ents.jsonc

Clone this wiki locally