# My First Mod Part 2

By Sprint1 (edited by Kobain)

Beginner

(This tutorial assumes you have Unreal installed to your C:\Unreal directory.) This was originally a tutorial Sprint1 wrote way back when he was the web master at WoD. Now that he's passed on the throne, I've brought it back. It's for Unreal, but with minimal alterations, applies to Unreal Tournament.

So you've finished your insanely powerful Rocket Launcher from the first tutorial, and are hungry for more "easy-editing"? Here's an explanation of what everything in the defaultproperties of the Stinger means.
Everything in WHITE is the actual code, and everything in GREEN is my explanation.
defaultproperties
{
AmmoName=Class'UnrealShare.StingerAmmo'
This is the Ammo Type that the weapon will use. Check out other weapons for more ammo types.
PickupAmmoCount=40
How much "AmmoName" ammo you get when you pick up the weapon.
bAltWarnTarget=True
This is when you put the crosshair over the enemy. For a bot they would spring into action and start going crazy at you, or at a player it would make that noise if you get locked on by the 8ball.
FireOffset=(X=12.000000,Y=-10.000000,Z=-15.000000)
It may look like the projectile comes out of the model, but it actually spawns at this point in the radius of the player.
ProjectileClass=Class'UnrealShare.Rocket'
This is the projectile that is fired when the Fire button is pressed. If you want to see other projectiles, look under "Projectiles" in the UnrealEd Classes menu.
AltProjectileClass=Class'UnrealShare.Rocket'
This is the projectile that is fired when the AltFire button is pressed.
shakemag=120.000000
This is how much the weapon shakes when it is called to shake. And that's usually when the weapon fires.
AIRating=0.400000
This is the rating of the weapon for bots. If its higher they worship it, lower and its something they bought in the local radioshack sale.
RefireRate=0.800000
This is how fast the weapon fires in primary fire. Higher is faster, but try not to go past 1.000000. For the Stinger, you may have to modify the Sleep counts in the main code, which right now are set at 0.2 for primary fire and 1.0 for alternate fire.
FireSound=Sound'UnrealShare.Stinger.StingerFire'
AltFireSound=Sound'UnrealShare.Stinger.StingerAltFire'
SelectSound=Sound'UnrealShare.Stinger.StingerLoad'
Misc1Sound=Sound'UnrealShare.Stinger.EndFire'
These are a list of all the sounds the weapon makes. There are so many sounds in the game that I can't even begin to make a list, but check out every class you can find and copy the sounds from them.
DeathMessage="%o was perforated by %k's %w."
This looks more complicated than it actually is. See, this is the message that pops up when you kill someone with this weapon. %o means it will print the person's name that was killed. %k is the killer (k=killer, that's easy), and %w is the weapon used by %k to kill %o. The weapon's name is determined by the ItemName, shown below.
AutoSwitchPriority=3
After a weapon runs out of ammo, it checks which weapon has the highest AutoSwitchPriority, and goes to it. You can change a weapon's default AutoSwitchPriority temporarily by going to your Options menu in Unreal.
InventoryGroup=3
This is pretty self explanatory. When you press 3, it will change to this weapon. But if you change this, the ammo the weapon uses won't match up in the weapon inventory screen, which doesn't really cause a problem except when you want to see how much ammo you have in a weapon without actually switching to it.
PickupMessage="You picked up the Stinger"
This is the message you get when you pick up the weapon. You can change it to anything you want, but keep it easy enough for the person to know what weapon it is.
ItemName="Stinger"
This is used in the DeathMessage and a few other things. Make sure it's the actual name of your weapon, and nothing else.
PlayerViewOffset=(X=4.200000,Y=-3.000000,Z=-4.000000)
How the player views the model. X right/left, Y is out/in, and Z is up/down. It mostly takes trial and error to get this right, unless you can think in 3D.
PlayerViewMesh=LodMesh'UnrealShare.StingerM'
The model the player sees. Again, there are a huge number of meshes in Unreal, so I can't make a list. But in UnrealEd, open the Windows tab, and then the Mesh Viewer tool.
PlayerViewScale=1.700000
The size of the mesh the player sees. By default, the Stinger is multiplied by 1.7, but 1.0 is "normal" size.
PickupViewMesh=LodMesh'UnrealShare.StingerPickup'
The model seen when the weapon is floating around, waiting to be picked up.
ThirdPersonMesh=LodMesh'UnrealShare.Stinger3rd'
The model seen in third person, i.e. when you are holding the weapon, or are seeing someone else holding the weapon.
PickupSound=Sound'UnrealShare.Pickups.WeaponPickup'
The sound played when you pickup the weapon. WeaponPickup is used for most weapons.
Mesh=LodMesh'UnrealShare.StingerPickup'
Mesh is declared in all classes. Because its a weapon in run time it changes to pickup mesh, so you only use it for what it looks like in the editor.
bNoSmooth=False
If this is True, the model won't be smoothed, and it'll look strange. Keep it false so the model looks better.
SoundRadius=64
How far the sounds travel, starting from the gun and ending 64 units out in each direction.
SoundVolume=255
The volume of the sounds. Note that in the main body of the code, this is multiplied by a certain amount for each sound the weapon makes, and it's also influenced by whether or not you have the Silencer.
CollisionRadius=27.000000
How far around the player the weapon collides with the world. Keep this amount so the player can actually move. :)
CollisionHeight=8.000000
How far above the player the weapon collides with the world.
}

Visitors Since December 26, 2000