Presentation is loading. Please wait.

Presentation is loading. Please wait.

Sega 500 The UT2K3 Gunsmith Jeff “Ezeikeil” Giles

Similar presentations


Presentation on theme: "Sega 500 The UT2K3 Gunsmith Jeff “Ezeikeil” Giles"— Presentation transcript:

1 Sega 500 The UT2K3 Gunsmith Jeff “Ezeikeil” Giles jgiles@artschool.com http://gamestudies.cdis.org/~jgiles

2 Last day We wrapped up states & state programming. Learned how objects can exist in different states & how they can have different functionality and effects for each.

3 Today Were going to desend into the one of the core elements that makes UT2k3 what it is. We’re going to build our own, unique, stand alone weapon.

4 Gunsmithing for UT This is not for the faint of heart, after poking around the forums, this looks like it’s causing lots of people some headaches. To top it off, the weapon functionality has *completely* changed from the previous version of Unreal Tournament.

5 Gunsmithing for UT The previous version was fairly straight forward in that it had very limited dependencies on other classes. Usually limited to the weapon, ammo and projectile classes…

6 Gunsmithing for UT This is no longer the case. For UT2k3, by my count, to get a unique stand alone weapon you require a minimum of 8 classes. Yes…EIGHT!

7 Gunsmithing for UT Now, it’s true that you can radically change the functionality of a weapon in less…but that’s now what we want here. In order to truly understand what’s going on with the weapons, and have a unique toy to play with, we need to build it from scratch.

8 Gunsmithing for UT So our goal for today is not to build all the functionality for a completely unique weapon, but to cover all the bases of what’s required to build one. We’ll do that tomorrow.

9 Gunsmithing for UT So why the heck then does UT need to have 8 classes to get a weapon to function. Consider all the parts we have to reference. Weapon Inventory & pickup Ammo Inventory & pickup Projectile Type, fire class & damage type Attachment class

10 Object dependencies for the weapon The Parent class is in brackets

11 Gunsmithing for UT With this many inter dependant classes, explaining how one relates to another is a bit tricky, so bare with me…

12 Gunsmithing for UT So the first thing to look at is all the parent classes that we’ll need to derive from… Starting with Weapon class BoomStick extends Weapon; This class contains all the core functionality for the weapon operate.

13 Gunsmithing for UT It’s an abstract class, so one can never instantiate a “weapon”, we must deriver from it. It’s also huge, open it up & you’ll find all the functionality which is common to and required by all weapons in UT.

14 Gunsmithing for UT Cut & paste the defaults from the link gun and change some defaults DefaultProperties { ItemName="BoomStick" FireModeClass(0)=BoomFire //what we shoot FireModeClass(1)=BoomFire //the pickup item which spawns this to our inventory PickupClass=class'BoomStickPickup'... Mesh=mesh'Weapons.LinkGun_1st' //which mesh to use … AttachmentClass=class'BoomAttach' //attachement class }

15 Gunsmithing for UT From here, we’ll just step through the changes we made in the weapon defaults & see where it takes us. The next change was the FireModeClass. Ours is very simple…

16 Gunsmithing for UT In essence, defining what we shoot. class BoomFire extends BioFire; DefaultProperties { AmmoClass=class'BoomAmmo' // what type of ammo to use ProjectileClass=class'Eze.BoomProj' //what projectile to spawn }

17 Gunsmithing for UT Now, notice something rather important. There are 2 types for base fire classes, PojectileFire and Instantfire. Using Instantfire is a bit more tricky, so we’re going to stick to projectiles for today.

18 Gunsmithing for UT The next thing to set up is the ammo type we which to use: class BoomAmmo extends Ammunition; DefaultProperties { ItemName="Boomstick shells" //our name IconMaterial=Material'InterfaceContent.Hud.SkinA' IconCoords=(X1=545,Y1=75,X2=644,Y2=149) PickupClass=class'BoomAmmoPickup' // what our ammo pickup class is MaxAmmo=50 InitialAmount=20 }

19 Gunsmithing for UT And the ammo pickup class used by our weapon: class BoomAmmoPickup extends UTAmmoPickup; DefaultProperties { InventoryType=class'BoomAmmo' //what item to create in inventory PickupMessage="You picked up some BOOM-stick ammo" PickupSound=Sound'PickupSounds.FlakAmmoPickup' PickupForce="FlakAmmoPickup" // jdf … StaticMesh=StaticMesh'WeaponStaticMesh.BioAmmoPickup' //mesh to use DrawType=DT_StaticMesh }

20 Gunsmithing for UT Recall how the inventory system works. When you pickup an item, it spawns a different item in your inventory for use by the player.

21 Gunsmithing for UT In this case: This is why we have the double arrow in the diagram. BoomAmmoPickup creates the BoomAmmo inventory item, And the BoomAmmo knows what item creates it.

22 Gunsmithing for UT Moving back to the projectilefire object, we also define a projectile type. Essentially, not much more than what projectile to create. class BoomProj extends BioGlob; DefaultProperties { //our damage class MyDamageType=class'DamTypeBoomStick‘ }

23 Gunsmithing for UT We now have our damage class which is specific to this projectile. class DamTypeBoomStick extends WeaponDamageType; defaultproperties { //death messages to the player DeathString="%o bought %k's S-Mart special." MaleSuicide="%o ate his own boomstick" FemaleSuicide="%o ate her own boomstick" //what weapon class causes this message WeaponClass=class'BoomStick' }

24 Gunsmithing for UT This leads us back to the weapon, which has two other important classes. The pickupclass, and the attachement

25 Gunsmithing for UT How the item appears in the world before pickup & what item it spawns into the players inventory

26 Gunsmithing for UT class BoomStickPickup extends UTWeaponPickup; DefaultProperties { //item created in inventory InventoryType=class'BoomStick' //pickup message displayed to the player PickupMessage="BoomStick!!!" PickupSound=Sound'PickupSounds.FlakCannonPickup' PickupForce="BoomStickPickup" MaxDesireability=+0.7 //mesh & draw type to use StaticMesh=StaticMesh'WeaponStaticMesh.LinkGunPickup' DrawType=DT_StaticMesh DrawScale=0.75 }

27 Gunsmithing for UT Finally, the attachment class DefaultProperties { //how the weapon appears in 3rd person Mesh=mesh'Weapons.LinkGun_3rd' }

28 Gunsmithing for UT Also in the ThirdPersonEffects function, I changed the muzzle flash type to simulated event ThirdPersonEffects() { …//some code MuzFlash3rd = Spawn(class'XEffects.RocketMuzFlash3rd');

29 Gunsmithing for UT Okay, at this point we’ve templated out our weapon and (hopefully) covered all the bases. We should get a customize linkgun which fires bioglobs (BoomProj actually…but we kept most of the functionality), has its own damage types and attachments to the pawn.

30 Gunsmithing for UT Run UT, pull down the console and type: You must call the pickup class, or nothing will appear. Summon yourPackage.Boomstickpickup

31 Gunsmithing for UT This is what should appear. Yup! That the linkgun mesh…As expected.

32 Gunsmithing for UT Walk over it like any other pickup. Cool! It’s our pickup message from the BoomStickPickup class.

33 Gunsmithing for UT Fire some goo He-HEY! It works Now for the final test. Suicide by my own hand.

34 Gunsmithing for UT Even better, our own death messages.

35 Gunsmithing for UT To summon the ammo pickups pull the console again & type Summon yourPackage.BoomAmmoPickup Your weapon now functions on it’s own ammo type…not the biogoo.

36 Gunsmithing for UT However you can now also use the weapon placement items in the editor. It will appear there too.

37 Gunsmithing for UT Using the editor… Boomstick ammo xWeaponsBase which now accepts The Boomstick as a Valid weapon Yes, they look like regular UT pickups…but they are ours

38 Gunsmithing for UT Lastly, to be 100% complete, we need to set up our int’s so that our weapon appears in the menus.

39 Gunsmithing for UT Starting with the weapon declaration in your packages int: This will allow the weapon along with a description to be displayed in the menu. [Public] Object=(Class=Class,MetaClass=Engine.Weapon,Name=eze.BoomStick, Description="Ezeikeil's custom boomstick... Shop smart... Shop S-mart.")

40 Gunsmithing for UT For the ammo pickups: [BoomAmmo] ItemName="Boomstick shells" [BoomAmmoPickup] PickupMessage="You picked up some BOOM-stick ammo"

41 Gunsmithing for UT The weapon itself: [Boomstick] ItemName="Boomstick" [BoomstickPickup] PickupMessage="Boomstick!!!"

42 Gunsmithing for UT And the damage messages [DamTypeBoomStick] DeathString="%o bought %k's S-Mart special." MaleSuicide="%o ate his own boomstick" FemaleSuicide="%o ate her own boomstick"

43 Gunsmithing for UT This is important to know for 2 reasons. First, the int file overrides the specified parameter listed in that class…

44 Gunsmithing for UT Second, this provides an easy one-stop- shop to make changes to the messages displayed to the screen, without changing the code…handy for internationalization of the product.

45 Gunsmithing for UT Exactly what is the int doing? Look at the boomstick, this can also be read as: [Boomstick] ItemName="Boomstick" Class name Variable name Value

46 Gunsmithing for UT This should make int files clear as mud right? It’s just a matter of figuring out where things live. The net result…

47 Gunsmithing for UT My weapon model My description

48 Gunsmithing for UT And all the other values we set will appear during gameplay.

49 Gunsmithing for UT Ok, earth shattering functionality this isn’t, but look at what we do have… We’ve mapped and templated all the basic steps that are required to create your own weapons in UT2k3.

50 That’s a wrap That’s all for today. However, customizing the weapons in UT is sufficiently complicated that we’ll spend the rest of the class building our own. Consider this an in class assignment. Tomorrow, we’ll start making some changes to the weapons functionality.


Download ppt "Sega 500 The UT2K3 Gunsmith Jeff “Ezeikeil” Giles"

Similar presentations


Ads by Google