Skip to content

Mapping & Porting Guide

wootguy edited this page Apr 28, 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 for tips on porting sven maps.

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).

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.
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

Common Porting problems

Extra edits are sometimes needed for compatibility with the vanilla HL client. Many of these issues are fixable in the custom client, but if I drop support for vanilla HL then both my server and this project die. Most players are not using the custom client, and a few are strongly opposed to ever using it. So, I fix the content rather than the client when possible.

A conversion script handles most common problems such as audio formats and texture downscaling. See the server setup for basic instructions on how to use it.

game_text chains have broken fade or scan effects

The vanilla HL client doesn't reset the text fade timer when a new message is received on the same channel. Change the channel on odd game_text entities in the chain to fix the scan-in effect (alternate 1-2-1-2).

Music is interrupted/restarted after cutscenes and respawning

Convert music to an .mp3 file and use ambient_music instead. stopsound commands are sent to players to prevent stuttering mic audio during/after cutscenes and on respawn.

Balance is off and sven maps are too easy

Half-Life doesn't have any built in damage resistances. This means things die about 2-3x quicker.

Weapon huds from sven don't work in Half-Life

Use the hud_create.py script to generate HL25 compatible HUD files. It's meant to be used alongside the map conversion script, so place all map content next to it. Copy over valve/ sprite files as needed. It can generate both weapon hud files and custom system HUDs (health, armor, flashlight, etc.). You can test different sprite resolutions with the hud_scale cvar (or use the command menu options).

Not-precached boxes are spammed when shooting a wall in a certain area of the map

Add mp_bigmap 1 to the map CFG. Bullet decals and all other temporary entity effects are replaced with real entities when outside of the +/-4k world boundaries, so that vanilla HL players can see them.

Hunk_AllocName: failed on XXXXXX bytes

Add -heapsize 65536 to the server launch options. Large maps that use lots of custom content need this. The max value is 131072.

func_tank* isn't moving/attacking

It gets stuck easily on nearby monsters. If it's bounding box intersects a monster, it won't move at all. Things like monster_furniture can also cause this. Make the turret nonsolid if it's necessary for a monster to be touching it.

trigger_push is too strong/weak compared to sven

The physics for this entity is different in HL. Either tweak the push speed or sv_maxvelocity if there's a problem.

Lack of ledge grab feature from sven prevents a solo player from progressing

Set sv_gravity to 780. Strangely, this has been enough to solve almost every case I've encountered. It's a small enough change that the average player won't notice. For very high ledges, you'll need to add/copy a func_wall to help them climb up. I'm not strongly opposed to adding the ledge grab feature, but it did enable some skips for older maps so I'm not certain it's an objective improvement. So far, 2-3 maps needed special edits, and 780 gravity was enough to fix 22 others (out of ~1600 bsps currently ported).

Custom Uzi model is broken (4 hands are visible)

Use the port_uzi.py script to convert uzi meshes and animations for mirrored rendering.

Custom friendly models are the wrong color

There are no friendly versions of models in this mod (hgruntf.mdl, islavef.mdl, etc.). Instead, skins are used to recolor friendlies. This is done to save on precache slots. To fix coloring, decompile the friendly models and add their textures as a skin to the enemy model.

Custom osprey model can't be hit by rockets

Recompile it to match the mod version. The hitboxes and positioning are likely different. Hopefully it's just a retexture.

"Tried to link edict X without model" spammed in console

This happens when there's a model precache overflow. You might test the map independently and not see this, then it happens on a live server because of plugins, or because more weapons are carried over in a map series (trigger_changelevel with keep_inventory enabled).

Simple entity setups which work in sven don't work in SevenKewp.

If it's not a bug in the SevenKewp entity, then it's probably related to how entities are ordered in SevenKewp. A new cvar mp_edictsorting will cause the active entity list to be in reverse order most of the time. This breaks setups where entities only look for the first entity with a given name in the list, when there are multiple possibilities. Try setting mp_edictsorting 0 if the entities themselves look fine.

Edict sorting is normally enabled so that non-networked entities can be moved to higher indexes in the edict list. This frees up edict slots which are very low for vanilla HL players, especially those on the legacy engine (1365 for legacy, 1665 for HL25, 8192 for sven).

Client crashes with no error

Possible causes:

  • A model texture has more than 512x512 pixels
  • A model is missing an external sequence model (xxxxx01.mdl)
  • A WAV file has bad/inverted cue points
  • Something is wrong with a BSP model that uses a !water texture

Clone this wiki locally