Skip to content
Andreas Schneider edited this page Jun 7, 2018 · 11 revisions

Welcome to the Half-Life-Scripts wiki!

Common mistakes

If the console says unknown command bxt_append, make sure Bunnymod XT is injected. If it says couldn't exec userconfig.cfg, make sure the file exists on your mod dir (valve, valve_WON or similar).

Performance Issues / Tips

For the use of scripts (and running this game in general), the computer must be running stable at a given frame rate at all times. This is hard to maintain ideally, however certain measures can help to achieve such thing. Note for AMD/Intel graphics users: OpenGL support on AMD is noticeably bad compared to NVIDIA's, and Bunnymod XT relies on this backend.

  • If you experience a 60/75 fps cap, disable vsync using the graphics card's control panel.
  • For Windows 7/Vista, you may set hl.exe priority to "High" using the Task Manager (CTRL+ESC+SHIFT).
  • Using the console "~" set r_dynamic 0 and r_decals 1, the first command disables dynamic lighting such as explosions, flashlight and environment, the second will limit the amount of decals like blood and dust.
  • Launch the game at a lower resolution like 800x600
  • If your Half-Life build dates from 2013 or later, you may enable "Low video quality" under video options.
  • Certain Half-Life builds may run better on your hardware, you can try using latest from your steam account, GoldSource Package 2.1 (2009) link or Half-Life 2005 link
  • If you're capable of setting thread affinity for Half-Life, you may notice improvements, somehow on more than capable machines the game can't run properly.

Stutters / Freezes

The memory manager allocates certain assets dynamically from the disk into memory such as speech, explosions, maps, etc and you may notice freezes when AI speak and or longer loading screens on a first encounter. It's possible to increase the this memory size using -heapsize <value in kilobytes> but I personally noticed no real improvement, the default value is more than enough. The best thing you can do is to load a few save files through the game and play a bit so the game can load some of these assets.

Saving / Auto-saving / Reloading

Writing saves into disk may cause a long freeze up to 1 second on worst cases, one common fix is to give the folder writing permissions to the user(?). The latest steam build as of 2017 is known for having inconsistent loading times from saves. Previous releases have consistent/predictable reload times.

Mod dir Fallback

When a mod is running such as cstrike, gearbox, valve_WON, etc, and a asset is required and not found, the engine looks for it under valve which is the default game, and it's known to increase lag since it's an extra task the game must do to. It's known to be awful on linux, level transitions can easily take 5 seconds instead of a few milliseconds. As for windows, it's quite noticeable on steampipe (engines builds from 2013 to present) but passable on older builds. If you seek for maximum performance, you may merge your mod into valve dir, preferably only valve_WON, the others may crash or malfunction.

cmd name / _special

Half-Life's client.dll between release and pre-steam (WON patches) has cmd name, and from Steam port circa 2003 up until 2013 has _special, both work as a way of parsing stuff into the end of the command buffer from within a script, which allows looping scripts and receiving player inputs at the same time. Valve in 2013 decided to patch these altogether at engine level¹ so no cmd name nor _special can be used. That's why BunnymodXT's bxt_append is the best way to get this functionality everywhere. ¹citation needed

Common scripting console commands

wait stops command parsing until the next frame.

TODO

Clone this wiki locally