Skip to content

Mapping & Porting Guide

wootguy edited this page May 22, 2026 · 35 revisions

When players ask how to make a map for this mod, I usually tell them to make a map for sven and we'll test it on my server. It's too complicated to set up a local server to test things currently.

Most Sven Co-op entities and settings are implemented. Below are some mapping features unique to this mod. See this guide.

New mapping features

  • Global sound/model replacement files can replace everything. Player movement sounds, default weapon sounds/effects, HUD selection sounds, etc. Stop adding weapon sounds to view model animations.
  • weapon_knife is a built-in entity.
  • info_landmark has new spawnflags for creating spawn points to speed up map porting.
    • 1 = Create spawn points on the floor, oriented away from the nearest level change.
    • 2 = Use angles (in case the spawns are facing the wrong way).
  • env_rain creates rain conveyors automatically in outdoor areas. See Demo
    • spawnflags 1 = Rain starts disabled. Triggering toggles rain on/off.
    • To change density, replace the rain models with a .gmr file (models/hlcoop_v2/weather/rain*.bsp). The rain texture can be swapped out with bspguy (right click image -> import). Splash sounds can be replaced with a .gsr file sound/hlcoop/weather/rain*.wav
    • There is an env_snow entity too but it looks bad in maps that aren't totally covered in snow textures. The snow isn't moving like I want either.
  • .res files are obsolete. Don't bother making one. The mod knows how to precache everything clients need.

Client commmands

Cheat commands useful for testing maps. The big 3 are god, noclip, and impulse 101 for all weapons. You don't use the cl_ versions here.

Command Description
instakill All your weapons do a million damage.
nodes Toggles node graph visibility. Different colored lines represent each hull path.
Pink = HULL 2 monsters and smaller can pass.
Blue = HULL 1 monsters and smaller can pass.
Orange = HULL 3 npcs can pass.
Yellow = Flying monsters only.
Thick line = An entity blocks the path (door).
revive Revive yourself
strip Remove your weapons
trigger Trigger something in front of you. Or, type in an entity name after this to trigger a targetname.
trigger0 Same as trigger but with the OFF trigger mode.
trigger1 Same as trigger but with the ON trigger mode.
trigger2 Same as trigger but kills the entity.

New map CFG commands

CVar Description
hud_file Overrides player HUD elements. You can replace or add new HL25-style icon sets here. The file format matches the default hud.txt file. Example: hud_file path/to/custom_hud.txt
include_cfg Executes another map CFG. For porting large campaigns without duplicating cvars.
mp_bigmap Must be set to 1 for maps that are bigger than the +/-4096 HL grid. Otherwise many effects won't work. Off by default to save precache slots. bigmap effects are very expensive network-wise, so don't port a big map that has lots of action outside of the +/-4k grid, otherwise you'll be seeing a lot of Reliable channel overflowed.
mp_blood_color_alien Change the default color for alien blood (engine palette index)
mp_blood_color_human Change the default color for human blood (engine palette index)
mp_blood_scale Change the scale of blood effects
mp_explosionbug Enables the broken explosion hit detection from vanilla HL (grenades in vents become mini nukes)
mp_flashlight New value "2" enables opposing force nightvision.
mp_flashlight_charge Multiplier for flashlight charge speed. 1 = 100%
mp_flashlight_drain Multiplier for flashlight drain speed. 1 = 100%
mp_flashlight_size changes the size of the flashlight Dlight effect.
mp_friendlyfire Enables friendly fire.
mp_hud_color Change the default HUD color. Values are 3 digit hex strings (80F = purple).
mp_keep_inventory Works the same as the keep_inventory keyvalue for trigger_changelevel when set to 1. Kept inventory is added in addition to the map default, and health/armor is restored.

When set to 2, the exact state of the player is saved and loaded in the next map. That includes health, armor, active weapon, flashlight battery, and weapon clips. If the player ever dies, their equipment is reset to the map default.
mp_mergemodels Set to 1 to merge most item world models and reduce model precache count.
mp_npcidletalk Set to 0 to disable idle talking in monsters like OP4 grunts and scientists. Reduces precache count.
mp_objectboost Enables the incredibly broken and fun pushable physics from steam_legacy
mp_one_pickup_per_player Disables respawn on all weapons, ammo, and items. Each player can pickup the same item once. Dying and respawning resets the pickup limit for yourself.
mp_soundvariety Limits sound variety to reduce precache count. 3 = max of 3 sounds per action per monster. 10 is a good starting point to nerf the talking monsters. Then try 3, then 2. 1 will probably be annoying.
mp_startflashlight Sets whether or not to start with a flashlight, and the starting battery level. Examples:
50 = start with 50% battery and a flashlight
0 = start with 0% battery and a flashlight.
-1 = start with 0% battery and NO flashlight.
-51 = start with 50% battery and NO flashlight
mp_use_only_pickups Forces all weapons, ammo, and items to be use-only
mp_weaponhands Sets the default weapon view model hands.
op4 = Opposing Force hands
bshift = Blue Shift hands.
sv_ledgesize How high a ledge can be for a monster to jump down and attack.
sv_stepsize Change how tall a stair can be for players/monsters to step up without jumping.
sv_vis_test_limit limits the amount of tests an entity can run to determine its visibility. This usually makes giant brush models visible everywhere in the map. Sometimes sprites are affected too. This greatly reduces CPU usage in some cases. Try values between 1000-8000 to troubleshoot. Set to 0 to disable.
weapon_hud_file Globally change the default HUD path for a weapon. It works the same as setting a "custom sprite dir" on entities. Example: weapon_hud_file my_map/weapon_shotgun will set the default HUD file for weapon_shotgun to sprites/my_map/weapon_shotgun.txt.

HUD files are downloaded by the client, and the file name must match the weapon classname. So, to update the hud, make a versioned folder, don't just edit the text file nor rename it.

The Nerfer

I'm irritated by maps that add respawning monsters or increase monster HP for no good reason. Two new cvars were created to undo those changes across all maps. These aren't cvars I think mappers should be touching, but here's how they work.

CVar Description
mp_bulletsponges 0 = Never allow increased monster health.
1 = Always allow increased monster health.
2 = Allow increased monster health if there is a "good" reason for it (custom model, death trigger, osprey/apache with a targetname, glow effect, or 90000+ HP)
mp_maxmonsterrespawns -1 = Allow monsters to respawn infinite times
0 = Never allow respawning monsters.
N = Allow monsters to respawn up to N times.

My defaults are mp_bulletsponges 2 and mp_maxmonsterrespawns 1. Special exceptions are made for maps like svencooprpg where infinite monster respawns are a gimmick and can be stopped by destroying the spawner.

More thoughts

Attempting to balance maps via monster health and respawns is a fool's errand. Even if you subjectively succeed, it's just that one map that's balanced now. What about the other 3000? The server op should be handling this job, not every map author with their own preferences.

A minimum/maximum player limit set for each map could work too. 10x monster HP is actually fine if there are 30 players. When that's implemented, the nerfing stuff might go away. That would create a new problem though, where mappers/porters are upset that their map never comes up due to the minimum player limit. As a player I think that could be more fun though. On the rare days where there's a full server, I'm thinking "wow there's X players we should be playing Y map, and we finally have enough players for Z map!" ...and then the resident evil map comes up. Or some other slow map filled with cutscenes.

Clone this wiki locally