| Home Page | Recent Changes | Preferences

MythOpus/Developer Journal


Mutator Code To Replace All Weapons:

function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
  bSuperRelevant = 0;
  if ( xWeaponBase(Other) != None )
    switch( xWeaponBase(Other).WeaponType )
      case class'ShockRifle':
        xWeaponBase(Other).WeaponType = class'ConcussionRifle';
        return false;

      case class'Minigun':
        xWeaponBase(Other).WeaponType = class'SomeOtherGun';
        return false;
  else if ( WeaponPickup(Other) != None )
    switch( Other.Class )
      case class'ShockRiflePickup':
        ReplaceWith( Other, "MadNess.ConcussionRiflePickup");
        return false;

      case class'MinigunPickup':
        ReplaceWith( Other, "MadNess.SomeOtherGunPickup");
        return false;

  return true;

From Foxpaw :D Thanks !

xEmitters Vs Emitters

There is no need to use xEmitters for Weapons. You can use Emitters as long as you set bStatic and bNoDelete to false.


Ph34r ! Don’t use Kcar.

All The Stuff You really Need To Know !

October 4. 2003

Welcome Again ! Now, I'm putting all my little projects on hold for my time on another mutator. This particular mutator is Paint Ball Arena !. I was sitting at the computer trying to code for my other mod Master Operations when I realized ot was hopeless :) So I came up with Paint Ball Arena. Ever wanted to shoot a player in the head with a well aimed paintbal in UT2k3? Well now's your chance :D All I really need is to get a new weapon model and do a few little tweaks and the mutator is ready for beta :D All this in not even two hours :D Joy ! I haven't seen many paint ball mods for UT2k3:D :P

GRAF1K: I would be very interested in seeing your paintball mod. Feel free to use any code you might find useful in [Laser War 2003], specifically LW2K3Mutator.uc, which deals with ragdoll, gib, and blood removal, as well as screams/pain sounds. If you do use any LW2K3 code, please make mention of it in your readme and/or website. I hope to see this mod go live. :)

October 6. 2003

Well here is a list of things I need to do to finish the beta for Paint Ball Arena.

  • The To Do List
    • A More Techy Hud
    • A Scoreboard with ' pisazz '
    • A New Paint Ball Weapon Model
    • Finalize Paint Ball Impact Effects
    • Creat Paint ' Splash '
    • Make something that'll make a paint splatter on a pawn when hit by a paint ball
      • I was thinking of a projector
    • New Player Models (if I am gonig to do a REAL mod)
    • New GUI (read above)
    • Create gametype based on Bombing Run (and other gametypes)
      • I'll explain this in more detail later ;)
    • Various Special Effects
      • Combo, Shields, etc...

I believe this is all I'll be implementing for the beta. Most of it has been partially completed and some stuff I haven't even begun. I do hope this will become a 'quality' mod and not some mod a two year old put together in a week. Most of all, I hope this will be a fun mod (it already is) Of course I will create better textures and new models (I have the ball model and texture done but it was just for testing purposes ;) ) but that will all come it time :D I want to take this time however to thank GRAF1K for letting me use his code to make the pawns disapear without any death thing and for his help in other areas :)

~~ Have you looked at http://planetunreal.com/exor/mutators/paintfight.html ?

October 12, 2003

My MOR| Started off with excited joy ! I have successfully created a Configurable Low G Mutator :D I think I might add more features to it, but I'm nto sure. I have about 20 other planned mutators and two of them are Admin Commands. I hope this will be cool and orginal, this collection of mutators. MOR| IS BETTER ! Anyways... I have a question... Is it possible to make a small level with Uscript so that an admin can send a player on his server that he doesn't like to a self-contained small level. And is it also possible to send a player to a Local Map file from a server?

Foxpaw: You can't generate BSP within Unrealscript. You can however implement an admin command to send a player to an area preprepared in the level in question. But if you're going to do that, why not just kick them? They'll probrably leave and come back to escape your "prison" anyway.

Also, I don't believe (but can't say for sure) that a server can force a player to change levels, let alone force the client to load up a level as botmatch. (at least, that's how I interpreted your question)

MythOpus: You interpret well :) What I want is a fun command alternative to the kick command though. Also I want it to work like a ban if the admin doesn't want the player to actually play on the map. For example, some stupid guy comes into my server and starts messing around. Team killing, or whatever. If I wanted to have fun with him or something, instead of kicking him, I can Banish him to the depths of a small little prison cell and then like a ban, it will log his ip so whenever he tries to reconnect or join at a later date, he'll be sent to the Prison Cell. I was also thinking as a fun little feature, the admin could open a sort of camera wherever on the map so ocasional players passing by can tilt their heads back and laugh. That feature isn't really an option now that you told me you can't make a level in Uscript :( and since this will be an admin command, I don't think every map in UT2K3 has a 'prison' type place :| And as for the local map, I wanted to, if the Uscript map was not possible as I suspected, be able to send the player you wanted to banish to a map in the cache file, which I don't think can happen becasue I think only the Multiplayer stuff can access that. This map would be a prison map that would come along with the mutator so each player joining the server would have to download the map too.

Foxpaw: Well, if you want to be REAL unfriendly, you can set up the code so when you invoke that command, that pawn set (client side only) it's owner to itself. This creates an infinite loop in the native code and crashes UT. It's important that you send a replicated function to the client and then the client sets it's owner. If you set the owner on the server with the hopes of replicating it, you'll crash the server.

I did this accidentally, and someone (I think it was Mychaeel) told me that there was a mod that did that on purpose to punish players who tried to cheat on the server.

GRAF1K: Jailbreak 2003 will throw you in jail if you leave the game while in jail and return during the match, to prevent obvious cheating.

MythOpus: WEll, I guess that feature is impossible then :'(

Foxpaw: Yes, Jailbreak for UT had a similar feature, but that requires a jail to be built into the level.

Foxpaw: I was poking through the GameInfo and there may actually be a function that you can use to send a player to a different URL, which may or may not allow you to send them to a map on their hard-drive. (I'm not sure how the security will feel about it.) Try calling ClientTravel on a playercontroller, like so:

  OffendingPlayerController.ClientTravel( "DM-Asbestos", TRAVEL_Absolute, true );

I don't know if that will actually work or not, but it's a shot in the dark I suppose. You could of course substitute asbestos for a map of your choosing. Also even if it works it will fail and leave you in the current level if you don't have the map, so you would probrably have to integrate the mutator and the jail map by using an embedded mutator and putting the map in your serverpackages. (Don't know for sure if that will work or not, but it's worth a shot.)

MythOpus: Well I knew that you could Server Travel, however how do you distinguish one player controller from another playercontroller ? Don't all the players use the same player controller, or is their name the same as their playercontroller ? (sorry I can't check on that myself because I'm at school :P ) Also, how do you go about making a console command and then putting it in to UT2k3?

Foxpaw: Well, all the player controllers are the same class, but there is one for each player. You can get the appropriate playercontroller a number of ways, depending on what you have to work with. If you have a reference to the person's playercontroller, well... that should be pretty straightforward. If you have a reference to their Player, you can call the function on Player.Actor. If you have their PlayerReplicationInfo, the owner of the playerreplicationinfo is the controller. If all you have is the textual name, you can iterate through all of the playerreplicationinfos and find the one with a matching CharacterName attribute.

The easiest way to "add a console command" is to use the Mutate function of a mutator. You can also override console and add a command that way, but that's much messier. So, the whole thing could look something like the following:

class JailMutator extends Mutator;

function string ParseMessage( string Prefix, string Input )
  if ( Prefix == "" || Input == "" || Len(Prefix) >= Len(Input) )
    return "";

  if ( Left(Input, Len(Prefix)) ~= Prefix )
    return Right(Input,(Len(Input) - (Len(Prefix) + 1)) );
  return "";

function Mutate(string MutateString, PlayerController Sender)
  local string Suffix;

  Suffix = ParseMessage( "JailPlayer", MutateString );
  if ( Suffix != "" )
    JailPlayer( Suffix );

  Super.Mutate( MutateString );

function JailPlayer( string ToBeJailed )
  local PlayerReplicationInfo PRI;

  foreach AllActors( class'PlayerReplicationInfo', PRI )
    if ( PRI != None && PRI.CharacterName ~= ToBeJailed && PRI.Owner != None && PRI.Owner.IsA('PlayerController') )
      PlayerController( PRI.Owner ).ClientTravel( "DM-Asbestos", TRAVEL_Absolute, true );

 // Put whatever stuff here.

That may or may not compile, and may or may not work. I just typed it out in here from what I figure should work. Once you get it to compile, hopefully typing "mutate JailPlayer " followed by the player's name will make them disconnect from the server and load DM-Asbestos. You might also want to test that out and check if the person calling it has admin priviledges, because I think mutate may be a replicated function. :P

MythOpus: Thanks Fox for helping me out on this one. I can't get around to testing this yet because I'm hard at work on the meat and bones of my project (the mutators and stuff) and I was planning on adding an admin command as an added bonus if I finish everything .. sadly, that won't happen soon :(

October 13, 2003

Well, thanks to GRAF1K for helping me along my slow and confusing path... I now have another thing to add to my MOR| Mutator Collection ;) Configurable Health Mutator :) Which seems very easy for you experts but I'm still learning as I go :P:P:P So now I have a LOW G and HEALTH PICKUP Configurable Mutators. Oh JOY !

October 15, 2003

Hey. You know what REALLY sucks? If you have a rather large Uscript project and you decide to change the name of something, You have to open the fine you want to change and change whatever. In my case, I changed the name of something rather small but it was REALLY anoying to do. So whatever, I changed the entire file and stuff. I have everything ready to re-compile so I close the file that I edited. Bam. It hits me. I didn't save over the other file. After yelling at myself for not doing something (which by now I should do automatically) and then I went and retyped everything... but I learned my lesson :) But now I have a HALF working Movement mutator that will let you move faster or slower and jump higher or lower, depending on how you set it up. Right now, I wanted to be able to set 5 different variables but so far only JumpZ will actually work and for some reason this lets you move faster and stuff. (For an example of what it can do, type setspeed 3 (or whatever number you want) in the console in UT2k3) I want it use the GroundSpeed, AirSpeed, WaterSpeed, JumpZ and DodgeSpeedZ seperately but for some reason, I haven;t been able to do this. Oh, well, Back to the sad reality which is school (N)

El Muerte TDS: get paranoid and use CVS, commit your code, tag it, mess the hell out of it, and revert it because it didn't work. Even if you are the only one working on a project, version control will solve a lot of problems. And ofcourse, save often and commit often.

MythOpus: I downloaded Turtle CVS before, but I never understood how it worked :S

October 22, 2003

Well, I have four mutators finally complete. THey are good mutators I guess, fun at least :) I'm at school though and I gotta go so l8r !

October 25, 2003

Currently, MOR| is doing great. It's not going as fast as I would like it too, but thats okay because I'm wasting time trying things that will never work :) UScript is so stressful (N) Anyways, I'll explain in a bit more detail what MOR| is about. MOR| (yes, mor is really spelt more but I wanted it to look different ;)) is a collection of cool and useful mutators for people running servers or who just want to play with some change once in awhile. The first mutator I have completed for MOR| is MOR|LowG which lets you configure how much of LowG you want (Low Gravity). The second was MOR|Health which lets you configure how much health you get when picking up a HealthPack. The third one is MOR|Adren which lets you configure how much adrenaline you get each time you pick up and Adrenaline Pill. I have just finished the first version of MOR|Sound which will let you configure a number of sound options. At the moment, you can only configure the volume of player grunts (heard when jumping/double jumping), the volume of footsteps and the volume of Ragdoll Impacts (not really noticeable, but when you die and your body falls down something and hits the ground or an object, it makes an impact sound). I hope to add more sound options to this mutator in the future but at the moment I wish to finish the rest of my planned mutators. At the moment, I am working on MOR|Toyz (yes with a Z !) which will give you new weapons/items to play around with.

November 1st, 2003

Well, Nov. 1st. What a day. I'm going to take a break from telling you all about my wonderful adventures in the land of no return... known to civillians as The Land Of EVIL Complex and Confusing Code. We have one of those ugly sex bots on our computer, the kind that adds favorites and changes your home page. It really pissed me off. My dad said if he couldn't get rid of it, he'd have completely delete EVERYTHING. Now for a normal guy, that'd be okay. However, I had LOTZ of code I was working on and since I'm not part of a huge mod team, I don't back it up :P So I was scared stiff about my code.. anyways, no more bot. But, I still have a BIG problem. The kind of problem that most people get. I have SOO many ideas. So many that you don't know where to start working. It gets really frustrating... and becasue your ideas are so big, you would have to get a dev. team but of course... your ideas suck to the ideas of the public and thus, you get no dev team and your plans are ruined.... or, you start making the idea/concept and bring it to life. And then, you realize that your skill as a coder... is really low and then you must stop working on the project, or at least slow down... that really brings YOU down. Bah, Too much to type, I have a headache... l8r

GRAF1K: That kind of thing does indeed suck... that's what Mod Ideas is for. :-)

MythOpus: Ya, but it really sucks if someone else has made YOUR idea come to life :P It's different of course if your part of their team :)

November 4th, 2003

I have made some progress. I have gotten my Code Vision mutator to work succesfully (along with me making some pretty lame matrix code textures cough cough) and I shall soon try to replace all the textures with new ones and then proceed to add new special effects. I'll put up a list of completed mutators here MythOpus for your pleasure :)

November 5th, 2003

Mr. Myth is one happy camper. I tell you so. However, I have one small, itsy bitsy problem. I want to replace the skins of ALL StaticMeshe?s using UScript and I have tried the following simple solution...

function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
        if ( StaticMeshActor(Other) != None )
        class'Engine.StaticMeshActor'.default.Skins[0] = ST0;

        return true;


I had a few thoughts on this... mostly " This won't work. This requires more confusing code!"

Sadly, I was proven right. I read somewhere that you can do something to the Super Class and those changes will happen to all of its Sub-Classes. After thinking about it, I've realized that simply changing stuff from the Super Class won't do anything to it's Sub Classes, and so, I reach out to the Wiki for guidance in my time of need, if anyone is watching :cheesy: And for those who say that it isn't possible... I have something to say to you.... If it's possible in Unreal Ed.... It's pretty possible with UScript :)

Foxpaw: Well, I don't believe that Static Meshes have "skins" like that anyway, though I could very well be wrong about that. What you can do though (I suspect) is use an overlay. That is how things like the electrocution effect when you get hit with the shock rifle work. The overlay is drawn on top of your existing texture. (more or less, it's a bit more complex because overlays can also make you transparent and stuff too.) You should be able to just slap your "code" overlay onto all static mesh actors by using an iterator. Like I said though I don't know any feasable way to do it with BSP, except possibly by making a crapload of projectors everywhere.

Actually, you might be able to get away with JUST using the projectors.. but I wouldn't count on that fully.

MythOpus Well, static meshes use Materials which are exactly like skins I believe. The only thing is you can overwrite the Material with the Skin texture. I overwrited the Overlay on my first test for changing the Player skins but I realized there were some problems with that so I figured out how to change skins :) Any ideas on how to change the skins or w/e of ALL the static meshes? I don't think Projectors would be good, don't they really slow down the FPS ?

Foxpaw: I'm not sure about the performance of projectors, but I don't know how many options there are for changing the textures on BSP from within UScript. You can easily find all of the static meshes in the level by using the AllActors Iterator, like so:

simulated function ChangeSkins()


  local int i;
  local actor A;
  foreach AllActors( class'Actor', A )
    for(i=0;i<A.Skins.Length;i++)  // Not sure if this array is filled up for static meshes or not. Might need to just add a set number of skins instead.
      A.Skins[i] = Material'CodeMaterial';


That should cover skeletal meshes as well, but not sprites, particle effects, or BSP.

MythOpus: I've tried everything and I couldn't get that to work :( Well, I guess I'll just put off that part of my mod until I can figure out a way to do it... thanks Foxpaw for al lyour help :)

Foxpaw: You might want to try playing around with the "UV2Texture" or something along those lines. I believe that static meshes use a different variable to hold their overlays, and it's named something like UV2Texture. It's declared in actor, and there's a little bit of a comment about it there.

November 13th, 2003

Myth Man has done it! When I mentioned what I was doing for a Matrix time thing, Foxpaw suggested I do something for Bullet Time. He said he didn't like how other mods activate bullet time and so I thought about what he said and then last night, I began looking for ways of doing this. The code hasn't been tested yet since I was grounded off my computer and had to work on my laptop but I hav eto go now so I'll inform you later on what I did.

December 6th, 2003

It's been too long since I last updated my journal. However, there hasn't been much progress with my MOR| project (I have decided to rename it too BTW). I have just realized that making a weapon from scrath with new models and effects and everything is HARD work. Too many times have I opened UT2003 to see where the weapon is on the screen and to see if it aligns itslef properly with the effects. Due to the slow progress of the weapons though, I have decided to stop working on weapons and start to work on the actual mutators and add-ons I have planned. I hope to get a complete public beta going around on christmas, if not earlier. It'll be the best christmas present ever ;) After a few thoughts on what I need to work on now, I decided to add Mapper Add-Ons. These will be little actors that can help the mappers that don't know how to use Uscript and let them do what they want in thier maps. Currently I only have a SpeedSpot that when a pawn goes into its collision area, it changes the pawns speed (to a set speed designated by the mapper) and then when the pawn gets out of the collision the pawn will be restored to it's default speed (or the speed set by the mapper). At the moment, when a pawn get's sped up, an effect get's attached to it's feet (at the moment it's the same effect as the Speed Combo effect). I'm trying to get it so the mapper can customize what effect he wants or even if he wants an effect.

It's defiantely cool, and I wish I had something like this when I was making a speed map. This'll help a lot of mappers out there :) Well, l8r.

Category Journal

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands


Mapping Topics

Mapping Lessons

UnrealEd Interface


Scripting Topics

Scripting Lessons

Making Mods

Class Tree


Modeling Topics


Log In