Tuesday, October 27, 2009

Custom Weapon in UnReal: Part 1

This tutorial is slightly tougher than Custom Characters as it involves hacking into scripts and compiling it (some pretty scary stuff for artists). So you've decided you want to mod a weapon. This tute is will only show you how to change the "skin" of the weapon and to have some customised animations. If you are looking for a very customised weapon with very specific projectile behaviour and weapon damage, this could be a starting point but definately not comprehensive enough.

First, decide what weapon you want to replace its skin with. Here, I chose the RocketLauncher because that's the weapon that comes with the IronGuard mesh.

Note that there is a first person(1P) and a third person(3P) version of the guns; the 3P version being lower in poly count.

Go into UnReal Editor and open up the package that contains the gun you wish to mod. Examine it right down to the Socket Manager (observe how many sockets and the name(s)) as well as the way the weapon parts are linked.

To keep things simple, I will be using just the 3P version to be implemented in the 1P and 3P weapons. Notice the MuzzleFlashSocket is only one in this case.

Go to UDN UT3ModHome to download the script source files.



The scripts required are these ones. Copy these files and place them into your UTGame/Src/NameOfYourWeapon/Classes. Rename the files to your WeaponName. Here, I copied and changed it to SmileyGun.

In your Config directory, look for the UTEditor.ini and add a modpackage called NameofYourGun. Note that this corresponds with the UTGame/Src/SmileyGun directory that you created.

Open up your weapon in max. Note the green "pyramids". Those will act as your bones once you skin the weapon. YES. You need to skin the weapon like you skin the character but eveything's rigid in this case. I will do another tutorial on how to skin the gun if anyone is interested. Please request for it if so.

The selected "pyramid" is the root bone of the weapon. When I exported it, it wasn't spinning centrally so my guess was to...

Move the gun away from the grid center before exporting in ActorX. Not sure it that did the trick coz I'm writing this tute based on memory as I screencaptured these pics quite awhile ago.

Do a series of animations and export it out in ActorX.

Refer to this text file to see if you can make any sense out of what I wrote.

In Part 2, we will examine how weapons are configured within UnReal Editor.

2 comments:

Anonymous said...

We Love Kevin !!

Anonymous said...

not really i feel weird

Post a Comment