Thread: Half-life SDK, where are the constants?

  1. #16
    mov.w #$1337,D0 Jeremy G's Avatar
    Join Date
    Nov 2001
    Posts
    704
    // MP5 Round
    gSkillData.plrDmgMP5 = GetSkillCvar( "sk_plr_9mmAR_bullet");


    This is what I found. If the damage value is indeed initiated here - well its not in the programming sdk persay.. Cvar's are generally stored in txt files with appropriate values. Id say theres a .cfg file with damage values listed nex to the appropriate cvar. Which is loaded when the game starts up. This is how quake works. You may have to search through a PAK file for the needed file.

    However there is away around this. Add a new console command or piggy back some pre defined function so that the value of dmg is printed into the console. IE. That will tell you what the value is. After that you can do a cheap trick - find all the instances where the member variable of the struct is used in a multiplyer for damage - and replace it with your own value.

    Good luck.
    c++->visualc++->directx->opengl->c++;
    (it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)

  2. #17
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    However there is away around this. Add a new console command or piggy back some pre defined function so that the value of dmg is printed into the console. IE. That will tell you what the value is. After that you can do a cheap trick - find all the instances where the member variable of the struct is used in a multiplyer for damage - and replace it with your own value.
    Thanks, that's what I was thinking too. I will look for the CVAR file, hopefully there is one.
    [email protected]
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  3. #18
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    Found it. "skill.cfg" in the root directory of pak0.pak. I can't believe I didn't know that was there.
    [email protected]
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  4. #19
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    this is off topic but I always thought hl was q2 but reading that link wizard posted puts that to rest. also, what exactly is the connection between the SDK and the main engine itself? I've never fiddled with SDKs, but I'm assuming it is just a way that lets you add your own custom components to an already existing module (the module being the engine!). I also just read that they did write some of their new parts of the engine in C++ (i.e the AI).

    EDIT: that link also said that quake1 did AI in 'interpreted Quake C', what the hell do they mean? lol

    wizard you should send us the source to the Unreal engine (I can't come up with the $300, 000 it costs or whatever for it )
    Last edited by Silvercord; 08-24-2003 at 05:21 PM.

  5. #20
    mov.w #$1337,D0 Jeremy G's Avatar
    Join Date
    Nov 2001
    Posts
    704
    Basicly the way the quake 3 and half life SDK's work is as plug ins.

    All the pattented revolutionary type of programming is what the exe engine consists of. Rendering pipelines- resource loading etc. etc. etc.

    The SDK's are actually compiled DLL's for client and server (and user interface for q3) which are copies of the GAMEPLAY code. That is to say structures - movement physics, game interaction, items, everything related to the Playing of the game is located in the client and server dlls. (Server dll doenst have progmatic code for graphics - thats client side)

    You will notice there are usualy some protected structures or variables that you are not allowed to change - as these are core/engine reliant. The exe of the game (engine) communicates dlls or virtual machines to each other using these dependant variables and through "system calls". They are called system calls in the q3 sdk anyway. Theres no way to modify these as they are part of the engine.

    So anyways all the game play code of the game are located in dlls or vm's. With the sdk - you are allowed to modify those rules as you see fit.

    I hope that clears some things up.



    Also - the quake 1 game wasn't actually coded in c or c++, it was coded in "Quake C". Which is a variation on the C language. The language is very similer but there are subtle (and not so) differences. John carmack is just that uber - altering the c language to perform to his standards - what an egotystical son of... j/k.
    c++->visualc++->directx->opengl->c++;
    (it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)

  6. #21
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    Exactly HOW do you modify a language? I mean wooptidy doo he defined a boolean in C, that doesn't mean he made his own language

    seriously though, how would one go about doing that?

  7. #22
    mov.w #$1337,D0 Jeremy G's Avatar
    Join Date
    Nov 2001
    Posts
    704
    easy- write your own compiler that creates the machine code. Its easy to creat your own language. I created one called "Jeremy". Its not very function, but by god it prints out Jeremy. The progmatic code is:

    emancipate Jeremy;


    See. I just created my own "language".
    c++->visualc++->directx->opengl->c++;
    (it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)

  8. #23
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    the question still stands. I mean I can compile Quake C with visual studio 6, does that mean there's some kind of plugin when you download the quake1 source that allows you to compile Quake C (a plug in into visual studio 6 that is )

    EDIT: what i mean is i thought it was just straight C because I've been ..........ing around with the quake source for a long time now, re programming the bots and what have you, and visual studio comiples fine as long as i take out the assembly files.

  9. #24
    mov.w #$1337,D0 Jeremy G's Avatar
    Join Date
    Nov 2001
    Posts
    704
    QuakeC is a language developed by id Software for their smash hit game, Quake. It is a subset of the C programming language, and has many many differences. While not particularly powerful, it made Quake one of the most easy to edit games of it's day and spawned literally millions of mods. In fact the total quantity of mods easily exceeds Quake II, ?Quake III, and and ?Half-Life combined. However, most of them are no longer available as the great hub of the community, PlanetQuake lost interest in Quake, when Quake II came out, and started dumping sites and mods left and right. Another major hit to the community is that cdrom.com stopped, a long time ago, accepting uploads for Quake and even the new location of the community archives doesn't accept uploads.

    But anyway, QuakeC is compiled with a QCC program (such as FrikQCC) into a ?progs.dat file. The file is read by the ?qcvm inside the engine. This method is incredibly secure and cross platform, much like ?Java.

    from: http://wiki.quakesrc.org/index.php/QuakeC

    search google for quake C stuff.
    bit of a difference between writing mods with quake c , and quake sdk i think.
    c++->visualc++->directx->opengl->c++;
    (it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)

  10. #25
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    This is cool stuff, I honestly never knew any of this to be honest, I've never heard of Quake C.

    Anywho, this is even more off topen, but goten in the quake3 BSP file do you kno whow to determine which brushes are SKY?

  11. #26
    mov.w #$1337,D0 Jeremy G's Avatar
    Join Date
    Nov 2001
    Posts
    704
    no.











    most disapointing post ever huh?
    i know.
    c++->visualc++->directx->opengl->c++;
    (it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)

  12. #27
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    actually it was good

    "Oh no I don't know how to do that one insignificant thing but in order to secure my insecurities I should tell you that I wrote a zero g program that has 224 pitch and yaw controls and is impossible to steer and uses way more vector math than you have ever come across in your life time"

    at least you didn't do that, and I've actually had someone tell me things like that instead of just saying 'no'

  13. #28
    *******argv[] - hu? darksaidin's Avatar
    Join Date
    Jul 2003
    Posts
    314
    Originally posted by Silvercord
    This is cool stuff, I honestly never knew any of this to be honest, I've never heard of Quake C.

    Anywho, this is even more off topen, but goten in the quake3 BSP file do you kno whow to determine which brushes are SKY?
    There are brush texture content flags, but I didn't got very far with textureflags in general. However, you can definetly get the information from the shaders. Like Alpha Blending/testing etc. It's all defined in the shaders.

    All skyboxes are shaders because there is only one "texturename" specified (which is a shadername) for the box but 5 are used. The shader defines those texturenames.

    edit: the shader setting is called "surfaceparm sky".
    Last edited by darksaidin; 08-25-2003 at 02:12 AM.

  14. #29
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    i was just told it is just a brush with a texture flag with the third bit set

  15. #30
    *******argv[] - hu? darksaidin's Avatar
    Join Date
    Jul 2003
    Posts
    314
    Originally posted by Silvercord
    i was just told it is just a brush with a texture flag with the third bit set
    Do you have a complete list of flags ? If not, I would not rely on the third bit.
    Some days ago I thought I had found a flag for billboarding... well, it worked in most cases, but not always - I produced some collateral damage like a few meshes squished down to 2 dimensions (that kept facing me) and created some really strange holes in the world

    Anyway, good luck with that bit.
    [code]

    your code here....

    [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. half life 2 modification looking for coders
    By pantsOFFinPUBLI in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 07-28-2005, 01:32 AM
  2. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 07:05 PM
  3. Half Life 2 book(and programming)
    By nbk in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 10-06-2004, 10:12 AM
  4. Half life Problem which I am right and the teacher is wrong
    By Shadow12345 in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 11-06-2002, 04:28 PM
  5. Half Life Blue Shift Problem
    By biosninja in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 08-23-2002, 09:57 AM