Announcement

Collapse
No announcement yet.

Species statistics mutator?

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

    Species statistics mutator?

    What does the Species Statistics mutator actually do? As far as I checked, the mutator code doesn't give any interesting code other than a link to SpeciesGameRules, where I find nothing interesting too. IMO it should change the way species are different from each other to Unreal Championship's described statistics, see http://unrealchampionship.com/roster.php . Somehow it doesn't feel like that when you play on and off with the current mutator - it feels the same IMO.

    #2
    That mutator is a fail. Don't bother with it.

    Comment


      #3
      So I was right, it's not complete... Is there a way to rewrite it?

      Comment


        #4
        I'm sure you can if you know how to code.

        Comment


          #5
          What if you don't know that much? Well, surely it shouldn't be hard. Just check what the Species an xPawn has set and then do changes in its properties.

          Comment


            #6
            UC1 species code

            //================================================== ===========================
            // MutUCSpeciesStats - species specific stats for players based upon UC1 code
            //
            //================================================== ===========================
            class MutUCSpeciesStats extends Mutator;

            struct StatMods
            {
            var() config float AirControl;
            var() config float GroundSpeed;
            var() config float WaterSpeed;
            var() config float JumpZ;
            var() config float HealthMax;
            var() config float AccelRate;
            var() config float WalkingPct;
            var() config float CrouchedPct;
            var() config float DodgeSpeedFactor;
            var() config float DodgeSpeedZ;
            };

            // attenuate stat mods, for easy tweaking of the value of these traits.
            var() config StatMods statAtten;
            // species array of stat mods
            var() config StatMods stats[7];

            // sjs - called game events, todo: hook this up to stuff
            function EventNotify(Pawn Other,Pawn Instigator,Name EventName, float value)
            {
            if( xPawn(Instigator) == None || xPawn(Other) == None )
            {
            Super.EventNotify(Other, Instigator, EventName, value);
            return;
            }

            if( EventName == 'Damage' && Other!=Instigator && value > 0.0)
            {
            if( xPawn(Instigator).Species == SPECIES_Night ) // vampiric
            {
            if( Instigator.Health < Instigator.HealthMax*2.0 )
            Instigator.Health = Clamp(int(Instigator.Health+value*0.5), Instigator.Health, Instigator.HealthMax*2.0);
            }
            }
            Super.EventNotify(Other, Instigator, EventName, value);
            }

            function RestoreSpecies(xPawn xp)
            {
            local int PrevHealth;

            PrevHealth = xp.Health;
            ModifySpecies(xp);
            xp.Health = PrevHealth;
            }

            // need to modify the actual class defaults due to plenty of code that uses defaults to restore values after temporary modification
            function ModifySpecies(xPawn xp)
            {
            local int speciesIndex;

            speciesIndex = xp.Species;

            //mutlog("Modifying species index:"$speciesIndex);

            xp.AirControl = class'xPawn'.default.AirControl * stats[speciesIndex].AirControl * statAtten.AirControl;
            xp.GroundSpeed = class'xPawn'.default.GroundSpeed * stats[speciesIndex].GroundSpeed * statAtten.GroundSpeed;
            xp.WaterSpeed = class'xPawn'.default.WaterSpeed * stats[speciesIndex].WaterSpeed * statAtten.WaterSpeed;
            xp.JumpZ = class'xPawn'.default.JumpZ * stats[speciesIndex].JumpZ * statAtten.JumpZ;
            xp.HealthMax = class'xPawn'.default.HealthMax * stats[speciesIndex].HealthMax * statAtten.HealthMax;
            xp.Health = xp.HealthMax;
            xp.AccelRate = class'xPawn'.default.AccelRate * stats[speciesIndex].AccelRate * statAtten.AccelRate;
            xp.WalkingPct = class'xPawn'.default.WalkingPct * stats[speciesIndex].WalkingPct * statAtten.WalkingPct;
            xp.CrouchedPct = class'xPawn'.default.CrouchedPct * stats[speciesIndex].CrouchedPct * statAtten.CrouchedPct;
            xp.DodgeSpeedFactor = class'xPawn'.default.DodgeSpeedFactor * stats[speciesIndex].DodgeSpeedFactor * statAtten.DodgeSpeedFactor;
            xp.DodgeSpeedZ = class'xPawn'.default.DodgeSpeedZ * stats[speciesIndex].DodgeSpeedZ * statAtten.DodgeSpeedZ;

            xp.bUsingSpeciesStats = true;
            }

            function mutlog(string s, optional name LogName)
            {
            // log(s, LogName);
            }

            function ModifyAffinityWeapon(xPawn xp, Weapon newWeapon)
            {
            local int i;
            local Ammunition ammo;
            switch(xp.WepAffinity.Type)
            {
            case WepAff_Damage:
            for(i=0; i<ArrayCount(newWeapon.FireMode); i++)
            {
            if( newWeapon.FireMode[i] != None )
            {
            //mutlog("WepAff_Damage modifying:"$newWeapon.FireMode[i]);
            newWeapon.FireMode[i].DamageAtten = xp.WepAffinity.Value;
            }
            }
            break;
            case WepAff_Ammo:
            for(i=0; i<ArrayCount(newWeapon.FireMode); i++)
            {
            if ( newWeapon.FireMode[i] != None && newWeapon.FireMode[i].AmmoClass != None )
            {
            if( i>0 && newWeapon.FireMode[i].AmmoClass == newWeapon.FireMode[i-1].AmmoClass )
            continue;
            Ammo = Ammunition(xp.FindInventoryType(newWeapon.FireMode[i].AmmoClass));
            if ( Ammo != None )
            {
            //mutlog("WepAff_Ammo modifying:"$Ammo);
            Ammo.MaxAmmo *= xp.WepAffinity.Value;
            Ammo.InitialAmount *= xp.WepAffinity.Value;
            Ammo.AmmoAmount = Ammo.InitialAmount;
            }
            }
            }
            break;
            case WepAff_FireRate:
            newWeapon.FireRateAtten = xp.WepAffinity.Value;
            break;
            case WepAff_Accuracy:
            for(i=0; i<ArrayCount(newWeapon.FireMode); i++)
            {
            if( newWeapon.FireMode[i] != None )
            {
            //mutlog("WepAff_FireRate modifying:"$newWeapon.FireMode[i]);
            //newWeapon.FireMode[i].FireRate *= xp.WepAffinity.Value;
            }
            }
            break;
            default:
            mutlog("Unhandled weapon affinity type!",'Error');
            break;
            }

            if( newWeapon.InventoryGroup == 2 ) // assault
            {
            // hack so assault rifle affin always has a bit of damage attenutation
            // because ammo and firerate kindof suck with it
            for(i=0; i<ArrayCount(newWeapon.FireMode); i++)
            {
            if( newWeapon.FireMode[i] != None )
            {
            //mutlog("WepAff_Damage modifying:"$newWeapon.FireMode[i]);
            newWeapon.FireMode[i].DamageAtten = FMax(newWeapon.FireMode[i].DamageAtten, 1.6);
            }
            }
            }
            }

            function ModifyPlayer(Pawn Other)
            {
            local xPawn xp;
            local String WeaponClassName;
            local class<Weapon> WeaponClass;
            local Weapon newWeapon;

            xp = xPawn(Other);
            if(xp == None)
            return;

            mutlog("MutSpeciesStats="$xp.class);
            ModifySpecies(xp);

            // weapon affinity
            if(xp.WepAffinity.WepClass != None )
            {
            newWeapon = Weapon(Other.FindInventoryType(xp.WepAffinity.WepC lass)) ;
            if( newWeapon == None )
            {
            WeaponClassName = Level.Game.BaseMutator.GetInventoryClassOverride(S tring(xp.WepAffinity.WepClass));
            mutlog( "xp.WepAffinity.WepClass:" @ xp.WepAffinity.WepClass );
            mutlog( "WeaponClassName:" @ WeaponClassName );

            if( WeaponClassName != "" )
            WeaponClass = class<Weapon>( DynamicLoadObject(WeaponClassName,class'Class') );

            if( WeaponClass != None )
            newWeapon = Spawn(WeaponClass,,,Other.Location);

            if( newWeapon != None )
            newWeapon.GiveTo(Other);
            }
            if( (newWeapon != None) && (newWeapon.class == xp.WepAffinity.WepClass) )
            {
            newWeapon.BringUp();
            newWeapon.bCanThrow = false; // don't allow default weapon to be thrown out
            ModifyAffinityWeapon(xp,newWeapon);
            }
            }

            // handle per-species setup
            if( xp.Species == SPECIES_Egypt )
            {
            xp.AdrenalineAtten = 1.5;
            }

            Super.ModifyPlayer(Other);
            }

            /*
            0=SPECIES_Alien,
            1=SPECIES_Bot,
            2=SPECIES_Egypt,
            3=SPECIES_Jugg,
            4=SPECIES_Merc,
            5=SPECIES_Night,
            6=SPECIES_None
            */

            Comment


              #7
              There are a fair number of species stats mutators available, many of which allow you to set a wide range of variables per species, and even integrate new species with ease. Personally, I use Species Stats Plus, but there are other options.

              Comment


                #8
                Super Dante: MutUCSpeciesStats.uc(166) : Error, Unrecognized member 'WepAffinity' in class 'xPawn'
                Shadow Dancer: Looks good, but kinda too fancy and not based on UC facts.

                Comment


                  #9
                  On the one I use, it makes my raptors run faster and jump around like you wouldn't believe! It's awesome!

                  Comment


                    #10
                    Hmm? They shouldn't affect vehicles, that's the best part of it, if you're a Juggernaut you should seek a tank which is faster than you move, as if you are a Gen Mo'Kai you should move on foot, that's almost as fast as a Scorpion in my current settings

                    By the way, this adds interesting depth into gameplay. In CTF matches, usually it's the best to order Juggs to defend and Gen Mo'Kai to attack (once they get the flag and even get on their speed boost, they're as fast as lightning!). But what about Onslaught for example? Once a Jugg gets to a PowerNode it's no way to stop him, but they are so slow that they usually don't. Actually, Juggs are like turrets just a little bit more mobile They should have Lightnings as they make nicer snipers than anything else (better crouch than move!).

                    Comment


                      #11
                      So, Super Dante, can you fix your script?
                      And with the current settings of my Species Stats Plus (not official, but somewhat to the UC side), DM statistics look like this:
                      http://img178.imageshack.us/img178/7979/speciesuf4.png

                      I'll even start respecting Juggernauts Their physics is really like a rock, but they have tank properties. Takes a lot of time to kill a Jugg, and they might even not move but aim better. The can't jump up the Rankin ramps though But that's what Translocator is for. If it was off, probably Mokara would get a better score as she could pick up all the powerups first. And in CTF she would excel (if was attacking). Strange that Xan got that much though, maybe his stats are higher overall.
                      Also, in Onslaught, some tactics can be used too. Like if you have a lot of tanks in your base, be a Juggernaut. You will be faster when in a tank, and live even after the destruction of it. But if there are less vehicles, be a Gen Mo'Kai - you will run as fast as a Hellbender (dunno actually ), and you will get around without the actual need for vehicles. If the match is starting, be a Gen Mo'Kai to quickly get all powernodes. If there's a chokepoint you control, be a Juggernaut to defend it better. If there isn't too much health in the map, be a Nightmare and you will get health from enemies. Nakhti are something between Gen Mo'Kai and Mercenaries. Robots are nothing special, but good if Translocator is off, and would be good for assault Trials

                      Comment


                        #12
                        Originally posted by GreatEmerald View Post
                        So, Super Dante, can you fix your script?
                        And with the current settings of my Species Stats Plus (not official, but somewhat to the UC side), DM statistics look like this:
                        http://img178.imageshack.us/img178/7979/speciesuf4.png

                        I'll even start respecting Juggernauts Their physics is really like a rock, but they have tank properties. Takes a lot of time to kill a Jugg, and they might even not move but aim better. The can't jump up the Rankin ramps though But that's what Translocator is for. If it was off, probably Mokara would get a better score as she could pick up all the powerups first. And in CTF she would excel (if was attacking). Strange that Xan got that much though, maybe his stats are higher overall.
                        Also, in Onslaught, some tactics can be used too. Like if you have a lot of tanks in your base, be a Juggernaut. You will be faster when in a tank, and live even after the destruction of it. But if there are less vehicles, be a Gen Mo'Kai - you will run as fast as a Hellbender (dunno actually ), and you will get around without the actual need for vehicles. If the match is starting, be a Gen Mo'Kai to quickly get all powernodes. If there's a chokepoint you control, be a Juggernaut to defend it better. If there isn't too much health in the map, be a Nightmare and you will get health from enemies. Nakhti are something between Gen Mo'Kai and Mercenaries. Robots are nothing special, but good if Translocator is off, and would be good for assault Trials

                        Sorta.

                        It's also not "my" code, but the actual code extracted from UC1

                        You'd have to set up the weapon affinty system basically exactly to that of UC1. The weapon affinty class should be fairly easy for someone like you to write Emrald. I can probably make a list if your intrested It's basically a firerate affinity, damage, and ammo. For example, Syzygy was a Lightning gun character, with firing rate affinty. Mokara was Shield Gun with ammo affinty (great flag runner etc). I'm guessing the "fav weapon" was what became of weapon afifinty

                        That would take some doing, cause they kinda renamed a few characters too. For instance in UC "Rapier" is a blue Robot (the other one besides Corrosion). Then the "grey" robot named Rapier in UT2004 is "Ginsu" in UC.

                        I am a big fan of species stats myself, where can I download that mutator?

                        Comment


                          #13
                          Oh.
                          Hmm, if I only knew what exactly needs doing ;D
                          You can download it from... Google :P Search for "Species Stats Plus".

                          Comment


                            #14
                            Well I can get the needed information if you like. Not too much to document with men and paper

                            Comment


                              #15
                              Well, if I can do it with my limited UScript knowledge then OK

                              Comment

                              Working...
                              X