Announcement

Collapse
No announcement yet.

Axe code overhaul

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

  • Axe code overhaul

    I just saw some oddities regarding the axatt frames in the player model wanted to let be known and suguest maybe a modeler here could make a fix?

    [ Ready for a little bit of Street Fighter II here eh? ]

    Basicly, you have (4) axatt sequences, that aree picked randomly during weaponframe code. My idea is to make an "alternate fire" system using
    perhaps a seperate impulse or button that lets you pick which one of these attacks you want to do rather than let the code do it randomly. Turns out ID left out the last 2 frames in its QC for all 4 of these animations, so we can see how it looks putting them in. Also we can set the .attack_finished float the player uses as different values on each one since a short blow takes less time to finish than the 2 handed frames would use for example, and the 2 handed framesets should do more damage, and also have a chance of a headshot , if you choose to code that in , as well as using crossproduct to detect behind attacks which should normally be a automatic kill or a decap if you want to get that gorry.

    NOTE: the ax v_wep model only has ( frames which seem to correspond only to single handed axatt frames, so this is where a modeler would be needed, to add in the 2nd hand animations for the overhand attacks.

    This first one I will call your basic short attack since basically the ax is all the way out in the 2nd frame, so then we should call the code to perfom the hit there instead of in frame 122 which is where ID had it. Also I would say this attack does the least damage and there is no chance for a headshot.

    Code:
    void () player_axe1 = [ 119, player_axe2 ] // Small chop one hand from right
    {
    	self.weaponframe = 2;
    };
    
    void () player_axe2 = [ 120, player_axe3 ]
    {
    	self.weaponframe = 3;
    };
    
    void () player_axe3 = [ 121, player_axe4 ]
    {
    	self.weaponframe = 3;
    	W_FireAxe ();  /// << moved this to here, was in frame down below
    };
    
    void () player_axe4 = [ 122, player_axe5 ]
    {
    	self.weaponframe = 4;
    };
    void () player_axe5 = [ 123, player_axe6 ] // ID left out these last 2
    {
    	self.weaponframe = 5;
    };
    void () player_axe6 = [ 124, player_run ]
    {
    	self.weaponframe = 6;
    };
    This next one is also a 2 handed blow. Since frame 126 or 127 could either be posiitons of contact with something, you could possibly beef up this attack by putting in another optional fireax () as shown. This attack would most likely be more time consuming so it would need the attack_finished float adjusted with some experimentation. Decapitation or a headshot with this one seems to have a good probability.

    Code:
    void () player_axeb1 = [ 125, player_axeb2 ] //Overhand 2 hands from left
    {
    	self.weaponframe = 5;
    };
    
    void () player_axeb2 = [ 126, player_axeb3 ]
    {
    	self.weaponframe = 6;
    	W_FireAxe ();
    };
    
    void () player_axeb3 = [ 127, player_axeb4 ]
    {
    	self.weaponframe = 7;
             if (random () < 0.5) W_FireAxe (); // Optional
    	
    };
    
    void () player_axeb4 = [ 128, player_axeb5 ] 
    {
    	self.weaponframe = 7;
    };
    void () player_axeb5 = [ 129, player_axeb6 ]// These last 2 added
    {
    	self.weaponframe = 7;
    };
    void () player_axeb6 = [ 130, player_run ]
    {
    	self.weaponframe = 8;
    };
    This 3rd one is most likely the most powerful for doing overall damage since its 2 handed straight down as if he is chopping wood. Headshot or decap here probably not likely but takes alot of time to perform this move.

    Code:
    void () player_axec1 = [ 131, player_axec2 ] // 2 hands overhand from center ~ powerful 2 handed overhead blow
    {
    	self.weaponframe = 1;
    };
    
    void () player_axec2 = [ 132, player_axec3 ]
    {
    	self.weaponframe = 2;
    };
    
    void () player_axec3 = [ 133, player_axec4 ]
    {
    	self.weaponframe = 3;
    	W_FireAxe ();
    };
    
    void () player_axec4 = [ 134, player_axec5 ]
    {
    	self.weaponframe = 4;
    };
    void () player_axec5 = [ 135, player_axec6 ] // last 2 here new frames
    {
    	self.weaponframe = 5;
    };
    void () player_axec6 = [ 136, player_run ]
    {
    	self.weaponframe = 6;
    };
    Finally, this last one is a 1 handed left uppercut, which I would say is a high chance of a decap / behead / headshot if it lands contact, I would say from behind this is an instant kill always....and takes the most time to do.

    Code:
    void () player_axed1 = [ 137, player_axed2 ] // left handed uppercut 
    {
    	self.weaponframe = 5;
    };
    
    void () player_axed2 = [ 138, player_axed3 ]
    {
    	self.weaponframe = 6;
    };
    
    void () player_axed3 = [ 139, player_axed4 ]
    {
    	self.weaponframe = 7;
    	W_FireAxe ();
    };
    
    void () player_axed4 = [ 140, player_axed5 ]
    {
    	self.weaponframe = 7;
    };
    void () player_axed5 = [ 141, player_axed6 ] // 2 new frames
    {
    	self.weaponframe = 8;
    };
    void () player_axed6 = [ 142, player_run ]
    {
    	self.weaponframe = 8;
    };

    Basicly thats a start. The rest involves checking the fireaxe () routine for specific frames then calculating damage and headshot probabilities based on the frameset we are in or if the attack is from behind...and of course the alternate fire system to select the specific axatt mode to use, or perhaps another that just keeps the current random system as another option.

    I will be experimenting with this in my Tekbot mod and will post the "backstab" code that I made for it with the help of PRimallove last year sometime.

    If there is a modeler who can re-model the axe to match the player frames, that would be a neat overall improvement I think.

  • #2
    this is a good idea. i think the axe should take a more expansive role in combat, to manage it a truly useful option, other than using it to dick around.
    My Avatars!
    Quake Leagues
    Quake 1.5!!!
    Definitive HD Quake

    Comment


    • #3
      Maybe consider coding in the ability to throw it?



      Then I guess you would have to think about retrieval or having it automagically re-appear in your hand.
      Username : Atomic Robokid on Steam

      Please check out my Quake made things:

      https://www.indiedb.com/games/run-over
      https://adam-freeman.itch.io/hazard
      https://adam-freeman.itch.io/diver
      https://adam-freeman.itch.io/beyond

      Comment


      • #4
        Originally posted by Adam View Post
        Maybe consider coding in the ability to throw it?



        Then I guess you would have to think about retrieval or having it automagically re-appear in your hand.
        there is an old mod somewhere with throwing axes. IIRC you start with 5 axes and you can throw they, after you can get the axes. Is a nice feature , but i think will be more "good" if:
        -you can use the axe like regular axe with primary fire button
        -the "secundary button shoot" will throw the axe
        -the axe returns to your hand flying (like a jedi saber)
        the invasion has begun! hide your children, grab the guns, and pack sandwiches.

        syluxman2803

        Comment


        • #5
          My dear wizard of the qc,
          don't tease us with idle chatter.
          It is the hard code we require.

          Glad to see you around these parts again.
          Username : Atomic Robokid on Steam

          Please check out my Quake made things:

          https://www.indiedb.com/games/run-over
          https://adam-freeman.itch.io/hazard
          https://adam-freeman.itch.io/diver
          https://adam-freeman.itch.io/beyond

          Comment


          • #6
            Adam, you are sweet sometimes
            A throwing axe is not that difficult to code. Cobalt and you should be able to do it without much trouble. It is always better to first try it yourself, otherwise you will not learn something at the end of the day.

            There are even tutorials to show you how it is done: click me


            As Nahuel said, there are several mods which have a throwing axe already.

            1.) The mod, that Nahuel mentioned is done by Steve Bond. It is available with source code here:
            click me.
            Here it is in action:
            [ame]http://www.youtube.com/watch?v=3zvsk06N_k4[/ame]


            2.) An even better implementation has been done by Patrick Martin (one of the best qc coders I am aware of). It is in the Drake mod (incl. source): click me
            Here it is in action:
            [ame]http://www.youtube.com/watch?v=F1Y4u5go0XQ[/ame]



            Cobalt, for the 2 additional animations of the v_axe, you do not need a modeler to do it, as you do not need to change the model shape itself. You already have everything you need in it: axe and arm.
            You can simply make a copy of the arm, mirror it and add it to the left side to have a "double-hand" attack. The animation itself can be done via blender, qme, milkshape or other .mdl editors. I recently did the original 8 axe frames to a static axe model in milkshape + qme and it was not that difficult. The axe and arm you already have = original v_axe. So it should be not much work.

            You have to hide the left arm (just like it is done with the Quake muzzleflashes) behind the coordinate origin for the frames where they have to be invisible to the player.

            Have fun that is a cool idea/project.
            Seven

            Comment


            • #7
              Hi Seven

              Those are interesting videos. Modders preference, but I believe if you throw the axe, it ought not return, but be available as a pickup , of course. This also raises the possibility of dual wielding axes, say you find one and already have the axe , but the original Q1 Axe seems to not be a hand axe type but
              long handle axe, so not sure if thats an immediate possibility.

              The Thors Hammer idea is nice, and from my research the Hammer was actually intended to be part of Quake, since the Quake character in the Dungeons and Dragons Module that ID based the game on apparently used a Hammer.

              Not 100% sure how I wont need a modified V_wep model for this idea...though your process sounds kind of simple...I did get a left handed V_axe model from someone here, I think it was Web Angel? She mirrored it in Blender, however the hand is the same hand as the other side so if you look carefully you can see its not a real left hand.

              Im mostly concerned with the current animation not depicting the doublehanded axatt frames I mentioned above. One is a overhead downward blow, the other is a doublehanded from left to right.


              You definitely have become the Quake1 encyclopedia here with your knowledge, glad to see your input here. Hopefully we can come up with something. Im bad with Blender, but somewhat ok with QME.






              Originally posted by Seven View Post
              Cobalt, for the 2 additional animations of the v_axe, you do not need a modeler to do it, as you do not need to change the model shape itself. You already have everything you need in it: axe and arm.
              You can simply make a copy of the arm, mirror it and add it to the left side to have a "double-hand" attack. The animation itself can be done via blender, qme, milkshape or other .mdl editors. I recently did the original 8 axe frames to a static axe model in milkshape + qme and it was not that difficult. The axe and arm you already have = original v_axe. So it should be not much work.
              You have to hide the left arm (just like it is done with the Quake muzzleflashes) behind the coordinate origin for the frames where they have to be invisible to the player. Have fun that is a cool idea/project.
              Seven

              Comment


              • #8
                She mirrored it in Blender, however the hand is the same hand as the other side so if you look carefully you can see its not a real left hand.
                Select a vertex on the hand
                press cntrl+L (selects all polys for that model)
                press shift+D (duplicate)
                press S then Y then -1 (scales new hand reverse 100% on the y axis... this is the proper axis to scale on for this model. Et Voila left hand.)
                press cntrl+n (recalculate normals outside)

                press HEADACHE as you figure out how to adjust the new hand using shape keys



                I did a lot of modification to make this one image. Aside from the above steps, I rotated the axe head to be at more of a 2 handed angle and I moved the entire axe upwards to give the hands some room from the head. This image is just a proof of concept for your idea. For an overhead attack you will definitely need to add some more arm to the model. Just doing that pose in real life I can see quite a bit of my biceps.

                pro tip: Use the outer white circle of the translation tool in perspective view for any rotary modifications. None of this model is as simple as stock x,y,z.
                Last edited by TheRealMadGypsy; 06-24-2015, 01:34 AM.

                Comment


                • #9
                  looking very nice!
                  My Avatars!
                  Quake Leagues
                  Quake 1.5!!!
                  Definitive HD Quake

                  Comment


                  • #10
                    Whoa, yea, very nice job MG. Had no clue you were that good in Blender.
                    Since you went that far why not keep going? I dont know why Im so lazy these days not to take the time out to learn these tools some more, the god of Quake knows I have alot more stuff to do before my mod is anywhere near close, and modeling and also mapping are my weak points wight now...so any help would be greatly appreciated and when I make my credits.txt file or Webpage I am gonna try and credit those who have helped and been inspiraiton (if I can remember them all )

                    Originally posted by TheRealMadGypsy View Post
                    I did a lot of modification to make this one image. Aside from the above steps, I rotated the axe head to be at more of a 2 handed angle and I moved the entire axe upwards to give the hands some room from the head. This image is just a proof of concept for your idea. For an overhead attack you will definitely need to add some more arm to the model. Just doing that pose in real life I can see quite a bit of my biceps.

                    Comment


                    • #11
                      I am curious as to how the axe bug will work once this is deployed somewhere!
                      Want to get into playing Quake again? Click here for the Multiplayer-Startup kit! laissez bon temps rouler!

                      Comment


                      • #12
                        @sylux - thank you!

                        @cobalt ~ good at blender

                        You give me too much credit. 90% of that was just keyboard shortcuts

                        @keep going

                        Well, I originally was going to just do the whole thing for you "right quick" and then I hit a major wall with shape keys. Honestly, I don't have the time to dedicate to this. When I thought it would take a few hours I was available but, it is going to take me much more than that. I'm creating my own game right now and I am seeing lots of results. I need to keep my momentum. I know me, taking more than a few hours of a break tends to shelve my projects. It starts with "learning shape keys" and then it becomes "my new idea". I don't want any new ideas. I'm learning to stick with the ideas that I already have so they can become more than an idea.

                        The above post by me would get someone else started quickly though. I could redo those efforts in like 2 minutes.

                        Comment


                        • #13
                          What is the Ax bug?

                          Originally posted by Mindf!3ldzX View Post
                          I am curious as to how the axe bug will work once this is deployed somewhere!

                          Comment


                          • #14
                            Originally posted by TheRealMadGypsy View Post
                            @sylux - thank you!

                            @cobalt ~ good at blender

                            You give me too much credit. 90% of that was just keyboard shortcuts

                            @keep going

                            Well, I originally was going to just do the whole thing for you "right quick" and then I hit a major wall with shape keys. Honestly, I don't have the time to dedicate to this. When I thought it would take a few hours I was available but, it is going to take me much more than that. I'm creating my own game right now and I am seeing lots of results. I need to keep my momentum. I know me, taking more than a few hours of a break tends to shelve my projects. It starts with "learning shape keys" and then it becomes "my new idea". I don't want any new ideas. I'm learning to stick with the ideas that I already have so they can become more than an idea.

                            The above post by me would get someone else started quickly though. I could redo those efforts in like 2 minutes.
                            mirror copy shapekeys dont work from the dope sheet anymore,have to do it in the 3d window,alt shift v I believe
                            Last edited by bluntz; 06-24-2015, 09:22 PM.
                            WARNING
                            May be too intense for some viewers.
                            Stress Relief Device
                            ....BANG HEAD HERE....
                            ---------------------------
                            .
                            .
                            .
                            .
                            .--------------------------

                            Comment


                            • #15
                              [ame]http://www.youtube.com/watch?v=9t-7W1kafvA[/ame]

                              Axe Bug!! Took me a moment to replicate it, and its near impossible to know if you succeeded without having chase_active 1 enabled.
                              Want to get into playing Quake again? Click here for the Multiplayer-Startup kit! laissez bon temps rouler!

                              Comment

                              Working...
                              X