Snake's Tutorial on editing weapon .odf's, ord's and animations

Started by Snake, April 02, 2010, 02:45:17 PM

Previous topic - Next topic
Well AG gave me the idea of making a Weapon Editing Tutorial. Since I'm really bored and doomed to bad luck on my maps and mods I decided, what the heck, why not? So here it goes. This is COMPLETELY by me  8).

Today I will be using a Republic Rifle .odf and ord files to demonstrate.

First the .ODF file of a rifle:

[WeaponClass]
ClassLabel       = "cannon"

[Properties]
AnimationBank      = "rifle"
GeometryName       = "rep_weap_inf_rifle"
HighResGeometry     = "rep_1st_weap_inf_rifle"

This is about the same as the character .odf except as you can see it has [WeaponClass] instead of [GameObjectClass]. Now the ClassLabel for this is "cannon". This is so it shoots instead of being thrown or sliced with. The AnimationBank is the animation of how a character holds it and what happens when it shoots. Since it has "rifle" it will be a two-handed grip and the arms will move slightly when shot (Which gives the appearance of recoil). GeometryName is ofcourse the geometry of the weapon. It never adds the .msh extension on the end. So instead of rep_weap_inf_rifle.msh its rep_weap_inf_rifle. The HighRes is for 1st person. This can have a separate model or it can simply be the main geometry.

//***********************************************
//*********** WEAPON PERFORMANCE VALUES *********
//***********************************************

RoundsPerClip     = "60"
ReloadTime        = "1.5"
ShotDelay         = "0.2"
TriggerSingle     = "0"

SalvoCount        = "1"
SalvoDelay        = "0.0"
InitialSalvoDelay = "0.0"
SalvoTime         = "0.0"

OrdnanceName      = "rep_weap_inf_rifle_ord"
FirePointName     = "hp_fire"

Next we have the values. As you can see, pandemic was kind enough to explain what these are about (Top). RoundPerClip hopefully is not hard to figure out, It is how many round per clip the gun has. ReloadTime just put a space in between those words and you got the meaning. For those of you who are extremely slow: The ReloadTime is how long it takes the weapon to be reloaded after it uses a clip.  ShotDelay is...The shot delay. Not many other ways I can put it. It helps determine how much time is in between shots. So if you're looking for a crazy fast machine gun you would want this at 0. TriggerSingle is if you have to push the button once or if you can hold it down. If you put this at 0 you can simply hold the mouse button down and it will shoot until it runs out of ammo. If you put this at 1 you will have to press over and over for it to shoot (Like a pistol). SalvoCount is how many shots are fired when you press once. SalvoDelay is how much time is in between those shots. InitialSalvoDelay and SalvoTime are basically the same thing. OrdnanceName **This Is Very Important** This is what tells the game what Ordnance this weapon uses. We will see just how important that is later. FirePointName is where the shot comes from. hp_fire would be the end of the barrel.

//***********************************************
//***********  HUD & CONTROLLER VALUES  *********
//***********************************************

IconTexture       = "IMP_blasterrifle_icon"
ModeTexture       = "HUD_weap_fullauto"
ReticuleTexture   = "reticule_rifle"
ScopeTexture   = "weapon_scope2"

MuzzleFlash         = "small_muzzle_flash"
FlashColor          = "80 80 255 255"
FlashLength         = "0.025"
FlashLightColor    = "220 220 255 175"
FlashLightRadius    = "2.0"
FlashLightDuration    = "0.25"
Discharge           = "small_smoke_effect"

RecoilLengthLight       = "0.1"
RecoilLengthHeavy       = "0.1"
RecoilStrengthLight     = "1.0"
RecoilStrengthHeavy     = "0.2"
RecoilDecayLight   = "0.0"
RecoilDecayHeavy   = "0.0"

Hopefully most of this is self-explained by now, So I will jump to ReticuleTexture. ReticuleTexture is (For those of you who don't know what a reticule is) what the aimer thingy in front of your gun in-game looks like. So it could look like this:

Or this:

Or you could make your own or use another weapons. This is the same for ScopeTexture except it is what the scope looks like.
MuzzleFlash         = "small_muzzle_flash"
FlashColor          = "80 80 255 255"
FlashLength         = "0.025"
FlashLightColor    = "220 220 255 175"
FlashLightRadius    = "2.0"
FlashLightDuration    = "0.25"
Discharge           = "small_smoke_effect"
This stuff is all about the colors and effects of when a laser is shot out of the barrel.
Everything with Recoil at the beginning has to do with the Recoil. You don't want this high or when you shoot you will get your gun shot up above you. Especially on a weapon with a triggersingle of 0.

//******************************************************
//***************   SOUND      ****************
//******************************************************

FireSound          = "rep_weap_inf_rifle_fire"
ReloadSound        = "rep_weap_inf_reload_med"
ChangeModeSound    = "rep_weap_inf_equip_med"
FireEmptySound      = "com_weap_inf_ammo_empty"
WeaponChangeSound    = "rep_weap_inf_equip_med"
ClankLeftWalkSound  = ""
ClankRightWalkSound = ""
ClankLeftRunSound   = ""
ClankRightRunSound  = ""
JumpSound           = "rep_weap_inf_rifle_mvt_jump"
LandSound           = "rep_weap_inf_rifle_mvt_land"
RollSound           = "rep_weap_inf_rifle_mvt_roll"
ProneSound          = "rep_weap_inf_rifle_mvt_squat"
SquatSound          = "rep_weap_inf_rifle_mvt_lie"
StandSound          = "rep_weap_inf_rifle_mvt_getup"

This stuff has to do with the sounds the weapon makes. Like clanks, crashs, bumps.

Now we will talk about the ord file of the republic rifle. First I want to clarify what the ord file is. It is completely made for what kind of ammo the weapon has. It shows the texture of the laser, the brightness, the color, all that good stuff. Also has some effects. For big booms when they hit you would use an exp file (rep_weap_inf_torpedo_launcher_exp.odf). We will not go over that now.

So here's what the start of the ord file looks like:

[OrdnanceClass]
ClassLabel       = "bolt"

As you can see "ord" stands for Ordnance. In the dictionary, for those of you who don't know, means:
1.
cannon or artillery.
2.
military weapons with their equipment, ammunition, etc.

Well what do ya know! It means AMMO. So what we are looking at here is the ammo of the republic rifle. That brings me to the ClassLabel. It has "bolt" at the end. So that means that when this rifle is shot, it shoots out a bolt. See how that works? So now on to the next part.

[Properties]
ImpactEffectWater    = "watersplash_ord"

Now again wit the Properties. What does that mean? That means this part is really important. ImpactEffectWater is....The effect that happens when you shoot at water. Why this is at the top of the list, the world may never know.

LaserTexture      = "bluelaser_d"
LaserGlowColor      = "92 136 250 100"
LightColor              = "92 136 250 100"
LightRadius             = "4.0"

This is what you can do with these:

Now, as I was telling you about the texture of the laser. LaserTexture is just that. This is a .tga file located in the shipped common effects. LaserGlowColor is the glow color of the laser. You could change these effectively by going in some kind of paint program and dragging your mouse over the colors to see the numbers that come up. LightColor is the color of the light that shines when the laser passes near an object. The LightRadius is how close that laser has to get for that to happen.

LaserLength      = "1.0"
LaserWidth      = "0.1"
GlowLength      = "3"
BlurLength      = "5"

This is more stuff about the laser. Hopefully it's self-explanatory enough that I don't have to tell you what it does.


ImpactEffectSoft   = "ord_explosion"
ImpactEffectRigid   = "ord_explosion"
ImpactEffectStatic   = "ord_explosion"
ImpactEffectTerrain   = "ord_explosion"
ImpactEffectWater    = "watersplash_ord"
ImpactEffectShield   = "ord_explosion"

These are pretty important. These are the effects that happen when you shoot a certain surface. So ImpactEffectRigid for example would probably mean a wall or building. ImpactEffectShield would be like a droideka shield.

ExpireEffect      = "ord_explosion"

LifeSpan          = "0.8"
Velocity       = "150.0"
Gravity         = "1.0"
Rebound         = "0.0"

ExpireEffect I believe is the general explosion that happens. I could use some input on this since I have never tested with it. LifeSpan is how long it goes before it simply disappears. Velocity Is how fast the laser goes. This is fun to mess with but make sure you don't use it on something like a sniper without changing some settings or you won't be able to shoot. Gravity is how fast it falls. If you put it at 0 it won't fall at all. Rebound is like a grenade. If you put this at 100000 it would probably be a never ending bouncy bullet until it hit someone.

OrdnanceSound      = "com_weap_inf_ord_hum_lg"
CollisionSound = "imp_weap_ord_exp"

MaxDamage       = "50.0"
VehicleScale      = "0.0"
ShieldScale      = "1.0"
PersonScale      = "1.0"
DroidScale      = "1.0"
BuildingScale      = "0.1"

Ordnance and CollisionSound are what it sounds like when its being shot or when it hits something. MaxDamage is the maximum damage the weapon could have. VehicleScale is how effective this is against a vehicle(like a missile launcher). ShieldScale is how effective this weapon is against a shield like a droideka shield. PersonScale is how effective this weapon is against something like a clone or a rebel. DroidScale is how effective this weapon is against something like a battle droid. And BuildingScale is how effective this weapon is against an armed building (A building that can be destroyed).

Well that's all for the .odf and ord files. Now it is time for animations.

There are basically 4 major types of weapon animation. There's rifle:

There's grenade:

There's basooka:

Then there's lightsabre(Yes I spelled it right):


Each one is special and is used in different ways.

Well I hope this helped some. It took me a good while to write all this. I may add more in the future. I'd appreciate input and suggestions.
=AaTc= Forever

SALLY....

-Retired Modder

I would like add what I learned last night. I found a mesh option file that has inside it -scale 0.75. I use that instead of the regular weapon option mesh file. The idea big gun size for me was 1.75 and 1.50. Have fun trying that to make a gun bigger or smaller.


Couple of questions, I tried to make a melea using the grenade animation but for some reason it used an underhand swing and for the life of me figure out why. The second question is, how do you make a flame thrower? I've seen them in alot of mods but every time I try to make one the flames float in the air and never disapear or they don't show up at all. Third question is regarding custom models. I've tried using a couple of fan made weapon models but they won't show up in game. the weird thing is that when I follow the same steps with a LA made weapon (IE giving the republic troops the rebel rifle) it works fine.

About the melee: I'm not sure... I have seen that alot but I have never heard of a way to solve it. Flame thrower: You have give the effects a flame. You add Gravity to it so it wont float as bad. And maybe try changing the LifeSpan and/or FadeOutTime to 0. I do not know how to model so unfortunately I cannot help. There are neverending complications with modeling. It could be about anything.
=AaTc= Forever

SALLY....

-Retired Modder

Animation is so cool. Imagine super battledroid animation fire with a bazooka in hand. He is holding the gun in air holding upward and when shoot happens its just like a super battledroid. So cool. And the head movements are also nice.

You forgot to list the pistol animation
There is no 'ctrl' button on Chuck Norris's computer. Chuck Norris is always in control.

Yes I noticed that.  :P I've been too lazy to add it though.
=AaTc= Forever

SALLY....

-Retired Modder

So far you've done an awesome job with the tutorials. :D


#TYBG

Thanks ag, I was thinking of doing effects next. Like changing out effects and making cool stuff. Like with my Snake's Mania Mod coming out.
=AaTc= Forever

SALLY....

-Retired Modder

Quote from: Snake on April 02, 2010, 02:45:17 PM
There are basically 4 major types of weapon animation.
Correct, four basic types but for some crazier animations.

Force
AnimationBank      = "lightsabre"
GeometryName       = ""
HighResGeometry                    = ""

regular information between

OrdnanceName       = "rep_weap_inf_pistol_ord"
FireAnim                                   = "2"
FirePointName      = "hp_fire_2"

or

AnimationBank      = "sbdroid"
GeometryName       = "cis_weap_inf_launcher"
HighResGeometry                    = ""

regular information between

OrdnanceName       = "cis_weap_inf_pistol_ord"
FirePointName      = "hp_fire"

But, did you guys already know this?

Lol cool mike, i have not tested with that.
=AaTc= Forever

SALLY....

-Retired Modder


EDITED by Buckler:  Please don't quote such a long post, and don't bump such an old topic without something more to contribute


i think this would really help, i just need some help with the skinning, add me my xfire is wusisoul