Forum posts

Posted 1 day ago2023-11-29 14:31:46 UTC
in Half-Life Asset Manager Post #348112
There is no Linux version yet, but you can try to build it yourself by using the Continuous Integration configuration as a starting point:

Some of these steps are only for CI, just make sure to clone the repository using recursive clone so vcpkg is also cloned. You'll need to set up CMake to use the toolchain file provided by vcpkg as shown in the CI configuration.

You'll need to install these packages as well:
  • libopenal1
  • qtbase5-dev
Run CMake to set up the Makefiles, then make and make install to install the resulting executable. Note that i haven't set up the install rules for Linux yet, the Windows version includes some third party libraries so it will probably be incorrect.

You can also download Linux artifacts produced by the CI pipeline on Github by going to the Actions tab and then the latest successful run, like this one:

CI builds are release builds and are almost identical to release builds made using the above steps.

My goal is to get the Linux version fully operational for version 3 including proper installation rules and a simple guide for compiling, but that's not going to happen for a while.
Posted 3 days ago2023-11-26 21:09:08 UTC
in Half-Life Asset Manager Post #348100

Half-Life Asset Manager V2 Release Candidate 1 released

Half-Life Asset Manager V2 Release Candidate 1 has been released:

  • Added OpenGL debug logging (debug builds only)
  • Removed obsolete sequence group filename correction and saving behavior (no longer used)
  • Replaced stringstream uses with fmtlib
  • Updated vcpkg to latest version, updated dependencies to latest versions:
    • fmtlib: 9.0.0 => 10.1.1
    • spdlog: 1.11.0 => 1.12.0
    • OpenAL-Soft: 1.22.2 => 1.23.1
  • Reworked filesystem absolute path resolution to no longer search relative to the program install location
  • Implemented case-insensitive filesystem lookup to allow files to be loaded even if the filename case differs on Linux
  • Rewrote model loading to make error messages more accurate
  • Added option to mute program when it is in the background
  • Fixed minor issue in Options dialog page remembering behavior
  • Moved Take Screenshot action to Video menu, now usable using F10 shortcut
  • Reworked fullscreen mode to use the main window instead of a separate window
  • Ensured keyboard shortcuts still work in fullscreen mode
  • Escape no longer closes fullscreen mode, F11 now toggles the mode
This adds all features that were planned for V3 aside from the graphics overhaul. The Linux version is working pretty well aside from the graphical issue mentioned in a previous update so once V3's graphics overhaul is complete the Linux version should also work properly.
Seems to be working fine for me. Maybe a config file is overriding the setting?
Posted 4 days ago2023-11-26 13:18:19 UTC
in LoadBlob.cpp NULL!=hmoduleT Post #348095
Does this happen with the latest update? It looks like they've disabled asserts so this shouldn't happen anymore.

Regardless, the probable reason for this is the secure client code:

Secure clients were once encrypted blobs which is why the error mentions LoadBlob.cpp. If they get rid of the redundant load calls this problem should be solved altogether, but it appears the asserts are already disabled so it shouldn't happen anymore.
Posted 1 week ago2023-11-19 18:14:52 UTC
in Half-Life Updated (custom SDK) Post #348065
Today's update fixes the problems that broke Half-Life Updated and mods derived from it. I'm going to wait until they've released an SDK update before i touch anything since it'll be a while to stabilize everything.

There's a test branch for Opposing Force which means it'll receive an update soon as well. Expect the same for all GoldSource engine games to fix issues with the new engine update. I'd expect the SDK update to come after all games have been updated and fixed so it'll probably be a few weeks.

Until then use the steam_legacy branch to develop, test and play mods.

In case i don't have time to deal with the SDK update, here's the procedure for merging changes into Half-Life Updated:
1. Fork the newest version of the Half-Life 1 SDK
2. Make sure all files use UTF8 encoding (should hopefully be done by Valve already, but check first) and commit any encoding changes
3. add the .clang-format file from Half-Life Updated and format all files (script in the Unified SDK or a Visual Studio extension can do this among other tools). Needed to avoid massive amounts of merge conflicts caused by whitespace and newline changes
4. Commit formatted files
5. Add fork as remote to Half-Life Updated
6. Use git fetch to update remote info
7. Merge the commit that formatted files
8. Resolve merge conflicts; there will likely be many. Some changes are technically out of scope for the project like the game balance changes, i'd exclude those changes or make them conditional based on cvars (the Unified SDK uses configuration files for those changes so it'll need to be updated there instead)
9. Commit merge and push

That should cover it. I'd recommend using a separate copy of the source code to avoid messing up the one people normally use for development. Use a Git GUI like SourceTree, it makes things a lot easier.
Posted 1 week ago2023-11-18 13:40:06 UTC
in Half-Life Updated (custom SDK) Post #348059
Yeah, they used the solution i mentioned to someone a while back. I never got around to applying it myself but it'll be merged in once the SDK update rolls around.

I do wish they'd make the anniversary edition a separate game as that would've avoided all of the problems. No need to switch branches, no broken games and mods and each game can be ported one at a time. And then a separate game/tool/app on Steam for mods to use to decouple game fixes from the mod version of the engine.

There must be a reason why they did it this way but it's causing a lot of headaches.
Posted 1 week ago2023-11-17 19:09:26 UTC
in Half-Life Updated (custom SDK) Post #348054

Half-Life 25th anniversary version released

Valve has released the 25th anniversary version of Half-Life which has slight changes in how the filesystem interface works which causes all mods based on recent versions of Half-Life Updated to crash. I've identified the problem and i've pushed a fix to a separate branch:

Until Valve releases a new SDK all projects will remain as-is. Use the steam_legacy branch to run mods. You can access it by right-clicking Half-Life in Steam, opening Properties and going to the Betas tab:
User posted image
Make sure to change Half-Life's branch even if you're trying to run another game like Counter-Strike because all GoldSource engine games and mods use Half-Life's engine files. Once you've switched it make sure Half-Life is up-to-date (you may need to launch it or press the Update button) and then you should be able to run other games/mods.

Once the SDK has been released i'll update the SDKs to work with the new version.

Note that there are some bugs in the new version. There is a noticeable (half second) delay in sound playback so they'll probably be fixing bugs before any SDK updates can be expected.

Please don't report mod crashes as bugs on the Half-Life Updated issue tracker because it's currently out of our hands. Check the Half-Life issue tracker and search before you post.
Posted 1 week ago2023-11-17 17:52:17 UTC
in Half-Life Asset Manager Post #348052

Half-Life Asset Manager V2 Beta 12 released

Half-life Asset Manager V2 Beta 12 has been released:

  • Removed dot in file extension to fix file associations not working when installed using offline installer
Posted 2 weeks ago2023-11-16 16:17:09 UTC
in Water plop sound Post #348048
Ambiguous leafnode content errors happen when different faces on the same brush have a different type, like one having a water texture and another having a normal one. This can happen due to bad texture application but also when the compiler splits brushes and applies the wrong texture.

You can use func_detail to help avoid this or rework the geometry a bit but sometimes it's unavoidable.
Posted 2 weeks ago2023-11-14 16:29:00 UTC
in Wiki enhancment thread Post #348039
Yeah we really need better beginner tutorials, the problem is that nobody has time to write all of that down. And any tutorial that explains everything people need to know will end up being very long due to how many terms there are, the amount of history, etc.

I thought about making pages that list every kind of fatal error the engine can produce along with an explanation (easy enough to find by searching for Sys_Error calls and Host_Error calls using a disassembler) but that also takes time.

Also needed is a page containing all of the old update notes from the pre-Steam HL website and the old Steampowered news site before they switched to Steampipe since that's all lost now outside of, but again that takes time to dig through and assemble. There's also information in the old mailing lists that isn't documented anywhere else.
Posted 2 weeks ago2023-11-14 16:25:37 UTC
in Water plop sound Post #348038
It shouldn't make any difference performance-wise, but you can always fix them if you're worried about it.
Posted 2 weeks ago2023-11-14 11:52:01 UTC
in Water plop sound Post #348036
It shouldn't cause water sounds to play.
Posted 2 weeks ago2023-11-13 14:18:09 UTC
in Wiki enhancment thread Post #348030
The Half-Life Programming - Getting Started tutorial has been updated to streamline the tutorial and remove obsolete information.

References to Mac development have been removed. Half-Life Updated no longer supports Mac builds and only the Steam version of Half-Life has a Mac version.

Steam will drop support for the last 32 bit Mac OS version in a few years, they dropped support for Mac OS 10.12 this last september and the last 32 bit version is MacOS Mojave (10.14). This is in response to Chromium dropping support for those versions since Steam uses Chromium for its user interface.

Chromium is dropping support for MacOS Mojave in their latest versions, as noted in this issue which tracks removal of code used to support older MacOS versions.

Chromium version M117 released a few months ago. Steam usually trails behind Chromium updates and will be updating to a version that no longer supports Windows 7 and 8.1 at the start of next year. Chromium M110 was the first version to drop support for those and released about a year ago.

Given the rate at which Steam updates its Chromium dependency it will likely drop support within 1-2 years.
Posted 2 weeks ago2023-11-12 19:15:00 UTC
in Half-Life Updated (custom SDK) Post #348028
<== Continued from previous post

A new UI

I've looked into integrating RmlUi to determine which challenges are ahead in that area. I've experimented with replicating the look of the HUD in HTML, but so far i haven't been able to reproduce the exact method used which involves using a grayscale image colored with a specific value and whose alpha value is affected by the saturation of the color.

All of my findings are included in the Github issue:

If there is a way to replicate the HUD's exact appearance in HTML then it probably won't work in RmlUi since it will likely depend on CSS features that RmlUi doesn't (yet) implement.

Until it's possible to render the HUD in RmlUi it isn't worth trying to integrate it into a mod.

I've also done some investigation work into how modern engines handle UIs to see if any of them provide their UI toolkits as standalone options that can be integrated into an engine this old.

My findings are as follows (not an exhaustive list):
  • Unreal engine: Uses Unreal Motion Graphics, a tightly integrated toolkit that depends on other Unreal features like blueprints to function.
  • Unity engine: Uses UGUI, a GameObject-based toolkit. Totally dependent on the engine to function and written in C#.
  • Godot engine: Uses Godot UI, a tightly integrated toolkit that builds on Godot's class hierarchy.
  • Source and Source 2 engines: Use Panorama, a tightly integrated toolkit that uses a web-like development stack using XML, CSS and Javascript. It integrates with the engine to allow features like particle systems and model rendering to be embedded in the UI itself. Panorama's XML is not strictly HTML; it's very similar but is an evolved form of VGUI (it uses `Panel`s just like all VGUI versions).
Panorama is the closest to RmlUi in functionality but like all toolkits listed is tightly integrated into the engine.

This integration allows engine functionality to be used in the UI but precludes integration into other engines. None of these toolkits are available for standalone use, and even if they were they all use modern graphics APIs which makes integration even harder.

All of these toolkits are optimized for use in games, which means they update and render once a frame.

Another alternative is Chromium Embedded Framework 3 (CEF3), used to implement the UI in various desktop applications like Steam, Discord and Visual Studio Code (using Electron, a desktop application framework built on top of Chromium).

Chromium is designed to power web browsers; its architecture is designed around this use case. In practical terms this means Chromium uses subprocesses to perform tasks to prevent a browser tab from freezing the entire application, to prevent one tab from using exploits to read another tab's memory and other security and performance-related issues.

In part because of the use of subprocesses Chromium uses a lot more memory. Steam for instance uses around 470 MB of memory when running idle in the background. Discord uses 315 MB. It's possible for Chromium to use more memory then the rest of the game combined.

Chromium renders frames on its own, out of sync with the application. It's possible for Chromium to render more frames than your application needs, but also less, and probably lagging behind which can be a problem in a real-time environment like a game.

Additionally since pages are handled by subprocesses exposing Javascript APIs to UI logic isn't as cheap as it is with toolkits like RmlUi and Panorama. Half-Life's UI code accesses game state and in some cases modifies it as well which is complicated by the need to also communicate with the main game process.

GoldSource uses CEF1, an older single-process version of Chromium to render the HTML-based message of the day in Counter-Strike and Day of Defeat. It's been out of support for 10 years and can't even display the official Counter-Strike website due to a lack of support for modern secure connection technology. This integration is limited to rendering frames for display in VGUI2; it can't allow interaction between a website's Javascript and the game itself.

There aren't many cases of games using Chromium for their in-game UI. Here are some articles and discussions that covers the subject in more detail: I couldn't find any references to games that actually use Chromium but i have seen discussions about it in passing before.

A couple mod teams have attempted to integrate Chromium into mods before (GoldSource and Source) but it has always led to failure due to the problems listed above and overall technical challenges involved with such a complex framework. If you really want to use it, you'd better prove it can be done properly first.

Based on my findings i'd say trying to integrate a new UI toolkit is a waste of time unless you can guarantee these things:
1. You can replicate the UI in HTML exactly as in the original without performance issues
2. The toolkit of choice can be integrated into a mod and works properly on Windows and Linux and when using the OpenGL and Software renderers (Software mode support can be dropped if needed, but for the Unified SDK in particular it's not an option without a major version change)
3. The implementation runs well in general and on older systems in particular. Given that Steam is dropping support for older platforms due to CEF as well this isn't a major challenge but Half-Life players tend to use older systems

Remaining work to be done

  • MIT license all community-written Updated & Unified SDK code
  • Move projects to twhl-community organization
  • Add any required documentation on development process that is currently missing
I've run through all of the games again to test for any remaining issues. A handful were found and fixed and are listed above alongside fixes found by others.

This just about wraps up all work for V1.0.0. Everything that can be done in a reasonable timeframe has been done, all major issues have been dealt with and the last full test shows the games are working as expected. Once the remaining work listed above has been completed all projects are ready for a V1.0.0 release.

However, the full release of V1.0.0 will have to wait until after Valve has finished what they're working on to avoid having to release a patch in case there are any problems. People have noticed activity in a new password-protected branch that indicates the games are being updated with better controller and Steam Deck support.

No details are available so to avoid potential problems V1.0.0's full release has been delayed until these changes have been released by Valve. Given that controller support is implemented in the client dll which is part of the SDK this will likely mean mods will have to update to get the same changes.

That's probably meant to release on the 25th anniversary which is a week from now, so it shouldn't be a very long delay.

Once all of that stuff is sorted out all three of the Updated projects and the Unified SDK will be part of the twhl-community Github organization and will be maintained by the community.

The map decompiler will also be moved over after i've double-checked all of its features and the text color bug in Avalonia has been fixed.

Half-Life Asset Manager V2.0.0 will also receive a full release shortly once all of the above has been dealt with after which i will begin working on V3.0.0 which aims to replace the graphics code with modern OpenGL and to hopefully provide a fully functional Linux version.

I'd like to thank everybody for helping to develop and test these projects and hopefully they'll be fully released soon for everybody to try out and play with!
Posted 2 weeks ago2023-11-12 19:14:51 UTC
in Half-Life Updated (custom SDK) Post #348027
<== Continued from previous post

Progress on the Unified SDK

Release candidate 3 is now available:

SDK Changes

  • Reworked tripmine entities to use separate world model
  • Don't allow executing sv_addbot with no parameters
  • Added ITEM_FLAG_SELECTONEMPTY flag to weapons that regenerate ammo to always be selectable and never show as red in hud history
  • Truncate yaw using cast to int instead of floor to match engine behavior (fixes NPC navigation in some maps)
  • Fixed ambient_music not being triggerable in radius mode
  • Added keyvalues to set barney & otis corpse bodygroups
  • Fixed code analysis warnings when combining format result with string_view in ternary
  • Speed up sv_load_all_maps, automatically load first map & print more info, more consistent and robust behavior and added stop_loading_all_maps command to stop this process
  • Build portable binaries and workaround gcc bug to allow the Linux version to run on architectures that are missing the C++ runtime version used by the game and to avoid problems with std::regex
  • Additional fix for op4loader sound looping bug to stop looping when the NPC is removed
  • Boosted volume to match original engine by multiplying by **8**

C# Changes

  • Adjusted MaxRange (far Z clipping plane) in c2a2a to fix graphical issues
  • Fixed Alien Slaves in ba_canal1 waiting for 5 seconds before attacking
  • Added upgrades to fix issues with barney, otis & scientists in specific levels (skin color & equipped weapons and items)
  • Don't delete node graphs, update timestamps instead so graphs will be loaded from disk
  • Updated third party dependencies and updated BSPToObj to account for changes in the vertex order used by Sledge library
  • Add upgrade for bell1.wav sound and pitch so the bell sound sounds like it does in the original game

Asset Changes

  • Added separate tripmine world model
  • Added scientist_cower models
  • Reverted changes made to viewmodel animations to match the original games
  • Updated test maps to account for code changes
  • Fixed HEV suit sentences playing in Opposing Force and Blue Shift
  • Changed event id for sounds played by scientists that shouldn't affect the mouth so scientists don't "talk" when a beep sound plays
  • Add polygons to loader accordion spine
  • Added hlu_technology_demonstration map (unfinished, only contains a zoo of various NPCs and NPC models at this time)

Framerate issues in the GoldSource engine

Some people have reported issues that occur when playing at high framerates (100+ FPS) or when using cvars like host_framerate to manipulate the framerate to run very high.

This game was developed on machines that ran the game at about 20-30 FPS and everything was designed around that. The engine doesn't compensate for high framerates correctly in some cases and some game code also lacks proper compensation. Some of these issues have been fixed but the game will never work properly at high framerates because the render framerate is tied to the simulation framerate.

The engine was also designed to run at a maximum of 72 FPS, as seen in Quake 1's source code:

GoldSource lacks this limiter but it still won't work properly. The recommended framerate is either 30 or 60 FPS. 100 FPS generally works but in specific cases like elevators there might be glitches like NPCs taking damage, dying or getting gibbed due to getting stuck. Higher framerates will be more prone to glitches.

Modern engines typically lock framerates or decouple the simulation framerate from the render framerate to avoid these issues, unfortunately this can't be fixed in a mod without re-implementing the entire physics engine.

NPC navigation issues

Users reported NPCs having problems navigating in specific areas. Known occurences include We've Got Hostiles in the area after the first elevator and a soft-lock that sometimes occurs in Lambda Core level A, where the scientist holding the shotgun fails to move to the button to open the door.

This was caused by an engine function that was re-implemented in game code to allow for better optimizations.

The faulty code looked like this:
float VectorToYaw(const Vector& forward)
    if (forward[1] == 0 && forward[0] == 0)
        return 0;

    float yaw = atan2(forward[1], forward[0]) * 180 / PI;

    if (yaw < 0)
        yaw += 360;

    return yaw;
The fixed code looks like this:
float VectorToYaw(const Vector& forward)
    if (forward[1] == 0 && forward[0] == 0)
        return 0;

    float yaw = static_cast<int>(atan2(forward[1], forward[0]) * 180 / PI);

    if (yaw < 0)
        yaw += 360;

    return yaw;
The lack of a cast to int caused yaw angles to be calculated slightly differently compared to the engine.

Casting to int and then back to float causes the value to be rounded. The exact behavior is compiler-specific, in Microsoft's case this is equivalent to calling std::round:

Without the cast no rounding is performed and yaw angles will be slightly off, in some edge cases like those mentioned above this can cause NPCs to get stuck.

Finding the cause of this is 99% finding a reproducible case of the problem happening. The Lambda Core occurrence didn't always happen, but the We've Got Hostiles one did.

Once that was found it was a simple matter of using version control to pinpoint which change introduced the problem and then finding the exact line of code. Comparing against the engine's version showed the missing cast.

This bug highlights the importance of being precise when recreating existing functionality, as well as making good use of version control. Without version control finding the cause would've been a lot harder.

sv_load_all_maps command

The sv_load_all_maps command has been modified a bit to deal with an engine bug that causes the game to crash or shutdown partway through loading all maps.

This command is mainly intended to be used to automate generation of node graphs but it can be used to gather error logs for each maps as well, or to automate testing of scripting systems using map-specific scripts if your mod has that.

A related command called sv_stop_loading_all_maps has been added to stop this process if necessary.

Node graphs

Node graphs are now bundled with mod installations instead of requiring them to be generated when a map is first loaded. This should make the first-time experience a lot smoother.

New repositories in the TWHL Community Github organization

A few new repositories have been added:
  • HalfLifeSDKHistory: Contains each Half-Life 1 SDK release's source code as individual commits to allow viewing changes made in each update. There are also branches for the multiplayer version (lacks AI code) and a branch showing the difference between the singleplayer and multiplayer versions
  • OldValveReleases: Contains modding files released by Valve, mostly old SDKs
  • SlackillerDownloads: Contains files hosted on the old Slackiller modding website
  • VHLT-V34: Contains the source code for VHLT V34 along with branches that remove disabled code paths for easier viewing. Also includes a copy of the VHLT V34 tools for completeness sake
Continued in next post ==>
Posted 2 weeks ago2023-11-12 19:14:38 UTC
in Half-Life Updated (custom SDK) Post #348026

Half-Life Updated release candidates released

Half-Life Updated, Half-Life: Opposing Force Updated and Half-Life: Blue Shift Updated release candidates have been released:

Half-Life Updated:
Half-Life: Opposing Force Updated:
Half-Life: Blue Shift Updated:
Drown recover damage handling was broken during the period of October 9 through November 5. If you cloned the source code during that time, make sure to update to include the fix for this problem. If you need to know what to change you can view the fix here (i'd suggest using Git to get the update instead):
Notable changes for all games:
  • Fixed save game system not saving arrays of EHANDLEs if the first half of the array contains null handles (mainly affected Nihilanth's spheres)
  • Fixed player gaining health when drowning with god mode enabled and recovering health after surfacing
  • Fixed human grunts continuing to fire for a few seconds after killing the last enemy in an area
  • Fixed crash when +USEing NPCs that have just exited a scripted sequence
  • Fixed talk monsters resetting other talk monsters' dying schedule if they are both killed at the same time
  • Fixed RPG laser turning on when reloading immediately after equipping the weapon
  • Reverted weapon selection using weapon IDs to prevent the game from malfunctioning when delta.lst is missing
  • Added sv_load_all_maps & sv_stop_loading_all_maps to help automate node graph generation
Notable changes for Opposing Force:
  • Fixed Male Assassin Snipers not tracking their last shot time properly causing them to fire the Sniper Rifle as if using full auto
  • Fixed torch and medic grunts, male assassins and shock troopers continuing to fire for a few seconds after killing the last enemy in an area
  • Fixed Gonome crashing the game if the player dies while being damaged by Gonome's chest mouth
  • Save and restore allied grunt repel entities to ensure spawned NPCs have correct properties
  • Fixed Desert Eagle laser turning on when reloading immediately after equipping the weapon
Continued in next post ==>
Posted 2 weeks ago2023-11-12 13:24:36 UTC
in 64-bit GoldSource engine? Post #348024
Without a 64 bit executable to launch it those binaries are rather useless. From what i can find online it seems that there was once a 64 bit version around 2004-2006 but i don't see any way to run it now.

The game has had Linux server support since long before the client was ported to Linux, that's why there are only 64 bit server files and not client files.
Posted 2 weeks ago2023-11-12 13:12:34 UTC
in Water plop sound Post #348023
The -skyclip command line parameter explicitly enables sky clipping, -noskyclip disables it.

The info_compile_parameters entity can also change this setting using the noskyclip keyvalue.

If items still pass through it then you can work around the issue by making the sky brushes as thin as possible.
Posted 2 weeks ago2023-11-10 13:49:26 UTC
in Water plop sound Post #348017
You should use VHLT instead of ZHLT:

There are command line options and info_compile_parameters settings to control sky clipping behavior so make sure you're not changing the setting.
Posted 2 weeks ago2023-11-09 23:04:09 UTC
in Water plop sound Post #348013
Older map compilers didn't make the skybox solid so the skybox brush volumes act like water.

Entities will also make water sounds when they move in or out of certain contents types, as you can see here in code from Quake 1:
Posted 2 weeks ago2023-11-09 23:00:28 UTC
in trigger_changelevel @ c1a1d Post #348012
A map can have multiple level changes to the same level. In this case both the previous and next map are the same and you enter through a different level change. Your code needs to account for that.
Posted 3 weeks ago2023-11-08 20:44:57 UTC
in Half-Life Asset Manager Post #348001

Half-Life Asset Manager V2 Beta 11 released

Half-life Asset Manager V2 Beta 11 has been released:

  • Converted source files to UTF8, use correct copyright character
  • Use different filter for executable filenames on non-Windows systems
  • Added OpenAL Soft version to About dialog
  • Github Actions now provides Linux artifacts for testing
  • Removed progress dialogs when opening and closing files to avoid interfering with dialogs asking for user input
  • Allow users to load Xash models in program, add warning about potential loss of data
  • Fixed typo in settings category
It's now possible to load Xash models again. Users can choose how Xash models are loaded (in HLAM or in another program) and can choose the default action (always/never load in HLAM, or always ask first).

The Linux version has been tested. It's mostly functional but there are some bugs left. Current known issues are:
  • Filesystem access is case sensitive and can't find some files the engine is able to find under the same conditions
  • Some graphical options draw whatever is behind the program window (e.g. if you have a text file open it'll show that file)
Filesystem access needs reworking to follow the same rules as the engine. That's not terribly difficult but it's a bit of work.

The graphical issues are caused by the method used to implement transparent screenshots (the OpenGL window has an alpha channel which is uncommon). That will be fixed automatically when the graphics code gets rewritten for 3.0.0 and screenshots are handled using a different approach that also fixes the background color affecting transparent screenshots.

Since the program won't work properly until version 3.0.0 the Linux version will also be delayed until that time. 3.0.0 is intended to update the graphics code and fix graphical issues and not much else so hopefully that shouldn't take long after 2.0.0's release.

2.0.0 is now pretty much complete so this should be the last beta. Once Half-Life Updated and the Unified SDK have shipped V1.0.0 Asset Manager V2.0.0 will also be shipped and i'll start working on 3.0.0.
Posted 3 weeks ago2023-11-07 12:36:07 UTC
in Half-Life Updated (custom SDK) Post #347998

Map Decompiler beta 13 released

Map Decompiler beta 13 has been released:

  • Fixed not being able to decompile HL Alpha maps
Posted 1 month ago2023-10-05 14:36:23 UTC
in Problem with zombie soldier Post #347924
Posted 1 month ago2023-10-05 13:04:51 UTC
in Problem with zombie soldier Post #347922
The link is inaccessible because you need to share access.

Just post the code directly using code blocks.
Posted 1 month ago2023-10-05 07:27:29 UTC
in Problem with zombie soldier Post #347920
Show all of the code you've written and modified to implement this NPC.
Posted 2 months ago2023-09-20 13:40:53 UTC
in Half-Life Updated (custom SDK) Post #347866

Map Decompiler beta 12 released

Map Decompiler beta 12 has been released:

  • Remove collinear points immediately to avoid merging faces into concave shapes
This fixes the Face-To-Brush decompiler generating bad brushes sometimes.

For example in ba_canal2:

User posted image
User posted image
The cause of this problem was that collinear vertices (vertices that lie on the same line, like a triangle whose vertices are all in a straight line) were removed after faces were merged. The face merging algorithm (which dates back to the original Quake 3 codebase) assumes the 2 faces don't have collinear points so this sometimes resulted in concave faces being created which level editors can't reconstruct properly.

This problem could also result in some brush faces in the .map file having NaN values.

Thanks to almix for reporting this issue.
Posted 2 months ago2023-08-31 20:44:46 UTC
in Half-Life Updated (custom SDK) Post #347817

Half-Life Updated release candidates released

Half-Life Updated, Half-Life: Opposing Force Updated and Half-Life: Blue Shift Updated release candidates have been released:
Half-Life Updated:
Half-Life: Opposing Force Updated:
Half-Life: Blue Shift Updated:

Notable changes for all games:
  • Fixed hand grenade model not animating
  • Added cvar sv_allowbunnyhopping to control whether the bunny hopping limiter is enabled
  • Fixed mouse cursor being invisible in VGUI1 menus when raw input is enabled
  • Fixed RPG being flagged as unusable while a rocket is loaded
  • Copy delta.lst when building client or server to ensure mods have correct delta.lst file (defines networking properties for data types)
  • Fixed item history HUD not resetting the vertical position used for new items added to the list when loading save games
  • Fixed Gauss gun dealing full damage when saving and loading right after starting a charged shot
  • Prevent breakables from spawning multiple items when destroyed by gunfire and explosives at the same time
  • Properly fixed mouse movement in main menu affecting in-game angles
Notable changes for Opposing Force:
  • Fixed electrified wire damage being frametime-dependent causing players to die almost instantly at high framerates
  • Fixed func_tank_of and other OF tank entities firing many attacks at the same time at players if they hide behind obstacles for a few seconds
  • Fixed Geneworm not lighting up its eyes

Progress on the Unified SDK

Release candidate 2 is now available:

SDK Changes

  • Fixed incorrect attribute order on a couple functions
  • Optimized debug & project info huds to avoid unnecessary memory allocations
  • Fixed third person view not using correct camera offset
  • Set Drill Sergeant accessories bodygroup to blank
  • Added Natvis types for Schedule_t, CBaseMonster & CCineMonster to make it easier to debug NPCs and scripts using the Visual Studio debugger
  • Move mouth when playing regular sounds as well as when playing sentences
  • Fixed not being able to select weapons if they do not have sequential positions in the weapon bucket
  • Hardened HUD code against missing configuration data
  • Added check to prevent out of range access in entity classification code
  • Fixed func_tank entities not respecting persistence and not being able to switch targets properly if target is behind cover
  • Fixed func_tank and other tank entities firing many attacks at the same time at players if they hide behind obstacles for a few seconds (same fix as in Opposing Force, applies to regular tank entities here)
  • Make sure loader NPC stops playing looping sounds on death
  • Fixed rats having alien gibs instead of human gibs
  • Fixed turrets and tanks continuing to target players after enabling notarget
  • Fixed baby voltigores using adult sized gibs
  • Fixed Baby Voltigores playing attack sounds at wrong pitch
  • Fixed Hornet gun not playing attack animation when firing after recharging the only available ammo
  • Implemented cvar change callbacks to simplify syncing cvar changes with other systems
  • Added cvars sv_infinite_ammo & sv_bottomless_magazines to override skill variables
  • Made crosshair color separately configurable

C# Changes

  • Removed classname validation on map load to allow TFC's flagrun map to load (contains an entity with an empty classname)
  • Missing game content is now logged as a warning instead of an error
  • A missing Half-Life Uplink installation is no longer logged as an error or a warning
  • Fixed Osprey falling through the ground and reverting to the flying animation in ofboot1 after loading a save game
  • Fixed Op4 func_tank entities using persistence keyvalue (func_tank_of entities do not use this keyvalue and act as though it is set to 0)
  • Added missing wav extension to sound in of6a5 (portal sound when Geneworm arrives)
  • Removed redundant chaptertitle key from ba_power2
  • Fixed bullsquids in of5a2 not playing eat scripts (Xen area reached via Displacer)
  • Fixed grunts in ba_outro having wrong body groups

Asset Changes

  • Reverted the LD Opposing Force Crowbar model to the original model
  • Fixed Snark viewmodel fidgetnip animation leaving the left hand in an awkward position at the end of the animation
  • Use correct hud sprite for Opposing Force scanline digits
  • Fixed scientist portal animation cutting off dialogue due to sounds played on voice channel (affects c3a2d, final Lambda Core level)
  • Fixed deadhaz.mdl helmet submodel including Gordon's head causing his glasses and ponytail to clip through the helmet
  • Added crosshair color setting to cfgs, added player_setcrosshaircolor to fgd, updated test_sethudcolor with tests for crosshair color

Remaining work to be done

  • Update changelog to include all changes (done)
  • MIT license all community-written Updated & Unified SDK code
Thanks to everybody for testing these out and giving feedback, this has allowed a lot of issues to be fixed and improvements to be made.

The documentation has also been updated to include new additions.

These releases are mainly bug fixes but in the Unified SDK a few new features were added based on feedback:
  • The infinite ammo and bottomless magazines skill variables now have associated cvars to override the skill settings
  • Crosshair color is now independent of hud color and Blue Shift's crosshair color now matches the original game's color (blue was harder to see as well)
All projects are feature complete so no new features will be added. These were added because they are simple enough and somewhat required for the existing features to work well.

Do remember to follow the installation instructions to ensure that all game assets are installed and upgraded properly so as to avoid glitches and bugs!

There are some more changes that will be made for a third release candidate but nothing involving bug fixes at this time.

Try out the new release candidates and let me know what you think!
Posted 3 months ago2023-08-26 17:47:53 UTC
in Half-Life Updated (custom SDK) Post #347796
I'd hold off for a couple more weeks. We're still testing things and fixing bugs.

There should be another release candidate in the coming days to make all of the fixes available.
Posted 3 months ago2023-08-20 19:06:12 UTC
in Half-Life Asset Manager Post #347790

Half-Life Asset Manager V2 Beta 10 released

Half-life Asset Manager V2 Beta 10 has been released:

  • All mouth bone controllers now work properly and synchronize their controller value
  • Mouth controller value range matches the internal range used by the game
  • Mouth controllers can have a negative starting range
  • Fixed shadows drawing at wrong height when models are moved up or down
  • The "Highlight Hitbox" option now uses a different configurable set of colors than hitboxes drawn with "Show Hitboxes"
  • Added known issues to the manual
  • Numeric edit widgets now use the shortest possible representation to reduce the width of the text
  • Miscellaneous code cleanup
Posted 3 months ago2023-08-20 10:12:57 UTC
in Half-Life Updated (custom SDK) Post #347789

Map Decompiler beta 11

Map Decompiler beta 11 has been released:

  • Added checks to log a proper error if BSP version is not supported
  • Show messagebox if any errors occur when saving settings (e.g. file is read-only)
  • Reworked parallelization to improve throughput when decompilation takes a while
  • Fixed job time elapsed being incorrect
This should improve CPU core usage without causing any performance issues. Testing shows that decompiling 125 maps takes 31 seconds with beta 10 and 29 seconds with beta 11.

If you encounter any issues with stuttering or freezing do make sure to let me know.
Posted 3 months ago2023-08-18 17:28:48 UTC
in Problem with sprites Post #347784
Try using the TE_PLAYERATTACHMENT message instead. It creates a temporary entity attached to the player that sticks around for a specific amount of time.

It works by using the clientIndex variable in TEMPENTITY along with the flags FTENT_PLYRATTACHMENT and FTENT_PERSIST, so if this message doesn't do the trick you can make your own. The rest of TEMPENTITY's variables you should be able to set up like you would a server side entity.
Posted 3 months ago2023-08-16 11:30:59 UTC
in Half-Life Asset Manager Post #347776

Half-Life Asset Manager V2 Beta 9 released

Half-Life Asset Manager V2 Beta 9 has been released:

  • Set default text codec to UTF-8 to fix filenames converting incorrectly in some cases
  • Fixed filenames containing UTF-8 passed on the command line becoming corrupted
  • Rewrote the manual in Markdown to allow it to be read directly when viewing it on Github
  • Allow Vertical Sync setting to be changed on-the-fly
  • Use better check to detect lack of textures in main model (fixes Deleted Scenes' null.mdl failing to load)
  • Fixed incorrect filename being referenced in External texture file "<filename>" does not exist or is currently opened by another program message
  • Clean paths before adding them to recent files list to avoid duplicates differing slightly
  • Ensured settings file cannot add too many recent files
  • Added info to dumped model info about use of external texture file
  • Lazily create asset menus and delay file browser startup until it's opened to speed up initial startup
  • Replaced text-based vector edit widget with 3 spin boxes to improve editing experience
  • Made Transformation dock widget visible by default, added to bottom bar, reduced vertical size
  • Added information about spinboxes to manual (CTRL+Click changes values 10 at a time)
Posted 3 months ago2023-08-15 11:53:47 UTC
in Half-Life Updated (custom SDK) Post #347773
Ahhh I see. That's a darn shame, I loved that sound lol. And you're once again an absolute legend for adding that bunnyhop cvar. I made a video about your unified SDK btw, just released it today.
That's nice. Thanks for making a presentation of what the project does.

I should stress given some of the comments that this is an SDK first and a mod second, intended to allow others to build on it.

Once the project has moved to the TWHL Community organization people can add more features if they want to, like Decay features and map support but that's out of scope for V1.0.0.

Mr Floyd is currently making a Decay solo campaign mod so they can ask him about possibly porting the campaign but that's not something i have planned myself. The asset sources are going to be made available at some point so it should be possible for anyone to do that.

I've fixed the invisible mouse cursor issue that several people have reported. The next release candidate will have that fix along with a couple others.
Posted 3 months ago2023-08-14 11:23:43 UTC
in Half-Life Updated (custom SDK) Post #347771
So even with all these changes to the code, there's still no way to bring back gunshot impact sounds for the player's bullets? And a cvar to enable / disable bhop cap would be very welcome for someone like myself
I've added a cvar sv_allowbunnyhopping to control the bunny hopping limiter. That can be used to allow unconstrained movement speed.

I haven't actually managed to bunny hop to see if it's possible to accelerate but the code that limits it won't execute so it should work.

Gunshot impacts aren't possible without removing weapon prediction. This is because the impact sounds are handled by client side events, and those events can't detect corpses.

The reason why corpses are undetectable is because the client operates on the list of solid entities that's also used by the player physics code. This list is populated with entities the client is told about by the server but it explicitly filters out some entities, corpses among them. They are quite literally invisible to that part of the game.

Unfortunately there's no way to detect this so it's not even possible to let the server handle it.
Posted 3 months ago2023-08-02 14:10:03 UTC
in Half-Life Updated (custom SDK) Post #347748

Map Decompiler beta 10

Map Decompiler beta 10 has been released:

  • Added Windows version requirement to README
  • Added failsafes to prevent empty or invalid configuration files from crashing the program
This fixes the program failing to start if the configuration file is empty, which some users have experienced.
Posted 3 months ago2023-07-31 17:37:18 UTC
in Half-Life Updated (custom SDK) Post #347742

Map Decompiler beta 9

Map Decompiler beta 9 has been released:

  • Renamed executables to user shorter names
  • Increased plane hashes array size to match BSP file format's MAX_MAP_PLANES limit
  • Fixed plane normals being rounded incorrectly resulting in some map geometry being misshapen
  • Updated Sledge.Formats libraries to latest version, upgraded code to match library changes
  • Updated Serilog, Newtonsoft.Json and SILK.NET.Maths libraries to latest versions
  • Upgraded to Avalonia 11.0.2, upgraded code to match library changes
  • Replaced deprecated file and folder dialog code with StorageProvider API
I'm waiting for this bug to be fixed before releasing Release Candidate 1. This bug causes the text in the top right corner to become invisible until clicked on after changing the theme from Light to Dark or vice versa.
Posted 3 months ago2023-07-31 17:33:27 UTC
in Half-Life Updated (custom SDK) Post #347741
Thanks, i do my best :)
Posted 3 months ago2023-07-30 18:28:50 UTC
in Half-Life Updated (custom SDK) Post #347738

Half-Life Updated release candidates released

Half-Life Updated, Half-Life: Opposing Force Updated and Half-Life: Blue Shift Updated release candidates have been released:
Half-Life Updated:
Half-Life: Opposing Force Updated:
Half-Life: Blue Shift Updated:

Notable changes for all games:
  • Fixed tripmines not detonating if placed on breakable and a save game is loaded
  • Fixed func_friction not working properly in multiplayer
  • Fixed Gauss gun sometimes settting player uranium ammo to -1
  • Fixed user interface coordinates and sizes being incorrectly adjusted for resolution
  • Fixed player weapons still receiving input when starting to use a func_tank
  • Fixed alien slave beams staying forever if they exist during a level change
  • Fixed limit in world weapons (e.g. Hand Grenade) respawning at wrong time if server is near edict limit
  • Fixed Human Grunts dropping weapons again if the game is saved and loaded while the grunt is dying
  • Fixed mouse movement during map load affecting initial view angles
  • Fixed being able to break scripted_sequence by +using friendly NPCs to make them follow player
  • Fixed potential incorrect facing in scripted sequence
  • Fixed Egon not stopping its attack animation if the attack button is held down and ammo runs out
  • Fixed scientists crashing when speaking fear dialogue when enemy has been removed
  • Disabled fall think function for weapons when the player picks it up to prevent possible double-pickup which removes the weapon and crashes the game
  • Disabled jump sounds while player is frozen (e.g. trigger_camera, trigger_playerfreeze)
  • Fixed node graph code incorrectly flagging node graphs as out of date if an outdated graph exists in a search path other than the mod directory (e.g. a graph in halflife_updated_addon/map/graphs)
Notable changes for Opposing Force:
  • Force Pitworm animations to interpolate to fix stuttering movement
  • Implemented snow footsteps and impact sounds, changed snow material type ID to O to match Opposing Force
  • Added missing EXPORT to a few Opposing Force entities
  • Fixed M249 using wrong spread in singleplayer when standing still and ducking
  • Fixed Capture The Flag items crashing on respawn
  • Fixed Health Charger recharge time not using the correct value in Co-op
  • Fixed Desert Eagle laser position not updating when holding down reload button
  • Fixed Voltigore creating beams on death connecting to wrong entity
  • Fixed ropes breaking at high framerates
  • Fixed allied human grunts continuing to fire for a few seconds after killing the last enemy in an area

Progress on the Unified SDK

The first release candidate is available:

SDK Changes

  • Disabled following by default for monster_generic
  • Create smell sound when spawning client-side gibs so NPCs can comment on it
  • Only allow monster following if it's actually a monster (stops entities inheriting from CBaseMonster from being +USEable)
  • Removed json_debug cvar (redundant, server commands require rcon access)
  • Updated documentation & changelog to fix some issues, add remaining code changes and make them easier to navigate

Asset Changes

  • Fixed Spore Launcher spore appearing on the side of the screen when reloading
  • Fixed HEV sounds playing when taking damage in Opposing Force

The future of Half-Life Updated and the Unified SDK

With the first versions of these projects coming close to completion a plan for post-launch support is being worked out to allow these projects to continue receiving updates.

I previously announced that the three Updated projects would be archived upon the release of version 1.0.0. Some have indicated a desire to keep updating them afterwards to incorporate changes from the Unified SDK, so i've been working out a way to handle this.

So far i've been managing these projects mostly on my own, merging in changes contributed by others as needed. The Git repositories are part of my Github account, and i can add collaborators to allow direct commit access.

To allow the community to support these projects we've created a new Github organization called TWHL Community

The Updated projects as well as the Unified SDK and others i have on my account will be moved to this organization to allow development to continue there. Github will automatically redirect existing links to the new locations so everything should keep working as before, though links will still be updated for clarity.

Members of the organization as well as collaborators added to the individual repositories can commit to these repositories and merge pull requests.

The move of these projects to an organization managed by TWHL makes these projects officially an extension of the community and should allow development to continue as long as the community remains active. It also ensures that projects referenced by tutorials on the website remain available.

Remaining work to be done

  • Update changelog to include all changes (mostly complete)
  • Write documentation for all new features (done)
  • Stress test the four campaigns and fix issues that show up (third test done)
  • First release candidate build (done)
  • MIT license all community-written Updated & Unified SDK code
With the release of release candidate builds for all 4 projects most of the work is now done. Some small changes may still be made to wrap up some work and fix issues but everything's ready for testing now.

This means no more large changes are going to be made for V1.0.0. Stability, correctness and performance are the priority now.

If anybody wants to try them out, just download them and follow the instructions. Report bugs and other problems on the issue tracker for the relevant project. Make sure to provide as much information as possible.

Thanks and have fun!
Posted 4 months ago2023-07-23 18:33:11 UTC
in Half-Life Updated (custom SDK) Post #347724

Progress on the Unified SDK

SDK Changes

  • Added checks to prevent entities with class none from becoming hostile to player (e.g. if a scientist is killed near the G-Man the G-Man is marked as suspicious which makes him hostile. He'll try to attack the player but, lacking weapons, resorts to stalking the player like a Terminator instead)
  • Prevent allow_follow being set on script entities
  • Added check to prevent level changes from breaking if they are too close to each-other in relative space. The game will instead notify players who touch broken level changes that the level change is incorrectly placed
  • Reduced size of fixed size containers to optimize memory usage in sentence system
  • Use lookup table to get sounds to speed up lookup
  • Eliminated unnecessary conversion from sound index to name and back again when starting sounds
  • Clamp health before conversion to int when showing entity info (prevents entities with huge health values from showing up as having negative health)
  • Properly set scientist head when using random head setting to prevent other body groups from being changed
  • Fixed allied human grunts continuing to fire for a few seconds after killing the last enemy in an area

C# Changes

  • Update env_spritetrain sounds when upgrading maps (same as func_train)
  • Added hack to install default config.cfg file with correct key bindings
  • Added MapUpgraderDocGenerator: converts XML documentation generated by C# compiler for the MapUpgrader.Upgrades library to Markdown for use in documentation

Asset Changes

  • Added polygons under bigrat paws
  • Create valid sequences for unused HD zombie sequences
  • Added test maps to test level changes being too close to each-other
  • Added studio property to a few entities in fgd file
  • Added files used by prototype scripting system

Broken level change detection

If you go through a level change and you're touching a level change immediately after loading into the next map then all level changes will break. This has been fixed so that the level change responsible is instead disabled and a warning is shown to make this clear:
User posted image

Memory and performance optimizations

The new sound system had some performance issues that have been fixed:
  • The memory used by the client-side sentences list has been reduced by about 3/4th from 2 MiB to just under 600 KiB. This was done by reducing the size of the fixed size buffer used to store sentence names and the list of sentence words. For names and word counts that exceed the buffer size additional memory will be allocated. The new buffer sizes were chosen based on the minimum, maximum, average and median counts for both to minimize waste of memory
  • Sound lookup on the client side was too inefficient due to having to compare sound names against every sound used by sentences before regular sounds precached by the server were checked. This now uses a lookup table to dramatically reduce lookup time
  • Sounds and sentences started on the server side are no longer converted from an index back to a name and then back to an index again, which eliminates the need to perform a lookup altogether
These were the only outliers in SDK code that showed up when checking the game with a performance profiler. Most of the game's CPU time is spent in the engine which can't be analyzed more thoroughly due to a lack of access. Memory usage is pretty good with no notable outliers.

Prototype scripting system

The prototype Angelscript-based scripting system has been made available in the Git branch nonfunctional-prototype-scripting.

This prototype implements a number of features that can be used as a starting point for a more complete and functional scripting system:
  • Plugins and map scripts
  • trigger_script
  • Event System
  • Scheduler
  • Call functions from C++ using helper functions and types
  • Entity APIs
  • Custom Entities
  • Per-Entity User Data
  • Console Commands
A more complete overview is included in the documentation. The documentation explains the concepts behind these features, how they work and where the design can be improved.

I updated the prototype to include all changes made to the project and i added a couple more features i thought people might need an example for but as noted in the documentation this prototype is nowhere near ready for use. You'll need to put in a fair amount of effort to get it working.

As i noted in the Closing Thoughts you should evaluate other scripting languages to choose the right one for the job. Angelscript is powerful but that also makes integrating it into a program difficult, and when something goes wrong (and it will) you'll need advanced level C++ knowledge to understand what's happening.

Documentation and changelog

I've added documentation for as much as i can. The documentation covers everything from new features, new, modified and removed entities, tools, scripts and prototypes.

I've also added a changelog listing all changes made in the Unified SDK project (not including changes made in the Updated projects):

The changelog is about 13 A4 pages when exported to PDF.

The main documentation readme acts as a hub for the documentation to allow navigation to the documentation and links to other projects related to this one.

Potential Upgrades

Remaining open Github issues have been moved to a "Potential Upgrades" project. I've also added issues from my TODO list to this project.

These are issues that could be worth investigating and cover bug fixes, API changes and new features. They are by no means required to be added at any point, they're just things that are worth investigating.

Remaining work to be done

  • Update changelog to include all changes (mostly complete)
  • Write documentation for all new features (mostly complete)
  • Review all changes (done)
  • Stress test the four campaigns and fix issues that show up (second test done)
  • First release candidate build
There are a couple things left to be done before development is wrapped up, mostly testing the four campaigns again to check for any issues worth fixing.

I'd like to thank malortie for helping to get the project ready for release. He's done a lot of good work on the project and helping to test the game. The project would not have gotten to this point without him.
Posted 4 months ago2023-07-03 12:20:01 UTC
in Wiki enhancment thread Post #347683
The tutorial for setting up level changes has been updated to cover a common issue where level changes break if set up incorrectly:

This information was missing and it often happens to beginners so this should help.
Posted 5 months ago2023-06-27 12:36:53 UTC
in Wiki enhancment thread Post #347654
I've split the tutorial for setting up a mod directory into WON and Steam versions and i've added links to the main tutorials page to point to these tutorials:

I've also added some extra info about the use of unrelated client and server dlls and changes in how the game uses the multiplayer_only option.
Posted 5 months ago2023-06-27 12:34:07 UTC
in Half-Life Updated (custom SDK) Post #347653
I'd suggest asking for help on the Discord server, they can help you with that.
Posted 5 months ago2023-06-25 13:38:05 UTC
in Half-Life Updated (custom SDK) Post #347650

Progress on the Unified SDK

SDK Changes

  • Fixed scientists crashing when speaking fear dialogue when enemy has been removed (e.g. scientist screaming in fear at human grunt that was just gibbed)
  • Fixed serverctrl tool not compiling when built as 64 bit (note: tool is not compatible with Steam Half-Life due to removed engine functionality)
  • Removed procinfo library (obsolete, the Half-Life SDK uses SSE2 by default which is only available with CPUs newer than what this library tests for)
  • Tools now obtain SDL2 using vcpkg instead of relying on the SDL2 library included with the SDK (allows 64 bit builds to be made)
  • Fixed qcsg & qrad crashing due to pointer-to-int downconversion in 64 bit builds
  • Disabled fall think function for weapons when the player picks it up to prevent possible double-pickup which removes the weapon and crashes the game
  • Implemented cheat_jetpack: When enabled, players can fly by holding down the jump button and accelerate forward when holding the forward movement button
  • Give maximum ammo when giving weapons with impulse 101 (MP5 gets full magazine)
  • Fixed Egon gun resetting animation when another weapon has just been deployed
  • Added checks to ensure talk monsters (scientists, security guards, friendly grunts) only talk to other talk monsters when idle chatting or getting shot by friends
  • Added missing call to PostRestore in weapons code (caused weapons dropped in the world to change models when going through level changes)
  • Allow CBaseMonster::DropItem to drop any entity (fixes Shock Troopers not dropping roaches)
  • Disabled jump sounds while player is frozen
  • Fixed node graph code incorrectly flagging node graphs as out of date if an outdated graph exists in a search path other than the mod directory
  • Ensure auto weapon switch setting is always initialized (fixes not switching to picked up weapons in singleplayer)

C# Changes

  • Removed globalname from crates next to the Dam in c2a5 to stop them from disappearing when entering through level change
  • Removed unnecessary sentence replacements (now handled by bs_sentences.json)
  • Removed dialogue in ba_tram2 that references Freeman and HEV suit in error

Asset Changes

  • Fixed allied grunt sentence using wrong filename ("Ok, check in!" dialogue)
  • Stop looping turretrot1.wav sound played by loader model


This cheat was added to make it easier to traverse maps more quickly and to allow players to reach ledges that are just out of reach when testing maps:

Remaining work to be done

  • Update changelog to include all changes (partially complete)
  • Write documentation for all new features (partially complete)
  • Review all changes
  • Stress test the four campaigns and fix issues that show up (second test done)
  • First release candidate build
I've tested all campaigns and training courses. All of the above changes are fixes for bugs encountered during these tests.

The next step now is to write the changelog and documentation. Features will be tested to verify that documented behavior works as expected. Any bugs found along the way will be fixed.

Once this process is complete the first release candidate builds for all projects will be released.
Posted 5 months ago2023-06-21 13:52:27 UTC
in Half-Life Decay HUD Problems Post #347637
READ_BYTE is used to read data from an incoming network message. It's only valid inside the message handler for the message. You can't just call it whenever and get the value you want; you'll get -1 instead since there's no data to read. There are plenty of examples on how to cache the values received in a message in existing handlers, so look at those to get an idea on how to do that.
Posted 5 months ago2023-06-17 08:14:53 UTC
in Is there any way to preview "p_" models? Post #347630
Sounds like your computer itself has a problem. Maybe your operating system installation is corrupted somehow?
Posted 5 months ago2023-06-16 18:38:32 UTC
in Half-Life Updated (custom SDK) Post #347628

Progress on the Unified SDK

A new pre-alpha build is available:
Note: pre-alpha builds are not intended for general testing. As the wiki article on software life cycles explains the first versions intended for this kind of testing are alpha builds. Pre-alpha builds are for testing specific features by request to verify that they work as expected based on bug reports and feature requests.

Since this project is still in the midst of development (essentially this is the game engine development part of the project) it's expected that there are bugs and features not working as expected (or at all). Once all required features have been implemented the project can move to the alpha testing stage where verifying the proper behavior is the main goal.

SDK Changes

  • Added cl_custom_message_text cvar to display a custom message on-screen, along with cl_custom_message_x and cl_custom_message_y to control the position on-screen (works like game_text)
  • Fixed ropes breaking at high framerates
  • Added documentation to the engine's server interface
  • Marked a few more engine functions as deprecated
  • Fixed code analysis warnings
  • Reworked the music system to use a separate OpenAL device to prevent the HRTF setting from affecting music playback
  • Added option to use Link-time optimizations (C++ compiler setting)
  • Reworked HEV suit sentence playback to no longer store group and sentence indices in save games (indices are not guaranteed to be stable)
  • Reworked sentence groups to allow sentences to be non-sequential, removed bad sentence group index diagnostic message
  • Redesigned sentences system to use JSON instead
  • Removed sv_snd_openal and cl_snd_openal cvars (sound is played through the OpenAL sound system only now)
  • Disabled follower logic for (ai)scripted_sequence to prevent players from activating them with +USE (scripts share code with NPCs, including follower code)
  • Converted documentation for server and client interfaces to Doxygen format, fixed swapped documentation for HUD_Init and HUD_VidInit

C# Changes

  • Added Sentences2Json: tool to convert sentences.txt to sentences.json

Asset Changes

  • Replaced sentences.txt with sentences.json
  • Removed sentence groups that aren't actual groups
  • Fixed bad sentence replacements used in the Opposing Force & Blue Shift replacement files
  • Reworked sentences so game-specific sentences replace originals

Framerate-independent rope physics

Ropes in Opposing Force don't account for the framerate so higher framerates cause players to apply more force to ropes, and ropes will eventually stop moving if the framerate gets high enough.

This has been fixed. Rope physics has been reworked to behave as it did at 30 FPS.

Sentences changes

The HEV suit's playback list used to store group and sentence names using their index which can change between maps in this mod because it supports custom sentences files. The list now stores the names instead. This also simplifies the API used to play sounds since it can deduce what is being played using the name. It previously required you to tell it whether it was a sentence or a group.

The switch to JSON means the engine can no longer load the mod's sentences files so support for using the engine's sound system has been removed. The OpenAL sound system handles everything just fine with the sole exception of the bell sound in the Hazard Course map. That single case can be fixed by manually adjusting the sound to play as it does under the original sound system.

The new file syntax looks like this:
    "Sentences": [
        // Grenade Warning
        "HG_GREN0 hgrunt/clik(p120) grenade! clik",
        "HG_GREN1 hgrunt/(t30) clik take!(e75) cover!(s5) clik",
        "HG_GREN2 hgrunt/clik clik oh! shit! clik",
        "HG_GREN3 hgrunt/(p110 t40) clik(p120) get!(e78) down!(t30) clik",
        "HG_GREN4 hgrunt/clik(p110) (t40) of!(e75) god! clik(p110)",
        "HG_GREN5 hgrunt/clik no! clik",
        "HG_GREN6 hgrunt/clik move! clik(p120)"
    "Groups": {
        "HG_GREN": [
Sentences is a list of strings containing the sentences, just like before.
Groups is an object of group names to lists of sentences that are in that group.

It is no longer required for sentences to start with the group name and it doesn't have to end with a digit either.
This allows another sentences file to replace groups and arbitrarily combine sentences.

A tool called Sentences2Json has been added that can convert the old format to the new. It also prints warnings if invalid or duplicate sentences are encountered. The default file has a few of those.

Here's an example of the BA_POK group being replaced, which is played when you +USE a pre-disaster Barney, as well as the scripted sentence BA_SEC2_NOPASS which plays when trying to continue in the Insecurity chapter before you've got your armor:
    "Sentences": [
        "BA_POK0 hgrunt/clik(p110) (t40) freeman you are lay!(e90) team!(e20) clik(p120) clik",
        "BA_SEC2_NOPASS barney/c2a4_ba_longnite"
    "Groups": {
        "BA_POK": [
This becomes:
Note that you can reload the map to test changes as opposed to the original game which requires a full restart.

Remaining work to be done

  • Update changelog to include all changes (partially complete)
  • Write documentation for all new features (partially complete)
  • Implement as much of the work scheduled on the issue tracker as possible (done)
  • Review all changes
  • First alpha build
  • Stress test the four campaigns and fix issues that show up (first test done)
  • First beta build
These changes represent the last programming work that had to be completed for V1.0.0. Code-wise this project is now feature complete, which means it's now time to test it and finish the documentation.

This also includes testing the 3 Updated projects independently to make sure they work on their own. That means 7 full campaign playthroughs are required to verify that they work as intended: once in each Updated project and once in the Unified SDK.

New beta builds for the Updated projects will be made available once i've done these tests.

That's about it for now, until next time.
Posted 5 months ago2023-06-16 08:38:07 UTC
in Is there any way to preview "p_" models? Post #347627
If possible, configure HLAM to log OpenGL info and show what's in the log file. See this page for more information:

This should shed some light on why it fails to work.

Also note if it's not working due to an error or if it's crashing.
Posted 5 months ago2023-06-11 15:22:56 UTC
in Half-Life Updated (custom SDK) Post #347600

Progress on the Unified SDK

A new pre-alpha build is available:
Note: pre-alpha builds are not intended for general testing. As the wiki article on software life cycles explains the first versions intended for this kind of testing are alpha builds. Pre-alpha builds are for testing specific features by request to verify that they work as expected based on bug reports and feature requests.

Since this project is still in the midst of development (essentially this is the game engine development part of the project) it's expected that there are bugs and features not working as expected (or at all). Once all required features have been implemented the project can move to the alpha testing stage where verifying the proper behavior is the main goal.

SDK Changes

  • Simplified talk monster friendly check and use/unuse sentence configuration. Friendly NPCs like scientists and security guards will no longer follow players if their classification treats players as anything other than allies (i.e. as if the player has shot them while not in combat)
  • Made it possible to for any NPC to follow players if they are friendly to the player (barebones support only)
    • Disabled following for some NPCs
  • Removed some obsolete HUD sprite functionality
  • Removed unused CHealthPanel class (non-functional VGUI1 version of the health HUD)
  • Reworked UI code to no longer use resolution size specifier
  • Reworked some string buffers & operations to avoid buffer overflows or truncations (fixes GCC compiler warnings)
  • Removed option to print list of all entities with ent_list client command to avoid network buffer overflows
  • Reworked weapons functions that start animations to use pev->body instead of a separate body parameter
  • Fixed Egon gun not stopping its attack animation if the attack button is held down and ammo runs out
  • Implemented chainsaw_melee skill variable: enables buggy melee attack behavior causing corpses to be damaged much faster
  • Changed client-side fog code to update fog parameters before the game frame is drawn to avoid edge cases that cause black screens
  • Clear global state when game_end is used to end multiplayer game (allows Co-op maps to clear state that may affect other maps)
  • Fixed various compiler warnings that occur at warning level 4. 3 warnings remain involving lambdas that have unreachable return statements. This is probably a code analysis bug, not incorrect user code
  • Fixed a bug in the text-based scoreboard that causes it to search for empty teams incorrectly. This code is not used and the VGUI1-based scoreboard does not have this bug
  • Optimized sound system to avoid a potentially expensive call when starting sounds
  • Reworked HUD message drawing to allow for unlimited-length lines
  • Prevent paths passed to filesystem functions from containing .. (parent directory)
  • Fixed Doxygen comments that contain bad syntax
  • Added child_classification keyvalue to allow NPCs that spawn NPCs (e.g. Big Momma, Osprey) to pass on classifications
  • Added unkillable keyvalue & cheat_unkillable: Makes NPCs and players unkillable, respectively. Not all NPCs support this setting
  • Mark monster_*_dead NPCs that should use human gibs as such so they spawn gibs
  • Play predicated sounds through OpenAL sound system as well (footsteps, weapon empty sounds)
  • Added sv_load_all_maps command to load all maps and generate node graph for them (allows leaving the game running on its own, can also be used to generate a log containing any errors logged by the game)
  • Don't switch weapons when using impulse 101 if the player has a weapon equipped already
  • Merged armor HUD into health HUD, draw armor next to health regardless of resolution (matches original game behavior at 640x480 resolution)
  • Fixed bug in sound loading code that caused it to calculate cue point positions incorrectly for stereo sounds
  • Fixed turrets and spore ammo entities not playing sounds in multiplayer in some cases
  • Reworked Nihilanth and Gene Worm death logic to not teleport players in multiplayer (used to trigger the end-of-map script)
  • Reworked Medic Grunt follower logic to follow player that used it instead of the local player
  • Removed invalid cast in Torch Grunt death logic

Asset Changes

  • Cleaned up fgd some more
  • Added keyvalues for new features to the fgd
  • Added test maps for some features
  • Added information about how to compile, package and copy models from source to a game installation using provided scripts
  • Changed hitgroup values for NPC models back to 0 to ensure game balance (i.e. damage required to kill) is identical to the original games
  • Fixed Rat NPC jump and death animations so they don't loop and end on the right frame
  • Fixed MP5 model so the arm vertices aren't attached to the weapon

NPC following behavior

Barebones support allowing NPCs to follow the player has been added:
NPCs don't have default start and stop sentences yet and may not always follow players as expected.

I implemented the essentials needed for this to work so others can expand on it as needed. This covers the AI schedule aspect of things and moving logic from a more specialized C++ class to the general NPC class.

Chainsaw melee

Chainsaw melee is a bug that causes melee weapons to attack corpses very quickly. It was fixed in this project, but i've added the option to enable it again:

Unkillable characters

NPCs can be set to be unkillable. Not all NPCs allow this since some have their own damage logic, but support can be added there as needed.

Players can also enable this for themselves using a cheat.
This feature is based on Source's buddha cheat.

Sounds in multiplayer

Some sounds didn't play in multiplayer. This happens with entities whose origins is in a brush or on the plane of a brush face. The calculations used to determine if a sound emitted at that position can be heard can produce false negatives causing the entity to be silent.

This was fixed by allowing entities to provide an offset to push the sound origin out of brushes. This fix can only be used with the new sound system since the original sound system has this code in the engine.

Remaining work to be done

  • Update changelog to include all changes (partially complete)
  • Write documentation for all new features (partially complete)
  • Implement as much of the work scheduled on the issue tracker as possible (in progress)
  • Review all changes
  • First alpha build
  • Stress test the four campaigns and fix issues that show up (first test done)
  • First beta build
This completes more of what's becoming a small TODO list. There are only a few issues left on the issue tracker that will be handled for the first release.

I've tested the sound system with these high quality sound packs: Stereo sounds play without 3D spatialization, essentially they sound as if they're coming from the player entity. Mono sounds play just fine.
There was an issue with cue points not loading correctly but that was fixed. No other issues were found.

The previous dev build included outdated tools that would fail to run due to relying on an older version of the bundled Utilities library. All tools have been updated so that shouldn't be an issue now.

I'm writing documentation for some engine functions to make it easier to work with them. Note that Doxygen's UI program currently freezes when processing this codebase due to a problem with the doxywizard program. The problem has been dealt with so the next release should work fine.

That's about it for now, expect the next progress update to be smaller than this one.
Posted 5 months ago2023-06-04 08:44:19 UTC
in [Help] Sparks Above NPCs Heads Post #347579
This only shows up if you use debug builds. Make a release build and it won't happen.

It's also vanilla HL SDK behavior, not specific to HL Updated.