Forum posts

Posted 3 days ago2025-03-14 03:25:55 UTC
in Server side weapon implementation? Post #349576
Recently I played on a HLDM server with a totally vanilla Half-Life 1 client. The server had a fully functional Opposing Force spore launcher weapon implemented, along with a chainsaw, they even had distinct weapon slots with proper HUD icons. How is it possible? I thought to implement a weapon, you need to touch client side code (client.(so|dll)), that is not possible when dealing with vanilla clients. After this, I wonder what are the limits of modifications that can be fully implemented on server side only. Like the server could even invoke VGUI panels via menus. It also sets my multiplayer decal limit to 5, which then stays being set even if I go to another server, which I don't really appreciate – always have to set it back manually.
Posted 4 months ago2024-11-16 23:00:01 UTC
in 20th Anniversary of Half-Life 2! Post #349352
Yeah, the recording thing in Steam - is the thing that must have its place in Steam Overlay. I haven't tested it out, but i hope in future i'll do so.
Hope it'll became available for HL1 too!
Posted 4 months ago2024-11-16 22:15:45 UTC
in Show off your HL box copies! Post #349351
On the occasion of the 20th anniversary of Half-Life 2, I wish happy non-mechanical reproduction simulation to everyone!

I thought to dig up the box copies of HL2 I got for 2004 Christmas from my now-deceased Dad, and HL2:EP1 I bought years afterwards. Unfortunately, I skipped getting a boxed copy of the Orange Box, I only purchased it digitally in Steam. I was quite poor back then and didn't think about the ideological value a boxed copy would have by today. If I think about it, probably HL2:EP1 was the last game I got a physical copy of, aside from the Undertale Collector's Edition from 2017.
Half-Life 2 Retail and EP1 coversHalf-Life 2 Retail and EP1 covers
Half-Life 2 box contents (excuse the snack wrappers covering the keys)Half-Life 2 box contents (excuse the snack wrappers covering the keys)
Half-Life 2 released on 5 CDs (didn't have a DVD drive back then)Half-Life 2 released on 5 CDs (didn't have a DVD drive back then)
You can find more photos here:
https://undead.megabrutal.com/pics/hl/box/

Do you still have your physical copies perhaps? Post your photos here! Nice memories, huh?
Posted 4 months ago2024-11-16 21:00:00 UTC
in 20th Anniversary of Half-Life 2! Post #349349
What's also ultimately awesome is that you can record HL2 footage right with Steam, without needing to set up complicated recording software like OBS (which is a great recording software and probably more capable than the Steam UI, still I always scratch my head over the settings).

This is my first attempt:
Failure to comply with loyalty check
Probably I could have achieved better quality with OBS, but I must appreciate the simplicity of the Steam UI, so I think there is a trade-off here. Also it is inherently hard to record any good quality footage with my gear, for example I can't get rid of the awful screen tearing in GoldSource games (like the Sven Co-op footages on the same channel).
Posted 4 months ago2024-11-16 12:30:15 UTC
in HL.dm20.NET - Vanilla/Fun Server Post #349345
Nice server and website! I see it's static – did you make it with Hugo or by hand?
You can check out my server too, it's „Coralie”.
Posted 4 months ago2024-11-16 12:15:15 UTC
in 20th Anniversary of Half-Life 2! Post #349344
I noticed Half-Life 2: Deathmatch being delisted from the Steam store. Is it automatically granted for HL2 now, along with the episodes, or did it become temporarily unobtainable? It's even possible that it's been like that for a long time, I just didn't notice – even I didn't buy HL2DM separately, but got bundled to something – to what, I don't even remember.
I have Half-Life (app id: 70) installed. It ships build 9911 with hl.so (SHA1:a9f5d8eef0b206524167028a792ddcbb28f746d2).
A fresh HLDS install via SteamCMD (app id: 90) ships build 9907 with hl.so (SHA1:fde38762b7258cdbb92b10802ecdf6b7dc280ccc).

I noticed that HLDS is usually behind the Half-Life client installation, so basically I have to run outdate dedicated servers.

Why?
Posted 1 year ago2024-01-02 15:00:12 UTC
in Christmas themed maps & servers Post #348386
Start Half-Life, open the server list with Find servers, look for „Christmas Coralie” and join.
Alternatively, open up the console (it's '~' or '0' NOT on the numpad) and enter the
connect addon.coralie.megabrutal.com:27019
command to join.

I'll be running it until Epiphany at least.
Posted 1 year ago2023-12-29 00:45:15 UTC
in Christmas themed maps & servers Post #348372
Probably I'm a little late with this, but strictly speaking it's still Christmas season, so I go ahead. I created a Christmas themed HLDM server which mostly runs Christmas themed and snowy maps. Yeah, some of them are a bit of a stretch because it only features pine trees those are definitely not Christmas trees, and some of them are just snowy without any Christmas going on; but there are some fun Xmas maps as well.

Here is the current mapcycle:
ms_xmas_rats_beta
penguin_park
codename_blueballz
simple_xmas_dm
creep_xmasitall
mario_xmas2
dm_utopium
dm_alpestrine
veryratsxmas
tetrico_navideno
creepy_xmas
toyshop_rats
moab_compo27
sr_xmas
iceworld
simpsons_xmas_rats
lostinxen
frozenrats
snowbank
holidayhell
Can you suggest any more maps to add?

Btw, my server's address is addon.coralie.megabrutal.com:27019. Do you also run or know about any Christmas servers I should check?
Posted 1 year ago2023-12-13 03:30:30 UTC
in Override GameRules in Metamod Post #348221
I'd like to tweak certain aspects of multiplayer games and I think by defining my own GameRules I could achieve what I want. However I don't feel it would be feasible to ship an entire new server library, it would be much more sensible to apply my modifications in a Metamod plugin. The problem is that I don't see the necessary bindings/hooks in the Metamod documentation that would allow me to override the GameRules. Is it possible? Am I overlooking?
Posted 1 year ago2023-12-04 04:00:10 UTC
in Coding help needed for PMPreCache plugin Post #348140
I'm thinking that maybe I should create an entity and define a Think() callback for it with a sufficient delay set for nextthink. Now I'm wondering if this is the elegant way of delaying actions in a plugin or is there a more straightforward way.
Posted 1 year ago2023-11-30 12:45:46 UTC
in Coding help needed for PMPreCache plugin Post #348123
I decided to hook ClientPutInServer which runs when the player enters the game, but unfortunately it is too early to send messages from here.
void ClientPutInServer( edict_t *pEntity ) {
    const char* playername = STRING(pEntity->v.netname);
    char* modelname = g_engfuncs.pfnInfoKeyValue( g_engfuncs.pfnGetInfoKeyBuffer( pEntity ), "model" );
    char modelfile[256];
    snprintf(modelfile, sizeof(modelfile), "models/player/%s/%s.mdl", modelname, modelname);
    LOG_MESSAGE(PLID, "Player %s is using model %s", playername, modelname);
    if (fileExists( modelfile )) {
        LOG_MESSAGE(PLID, "Model %s is present on server", modelname);
        SAY(pEntity, "Your model is present on the server, it will be precached for the next round!");
        if (addPrecacheEntry( playername, modelname ))
            LOG_MESSAGE(PLID, "Added model %s to precache list", modelname);
        else
            LOG_MESSAGE(PLID, "Model %s will not be precached - reduntant or precache list is full", modelname);
    }
    else {
        LOG_MESSAGE(PLID, "Unable to precache due to FILE MISSING: %s!", modelfile);
        SAY(pEntity, "Your model is not present on the server, can't distribute for other players!");
    }
    RETURN_META(MRES_IGNORED);
}
If I send a message to other players who are already in game, or all players, they receive the message, so it's not that SAY() doesn't work. I think somehow I should add some timing, so the message would be sent several seconds later when they are already playing. (Just an irrelevant sidenote: the log message "Model %s will not be precached - reduntant or precache list is full" is confusing, because if the model is already added to the list, it WILL be precached for the next round, but won't if the list is full.)

SAY() is a macro I defined to send raw messages – I remember there are other methods I tried, but all of them effectively do this at their core.
#define SAY(pEntity, text) {\
    MESSAGE_BEGIN( MSG_ONE, GET_USER_MSG_ID(PLID, "SayText", NULL), NULL, pEntity );\
        WRITE_BYTE( ENTINDEX(pEntity) );\
        WRITE_STRING( text );\
    MESSAGE_END();\
}
And fileExists() here is just a wrapper for calling access() (this is the other thing I have problem with):
bool fileExists(const char* path) {
    char fullpath[256];
    snprintf(fullpath, sizeof(fullpath), "%s/%s", &gGamedir[0], path);
    return access(fullpath, R_OK) == 0;
}
I highly doubt that LoadFileForMe() would mmap() the file – it would be somewhat better because it's faster and the kernel could at least unload it if it's not used, but it would still be better to not load files in the middle of a game when they are not needed in memory.

IFileSystem in public/FileSystem.h is interesting, I think it would do what I need but I have no idea what it links to.
Posted 1 year ago2023-11-29 03:15:15 UTC
in Half-Life Asset Manager Post #348107
Can you provide the build instructions for Linux?
Posted 1 year ago2023-11-29 01:45:00 UTC
in Issues with copy-pasted entity code Post #348105
Instead of copy-pasting, consider extending the CBarney class and overriding the methods those are different for your CCustom class.
Posted 1 year ago2023-11-28 22:15:30 UTC
in Coding help needed for PMPreCache plugin Post #348103
Previously I announced my simple Metamod plugin which helps to spread player models. I've been using it ever since then and it works, but it has certain aspects that I'm dissatisfied with, and I'm not an experienced plugin author yet to fix them.
  1. On Linux, file names are case-sensitive, and if the user provides the model with a different case, my plugin doesn't find it. Not sure if the engine is prepared to look up files case-insensitively, but it leads to another problem: I use the access() system call to check for the existence of files and it is obviously not a good idea. Once, it completely bypasses the engine, so even if the engine has a solution to look up files case-insensitively, I don't utilize that. Moreover, it makes the code platform-dependent, as it won't compile on Windows. I know there is an engine callback, LoadFileForMe, but I don't want to load the model files at that point, just check for their existence. I also don't know the lifetime of the buffer returned by this function, is the engine smart enough to not load this file again when it is precached the next round, or would I waste memory, how to ask the engine to free it if I need to.
  2. The plugin is supposed to inform players whether the server has their player model. The problem is that the message is sent when the player has not yet fully entered the game, so it's not shown to them. When I was experimenting with this feature, I found like 3 methods to send messages to the player, and the maximum I could achieve is that the message appeared on the console, which is easy to miss. I somehow need to delay the sending of the message, but I don't know how to approach this problem. Somehow I should set up a timer.
  3. Currently I allocate my own buffer for storing strings because I'm afraid ALLOC_STRING() would redundantly allocate the same strings for the same player models over time and I don't know when these strings get freed. So I felt like this is the only way to control the lifetimes of these strings, but I'm curious for better ideas.
I really hope some HLSDK gods are around to help me out with this; thanks in advance! :D
Posted 1 year ago2023-11-19 04:25:00 UTC
in FUNC_VEHICLE Post #348062
Please tell me about your maps utilizing func_vehicle, I want to host them on my server!
I really liked Unreal Tournament games (especially 1999) when I was a schoolkid (heck, I remember the days when UT2003 was new). I must admit, I never saw such artistic value in them like in Half-Life, but still they have good vibes and left an impact. Also I've never played Unreal, the single player campaign, but it was on my bucket list (maybe it even gives some backstory to UT, if there's any). Not so long ago I noticed they are on Steam and wishlisted them to buy them later. However, in recent days I noticed that they are not available anymore. I searched a little and found out that they were pulled down by Epic Games and unlikely that they'll ever come back. (Also it creates a very sad precedent for me – can this ever happen to Half-Life too?)

So I ask those who are into these games and follow the news much better than I did.
  • How can I still get these games?
  • How do I still play them online?
  • Should I run a server to help UT be alive?
  • Is there a master server so other players can find my server in a server list?
Yeah, I can use web search, but there is too much info to filter, most of the guides were possibly written at the time when Epic still supported these games. That's why I ask someone who is following the news and possibly runs a server and were probably doing this for decades. I'm also very aware that it's a HL forum, still it seems so friendly that I give it a shot here before seeking out dedicated UT communities. :)
Posted 2 years ago2023-03-14 20:15:15 UTC
in Metamod plugin to precache player models Post #347392
Exactly that's the point! The inspiration came from a Sven Co-op server, twilightzone (TWLZ) where this is implemented and everyone is running around with custom player models. Also I had a pretty embarrassing misconception that clients can upload their player models to servers when sv_allowupload is enabled... of course it's not the case...

I can't use the same plugins those work in Sven Co-op because they're in AngelScript which is exclusive to SvenDS; vanilla HLDS doesn't have an AngelScript interface. Initially I tried to look for an existing Metamod plugin but I couldn't find one. Here's how it started:
https://forums.alliedmods.net/showthread.php?t=336998

In the end, I had to implement it myself. In order to utilize this plugin, server admins need to install an enormous model pack, so there is a great chance that when a player joins with a custom model, you already have that.
Posted 2 years ago2023-03-14 19:30:00 UTC
in Any coders out there? Post #347390
Admer456 is right, making hostile Barneys and fearing scientists and changing the HUD color is quite easy, I tell you from experience. Back in the day
I made Barneys and human grunts sided with the aliens and HUD color changeable via env_ entities.

My biggest addition was probably a PDA interface which allowed you to read e-mails and logs the System Shock style.
Posted 2 years ago2023-03-12 23:30:45 UTC
in Metamod plugin to precache player models Post #347383
I made a Metamod plugin to precache custom player models if they are present on the server. Not sure if such plugin exists already – when I needed it and looked for it, I couldn't find any.

Here is the source code:
http://git.megabrutal.com/?p=pmprecache.git

As for now, I don't publish pre-compiled binaries, but I might if there is a need.

Any criticism is welcome, especially if you find memory safety issues.
Posted 2 years ago2023-02-12 01:30:45 UTC
in Which Half-Life games need more servers? Post #347332
I'm in the fortunate situation that I could run game servers. What do you think, which GoldSrc or Source games would benefit the most?

What I was thinking about so far:
  • Half-Life Deathmatch
  • Opposing Force DM / CTF (not sure which one)
  • Sven Co-op
  • Half-Life 2 Deathmatch
  • Black Mesa
Any other ideas?
Posted 2 years ago2023-02-07 20:30:45 UTC
in Stuck in TWHL Tower Post #347308
Tower 1 uses spirit 1.8, maybe you downloaded the wrong version? I have a Linux version of SOHL 1.8 with bug fixes here, but note that I do not test these builds on Linux.
At first it didn't seem to work, then I reverted to the other libraries I had and gave up, so I noclipped through the barrier and finished the game. But then I thought to give it another try, because it occurred to me that save files might not be compatible between different SOHL versions and I was right. When I loaded the map directly, I could gauss over the barrier with ease! So yeah, it wasn't supposed to be hard.
For Tower 2, it uses a slightly customised version of SOHL 1.8, the changes are pretty minor so the same thing might work for that, otherwise you can compile it yourself from this branch.
I've built the libraries but for some reason it keeps crashing randomly. Wish I knew why. It looks so random that I can't even provide useful error messages beyond "Segmentation fault". I can start the game and play for some time, but loading a saved game always leads to a crash (the save in question was made with the same libraries). Here is some output from the terminal:

`ILocalize::AddFile() failed to load file "resource/twhltower2_english.txt".
Platform config directory: platform/config
0:Initializing platform...
Server module initialized.

World module initialized.

## CHud::Init

Fatal Error: FMOD library couldn't be loaded!

STEAM Auth Server

AppActive: active
Installing breakpad exception handler for appid(gameoverlayui)/version(1.0)
AppActive: active
Loading game from SAVE/Half-Life-002.sav...

Loading game from SAVE/tower2_jamaican.HL1...

ERROR: ld.so: object '/home/megabrutal/.steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
crash_20230207210803_3.dmp[3169804]: Uploading dump (out-of-process)
/tmp/dumps/crash_20230207210803_3.dmp
home/megabrutal.steam/steam/steamapps/common/Half-Life/hl.sh: line 43: 3169726 Segmentation fault (core dumped) ${DEBUGGER} "${GAMEROOT}"/${GAMEEXE} $@
crash_20230207210803_3.dmp[3169804]: Finished uploading minidump (out-of-process): success = yes
crash_20230207210803_3.dmp[3169804]: response: CrashID=bp-af299b77-5d78-436b-a611-2a16b2230207
crash_20230207210803_3.dmp[3169804]: file ''/tmp/dumps/crash_20230207210803_3.dmp'', upload yes: ''CrashID=bp-af299b77-5d78-436b-a611-2a16b2230207''
pid 3169804 != 3169803, skipping destruction (fork without exec?)
Game process removed: AppID 70 "/home/megabrutal/.steam/ubuntu12_32/reaper SteamLaunch AppId=70 -- home/megabrutal.steam/ubuntu12_32/steam-launch-wrapper -- '/home/megabrutal/.steam/steam/steamapps/common/Half-Life/hl.sh' -steam -game twhltower2 ", ProcID 3169726
`

I'm thinking maybe the lack of FMOD might be the problem, but it seems to keep running after that point. (I don't see why it needs FMOD for MP3 playback in the first place because Steam build of HL already has built-in support for MP3.) And the message about gameoverlayrenderer.so keeps repeating anyway, even for vanilla Half-Life, so I don't think that's the problem either. So yeah, I don't know, maybe I'll just use the other libraries those worked with TWHLT1, but it would be interesting to know why this one fails.
Posted 2 years ago2023-01-25 21:00:00 UTC
in Stuck in TWHL Tower Post #347258
I didn't have any issues with the jump when I played it, but if it's not working right you can always just noclip through.
Yeah, I wanted to verify whether it's really glitched, or the different game library, or I'm just clumsy enough that I legitimately can't make that jump before cheating my way through.
I'm using the vanilla Spirit of Half-Life game libraries
Why?
Good question! Well, the TWHL Tower download from RunThinkShootLive didn't include a Linux .so file to allow me play. But I saw it's Spirit, so I just downloaded the release version of Spirit and used spirit.so from that package. It worked so far... at least, until this point. That's why I'm curious whether TWHLT utilizes a vanilla build of Spirit or has custom code that I'm obviously missing.
Posted 2 years ago2023-01-25 00:00:30 UTC
in Stuck in TWHL Tower Post #347254
Hey, I'm new on the forum! I'm playing TWHL Tower and I'm blatantly stuck where I'd need to do a gauss jump. So I have a question. Gauss jumps seem significantly easier in multiplayer mode, and I'm starting to doubt whether it's supposed to be THIS hard to make that jump. „In Multiplayer, you can boost yourself both horizontally and vertically, while in Singleplayer you can only get horizontal boosts.” (Source: SourceRuns) Now I know TWHL Tower utilizes the Spirit of Half-Life game libraries, but I'm wondering, does TWHL Tower apply a modification to unlock multiplayer gauss jumps in singleplayer mode? If so, that might be my problem, because yeah, I'm using the vanilla Spirit of Half-Life game libraries... But it's also possible that I'm really just that lame that I can't make that jump in an hour of trying.