Announcement

Collapse
No announcement yet.

How do I make impulse commands to work in QuakeC?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I make impulse commands to work in QuakeC?

    I want to use QuakeC to compile and create a progs.dat that will allow me in game's console (that I can bring by pressing the tilde ` key):

    impulse 12 => Equip the previous weapon or toggle weapons down
    impulse 252 => have now Pentagram of Protection
    impulse 253 => have now Ring of Shadows
    impulse 254 => have now Bio-suit

    I am using Dark Places engine, and currently these commands do nothing.

    I wanted to ask this question in the InsideQC forum, but my account is currently inactive and I can't active it, because I don't know how to. It says that I need to contact an administrator for help with this, but it doesn't say how to do this, so I decided to ask it here.

    Note: After I have registered in InsideQC, I didn't receive email with link to activate my account.
    Last edited by ezwa; 03-14-2017, 05:48 AM.

  • #2
    Find the ImpulseCommands function...i think it's in weapons.qc. Look at how they tie in the various impulses. Now look at the QuadCheat command. You can replicate this command for the other power-ups. Look at CheckPowerUps command to see all the player fields regarding powerup behavior, so you'll know what to include in your new impulse commands.

    Impulse12 is already done if you download progs 1.06 source. Or you could simply re-write impulse 10 in reverse order.

    Use a good text editor like Notepad++ to edit the files. Use FTEQCC to compile the source into a new progs.dat.
    'Replacement Player Models' Project

    Comment


    • #3
      Originally posted by Dutch View Post
      Find the ImpulseCommands function...i think it's in weapons.qc. Look at how they tie in the various impulses. Now look at the QuadCheat command. You can replicate this command for the other power-ups. Look at CheckPowerUps command to see all the player fields regarding powerup behavior, so you'll know what to include in your new impulse commands.

      Impulse12 is already done if you download progs 1.06 source. Or you could simply re-write impulse 10 in reverse order.

      Use a good text editor like Notepad++ to edit the files. Use FTEQCC to compile the source into a new progs.dat.
      Thanks.

      Comment


      • #4
        Originally posted by Dutch View Post
        Find the ImpulseCommands function...i think it's in weapons.qc. Look at how they tie in the various impulses. Now look at the QuadCheat command. You can replicate this command for the other power-ups. Look at CheckPowerUps command to see all the player fields regarding powerup behavior, so you'll know what to include in your new impulse commands.

        Impulse12 is already done if you download progs 1.06 source. Or you could simply re-write impulse 10 in reverse order.

        Use a good text editor like Notepad++ to edit the files. Use FTEQCC to compile the source into a new progs.dat.
        Unknown command "CheckPowerUps".

        Comment


        • #5
          Originally posted by quake one View Post
          Unknown command "CheckPowerUps".
          I'm assuming you can't find it? I may need a bit more info to help you.

          It's a function located in weapons.qc, near the bottom of the file above PlayerPreThink(). Within this function, the players fields regarding the power ups are constantly updated/monitored when it is called on in PlayerPostThink(). You need to look in this function, find the appropriate fields for each powerup, and write functions that initiate these fields and update the player's items (EXACTLY like the QuadCheat() function), and then tie these functions to impulses within ImpulseCommands. Then you'll need to bind a key on your keyboard to these commands in-game.

          What I just detailed is very basic stuff...if it doesn't make any sense, you need to read through this:

          QuakeC Manual

          Everything you need to know is in there. The rest you will learn by trial and error.
          Last edited by Dutch; 03-15-2017, 08:39 AM.
          'Replacement Player Models' Project

          Comment


          • #6
            @quake one

            When I get home from work tonight, I'll post up an example of what I'm detailing. I realize I threw a lot of info at you, sometimes it's hard to remember how difficult the initial learning curve is for QC.
            'Replacement Player Models' Project

            Comment


            • #7
              Originally posted by Dutch View Post
              @quake one

              When I get home from work tonight, I'll post up an example of what I'm detailing. I realize I threw a lot of info at you, sometimes it's hard to remember how difficult the initial learning curve is for QC.
              I quickly found out how and discovered how to extend the time of the quad damage powerup in weapons.qc and I am doing B.Cs degree in computer science, so don't think that I am fool. For me, it shouldn't be so hard to learn QuakeC or QC in short. I can learn it quickly. It's just to learn new language and syntax. Not big problem for me. Really. I just need clear and detailed answer with good explanation. You have done this already, so I thank you. I will try your tips and let you know if I have achieved my goal.

              Unknown command "CheckPowerUps".
              At the beginning of this thread, when you first time ever mentioned this command, you didn't say where to look for it, so I guessed that this another one of the commands of the darkplaces quake engine, so I just launched and run the game, pressed the tilde ` key to bring up the console and typed "CheckPowerUps". The game console then said
              Unknown command "CheckPowerUps"
              Only later you said that this command should be in the weapons.qc text file, and implied that it doesn't in the darkplaces quake engine. I don't want to guess where everything is. You should specify. You should tell at least all the minimum and necessary information I need, so I will succeed to do what I want to do at last.

              Now I have opened the weapons.qc text file with Notepad.exe, the known application that comes with the every Microsoft Windows operating system, and I have invoked the Find procedure of this application (through window's menu) for the string input "CheckPowerUps" and then a message box appeared with the output

              Cannot find "CheckPowerUps"
              But you said that this command should be in this text file, so I should not get this output from Notepad.exe. Same for both "PlayerPreThink" and "PlayerPostThink". Are you kidding me or what?
              Last edited by ezwa; 03-15-2017, 03:59 PM.

              Comment


              • #8
                Yeah, I screwed up. The impulse commands and the quad cheat are in weapons.QC. checkpowerups and PlayerPreThink are in client.QC. Apologies.

                @giving you all information

                I gave you more info than I had when I started QC, and I figured all that stuff out myself. And then I offered to provide an example, which you just turned down.

                @couldn't find checkpowerup function

                If you can't find a function in a particular file, open up all the files, and use the find feature in all open documents...which you can't do in the shitty notepad text editor. But you can do it in notepad++, the program I recommended you download to edit QC files.

                So here's where we stand: you don't want to track down any of the necessary info yourself, and expect a free answer. Then when I offer you a free answer, you turn it down. I'm confused. I'm not trying to be a dick, but you're acting very demanding.
                'Replacement Player Models' Project

                Comment


                • #9
                  fteqccgui has a simple grep feature that can scan through all of your mod's qc files to find both where thing are defined or used. notepad++ likely has a similar feature but I don't know if it'll scan other files or not, I can't say I've ever used it.
                  For instance, grep for 'impulse' and you'll find the various places where the impulse handling stuff is (eg: the bit in weapons.qc where it handles impulse 255 and invokes QuadCheat). From there you can find super_damage_finished, and then find your way to powerup_touch so you can find the names of the equivelent fields for the other powerups. Easy.

                  The term 'command' usually refers to console commands, using that word to refer to a function is something that only someone who wrote too many shell scripts would do...
                  that said, quake's console commands are very rarely camelback like that, so anyone who's been around quake a while should realise that pretty quickly (recognising the individual functions makes it a bit too easy).
                  Some Game Thing

                  Comment


                  • #10
                    Originally posted by Spike View Post
                    The term 'command' usually refers to console commands, using that word to refer to a function is something that only someone who wrote too many shell scripts would do...
                    that said, quake's console commands are very rarely camelback like that, so anyone who's been around quake a while should realise that pretty quickly (recognising the individual functions makes it a bit too easy).
                    Yeah, I didn't even realize I was doing this until after I posted...it's an old habit of mine, even before QC (back in the Matlab days in college).

                    I'll have to give your GUI compiler a try, sounds pretty handy.
                    'Replacement Player Models' Project

                    Comment


                    • #11
                      Originally posted by Dutch View Post
                      Yeah, I screwed up. The impulse commands and the quad cheat are in weapons.QC. checkpowerups and PlayerPreThink are in client.QC. Apologies.

                      @giving you all information

                      I gave you more info than I had when I started QC, and I figured all that stuff out myself. And then I offered to provide an example, which you just turned down.

                      @couldn't find checkpowerup function

                      If you can't find a function in a particular file, open up all the files, and use the find feature in all open documents...which you can't do in the shitty notepad text editor. But you can do it in notepad++, the program I recommended you download to edit QC files.

                      So here's where we stand: you don't want to track down any of the necessary info yourself, and expect a free answer. Then when I offer you a free answer, you turn it down. I'm confused. I'm not trying to be a dick, but you're acting very demanding.
                      expect a free answer
                      you're acting very demanding
                      I am not expecting free answer and I am not acting demanding at all. How did you reach this conclusion? I am just asking for help and for direction. That's all. I am appreciating anyone who tries to help me. I don't get mad and angry if the help of somebody didn't assist me. It's just seems that you told me something wrong in your past replies. At first you said that CheckPowerUps and PlayerPreThink are in weapons.qc, but it appears to be false and a lie. Now you say that they are in client.qc but I still believe you, because you admitted that it was your mistake, and it's natural that people make mistakes. It's important to say and point out that your statements are false if I find them false. Don't you think so too?

                      Okay I had a look in client.qc and your recent statements appear to be true, and not only that, they are also very helpful. I am seeing in there under CheckPowerUps header, invisibility, invincibility and all this stuff that I am looking for and I am planning how to make my desired impulse commands to get to work that I want in my quake game. Thank you very much!
                      Last edited by ezwa; 03-16-2017, 01:58 PM.

                      Comment


                      • #12
                        You're right, I'm sorry. Had a bad day yesterday and got impatient with you, which was wrong.

                        I'm glad you found the stuff I was talking about, if you need any more help or have any more questions just let me know.
                        'Replacement Player Models' Project

                        Comment


                        • #13
                          Good luck with your QC plans quake one.
                          My final exams for 8 grade will get over tomorrow so I can offer more advice.

                          You said you were doing a B.Sc in Computer Science?
                          Where? I plan to study in India(my country and where I am now) unless I find a good place.
                          I want to do that degree and then return to India(unless I am still in India) to do a 3D Animation degree!
                          Sorry for going a bit off-topic.Would like to see what you do.

                          -Ijaaz Ahmed(13 year old person who just finished an exam he hates called Second Language)
                          Dude,lets party!
                          Bring some food and drink.I got Arcane Dimensions 2.666!?!

                          Comment


                          • #14
                            Originally posted by ijazz View Post
                            Good luck with your QC plans quake one.
                            My final exams for 8 grade will get over tomorrow so I can offer more advice.

                            You said you were doing a B.Sc in Computer Science?
                            Where? I plan to study in India(my country and where I am now) unless I find a good place.
                            I want to do that degree and then return to India(unless I am still in India) to do a 3D Animation degree!
                            Sorry for going a bit off-topic.Would like to see what you do.

                            -Ijaaz Ahmed(13 year old person who just finished an exam he hates called Second Language)
                            I doing this my degree in Israel country in HIT (an acronym of Holon Institute of Technology) college and I am not learning there 3D animation, but a lot of calculus, linear algebra and discrete mathematics, including logic, sets theory, graphs theory and more. Very hard courses. Require high intelligence.

                            Comment


                            • #15
                              Originally posted by Dutch View Post
                              You're right, I'm sorry. Had a bad day yesterday and got impatient with you, which was wrong.

                              I'm glad you found the stuff I was talking about, if you need any more help or have any more questions just let me know.
                              By the way, I have already done what I wanted to do, i.e. get the impulse commands to work, not only for quad damage, but also for pentagram of protection, ring of shadows and biosuit. Now I am trying to make infinite ammo, i.e. ammo variable does not decrease when I fire, but my attempt caused the server to shutdown and disconnect instead when I either press or click the fire key/button in game. Do you have any idea what is the right way to do this?

                              Comment

                              Working...
                              X