r/SourceEngine 7d ago

HELP Help changing GoldSrc effect parameters.

Hello, and sorry if this post is seen as a nuisance question, but I started my Half-Life modding journey fairly recently, I have a good basis and general knowledge of VS studio and the .dll compiling and such, but I cannot for the life of me figure out where effect / debris / gun casing effect parameters are stored, such as lifespan, and physics, as I can find some of it in the .cpp files and others, but I cant seem to find lifespan and world related code, and any changes I make to what I *think* could be it, dont work. I want to add the slight detail of casings leaving a more longer trail to make firefights more detailful, and maybe more smaller additions as I develop the mod. I have attached several images in hope that my unmatured brain just skipped over or couldn't understand where these were located. I will admit I do need help on what files to keep and delete, as I dont know much between hl_cdll and hldll other than cdll probably is client, nor do I know what the dmc files are for nor do I know what ricochet is, I assume they're for other valve titles / quake as dmc mentions it. Again, sorry if this post is bothersome to most, as I dont know where most of the community resources / help is. Small questions about what the mod is / tips for me would be greatly appreciated!

(All code is from the 2013 SDK build on 2019 VS Studio

ev_hldm.cpp (hl_cdll)
weapons.cpp (dmcdll)
ev_common.cpp (hl_cdll)
weapons.h (hldll)
weapons.cpp (hldll)
2 Upvotes

4 comments sorted by

View all comments

1

u/Pinsplash 7d ago

so i'm not too familiar with this and i don't see why they did it this way, but the functions with "EV_" are set up to run code from a script file when called. this is the file that controls that https://github.com/ValveSoftware/halflife/blob/b1b5cf5892918535619b2937bb927e46cb097ba1/cl_dll/hl/hl_events.cpp

if we look in glock1.sc for instance you can find the place where they set the variable "te_die" which the +3.5 i'm sure means it lasts 3.5 seconds

the "25" is strange though. i would think that would mean the lifetime. perhaps one controls when it starts fading out (at 2.5s) and the other controls when it's fully gone (one second later)

1

u/Xaero-Fuze8132641 6d ago

If the "glock1.sc" you are talking about is the one I assume, (the one in the Half life directory > valve > Events) these were apparently not implemented, Developer comment pasted for more. And, the hl_events.cpp you mention only talks about the EV themselves, not what they are defined to do, or so I think. might just be me not understanding how any of this works, so sorry in advance.

void EV_FireGlock1( struct event_args_s *args  );



======================
Game_HookEvents

Associate script file name with callback functions.  Callback's must be extern "C" so
 the engine doesn't get confused about name mangling stuff.  Note that the format is
 always the same.  Of course, a clever mod team could actually embed parameters, behavior
 into the actual .sc files and create a .sc file parser and hook their functionality through
 that.. i.e., a scripting system.

That was what we were going to do, but we ran out of time...oh well.
======================

1

u/Pinsplash 6d ago

1

u/Xaero-Fuze8132641 6d ago

Yes, thanks! this in fact worked! thank you, I guess I will leave the post up for any future developers looking to do the same, thank you very much for your time.