Forum posts

Posted 54 minutes ago2025-03-31 11:18:58 UTC
in My HLBSP is Dead AGAIN! Post #349694
hlbsp ---> hlcsg ---> hlvis ---> hlrad
The order of BSP and CSG should be swapped, e.g.:
CSG -> BSP -> VIS -> RAD
(Tutorial: Compiling Introduced#The_Compile_Programs)

The log file you sent at the start of the thread did print several warnings from CSG, related to an illegal brush and several malformed faces.
These are just warnings, not errors, but I recommend checking out these brushes and fixing them anyway.
Posted 1 hour ago2025-03-31 11:00:53 UTC
in .qc file troubles. [help needed] Post #349691
The targetname and Start On flag descriptions already mentions that, but could be more explicit with a mention that sprites need to be "on" to be visible.
Posted 3 hours ago2025-03-31 08:47:10 UTC
in Abort Scripted_Sequence during animation Post #349686
The typical and easiest way of doing this is to have the scripted_sequence play a looping Idle Animation, which it will then interrupt when triggered.

If the sequence isn't looping (which is the case for soda), then as long as you're making a mod/minimod then you can change the sequence in HLAM.
When doing that, it also adds the possibility of adding additional features by using various sequence events, such as using 1004 to play a sound or 1003 to trigger an entity with a given targetname (events reference).

When using the Action Animation however, I'm not sure if there are any vanilla ways of interrupting the scripted_sequence using triggers. Only attacking the monster will interrupt it as far as I'm aware.
Posted 21 hours ago2025-03-30 15:02:34 UTC
in .qc file troubles. [help needed] Post #349684
If you give it a targetname, it causes the env_sprite to "start off" unless the Start On flag is enabled. It needs to be "on" to be visible.
Posted 1 day ago2025-03-29 16:06:56 UTC
in .qc file troubles. [help needed] Post #349678
It depends on the kind of entity you've chosen to display the model. It sounds like you're using cycler, which gives it a human-shaped collision box and will bleed when hit (as well as cycle its sequence/frame, depending on the mode which you can change by using it).

cycler is something of a development tool and doesn't survive save/load (so it's not suitable for singleplayer campaigns). You might want to use env_sprite instead and use CLIP brushes to give it collisions (and remember to set zero values of its angles (Pitch Yaw Roll) keyvalue to 360).
Posted 6 days ago2025-03-24 14:43:25 UTC
in Rules for level transition? Post #349664
The info_landmark entity is a reference point for the two maps. Its position is irrelevant, you may place it at the origin, at (256, -128, 32), anywhere.
What matters is that the position of the corresponding objects in each map are the same relative to each info_landmark entity.

For example you connect two maps with a transition in a corridor.
That corridor will be identical in both maps, so it makes sense to place our info_landmark here. Make sure it's in the exact same spot of that corridor in each map (regardless of actual coordinate location). Also note how we placed the trigger_changelevel on the right side of the corridor in Map A but on the left side in Map B. This is to allow for some distance between the level change triggers.
User posted image
This map might be fairly large, so our level change in Map A might be on the far east (right) part of the world, and the corresponding section is in the far south-west (bottom-left) part of the world, allowing us to make a section that stretches north-east.
Posted 1 week ago2025-03-22 09:12:34 UTC
in .qc file troubles. [help needed] Post #349645
Great to hear, congrats! ๐Ÿฅณ

For scaling the model, you don't even need to do that in the editor, just adding a $scale x command in the QC where x is the scale factor and recompiling is enough. Alternatively, you can use Transformation widget (Ctrl+M to show it if it's hidden) in HLAM to apply it to the model directly without any compilation/decompilation at all.

If you scale it in Blender, or just as a general tip for working with GoldSrc models in Blender, I can recommend changing the Scene Units to None. That way one unit in Blender will correspond to one game unit.
User posted image
From there you can use the typical reference measures as one would use in mapping, for example a human is about 72 units tall, a room wall is about 128 units tall, doors are 64x96, and so on.
Posted 1 week ago2025-03-21 22:15:20 UTC
in .qc file troubles. [help needed] Post #349642
When you fixed up the image in Blender it might have changed the format.
It needs to be 8bit indexed BMP, with exactly 256 colours.

There are different ways to achieve the format, this guide by The303 is a pretty good resource.
Another method is to use WadMaker to create a WAD (this guide also by The303 explains the process), and then extract the BMP using Wally.
Posted 1 week ago2025-03-21 19:59:49 UTC
in My hud ui not showing Post #349639
I can highly recommend learning how to use a Version Control (such as Git) and fork a project like HL Updated SDK.
With version control you can easily compare changes you've made with the original code, and even revert those changes to go back to the original state.

With that said, you should try from scratch with a clean copy of the SDK and try to get that to compile successfully first before adding any other changes.

Since all you showed was adding the creation of three new cvars in hud.cpp, but the tutorial has several more steps than just that, you're not giving me the impression you're keeping track of your own changes. Starting from scratch and having the project successfully compile from the beginning will be very helpful. And having version control to keep track of your changes for you automatically is a very good help as well ๐Ÿ™‚
Posted 1 week ago2025-03-21 11:27:07 UTC
in .qc file troubles. [help needed] Post #349636
$cdtexture is only useful if your textures are in a different folder from the one you used $cd to enter (for example if they're in a subfolder). In this case it's not needed.

"./no_material not found" means that one or more faces of your mesh has no material applied to it.
When using Blender with BlenderSourceTools, you use materials to apply textures to the mesh. The name of the material should be the name of the texture file (including the .bmp extension!), and all faces must have a material applied to it.
Posted 1 week ago2025-03-20 21:05:56 UTC
in My hud ui not showing Post #349624
I'm guessing by those cvars that you've been following Tutorial: Customising the HUD colour?
That tutorial is mostly for making a HUD whose colours can be customised using cvars, but if you just want a specific, permanent colour you can skip creating those three cvars and go straight to changing UnpackRGB in cl_util.h into something like:
inline void UnpackRGB(int& r, int& g, int& b, unsigned long ulRGB)
{
    if ( ulRGB == RGB_YELLOWISH )
    {
        r = 0;
        g = 0;
        b = 255;
    }
    else
    {
        r = (ulRGB & 0xFF0000) >> 16;
        g = (ulRGB & 0xFF00) >> 8;
        b = ulRGB & 0xFF;
    }
}
Tried it myself with HL-Updated SDK with only the above change to UnpackRGB (except setting r=255 and b=0) and it compiled successfully and worked fine in-game:
User posted image
I'm not sure if there are any limits on the MP3 format, I'd say try it out and see. ๐Ÿ™‚

As for a loop that can be interrupted, you can check out my toggled loop example:
Loading embedded content: Vault Item #6924
Posted 1 week ago2025-03-20 07:41:33 UTC
in .qc file troubles. [help needed] Post #349620
To take a screenshot you can use the Snippet Tool (Win+Shift+S, Win being the Windows button with the flag next to Ctrl) and then simply paste it (Ctrl+V) in a text box here. ๐Ÿ™‚

.blend1 files are just backup files, in case something happens to the .blend file.

I'd doublecheck the name of the SMD file in the QC with the file's actual name. In the QC you have "mt_lightlamp_referance", but in the post above you wrote "mt_lamplight_referance", that is, "lightlamp" vs "lamplight".
Posted 1 week ago2025-03-20 07:33:37 UTC
in My hud ui not showing Post #349619
In that case, since you mentioned changing the HUD colour to blue you can either try debugging that part of the code yourself, or post what that change was here.
Posted 1 week ago2025-03-19 06:39:12 UTC
in .qc file troubles. [help needed] Post #349613
Could you post a screenshot of the model source folder?
Posted 1 week ago2025-03-19 06:33:14 UTC
in My hud ui not showing Post #349612
Is textures the only folder within your mod folder?
If so, it's missing the dlls and cl_dlls folders where your built libraries should go.

When we ask to see your mod folder, we're more interested in which subfolders it has. All of those WAD files are of very little use to us. ๐Ÿ™‚
Posted 1 week ago2025-03-18 08:45:21 UTC
in .qc file troubles. [help needed] Post #349604
The $cd command is used to *C*hange *D*irectory in case your model source files (SMD files and textures) are in a different directory (folder) from the QC file.
If your model source files are in the same directory as the QC file (as is usually the case), you may leave it as just $cd ".\".

If it's still not working, make sure that "mt_lightlamp_referance.smd" actually exists inside the folder you CD to.
Posted 1 week ago2025-03-17 19:49:26 UTC
in 1st post, my suit disappeared! Post #349599
@PointClass color(255 128 0) = info_texlights : "Texture Light Config"
The FGD declaration for info_texlights is missing opening and closing square brackets ( [ ] ), it should look like this:
@PointClass color(255 128 0) = info_texlights : "Texture Light Config"
[
]
That might have interfered with the rest of the declarations following it, including item_suit.

It's not necessary to add it to halflife.fgd anyway, you should be adding the zhlt.fgd to your editor's game configuration instead (i.e. have both halflife.fgd and zhlt.fgd). It already has info_texlights and several more ZHLT "entities" ๐Ÿ™‚
Posted 1 week ago2025-03-17 15:17:35 UTC
in My hud ui not showing Post #349595
Perform that test to check if the client dll was built and loaded properly.
If it's not working, check out the debugging part of either guide and debug the code changes you made. If you get stuck, feel free to post the code changes you made here.

Please use code blocks when posting code snippets as it makes it easier to read ๐Ÿ™‚
(TWHL: WikiCode Syntax#Code_blocks)
Posted 1 week ago2025-03-17 12:59:25 UTC
in My hud ui not showing Post #349591
A simple test you can do to check if the client_dll was built correctly would be adding a "hello world" console message in CHud::VidInit(), such as
void CHud::VidInit()
{
    gEngfuncs.Con_Printf("Hello, world! (from client)\n");
    // ...
(Basically the example first change from Half-Life Programming - Getting Started#Making_your_first_changes).
It should then print "Hello, world! (from client)" in the console after starting a game in your mod.

Also, so far I have assumed you haven't made any changes to the code since you haven't mentioned doing that, but if you have made any changes then you should describe what those changes were.
Posted 2 weeks ago2025-03-17 11:40:45 UTC
in 1st post, my suit disappeared! Post #349589
Could you copy the item_suit declaration from your FGD and post it here (along with any base classes it might be using)?

Also, could you show what the item_suit entity in the MAP file looks like? It should look something like
{
"classname" "item_suit"
"origin" "-192 0 64"
}
(If it has a key rendermode and if it's set to anything but 0 along with a renderamt set to 0 that could make it appear invisible)
Posted 2 weeks ago2025-03-17 10:21:11 UTC
in 1st post, my suit disappeared! Post #349586
Hi and welcome!

When placing the item_suit make sure the origin (the X that appears when selecting/dragging the entity in the 2D viewports) is inside the map and slightly above the floor.
You could also export the MAP file and open it in a text editor and find the item_suit entity and make sure its origin key has a reasonable coordinate value.
Posted 2 weeks ago2025-03-17 09:58:25 UTC
in My hud ui not showing Post #349585
Could you provide some more information?
  • Which SDK did you use?
  • Have you been following the Half-Life Programming - Getting Started guide?
  • Did the IDE/compiler log any errors during the build?
  • Have you launched the game with -console -dev and checked the console for any errors/warnings, and if so what were they?
Yeah, how the game is played matters a lot. I had a great GM once that made sure the players engaged with the game through their characters and discouraged meta gaming. Often made a point that characters don't need to roll for things they can do (e.g. a character twice as strong as the average person can easily break down a rotten door and don't need to roll for that), only for things they need to attempt to do (with the GM having the final say about which is which, of course).
That way the focus was on more fluid roleplaying than constantly asking the GM "can I do this?" or "can I roll for this?". The GM also told us to ask the rest of the party in-character for advice instead of asking him and such, which helped a lot with encouraging the players to interact with each other and kept our more introverted players more in the loop so to speak. ๐Ÿ™‚

I downloaded those Mothership PDFs and the character sheet was already very space sci-fi, can tell there can be lots of nerdy fun with this! Will give the survival guide a read later!
I'm a D&D player myself, but haven't had the chance to explore any other games yet (apparently Call of Cthulhu is pretty great from what I've heard from friends) but can definitely check out Mothership!
How are you testing this?
Do you have a list of the colormap values for each TFC team, putting that in HLAM and comparing?
What sort of timer setup did you try making?

A simple resettable timer could be a game_counter that is constantly triggered by a multi_manager loop at a regular interval, and using a game_counter_set targetting the game_counter to reset it back to zero.
Posted 3 months ago2024-12-19 10:21:18 UTC
in Fishing in HL2! Post #349418
I'm going to focus on GoldSrc as that's where I'm far more experienced at.
Let's break it down into two parts: The entity part and the model part.

For the entity part, you have to decide on whether you truly need a custom NPC. If all you need is to display a model playing an idle animation and perhaps play some other animations now and then, and no need for an actual AI, then you could do that with a monster_generic and use scripted_sequence to play different animations.
If you do need some AI, then you'll need to do some code changes. Easiest would be making a duplicate of an existing NPC and adjust it to your needs. A good place to start for that would be Half-Life Programming - Getting Started.

For the model part, I highly recommend Blender as the editor (it's free and powerful, and with Blender Source Tools you can export to both GoldSrc and Source).
Regardless of editor, you should take some time to learn how to use that editor, specifically learn how to create meshes, apply materials, and creating, skinning a mesh to, posing and animating skeletal armatures.
After that, familiarise yourself with the process exporting and compiling a model, The303 has a great guide about that here, by making a simple model (e.g. just a static crate) and then once you've done that successfully try out exporting and compiling an animated model.
Once you have a grip on the export and compile process, you can decide on whether to create your custom model from scratch or start by editing an existing model. I'd recommend the latter, as it's far easier and quicker, and if it's a NPC model then you get a skeletal armature and animations for free.
To edit an existing model, you can use Crowbar as the decompiler, and then import the decompiled files into your editor (if using Blender with BST, you can simply choose to import the QC file by itself and it'll import everything else automatically). Make your changes to the mesh, apply or change textures, and skin the new mesh to the armature. Modify animations or create new ones. It should then be ready to be exported and compiled.

Some of these things will be similar in Source, but you'll find a lot better information and guides than what I can provide about this over at the VDC. ๐Ÿ™‚
Posted 4 months ago2024-11-14 08:10:03 UTC
in env_camera / trigger_once not working Post #349339
You said the trigger_once has a target, but you didn't specify if the target is the trigger_camera. Does it target the camera directly, or indirectly through other entities?

What sort of entity is the camera's target?

Have you double-checked if all targets and targetnames are correct and have no spaces or special characters in them?
Posted 4 months ago2024-11-01 21:37:26 UTC
in Three quick questions Post #349306
There are many ways to create custom textures, but The303 has a pretty extensive guide on his site here.

For custom sounds you can check out Tutorial: Making Custom Sounds
Custom sentences can only be made for mods, you can read more about it in the sentences.txt page I already linked you before.

And don't forget you have tons of resources over at Goldsource Tutorials and Entity guides.
Posted 4 months ago2024-10-31 13:59:23 UTC
in Three quick questions Post #349299
  1. Sound environments is achieved with env_sound. Each entity defines a sphere with a radius, that when entered permanently changes the sound environment (meaning that for two areas with different sound environment, you want a pair of env_sound at each entrance/exit between these two areas). The speaker entity (often multiples of it) can be used to play random sounds from sentence groups (sentences.txt) to add to a soundscape, such as combat soundscapes in Forget About Freeman.
  2. A trigger_hurt volume with Radiation damage type and positive damage will trigger a player's geiger counter when they're in proximity of the trigger volume. Even an 1x1x1 unit cube is enough.
  3. Tying brushes to func_rotating with a single brush covered entirely in ORIGIN texture to define the axis can be used to make rotating geometry, such as fans. As for parts of the worldspawn that rotates, that's not possible. The worldspawn BSP model is just a single, static mesh.
  4. Simple AND gates can be made using multisource, but more advanced/complex setups can be made with clever use of trigger_changetarget, for example. Though exact solutions would depend on the sort of logic you're trying to achieve.
Posted 5 months ago2024-10-31 08:05:21 UTC
in Coding problems. Post #349293
Or even better, upload here directly by copy&pasting the images into the text editor.
External hosting services can be unreliable.
"HLOP" is a very strange way to abbreviate Opposing Force. It's more common to use "Op4" or "OF" :p

But back to the topic at hand, the base game does not provide any way to change monster relationship, but you can either use a mod/SDK that already provides this functionality as the base for your mod, or use a SDK with Op4 code such as Op4 Updated SDK and either modify the Classify() method on the monsters or write in the functionality to override the Classify() value using a keyvalue.

The easiest would be using the Featureful SDK as kimilil suggested, as it already comes with Op4 monsters and allows one to invert the monster entities' player relationship (i.e. from friendly to enemy and vice versa).
Posted 5 months ago2024-10-06 16:13:20 UTC
in Warning: === LEAK in hull 0 === Post #349233
"The entity listed in the error is just a helpful indication of where the beginning of the leak pointfile starts..."
From the error message itself. It could be outside the map, or it just happens to be the entity nearest a possible leak location. Following the How to fix those leaks tutorial explains the steps to find and fixing the leak(s).
Posted 5 months ago2024-10-06 06:08:06 UTC
in error: map not found on server Post #349228
That's not the only WAD it couldn't find.
The compile tool used shouldn't matter, what matters is your editor's configuration has been set to use hlof.wad, hlbshift.wad and zhlt.wad, all under the ambiguous directory "/Program Files/" (it's ambiguous because the directory doesn't specify the drive, and both game and compile tools are on different drives).

If these WADs aren't used or don't exist, you can remove them from the game configuration and compile again.

If they do exist, you can try either placing them on the same drive as the compile tools (or vice versa), or edit the MAP file's "wad" property and add in the drive letter for each WAD path.
Posted 5 months ago2024-10-05 13:55:50 UTC
in error: map not found on server Post #349222
Do a text search for "error" in the compile log to find error messages.
There's several errors you should deal with in CSG.
Posted 5 months ago2024-10-04 07:48:37 UTC
in Warning: === LEAK in hull 0 === Post #349218
There's a tutorial specifically for finding and fixing leaks: Tutorial: How to fix those leaks
Posted 6 months ago2024-09-26 08:45:24 UTC
in How to hide HL player models from mods? Post #349184
Opposing Force doesn't hide the HL1 playermodels, those are included in the playermodel dropdown in options.

Games like Ricochet and Counter Strike uses nomodels "1" in liblist.gam as DaSalba said, and players instead choose playermodels elsewhere.
You'll need to code some GUI for the players to choose your mod's playermodels when using this, though.
Posted 6 months ago2024-09-23 20:19:03 UTC
in Post your screenshots! WIP thread Post #349181
Amazing work, loving the hazy atmosphere!
Posted 6 months ago2024-09-16 05:26:16 UTC
in Jack won't compile bsp Post #349165
Firstly, JACK doesn't do any compilation, it just calls the compile tools that do it.
Secondly, compile logs and their error messages are humanly readable. You do not need any special expertise to read them, let alone depend on strangers online to read it for you.

Now check your compile log, and compare the map name that the compile tools see with the map name in the console error message you posted earlier.
Very much at the very top for me, something that makes me not even click past the thumbnail, is seeing it's a mere content replacement pack.
"Edgier zombie mod". "Realistic MP5 mod". Stuff like that. It has been over 25 years since HL came out, and any novelty any such packs could bring is long gone. Past that, there's nothing interesting those packs bring to the gameplay value.
Posted 6 months ago2024-09-08 22:15:52 UTC
in Need help with monstermakers!!! Post #349136
Not possible either, in vanilla.

Since you mentioned it's an endless battle but that weapons are piling up somehow, then I assume it means you're providing the player with constant supply of ammunition.
If you insist on staying vanilla, then perhaps getting rid of this ammunition supply could help towards staying within the entity budget, by forcing the player to collect the dropped weapons for ammunition. Not the perfect solution, but might be the best you can do without code changes.

Either that, or replace the human soldiers with monsters that don't drop anything on death.
Posted 6 months ago2024-09-08 17:06:08 UTC
in Need help with monstermakers!!! Post #349134
As far as I'm aware there's no option to disable weapon drop by monsters in vanilla HL/Op4.
That would need some game code changes.
Also please don't make duplicate threads. People will reply when and if they can help.
(Previous thread: https;//twhl.info/thread/view/20845)
Duplicate thread is gone now - Urby
Posted 7 months ago2024-08-29 20:37:43 UTC
in How realistic would be making money just by modding? Post #349113
As you say, there is not much demand.
Though there are people out there still willing to pay for getting modding work done, it's just a matter of finding them (or getting found by them) and prove to them your skills are worth it.

A good start would be building up a portfolio, a collection of work you've done to show off your skills.
Posted 7 months ago2024-08-29 07:50:25 UTC
in Why are there sparkle things around monster_zombie? Post #349110
The pollen effect is a visual indicator used by the game to show that a monster is stuck in geometry, e.g. in a wall or, as in your case, in the floor.
I guess you could create a flag m_fInBurst (set to false in Spawn()) that you set to true in PrimaryAttack() if m_iBurst is equal to m_iMaxBurst, and set to false if m_iBurst is zero.
If m_fInBurst is true, set m_flTimeWeaponIdle to 0.1.

Then in WeaponIdle() do something like
void CMP5::WeaponIdle()
{
    if (m_fInBurst && m_iBurst > 0)
    {
        PrimaryAttack();
        m_flTimeWeaponIdle = 0.1;
        return;
    }
    // ... rest of code
Essentially use PrimaryAttack() to start the burst fire, and let WeaponIdle() as a loop to call PrimaryAttack() until the burst count is exhausted.

Again, I'm just guessing here.
Hi and welcome to TWHL!
Now I haven't dabbled much in the weapons related game code so I'm sure someone else might have a better way of doing it than I.

The way I'd do it is to give new members of type int to CMP5's header; int m_iMaxBurst and m_iBurst and initialise both of these to 3 in CMP5's Spawn() method.

Then in the PrimaryAttack() method, add a decrement to m_iBurst just below the m_iClip decrement, and further down add a check for if m_iBurst is exhausted, and if it is then add a 0.5 second delay to the next fire property and reset m_iBurst to m_iMaxBurst.

At the top:
void CMP5::PrimaryAttack()
{
    // don't fire underwater
    if (m_pPlayer->pev->waterlevel == 3)
    {
        PlayEmptySound();
        m_flNextPrimaryAttack = 0.15;
        return;
    }

    if (m_iClip <= 0)
    {
        PlayEmptySound();
        m_flNextPrimaryAttack = 0.15;
        return;
    }

    m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
    m_pPlayer->m_iWeaponFlash = NORMAL_GUN_FLASH;

    m_iClip--;
    m_iBurst--;

    // ... rest of code
At the bottom:
    // ... rest of code

    m_flNextPrimaryAttack = GetNextAttackDelay(0.1);

    if (m_flNextPrimaryAttack < UTIL_WeaponTimeBase())
        m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.1;

    if (m_iBurst < 1)
    {
        m_flNextPrimaryAttack += 0.5;
        m_iBurst = m_iMaxBurst;
    }

    m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat(m_pPlayer->random_seed, 10, 15);
}
You'd then need to make a check if the fire button had been released in the middle of a burst to reset m_iBurst back to m_iMaxBurst.
Posted 7 months ago2024-08-26 21:12:58 UTC
in Help with JACK. Post #349086
Just as I thought, an invalid character in the path.
These old tools don't play nicely with non-ASCII characters :p
Posted 7 months ago2024-08-25 20:59:09 UTC
in Help with JACK. Post #349077
These decompiled map files you downloaded, were those in a different directory from the ones you decompiled yourself?
Because that question mark in the path from the error message implies there is an invalid character in that directory name.

Shoutbox

Log in to add shouts of your own