Announcement

Collapse
No announcement yet.

smart/clever previous weapon scripts?

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

  • smart/clever previous weapon scripts?

    I have been trying to find/come up with some alias scripts to replace the previous weapon impulse 12 for older mods like mexx9 which do not include impulse 12 since they used an earlier version of the source.

    I already tried top uncompile the progs.dat from mexx9 so I could simply add impulse 12 into the progs, but unfortunately could not get it to recompile do to constant various syntax errors that I could just not figure out. .

    I was checking out some alternate previous weapon binds, but unfortunately, they stall when trying to move up or down the cycle to a weapon the player does not have or has no ammo for.

    U thought maybe I could use bestweapon in reverse order, but it doesn't quite work properly since it will always default to the first weapon in the list no matter which is my currently selected weapon.

    Any ideas? Thanks.

  • #2
    3 engines have a workaround that makes impulse 12 available even if it isn't coded in the mod.

    super8, requiem, mark v. The Requiem engine author invented that sneaky feature.

    None of the other engines do ... (i.e. DarkPlaces doesn't, Quakespasm doesn't)
    Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

    So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

    Comment


    • #3
      DarkPlaces has a bestweapon command.

      bind h "bestweapon 8 5 4 3 2 1"

      Will select best available weapon based on gun # 8 = lightning gun.
      Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

      So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

      Comment


      • #4
        Thanks for the reply baker.

        I knew about super9, which I suggested the feature for , and requiem. I was looking for ideas specifically to play with quakespasm. Super 8 and quakespasm are currently my engines of choice. Quakespasm when I want a more classic feel than super8 even though I primarily use super8. Quakespasm runs a little smoother for me too.

        The bestweapon command doesn't work quite as I wanted unfortunately as I explained in the op.

        Comment


        • #5
          Originally posted by Legend View Post
          bestweapon command doesn't work quite as I wanted unfortunately as I explained in the op.
          Haha, reading fail. Baker -2

          Well, you could toss out the impulse 12 in the Quakespasm thread at func. They may say no.

          (I don't think they would add it, they've known of the feature for a couple of years and the impulse 12 "hack" isn't 100% perfect, just 98% near perfect.)
          Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

          So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

          Comment


          • #6
            Legend, if you want to use an advanced engine without impulse 12 emulation for mexx9 mod, I made a quick fix for it. It adds the regular impulse 12 code.

            I love the authors humor because he also edited the impulse 9 CHEAT code.
            A dark voice says:"CHEATER" and removes all of your weapons and ammo.

            I needed the impulse 9 CHEAT code for testing, so I added a new impulse 13 CHEAT code which acts like original CHEAT. So, if you want to cheat you can use impulse 13 now.

            Also loving the new Death Knight sword animations.
            They are looking really cool.

            Nice mod! Thanks.
            Attached Files

            Comment


            • #7
              Wow. Thanks Henry. How did you decompile the progs? Which decompiler did you use? I tried doing that myself to add impulse 12 using the frikqcc27 decompiler. But while it would decompile seemingly fine, whenever I tried to recompile it, I would continually get errors that I could not figure out. They would always say that an error was in the very last line of code which was blank.

              Comment


              • #8
                @last line blank

                It might not have been blank. It could have had a null character of some kind. Erase the blank line and give it a shot. If you want to experiment a little you could grab notepad++ and change the encoding it uses to read with. If you choose the right thing it might show you the null character. It might even be a black box with the word NUL in it. You may have to worry about this all over the place which is why I would recommend hilighting whatever you can of the line and use find/replace all to turn it into absolutely nothing.

                find: [invisible null character]
                replace with: [leave blank]

                click "replace all in all opened documents"

                oh right, open all of the scripts before you do that.

                If you can't select anything on the line, you may have to change the encoding to something that can recognize "null" first.

                one of these options but I don't know which one


                I'm sure you realize that this isn't "definitely" the problem but, as soon as you said blank line problems this possibility popped into my head. It's happened to me a couple of times when copy/pasting code from websites. Actually, seven posted an ent file on this forum in a code or quote box and came back later to tell people that copy/pasting it breaks it. Null characters.
                Last edited by MadGypsy; 07-16-2016, 03:11 PM.
                http://www.nextgenquake.com

                Comment


                • #9
                  @Legend

                  I'd guess he used the deacc de-compiler
                  Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

                  So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

                  Comment


                  • #10
                    Originally posted by Baker View Post
                    @Legend

                    I'd guess he used the deacc de-compiler
                    I'm having some trouble locating deacc. Anyone have a link? I found Quark that seems to be by the same person, but it seens like more of a mapping tool.

                    Any other good decompilers around?

                    Comment


                    • #11
                      simple find.

                      deacc101.zip
                      deacc101.txt

                      I specifically searched for "Armin Rigo deacc QC decompiler". Even though I found 101 almost immediately I continued to search for higher versions. I found none higher than 101.

                      edit: I found it overall here. There is a lot of stuff in that list. Maybe there are things that other people can't find.
                      Last edited by MadGypsy; 07-17-2016, 03:41 PM.
                      http://www.nextgenquake.com

                      Comment


                      • #12
                        Originally posted by Legend View Post
                        Wow. Thanks Henry. How did you decompile the progs? Which decompiler did you use? I tried doing that myself to add impulse 12 using the frikqcc27 decompiler. But while it would decompile seemingly fine, whenever I tried to recompile it, I would continually get errors that I could not figure out. They would always say that an error was in the very last line of code which was blank.
                        The frikqcc27 does not work with mexx9.
                        Basically everything I know about decompiling I learned from Seven. He life in Germany like i do. We chat a lot and he sent me several decompilers. Use the meqcc decompiler for mexx9. It works. There is one download: QuakeOne - Quake 1 Resurrection - Quake 1 File Downloads - MrElusive's QuakeC compiler (1999)

                        Reverse engineering is not as easy as it looks. You have to know what you do. Some errors are not described well in the compiler. Using the meqcc decompiler need only 2 lines to correct afterwards to make it compilable again.

                        Be sure to use Spikes compiler. It is the best one you can find. But this should not be a secret to anyone.

                        Comment

                        Working...
                        X