Forum posts

Posted 2 years ago2022-04-16 11:26:38 UTC
in arkanos2 - hldm map Post #346440
Very nice! I like the details & lighting.
Having it in the TWHL Map Vault would also be pretty cool.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 2 years ago2022-03-13 14:18:07 UTC
in Patched a leak but level still at fullbright? Post #346340
Potentially, you might have a very very bright light, or you don't have any lights, or you aren't running HLRAD, or you're opening the map before HLRAD finishes.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 2 years ago2022-03-06 15:49:45 UTC
in Help with custom weapons. Post #346324
You can start by reading here: Weapons Programming - High-Level Overview
Existing weapons are typically located in the dlls folder in the SDK, here's the crowbar for example:
https://github.com/ValveSoftware/halflife/blob/master/dlls/crowbar.cpp

Do keep in mind that implementing new weapons will require a bit of C++ programming experience.
Admer456 Admer456If it ain't broken, don't fox it!
Oh my. This is wonderful.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 2 years ago2022-02-13 13:42:35 UTC
in Post Your Photos Post #346281
It's interesting that you both think of locations from HL2, cuz' Bosnia is relatively pretty darn close to Bulgaria. It would make for a good HL3 setting lol.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 2 years ago2022-02-12 15:07:46 UTC
in making a monster entity with its unique model Post #346277
In a nutshell, you'll need to make a custom mod and learn some programming. You can refer to the post above for more details.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 2 years ago2022-02-08 19:42:56 UTC
in Post Your Photos Post #346269
inhales
It's been 8 months since my last photos. Time for a slew of new ones. I'll also put nicknames which my cousins and I came up with for certain places and events.
March 2021 - "Spear Dojo"March 2021 - "Spear Dojo"
Recently, we threw spears around here. We'd basically hang some sorta target on the branches and throw spears at it.
August 2021 - "Sunset after the rain: Angle 1"August 2021 - "Sunset after the rain: Angle 1"
August 2021 - "Sunset after the rain: Angle 2"August 2021 - "Sunset after the rain: Angle 2"
August 2021 - "Sunset after the rain: Angle 3"August 2021 - "Sunset after the rain: Angle 3"
January 2022 - "Hill of Good Hope"January 2022 - "Hill of Good Hope"
If there's a Cape of Good Hope, there's a Hill of Good Hope. Context: we almost fell down there.
May 2021 - "The busiest road in Ošanjići"May 2021 - "The busiest road in Ošanjići"
On average, 3 whole cars per hour.
January 2022 - "The stealth area"January 2022 - "The stealth area"
Often, we'd hide around here, telling our parents we're not away from home, even though we actually kinda are.
January 2022 - "Hill of Good Hope, another angle"January 2022 - "Hill of Good Hope, another angle"
I've actually shown how this looks in May. Here it is again for comparison:
User posted image
December 2021 - "A foggy Mostar morning"December 2021 - "A foggy Mostar morning"
That's about it for now. See y'all in 6 months.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 2 years ago2022-02-02 20:37:34 UTC
in Half-Life Updated (custom SDK) Post #346246
Go to multiplay_gamerules.cpp, around line 500, look for CHalfLifeMultiplay::FPlayerCanTakeDamage.
//=========================================================
//=========================================================
bool CHalfLifeMultiplay::FPlayerCanTakeDamage(CBasePlayer* pPlayer, CBaseEntity* pAttacker)
{
    return true;
}
Simply replace return true; with this:
return !pAttacker->IsPlayer();
This will affect the deathmatch gamemode.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 2 years ago2022-01-23 12:19:52 UTC
in Quake (alias) models in Half-Life Post #346224
Take a look at this maybe:
https://valvedev.info/tools/raven/

It's got alias model rendering stuff.
Admer456 Admer456If it ain't broken, don't fox it!
That's because the tutorial was originally written for Sven Co-op, and Svengine (modified GoldSRC) has higher limits.
Admer456 Admer456If it ain't broken, don't fox it!
That happens because the server isn't transmitting those entities to the client. func_detail merges with worldspawn in the end, so it's visible along with world brushes.

There is a function in client.cpp in hldll that allows you to control which entities get sent to the clients, something like AddToFullPack. You'll need to additionally determine if the env_sky can see the other entities, and if so, transmit them. At least I think.

Be careful though, because you can only transmit a maximum of 256 entities.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 2 years ago2021-12-27 14:18:12 UTC
in game crashes if i shoot a tracer Post #346169
What HL SDK did you use? I am guessing halflife-updated as a base.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 2 years ago2021-12-27 10:11:59 UTC
in game crashes if i shoot a tracer Post #346166
Try compiling the SDK without any view bobbing changes, and make sure you're running the latest version of Half-Life on Steam, and make sure you placed the DLLs into a mod folder in the right places. Which exact steps did you take while following that tutorial?
Admer456 Admer456If it ain't broken, don't fox it!
Posted 2 years ago2021-12-26 23:20:05 UTC
in game crashes if i shoot a tracer Post #346164
Did ya compile both the client DLL and the game DLL? (hl_cdll and hldll projects)
Admer456 Admer456If it ain't broken, don't fox it!
Posted 2 years ago2021-12-26 18:34:09 UTC
in Programming video tutorials Post #346161
College and exams messed up my schedule a bit, but, I finished a new video this evening:
Finally getting to the more fun stuff. :walter:
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-12-17 19:19:55 UTC
in Changing a texture's palette Post #346126
I am guessing you've already managed to export the texture as a BMP or PNG file and it's 8-bit (indexed). If you haven't and don't know what the latter means, I'll explain. But anyway, let's say you're using GIMP and you got your texture with its palette.

In GIMP, you'll go to Windows -> Dockable Dialogs -> Colormap.
You will see something like this:
User posted image
On the left side, you can clearly see the palette and its 256 colours. From then onward, changing the palette is quite simple. You can right-click on one of these colours and click "Edit Color".

There's just one problem: if you want to change multiple colours, like, all the blue ones into red, it's gonna be tedious because you'll have to modify every colour that looks like the one you wanna replace (there are multiple blues in my case, and multiple greens, kinda hard to put my finger on the line there). For that, you can use fresco's suggestion. Once you import the texture into your image editor, you switch the mode to RGB, which will get rid of the 256-colour palette and let you do whatever you want.

If you want to change colours that way, you can select an area, and go to Color -> Hue-Saturation, and play with the hue setting:
User posted image
There is no easy way TBH. It all depends on what exactly you wanna do, and some types of edits will be simpler than others. You gotta practice to get the results you need, maybe for a couple of months or something. There will be pain and frustration along the way, but it's worth it IMO.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-12-01 19:29:43 UTC
in Half-Life Updated (custom SDK) Post #346093
I stopped using the VS2017 project files last year. I haven't seen anybody use them lately.
On that note: to use the CMake version of Half-Life Updated you currently have to build the INSTALL target to deploy the libraries, which might be a bit cumbersome and annoying.
Not a problem for me, though I imagine it'd be a bit confusing/frustrating to beginners.
Admer456 Admer456If it ain't broken, don't fox it!
Note:
The ? symbol is an inline if.
This line here:
result = condition ? a : b;
...is the same as:
if ( condition )
   result = a;
else
   result = b;
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-11-05 13:40:21 UTC
in One of my first maps Post #346033
You could, and perhaps should, upload this to the TWHL Map Vault:
https://twhl.info/vault/create
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-11-02 13:53:42 UTC
in Programming video tutorials Post #346029
The channel's focus is HL modding and game development with a Quake-style workflow. I don't think running marathons is something I'd know how to make tutorials about... I mean, the longest I've ever run without stopping was, like, 300 metres? Definitely not marathon material.

On a serious note, Marathon is a bit out of my interest zone, so I doubt I'll be making videos about it anytime soon. Same goes for Doom 1/2 etc.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-10-28 19:26:28 UTC
in Programming video tutorials Post #346020
Miraculously, I was able to finish a video this month, despite college.
Finding other entities
Yep, it's about UTIL_FindEntityByTargetname.
Admer456 Admer456If it ain't broken, don't fox it!
This post was made on a thread that has been deleted.
Posted 3 years ago2021-10-26 18:23:54 UTC
in Setting Player view direction (c++) Post #346010
I'm asking cuz' VectorAdd should work fine with vectors.
#define VectorAdd(a,b,c) \
{ \
   (c)[0]=(a)[0]+(b)[0]; \
   (c)[1]=(a)[1]+(b)[1]; \
   (c)[2]=(a)[2]+(b)[2]; \
}
Since the Vector class has the operator [ ], you can access its XYZ components with [0], [1] and [2] respectively, thus, VectorAdd will work perfectly fine.
Vector myVector = Vector( 20, 40, 50 );
// Alternatively: Vector myVector{ 20, 40, 50 };
VectorAdd( pparams->viewangles, myVector, pparams->viewangles );
The only reason you'd use * and (float*)& might be due to something like this:
void MyFunction( Vector* someParam )
{
   someParam->z += 20.0f;
}
...
Vector myVector{ 0, 0, 0 };
MyFunction( &myVector );
But I'd rather not do that. I'd rather pass the vector by reference instead of passing a pointer to it:
void MyFunction( Vector& someParam )
{
   someParam.z += 20.0f;
}
...
Vector myVector{ 0, 0, 0 };
MyFunction( myVector );
That way, you don't need to use pointer syntax. ^^
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-10-26 16:33:51 UTC
in Setting Player view direction (c++) Post #346008
"unfamiliar with C++"
It's less about knowing the language, more about knowing HL SDK. I think it's an okay solution, given the messy nature of the SDK.
view.cpp itself has a lot of "C-style" code, so I wouldn't even call it C++.

But, semantics and philosophy aside, I'm glad you got the desired effect.

Edit: Though i'm curious why you're doing *ev_permpunchangle and (float*)&ev_permpunchangle. You're not using a pointer to ev_permpunchangle, are you? The code would be cleaner if you did it differently, such as using a reference in the function parameters (Vector&) or something like that.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-10-26 10:01:22 UTC
in Setting Player view direction (c++) Post #346006
I think it's more or less the result of the client fighting the server. Client is like "Hey, I'm looking at this angle", and the server is like "No no, you're looking at THIS angle".

If you really wanna modify the view angles, you're way, waaaaay better off doing it on the clientside (hl_cdll project). What is it specifically that you want to achieve? I'm guessing some kinda custom recoil, but I could be wrong.

Edit: oh right, permanent view adjustments. So it's gonna be like punchangle, except it doesn't fall back to the original angles.
That's gonna be a bit more involved, but it's still doable on the clientside, thanks to something called weapon events. You'll find them in ev_hldm.cpp.

I'd provide some example code, but it's been a while so I don't remember how to force update view angles on the client. :|
Either way, you might also wanna take a look at view.cpp (don't be frightened by the messy code; V_CalcRefdef is the function you might wanna look at)
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-10-26 07:09:12 UTC
in Setting Player view direction (c++) Post #346004
You gotta set m_pPlayer->pev->fixangle to 1 if you wanna force view angles with pev->v_angle.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-10-24 22:21:40 UTC
in Programming video tutorials Post #345996
It's a fox.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-10-24 12:07:12 UTC
in Programming video tutorials Post #345993
A fellow Resolver! <3
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-10-23 19:04:38 UTC
in Programming video tutorials Post #345989
TBH there's hardly any documentation for anything in the SDK, apart from some archives.

In other news, there's a new video in progress and I more or less finished editing it. ;3
User posted image
It's gonna be about string_t and UTIL_FindEntityByTargetname.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-10-20 18:01:09 UTC
in Programming video tutorials Post #345982
Yeah, I suppose I could jam it somewhere in here:
User posted image
Or, maybe better, that could be part of HL SDK Extras. We'll see!
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-10-16 14:23:49 UTC
in Programming video tutorials Post #345976
Well, I do have plans for a Source series, once the GoldSRC one is more or less finished.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-10-01 08:06:16 UTC
in Programming video tutorials Post #345965
Custom keyvalues and save-restore. ^^
Part 2.3
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-09-22 09:27:33 UTC
in Hello All! Post #345950
Welcome back! It looks like de_bedroom is on TWHL as well. :)
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-09-21 19:03:27 UTC
in Programming video tutorials Post #345946
At last, entity properties and precaching.
Part 2.2
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-09-15 17:53:25 UTC
in [help] Rendering a model fullbright Post #345935
You can set the light sample colour and value around line 1240 in StudioModelRenderer.cpp:
lighting.plightvec = dir;
// After StudioDynamicLight is called, lighting is initialised
IEngineStudio.StudioDynamicLight(m_pCurrentEntity, &lighting );

// We can then begin changing it around
lighting.ambientlight = 0;
lighting.shadelight = 0;

// The rest will apply the lighting onto the model
IEngineStudio.StudioEntityLight( &lighting );
I believe you could, maybe, somehow modify lighting to get fullbright...
digs around a little bit
WOO! I was silly all along. You could just set ambientlight to 255 and shadelight to 0.
This scientist is afraid of his own brightnessThis scientist is afraid of his own brightness
So yea, the code just becomes:
lighting.plightvec = dir;
IEngineStudio.StudioDynamicLight(m_pCurrentEntity, &lighting );

// Fullbright
lighting.color = Vector( 1.0f, 1.0f, 1.0f );
lighting.ambientlight = 255;
lighting.shadelight = 0;

IEngineStudio.StudioEntityLight( &lighting );
Now, the only thing left to do is to check whether it's a specific entity or not. I guess you can check if m_pCurrentEntity->index is a certain number or something like that. Or, even better, add a special render FX value for that. :)
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-09-15 14:52:07 UTC
in [help] Rendering a model fullbright Post #345934
One hacky way would be to render the model black (render it with regular diffuse lighting, with 0 0 0 for the light sample colour, which it'd normally pick up from the ground or ceiling), then render it again with the additive render mode. It's been a while since I looked at the studio model renderer stuff, but I'll try to get a better answer tonight.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-09-01 20:03:55 UTC
in Programming video tutorials Post #345910
Aaaaand another one! Mainly about SetThink and stuff :>
Part 2.1.2
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-08-22 22:28:42 UTC
in Programming video tutorials Post #345891
New video's out! Today's topic: player usage and TakeDamage
Part 2.1.1
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-08-14 11:55:22 UTC
in Post your screenshots! WIP thread Post #345880
Very nice!
You could alternatively convert that cylinder brush to be a part of the model as well, but, that's just me. :lol:
Admer456 Admer456If it ain't broken, don't fox it!
You should look at the player movement code.
hldll -> Source Files -> pm_shared -> pm_shared.c or .cpp (if you're using halflife-updated, these are converted to C++)

Then, scroll down to the bottom until you find the PM_Move function. PM_Move calls PM_PlayerMove which contains all the pseudo-physics code for player movement, so you can modify all the "formulas" there, so to speak.

I think the functionality you're looking for is in PM_WalkMove, perhaps around this part:
User posted image
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-08-02 21:12:20 UTC
in Programming video tutorials Post #345832
A bit behind schedule, but, the 'fun' stuff is about to start:
Part 2.1: Think, Touch, Use
Admer456 Admer456If it ain't broken, don't fox it!
"I somehow couldn't find a link to it."
Here be the invite: https://discord.gg/hDSrpCDXhD (and if that's expired: https://discord.gg/8VhuRpNt)
"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"
Solokiller explained it pretty well. In the HL SDK at least, func_train doesn't do anything special in Spawn:
Move train to the &quot;origin&quot; keyvalueMove train to the "origin" keyvalue
Only after all entities have spawned, Activate() is called, which does the actual first path corner logic:
Move train to the target path_corner, align it to the bounding box centre tho'Move train to the target path_corner, align it to the bounding box centre tho'
This here is what effectively "ignores" origin brushes.

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.
"it's already started..."
'w'
I gotta say, that's actually quite compact. But, you didn't answer my question: how did you exactly use trigger_random? What was the expected output? What did it (not) do?
Admer456 Admer456If it ain't broken, don't fox it!
I haven't mapped for SC in a long time, but how are you sure trigger_createentity is creating nothing? In my test map, with basically the same keyvalues as yours (except the rendermode), it created a train at the trigger_createentity's position, but it didn't start moving. Not even triggering made it move. (note: the train had also an origin brush so I could see where it spawned)

I suppose 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.

BTW every time you'd shoot at the train, bullethole decals would be duplicated, since all instances are using the same brush model.
User posted image
Not sure how applicable this could be, but I'd personally keep things super simple but slightly more laborious, and have a line of 10 or so trains waiting in a queue in a separate room, to be teleported into action. I think this is something the Sven Co-op Developers Discord could resolve much better.

What about trigger_random?
Admer456 Admer456If it ain't broken, don't fox it!
Alright, so the problem comes from two things:
  • according to the HL SDK code, the train explicitly sets its position as the centre of its bounding box
  • according to VHLT code, origin brushes do not count towards the bounding box
Maybe you could try using the BOUNDINGBOX tool texture instead of the origin brush:
User posted image
User posted image
Just make sure it's large enough to encompass most of the train, otherwise it'll start disappearing when the boundingbox brush goes outside your FOV, like it did for me:
User posted image
Well, in that instance it works fine, but if I look slightly up, it disappears.

Either way, yeah, this is one hacky workaround you could use.

Edit:
BTW you might wanna describe how exactly you're using trigger_random & trigger_createentity, i.e. post their keyvalues :>
Admer456 Admer456If it ain't broken, don't fox it!
Somebody did, in fact, bring up func_trains with origins for their iceberg on the TWHL Discord. I believe the map compilers are to blame, because they're the ones which generate a brush model and give the brush entity an "origin" keyvalue to position it.

I'm gonna look at VHLT's source code to see if it does anything counter-productive with func_train.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-07-10 13:10:45 UTC
in SolidBSP [hull 0] Warning Post #345757
Are you sure it's not any game_text entity with too many characters, or a map chapter title with too many characters that crashes the game instead?

Cuz', those are just compiler warnings, means your geometry is a bit more complex than usual, still, I get thousands of these and my maps work perfectly fine. :>
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-07-07 11:36:33 UTC
in Liblist.gam/ custom game problems Post #345743
If you wanna launch your mod directly, by the way, create a shortcut to hl.exe and edit its parameters to include -game mymodfolder, where mymodfolder is, in fact, your mod folder as it appears in the Half-Life folder.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-07-06 21:42:59 UTC
in Liblist.gam/ custom game problems Post #345739
Restart Steam and your mod should appear in the library.
Your .wad folder must go into your mod folder, i.e. next to liblist.gam.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 3 years ago2021-07-03 20:38:52 UTC
in Programming video tutorials Post #345725
As outlined in #0: Introduction, you absolutely must learn C++ basics first. So, start with that first, and then you're surely on the right way.
Admer456 Admer456If it ain't broken, don't fox it!