Announcement

Collapse
No announcement yet.

Slow Motion For Bots Only

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

    Slow Motion For Bots Only

    Hello everyone!

    To be honest, this is my first attempt ever at using any kind of online forum. I never felt the need to because so many of my issues could usually be found in a discussion somewhere online, but in this case, I am at a loss and am feeling a little desperate at this point. I actually created an account here for the sole purpose of asking someone out there more informed than I this single simple question. Please feel free to answer any way you like. It will not bother me if you answer with "you stupid idiot! the answer is obviously...." or you feel the need to be hard on me because I am new to this, as long as you provide some guidance for me as to the solution. I will be in your debt if you can please help me with this. Is there ANY and I mean ANY way you can think of where I can play unreal tournament for P.C and have the bots move in slow motion, but I am at normal speed. I know you can aim in normal speed in slow motion, but I'm talking about movement and firing as well. Wouldn't it be cool if you could move just like fry does in that episode of Futurama where he drinks 100 cups of coffee? Some have seemed to have hinted at that "mokey matrix moves" thing, but it still only seems to make aiming normal, but not movement and firing. Please try to dumb it down for me as I don't have that much experience editing this game, but man can I play it. Thank you in advance for any help you can think of and have a nice day. P.S I already know about the Players Only cheat, but I would like slow motion, not no motion.

    #2
    Welcome to the boards.

    Hmm, well, the way that usual slomo works is that it literally slows down time. If you want your character to still be as fast as usual in slowed down time, the only thing I can think of is to modify the player stats so that the movement speed is faster, and the shooting speed is faster as well (think the Super Berserk mutator). Note that in that case there are still two problems: the projectiles you fire will still be slowed down (because they are regular projectiles like the bots fire), unless you also change their speeds as well. The second problem is that gravity will also work in slow motion, and I don't really know if you can make it work faster for a single player...

    And perhaps someone has already made some mutator like that, but I wouldn't know about it. Never looked at Matrix Moves either.

    Comment


      #3
      Thank you, GreatEmerald.
      You are absolutely right and that does make sense too. However, I was thinking from a coding standpoint, that maybe universal alterations to the stats of the bots might be easier. (I really don't know) ex: altering some kind of .ini file or something to change their movement and firing rate speeds. The physics like bullet speed and falling rate I'm not AS concerned about though. I know the challenge in this is that the guns all probably have their own firing rates and can only be changed on a universal level. The next best thing, however, would be the alteration of the damage and firing rate of a particular gun. If I were to move in slow motion, but still pick people off at an enhanced speed, that would very enjoyable. My main objective is a very high killing rate. I still suspect, however, that the running speed of the playable character might be able to be changed exclusively, considering during game play, I've sometimes noticed that my character seems to be able to outrun my bot teammates, even when moving in a straight, linear path. That may just be due to the fact that some of the easier level bots might not always run at full speed when going a straight long distance. But you have already pointed most of this out already. Either way, I wouldn't know how to do any of this anyways. Do you have any suggestions perhaps how to get this done. I do have a brother who has a tiny bit of coding experience (I'm sure no where near your level though) so he might be able to assist me if some of what you say gets too technical or over my head. Anyway, thank you for replying and I hope I can be pointed in the right path. Cheers.

      Comment


        #4
        You could have the bots move slower instead, yes, but making them fire slower is harder than making the player fire faster. But either way involves scripting, because text configuration files don't provide such functionality.

        Changing the weapon firing speed universally is trivial, since it's just a change to their default properties. Since you want that to only affect the player (or bots), though, it's a bit more difficult (you need to change the properties of weapons after you pick them up, to know whether the person picking them up is a player or a bot, not just in general). I think that could be achieved by a Mutator, setting the weapon properties in the CheckReplacement() function. Now unfortunately you can't change the firing rates of weapons directly (because the FireModes of each weapon are inaccessible from outside the weapon itself), but what you can do, and what the Super Berserk mutator does, is to ask the weapon to go into "berserk mode", where its firing speed is increased. You can check whether the player that took the weapon is a human by checking if the weapon's owner's controller is a PlayerController:

        Code:
        function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
        {
          if (Weapon(Other) != None && PlayerController(Weapon(Other).Instigator.Controller) != None)
          {
            Weapon(Other).CheckSuperBerserk();
          }
        
          return true;
        }
        ...or at least I hope so, it could be that Instigator is set only after CheckReplacement is called. But it doesn't hurt to try, anyway.

        To give a bit of background on that, the CheckReplacement() function is called when certain actors are spawned. That includes weapons. The actors are passed through the Other parameter. "Weapon(Other) != None" makes sure that the Actor that is being sent is actually a Weapon. To access everything related to weapons, we then use the "Weapon(Other)" notation. "Weapon(Other).Instigator" is the owner of the weapon, "Weapon(Other).Instigator.Controller" is the controller of the weapon owner's pawn (it can be either a player or an AI). "PlayerController(Weapon(Other).Instigator.Control ler) != None" thus checks if it's a real player. "Weapon(Other).CheckSuperBerserk();" activates super berserk mode.

        As for the movement speed, it is the property of the player pawn, and it's pretty easy to change that value directly. The function ModifyPlayer() is made for pretty much that purpose:
        Code:
        function ModifyPlayer(Pawn Other)
        {
          Super.ModifyPlayer(Other);
            
          if (PlayerController(Other.Controller) != None)
          {
            Other.AirSpeed = 880.0;
            Other.GroundSpeed = 880.0;
            Other.WaterSpeed = 440.0;
          }
        }
        This function is called on every pawn in the game. We again check if it's a real player or not by using the same method as before. If it is, then we can set all the different properties for the pawn. You can find a list of all the property default values you can change here: http://greatemerald.xmpcommunity.com...pawn.html#2454

        You can try this by putting the code into a mutator. How to compile those, look at the Unreal Engine wiki: http://wiki.beyondunreal.com/Legacy:...p_UnrealScript and http://wiki.beyondunreal.com/Legacy:...pt_Hello_World

        Comment


          #5
          Good news!
          So, I gave it a try and eventually even managed to come up with a mutator to change the player's GroundSpeed, WaterSpeed and such to make it feel more like natural UT2004 movement during slomo. I also succeeded to make it configurable. To simplify things, all one has to do is to input the same value as one did in GameSpeed and the mutator will do the rest for the movement of your character (no need to calculate for the user to neutralize the effect of GameSpeed).

          I'll also see if I can fasten the firing rate and projectile speeds of weapons as well once I get a bit better at UScript, but before I do so, I'll tweak it a bit and upload it in the beta-section of this subforum.

          EDIT: Hehe, Great Emerald, you beat me to it.
          Didn't expect programming in UScript to be this fun though. Well, it'll probably get frustrating at some point sooner or later as anything, but the first working results are really a great experience.

          Comment


            #6
            Originally posted by Sly. View Post
            Didn't expect programming in UScript to be this fun though. Well, it'll probably get frustrating at some point sooner or later as anything, but the first working results are really a great experience.
            If it wasn't fun, we wouldn't be doing it in the first place, now would we?

            Comment


              #7
              Hehe, true.

              Okay, so the movement works fine except for the gravity issue. I went for the approach to just speed up the player or slow down the player depending on how the Game Speed mutator's settings were set. This makes jumping a bit more odd though. Especially due to the possibility to have dodgeramps this can sometimes become a funny low gravity match for the player.
              Now I just wonder how I could go about defying the laws of gravity...
              Unfortunately I'm not aware of any "mass" setting that would make players weight more and be more affected by gravity - bummer! After all, all I know is that it's the ZoneInfo or Volume that define how much gravity force is applied to the pawn (and other actors).

              Comment


                #8
                Sly, you almost answered your own question. The 'mass' property of actor appears affect how fast/how much force is applied to the pawns using Unreal's physics and the gravity vector (I found this out the hard way in my mod when "heavier" heavy weapons pawns, mass equaled ~110, could no longer get across AngelMapper's CTF-CannonFodder map.) I don't know how well it scales the effects though (and may never really feel good in the sense of simulating time dilation..), you will probably have to play around with it a bit.


                [EDIT] on second thought, 'mass' changes may only affect how forced direction volumes affect the pawn... you should probably experiment with it a bit.

                [EDIT 2] hmmm after some testing in game, I spoke too soon. It looks like 'mass' does not affect the application of gravity, so never mind. Maybe use a custom inventory item instead, given only to player pawns, that manually adjusts the velocity in the gravity vector axis each 'tick' (yes this is hacky, but it can work and is how Doc Edo's parachute inventory item forcibly slowed the pawn down).

                Comment


                  #9
                  I'll definitely check it out and think some more about it. It made me curious.
                  So far I uploaded my first mutator ever to the forums, which is basically a prototype of what is being discussed here.
                  Well, it seemed to be a good occasion to start to get into UScript. Bear with my coding sins, mwahaha!

                  Comment


                    #10
                    Hmm, yea, changing the gravity in general is easy ( http://greatemerald.xmpcommunity.com...utlowgrav.html ), but changing it for a single player is the hard part...

                    Comment


                      #11
                      Thank you very much.

                      Comment

                      Working...
                      X