Forum posts

^ playgamealt is probably hardcoded to start the map hldemo1. the simple solution is to create a map of said name that is nothing but a room that immediately teleport-changelevel to a map of your choice.
Posted 1 year ago2023-11-18 10:03:52 UTC
in FUNC_VEHICLE Post #348058
I'm converting cs_twhlkart2020 to hldm. CS WAD requirements have been eliminated by embedding the textures used, CT/T spawns have been replaced with DM spawns peppered throughout the map, and a lot of weapons/ammos/items have been added, though mostly curbside. I'm damn sure it's currently very imbalanced towards the spectators vs the drivers. I'd like to have a few other people go over it and rebalance the placements. Or, maybe, have archie or urby release a HLDM version with all their level design wisdom. gdrive link

The karts work great btw.
User posted image
Posted 1 year ago2023-11-17 18:56:03 UTC
in Xash3D fixing overbright in Half-Life Post #348053
Valve literally just released the 25th Anniversary Update that fixed gl_overbright
Posted 1 year ago2023-11-16 14:25:24 UTC
in New Textures dont load Post #348047
already compiled bsps? use newbspguy.
Posted 1 year ago2023-11-16 09:53:41 UTC
in New Textures dont load Post #348045
did you forgot to save?

also please use HLAM.
Posted 1 year ago2023-11-09 05:22:41 UTC
in trigger_changelevel @ c1a1d Post #348007
Both changelevels of c1a1d points back to c1a1c.
User posted image
User posted image
Your implementation must have made the wrong assumptions.
Posted 1 year ago2023-11-02 08:11:48 UTC
in Mapping game of telephone Post #347988
The Achilles heel of this concept is that it'd take forever to get done, because only one person can work on it at any one time. How many passes is enough mutation? What if the person working on the current pass ghosts the project? And what if there's a loose lip among us? ඞ
func_guntarget might do it. idk if you can reactivate it after it's shot, firstly to reenable it and secondly to move it out of the way. you can test this with a func_guntarget that targets a trigger_relay, that after some delay targets the same func_guntarget. if this works and the guntarget reactivates, then you can start thinking about making the rest work with multiple sets of path_corners (front and back of the wall) and trigger_changetargets to change the paths the func_guntarget takes.
Posted 1 year ago2023-07-26 08:20:28 UTC
in Programs/tools to edit Half-Life´s UI? Post #347730
Steam goldsrc/source engines have a built in VGUI editor. Open the dialog box you want to edit in game, then press Ctrl+Alt+Shift+B.

But if you want to edit the colours/fonts/etc, edit the trackerscheme.res file (copy them from <half-life>/platform/resource/ to <half-life>/<yourmod>/resource/).
There's probably already a tool out there that lets you edit this scheme file that I didn't know of.
Posted 1 year ago2023-06-14 07:38:50 UTC
in Is there any way to preview "p_" models? Post #347620
First, HLMV is deprecated. Use HLAM.

Second, solokiller is working on it: https://github.com/SamVanheer/HalfLifeAssetManager/issues/71
Posted 1 year ago2023-05-11 13:13:45 UTC
in func_tracktrain sound Post #347508
My idea is to try have a second, invisible func_train shaped like a box, holding an invisible monster_generic that has an idle animation that emits the rotor sound (same thing that makes Barney go boop boop boop boop typing on those keypads.)
Posted 1 year ago2023-02-23 14:11:22 UTC
in ZBot implementation for Half-Life 1 Post #347368
I don't do C++ but it doesn't need to to say I hate hardcoded values. put the list in a config file, perhaps?
Posted 2 years ago2022-11-23 11:16:39 UTC
in Music not playing in HL:OpFor WON version Post #347124
It's dirt cheap on Steam right now, just buy it.

Otherwise, download a bin/cue CD image pair (NOT ISO) from archive.org, then download and install PowerISO, then mount the cue file as a virtual CD.
get the latest version. ask solokiller about it.
is it really as easy as adding the event and saving it?
Well, try it out!
Can this be done to remove events as well?
Yes. See pic:
User posted image
Simply put, HLAM is a must-have tool in your goldsrc toolkit.
You need to adjust said animation's events on the model. For this you'll need HL Asset Manager (HLAM).
  1. Load the model in HLAM and in the sequence tab/panel, load the animation you're trying to play.
  2. In the same tab/panel, check that Event #1000 is present in the sequence.
  3. If there isn't (or there is none), add one.
    • Press "Add" button.
    • Type in Event: 1000.
  4. Save the model.
Event 1000 tells the engine that the NPC dies in the sequence. At the specified frame, it presumably removes the NPC's collision and logic, though the sequence plays through the end. Then the sequence pauses at the last frame, its death pose.

I see a lot of stock scientist sequences having this event at frame 1, either because the player couldn't reach the scientist, or to make sure the player couldn't press E and cancel the animation (as they're already dead at the start of the sequence).

You might also want to check the "leave corpse" flag on the scripted_sequence.

Reference: https://the303.org/tutorials/gold_qc.htm#A1
From https://the303.org/tutorials/gold_mdl_fix.htm
*********** ERROR ***********
sequence "reload_empty" is greater than 64K


This is a rare error that happens with very complex animations with high nodes & frames. Usually frames past 200~300 range with over 100 bone nodes is likely to put out this error. I cannot pin down the exact combination of nodes to total frames which triggers this but this is my best estimates. 2 solutions:

1: Re-export the animation SMD with a modified FPS 3D model application side which results in lower total exported keyframes in the SMD, then adjust the QC fps to match.
2: Reduce the bone nodes or animation total frames manually

edit: You wanted to change the engine limits instead of the animation. I'd say it's better to reconsider your approach.
Posted 2 years ago2022-10-16 21:00:44 UTC
in Wiki enhancment thread Post #346971
I tried out a multi-column layout to emulate an infobox-style panel at Entity Flag: Not solid/Passable. Check them out and comments welcomed.
Hm, that would be a bit tricky to add, other pages will have categories and other stuff that shouldn't be included in the base page, also there's the challenge of what you do when the embedded page is updated... then you have to detect and re-render all the pages that embed it. I think I'd need more of a justification for a feature like that.
Hm, I wonder how MediaWiki, the workhorse for Wikipedia, manages it. It's unfathomable that they could have something like a templating system in place, with exclude and only-include sections... But what do I know about these stuffs, amirite? ¯\_(ツ)_/¯
The NOD file has a header and one of it's entries is the BSP's CRC checksum at the time the node graph was generated. Since you ripent-ed the BSP, the original CRC checksum is lost and thus a new one is generated (same checksum is used in multiplayer games to make sure the clients have the same map as the server). When the node graph loading code detect that the BSP's CRC checksum is different than the one that was stored while generating the graph, it assumes that the map changed and thus the old node graph is deleted to generate a new one.
I highly suspected this to be the case, so I once tried editing on bspguy with the CRC hack enabled. Not sure if it works like it's supposed to, considering node graphs are being regenerated regardless. It probably doesn't.

I also attempted locking the nod file on the filesystem level by setting read-only, but it could be the case that the engine regenerated a new one in memory and use it, only not saving it to file.

The big question still remains...

Problem statement

As I was making my bspguy edits through the entire Half-Life campaign, I hit a perplexing issue: The game freezes on "the" apprehension map (c2a3d). At first I just assume it's a one-off occurrence, but as I revisited the map it's becoming apparent that this is a 100% recurring issue.

After adding -condebug to launch options and observing the qconsole output, it appears that the game is grinding to a halt with an error spam: Unhandled Ent in Path momentary_door. So I searched that string in halflife's github, and it appears to be emitted from the AI node file dlls/nodes.cpp, line 283.

So, the AI system is detecting that the node path is blocked by an entity that it can't handle. It should have handled momentary_door in the same block as func_door but it doesn't.

But then how come this map worked at all in vanilla half-life, but tanks when the same map is in a mod? Not just the map with a minor edit, even the unedited c2a3d tanks it, if it creates a new node graph.

Troubleshooting

My first attempt is to force the mod to use the original node file. I copied the .nod file from valve to <modname> and set it to read only. The problem is that in the mod's grapth folder there are also .nrp files, which is curiously absent from valve's graphs folder. Even when the game can't edit the nod file (it's read only on FS level) it's still creating the nrp file, and seems to be relying on it. It seems to me that the AI system that uses the nod/nrp map combo is causing this problem, as the original game has no nrp files and it works fine.
Also, using the original bsp/nod pair works but that defeats the exercise of me wanting to edit the bsp.

Suspecting that maps saved by bspguy compels the engine to produce this problematic node formats, I resorted to ripent-ing the props I wanted to add (VHLT's). This failed, the problematic graph formats are generated, and the same freeze happens.

My final effort is to edit the momentary doors and make them slightly ajar (16u). That seems to work. I tried to follow up by having a pair of doors, a non-solid shut door, and a solid ajar one, which move in unison; but that failed again. I recalled the code doesn't check if the entity's solid.

I guess I had to have the doors ajar. For folks who has played this game a gazillion times it probably wouldn't matter (if they even noticed this change).

Afterword

The question still remain as to how the vanilla game (vanilla BSP and NOD combo) works when the new bsp/nod/nrp combo doesn't. Both vanilla and my mod is using vanilla code, so it's just something in the old nod file format that prevents this check from failing the way it does with modern formats.

Hope to see solokiller's unified sdk fix this by including momentary_door and/or passable flag to the logic check. I might also raise this issue to valve's github later.
The other day, someone made available* a 3D skybox model. I thought it'd be a neat idea to retrofit Half-Life's maps with them.

The one issue, after editing the maps with bspguy and placing the model, is that it's not visible anywhere in the map. In normal workflow (compiling from source) VIS takes care of that, by marking the area with info_overview_point as "visible everywhere on the map", and then I'll just place the 3D skybox model in the same place. It does that by perusing the portal file generated by the previous program (CSG or BSP).
But with the released game only the final product, the BSP, is shipped.

I googled for a way to get the prt from a bsp, and found the program bsp2prt for quake. But it only takes a quake bsp. I can't cheese it into taking a goldsrc bsp masquerading as quake bsp.

So the most straightforward way for me to proceed is if there exists, in this whole wide world, in a hard drive somewhere, a bsp2prt program that works on goldsrc bsp. Any lead is much appreciated.
p.s. I actually looked into this more technically; to find a way of actually modifying the bsp's PVS lump directly, but it's way out of my league. bspguy's source code (as in any C/++ code) is just goobledygook to me.

p.p.s. I was working on an unrelated project when I discovered about creative commons and how it's actually illegal to make derivatives of most of the stuff on gamebanana (the 3D skybox model included). I'm grateful that the forefatheres of this site saw through the asininity and not have the option to upload stuff to vault with the CC-ND clause (well, not that I know of.) I know the 3D skybox is also here in vault but now there are two licenses and I dunno which takes precedence.

ppps I just raised an issue in bspguy's github.
Posted 2 years ago2022-10-02 07:28:45 UTC
in Wiki enhancment thread Post #346922
For pages in category:Entity Flags, we should either:
  • add to the title, in parentheses, the base class or entity it applies to, OR
  • put them into subcategories with the same info
so you can know that from a glance at the category page instead of having to click on every single page – a problem that would get worse as more pages are added.
Posted 2 years ago2022-02-14 15:11:25 UTC
in trigger a sprite to appear and disappear Post #346283
Try bspguy. It lets you see the entity activator/target relationship in the map visually in 3D. You can add and edit entities there too!

There will be some set-up required. Particularly you'd need the FGD file for Half-Life for the program to understand what there is to Half-Life entities but you can get it by downloading Half-Life's SDK from Steam. It says that it's for svencoop, but if you're just looking to edit existing maps' entities and not doing the map merging thing, it works on any goldsrc game/map.

Hopefully once you get a grasp of what the program can do you'd be able to do way more bespoke things for your server. :P
Posted 3 years ago2021-08-08 11:26:36 UTC
in HLDM Server! Post #345865
I want to enjoy the maps but I can't when I keep getting pwned 😔
Did you manage to resolve your expression error?
yeah, once I reverted to the very last backup that I managed to save before jack removes it, just before the big oopsie. no more problems after that, after I realized the positional switch thingy, and -log now works.
Help, I got an expression error and -log does nothing!
Sorry, I put the switch after the path (for clarity in the Run Map dialog) but the program only supports switches before paths. IDK how C# works, but with python standard library argparse switches can be anywhere. Haven't checked with VHLT if the same limitation applies there.

Also, I opened several issues on github. They're all enhancement requests, but I can't figure out how to tag as such.
Help, I got an expression error and -log does nothing!
The very final problem now is to figure out how to kill these func_trains
Okay, I figured this one out as well!
  1. a trigger_entity_iterator is turned on on map start and iterates over all func_trains of the name I set
    • "Entity's TriggerTarget" set to the following entity
  2. a trigger_condition:
    • monitors the !activating func_train's origin,
    • and compares it to the origin an info_target placed on the map perpendicular to the end of the line
    • comparator check that the monitored func_train had passed the compared info_target on the relevant axis
    • spawnflags:
      • set to ignore other irrelevant axes,
      • cyclic (does its job once on trigger by previous entity),
      • [IMPORTANT] keep !activator
    • set to fire the following entity on true condition
  3. a trigger_changevalue
    • destination entity set to "!activator"
    • change the destination's targetname to a morbid one
    • trigger after action set to the following entity
  4. finally, a trigger_relay set to killtarget the just-renamed entity

All the core issue has been solved! Thanks to everyone who helped me go though this! :heart:

findings:
  1. origin brush is unused in func_train.
  2. when in doubt, "turn it off and on again" (still can't believe this worked!)
  3. thank goodness there's an !activator chain available. It would be way, way easier if more classic entities support !activator directly.
Also, in trigger_createentity, you seem to copy the parent train's rendermode. I'm assuming it's anything but Normal. It'd be a good idea to copy renderamt as well, otherwise it'll default to 0, which means invisible.
This is solved. The entity's rendermode's set to solid, but my trigger_createentity didn't explicitly set the renderamt so it apparently defaulted to 0. I've now added renderamt. and it now shows up as expected, and at the first stop target as it's supposed to.

The problem with triggering the train has also been solved, at long last! Somehow I need to turn it OFF first before I turn it on, using a multi_manager. Or maybe it needs a break in the trigger chain, which the mm provided. Doesn't explain why my delayed trigger_relay doesn't activate it though.

The very final problem now is to figure out how to kill these func_trains, as they don't have unique names, and no trigger entity seem to be able to take !activator for killtarget.
how did you exactly use trigger_random
The map no longer uses trigger_random, so the following setup is a recreation:
  • target count: 3
  • target #: the intended targets
  • minimum delay: the intended delay (say, 1.125)
  • max delay: 0
  • spawnflags: [1] Start on + [8] timed
I kinda don't want to deal with it now that I don't have to.
how are you sure trigger_createentity is creating nothing?
I have the trigger_createentity in a dev room, and a func_button that triggers it. The trigger_createentity's "Trigger after spawning" is set to fire a game_text. When I press the button, the game_text shows indicating a successful spawn (according to the entity guide).

I've set the created func_train's "First stop target" to a path_corner. The path_corner also have a "trigger on pass" fire a game_text. But this game_text never gets triggered, meaning the spawned func_train didn't do what you think spawned func_trains are supposed to do – to immediately teleport to its first stop target. every path_corner in the entire path_ chain is also set to fire a unique game_text. Those didn't trigger either.
User posted image
And yeah, I couldn't see the created func_train. Not in the dev room where the trigger_createentity is, nor at the targeted path_corner. If the case is that the train's there but invisible the path_corners would tell me with game_texts.

Wrt duplicated decals, it's a nonissue as these would be outside the play area (the "actual train") that players can't reach.
there is a way to make them work, involving a bunch of trigger_changevalue, but depending on what you wanna do, it can evolve into entity spaghetti real quick.
it's already started...it's already started...
As it stands now, the non-working of trigger_random has already resulted in entity spaghetti in the dev room with a bunch of path_corners doing the timing and logic that trigger_random was supposed to do.
keep things super simple but slightly more laborious, and have a line of 10 or so trains
My dude, the train is very long! 16 carriages cut to 4 sections and linked by seamless teleports (at least these work!). If I have the scenery func_trains the same length of each carriage, I'd need 27 to fill the entire outside area. Also, there are overlaps in the 4 sections so at some points in time and space 2 identical func_trains that need to exist in relatively the same areas as seen from the inside. This means I need to keep track of 2 entities for each piece of the scenery. More logic entities!

Here, let me show you the whole map, and NOT super simple and FAR more laborious the alternative is:
User posted image
I'd like to point out that there's one map in scmapdb called build that appear to use trigger_createentity. I downloaded and loaded the map but nothing seems to happen. No boxes that were supposed to be spawned by trigger_createentity gets spawned. Not sure if it needs more players for the map logic to start, or what.
something the Sven Co-op Developers Discord could resolve
Of course, there's a discord! I somehow couldn't find a link to it. [Not to mention the forums were nuked and redirected to an entirely non-condusive steam discussion]

You know, wrangling the engines to work how they're supposed to is frankly fast draining my interest in the project. The only saving grace here and miles around is MESS. I'd win the gold medal in going insane if I had to clone and align the 19 cars every time I change one. (and there's 4 unique cars)
I haven't gotten around messing with angles. I didn't realize it's already implemented because it's not mentioned in readme nor apparent in the FGD/object properties dialog, that is, you need to go read the documentation.

Also, can you clarify how macro_remove_if works? Do you apply it to template brush, or you wrap geometry with them, like macro_template? How does condition work? Do you put just keyvalue.contains('string') or it still needs braces i.e. {keyvalue.contains('string')}?

Lastly, what is the behaviour of brushes when their center handles are within the bounding box of macro_template, but some vertices are out of bounds?
Thanks for the suggestion. That's certainly a new mechanic that could be useful, but because the original path_corners were set to be out of the way (hidden from view), now the thing is flashing in and out of existence. So, I decided to just do away with origin altogether, and adjusted brushes/paths accordingly. The die is cast.

Now, the next step is to bash my head against the wall to figure out trigger_createentity.
Here be the keyvalues.Here be the keyvalues.
I don't think a basic func_train need any more keyvalues to get working.
Hello all!

I'm creating a train map for sven co-op, with lots of func_trains and path_corners. All func_trains have an origin brush each.

Here's a setup of the problem: I'm creating a func_train on the gangway connection between train carriages to simulate the effect of the train wobbling. The origin brush is off to the upper-side corner of the entity for tidiness sake. So are the path_corners that go back and forth; they're on the same y/z axes as the origin brush.
The setup. In the top view you can see the origin brush embedded inside the func_corner's bounding boxex.The setup. In the top view you can see the origin brush embedded inside the func_corner's bounding boxex.
And here's the thing in game:
*facepalm**facepalm*
Very obviously, the game engine decides to completely ignore the origin brush and put the geometric center of the entity to the path_corner. I can confirm that the origin of the entity model exist in the proper place in the BSP.
Origin point (dark gray dot) as rendered in BspguyOrigin point (dark gray dot) as rendered in Bspguy
This is clearly not how a GoldSrc engine is supposed to work. What is going on here? Is there a hidden spawnflag not found in the FGD that causes this? A svencoop cvar or setting that turns off the proper function of entity origins by default? Is there anything else I can do other than reconfiguring every func_train entity so that their geometric center becomes the origin, and move all the path_corners?

This is just one of the issues I'm having right now. some others being:
  • trigger_createentity creating nothing even when target brush entity's +model is properly set. The trigger didn't fail, as the "Trigger after spawn" gets fired.
  • trigger_random working *uck all, to the extent that I resorted to use – that's right – even more path_corners and func_trains to time and randomize things in the map.
Help and/or clarification is much appreciated!

p.s. somebody might have brought this up to the discord, talking about some guy from LambdaGeneration. that's me!
Awesome tool! I am currently making a train map and this allows me to just focus on detailing the carriage instead of mindless copypasting to make a 16 car train.

A few feature suggestions:
  • Make the macro_insert scale property a vector, so you could stretch one axis, and flip another axis.
  • Have it so the macro_insert's angles be used to make rotated instances. Maybe have a spawnflag to turn this behaviour on/off. I can even see {rnd(360)} being useful here.
Again, quite a lovely piece of work you've managed over here, I am impressssss'd!