I've been thinking of this after playing around with the UTC classes mod, would it be interesting and wise to create a mutator that scans all the pawns basic attributes like groundspeed, airspeed, jumpz, health and adds or removes a certain percentage from it when the pawn is spawned? (and make it compatible with relics, runez, uwar pickups and so on...)
Would this be an interesting idea to other people than me?
Would this be easy to code?
Mutator idea: Pawn Attribute Randomizer
Re: Mutator idea: Pawn Attribute Randomizer
This mutator will make monsters either thinner or fatter.
Fat monsters are stronger and slower.
Thin monsters are faster and more skilled.
Fat monsters are stronger and slower.
Thin monsters are faster and more skilled.
Code: Select all
class PawnRandomizer expands Mutator;
function bool IsRelevant(Actor Other, out byte bSuperRelevant)
{
local bool bResult;
// allow mutators to remove actors
bResult = Super.IsRelevant(Other,bSuperRelevant);
if ( bResult && (ScriptedPawn(Other) != none) )
ModifyMonster( ScriptedPawn(Other));
return bResult;
}
Code: Select all
function ModifyMonster( scriptedPawn Other)
{
local float factor, fTemp;
factor = RandRange(0.6,1.5); //Between 0.6 and 1.5
fTemp = Other.Fatness;
fTemp *= factor;
Other.Fatness = Clamp(fTemp,0,255); //Safe way of handling fatness
Other.GroundSpeed /= factor;
Other.AirSpeed /= factor;
Other.WaterSpeed /= factor;
Other.Health *= sqrt(factor);
if ( factor < 0 )
Other.Skill /= factor;
}
Re: Mutator idea: Pawn Attribute Randomizer
Yes!!!Higor wrote:This mutator will make monsters either thinner or fatter.
Fat monsters are stronger and slower.
Thin monsters are faster and more skilled.
Code: Select all
class PawnRandomizer expands Mutator; function bool IsRelevant(Actor Other, out byte bSuperRelevant) { local bool bResult; // allow mutators to remove actors bResult = Super.IsRelevant(Other,bSuperRelevant); if ( bResult && (ScriptedPawn(Other) != none) ) ModifyMonster( ScriptedPawn(Other)); return bResult; }
Code: Select all
function ModifyMonster( scriptedPawn Other) { local float factor, fTemp; factor = RandRange(0.6,1.5); //Between 0.6 and 1.5 fTemp = Other.Fatness; fTemp *= factor; Other.Fatness = Clamp(fTemp,0,255); //Safe way of handling fatness Other.GroundSpeed /= factor; Other.AirSpeed /= factor; Other.WaterSpeed /= factor; Other.Health *= sqrt(factor); if ( factor < 0 ) Other.Skill /= factor; }
-
- Inhuman
- Posts: 958
- Joined: Wed Mar 31, 2010 9:02 pm
- Personal rank: I am quite rank.
- Location: MrLoathsome fell out of the world!
Re: Mutator idea: Pawn Attribute Randomizer
Very nice mutator and code example Higor.
Short and sweet, and considerably more useful than a "Hello World" type of example.
Short and sweet, and considerably more useful than a "Hello World" type of example.
blarg
Re: Mutator idea: Pawn Attribute Randomizer
Okay, I'm going to place my version of this mutator here for you all to download.
The code is a bit tweaked to fit my tastes, but the change is extremely minor, just changed some values on it, nothing more, the core essence is still there.
It's got the u, int and readme file in it, so it should run in UT99.
Enjoy!
The code is a bit tweaked to fit my tastes, but the change is extremely minor, just changed some values on it, nothing more, the core essence is still there.
It's got the u, int and readme file in it, so it should run in UT99.
Enjoy!
- Attachments
-
- MonsterAttributeRandomizer (heliumcat edit).zip
- (1.9 KiB) Downloaded 222 times
- Dr.Flay
- Godlike
- Posts: 3348
- Joined: Thu Aug 04, 2011 9:26 pm
- Personal rank: Chaos Evangelist
- Location: Kernow, UK
- Contact:
Re: Mutator idea: Pawn Attribute Randomizer
I do like using Loathsomes random monster sizer, but often find it hard to tell if a swarm zombie is a giant or too close !
The physics works nice with small creatures being kicked across the map, so I'll see how this compares.
The physics works nice with small creatures being kicked across the map, so I'll see how this compares.
UT99.org House Rules
ChaosUT https://chaoticdreams.org
Your Unreal resources: https://yourunreal.wordpress.com
The UT99/UnReal Directory: https://forumdirectory.freeforums.org
Find me on Steam and GoG
ChaosUT https://chaoticdreams.org
Your Unreal resources: https://yourunreal.wordpress.com
The UT99/UnReal Directory: https://forumdirectory.freeforums.org
Find me on Steam and GoG