Now that you know the basics for making cool weapons, you will probably want to make your weapon actually look cool, with cool weapon models and explosion effects. Here are the basics for changing the look of your weapon.
Models and animationsThe first thing you can change is the model of your projectile (and launcher, if there is one). For every weapon, including melee and a few utilities, you will always have:
- Code:
-
<PayloadGraphicsResourceID>Bazooka.Payload</PayloadGraphicsResourceID>
<Payload2ndGraphicsResourceID></Payload2ndGraphicsResourceID>
...
<WeaponGraphicsResourceID>Bazooka.Weapon</WeaponGraphicsResourceID>
PayloadGraphicsResourceID is the model of the projectile, while WeaponGraphicsResourceID is the model of the weapon itself. For weapons such as grenade, cluster bomb, dynamite, etc..., WeaponGraphicsResourceID has usually the same value as PayloadGraphicsResourceID (except the Grenade, which has two different model names for some unknown reason).
The model names are pre-defined identifiers. If you enter an invalid model name, the game will crash as soon as it is attempted to be drawn.
Click here for the complete list of available model namesPayload2ndGraphicsResourceID is only used for the Inflatable Scouser because it needs a second model for its "inflated" state.
Now, maybe you will need to change the animations as well.
Here are the properties used to control animations on the projectile:
- Code:
-
<AnimTravel></AnimTravel>
<AnimSmallJump></AnimSmallJump>
<AnimBigJump></AnimBigJump>
<AnimArm></AnimArm>
<AnimSplashdown></AnimSplashdown>
<AnimSink></AnimSink>
<AnimIntermediate></AnimIntermediate>
<AnimImpact></AnimImpact>
AnimTravel is the default animation used when the weapon doesn't do anything specific.
AnimSmallJump and AnimBigJump are used for the sheep, when it jumps.
AnimArm is the animation played when the weapon is armed (Mine).
AnimSplashdown is played when the weapon touches water, and AnimSink is played when the weapon is sinking.
AnimIntermediate is only used for the Old Woman, when she collides with another worm, and steals something from his inventory.
AnimImpact is only used for the Poison Arrow, when it hits land.
Those properties accept a string value, which is an animation identifier. There is currently no reliable way to get the complete list of animations for each model, so you will have to look for them in the code of other weapons. If a wrong identifier is entered, no animation will be played.
And finally, the worm animations which define how the worm holds the weapon, how he aims it, etc...
- Code:
-
<WXAnimDraw>DrawBazooka</WXAnimDraw>
<WXAnimAim>AimBazooka</WXAnimAim>
<WXAnimFire>FireBazooka</WXAnimFire>
<WXAnimHolding>HoldBazooka</WXAnimHolding>
<WXAnimEndFire></WXAnimEndFire>
<WXAnimTaunt>TauntBazooka</WXAnimTaunt>
<WXAnimTargetSelected></WXAnimTargetSelected>
WXAnimDraw is played when the worm takes the weapon out, WXAnimAim is the animation while the worm is aiming the weapon at different angles, WXAnimFire is played when he fires the weapon, WXAnimHolding is the animation while the worm is holding the weapon, WXAnimEndFire is played after the weapon is fired, WXAnimTaunt is played when you press the Taunt key (T), and finally, WXAnimTargetSelected is played when you have selected a target (Homing Missile).
Those properties are string values as well, with an animation identifier. Just like the projectile animations, there is not reliable way for getting the complete list of identifiers, you should just read the code of other weapons, and get them.
It seems that those animations can't be changed for the Grenade, the Cluster Bomb, the Gas Canister, the Banana Bomb, and the Holy Hand Grenade.
EffectsNow, if you want to go a little further, you can change the particle effects of your weapons (smoke trail, explosion, etc...). There are a few properties for controlling particle effects:
- Code:
-
<FxLocator>bazookarocket</FxLocator>
<ArielFx>WXP_BazookaTrailPack</ArielFx>
<DetonationFx>WXP_ExplosionX_Med</DetonationFx>
...
<ExpiryFx></ExpiryFx>
<SplashFx>WXP_WaterSplash</SplashFx>
<SplishFx>WXP_WaterSmallSplash</SplishFx>
<SinkingFx>WXP_UnderWaterBubbles</SinkingFx>
<BounceFx></BounceFx>
<StopFxAtRest>true</StopFxAtRest>
...
<HoldParticleFX></HoldParticleFX>
FxLocator indicates to the projectile where to create the particle effect. Like animations, locators are specific to each model, and some models may have no locator, and are unable to display trail effects. If a bad locator name, or no locator is given, the effect given in ArielFx will not be displayed at all.
ArielFx is the particle emitter attached to the projectile, thus making a trail effect when it moves. It needs FxLocator to be set in order to be displayed. This property should be given a particle effect identifier. You can find the complete list of particle effects in PartTwk.xml (they all begin with WXP).
DetonationFx is the effect created when the projectile explodes.
ExpiryFx is the effect created when the projectile expires, but does not explode. The particle generated by a few effects can make the worms near them poisoned or hurt them, so if you copy the explosion effect from the Poison Arrow or the Gas Canister, you can easily create poisoning weapons.
SplashFx and SplishFx and the effects created when the particle hits water.
SinkingFx is the effect attached to the particle when it sinks (usually, bubbles)
BounceFx is the effect created each time the particle collides and bounces on something.
StopFxAtRest should be true if you want ArielFx to stop when the projectile doesn't move anymore.
Finally, HoldParticleFX is the effect you can see when your worm is holding the weapon.
A few unused properties may be useful for creating interesting effects as well, but they have never been used because they couldn't be get to work, or because they are too limited.
- Code:
-
<TrailBitmap></TrailBitmap>
<TrailLocator1></TrailLocator1>
<TrailLocator2></TrailLocator2>
<TrailLength>0</TrailLength>
<AttachedMesh>Bazooka.Flames</AttachedMesh>
<AttachedMeshScale>1</AttachedMeshScale>
AttachedMesh is the model attached to the projectile, you can modify its size by changing AttachedMeshScale. It is actually pretty easy to use, but looks too limited (no position offset, etc...) to be of any use other than the bazooka.
We still don't know how the 4 other properties work, if you manage to get something interesting with them, don't forget to tell us about it!
SoundsYou can easily add sound effects to your weapons using the following properties. Remember not to confuse Fx (particle effect) with Sfx (sound effect).
- Code:
-
<DetonationSfx>ExplosionRegular</DetonationSfx>
...
<BounceSfx></BounceSfx>
<PreDetonationSfx></PreDetonationSfx>
<ArmSfx1Shot></ArmSfx1Shot>
<ArmSfxLoop></ArmSfxLoop>
<LaunchSfx>RocketRelease</LaunchSfx>
<LoopSfx>BombWhistle</LoopSfx>
<BigJumpSfx></BigJumpSfx>
<WalkSfx></WalkSfx>
DetonationSfx is obviously the sound played when the weapon explodes.
BounceSfx can be heard when the weapon bounces, PreDetonationSfx is played before the weapon explodes (like the Hallelujah from the Holy Hand Grenade).
Not sure about this one, but ArmSfx1Shot seems to be the sound played once, when the weapon is armed. Used only on the Inflatable Scouser. ArmSfxLoop starts when the weapon is armed (Mine), LaunchSfx is played when the projectile is launched, and LoopSfx is the sound looped as long as the projectile exists. BigJumpSfx is used for sheeps, and is played when the sheep jumps. WalkSfx is played when the sheep walks.
A few properties are specific to the Super Sheep and the Starburst:
- Code:
-
<FlyingLaunchSfx></FlyingLaunchSfx>
<FlyingLoopSfx></FlyingLoopSfx>
FlyingLaunchSfx is played when the projectile starts flying, and FlyingLoopSfx is looped while the projectile is flying.
Those properties should receive a sound identifier.
Click here for the list of available sound identifiersEnd. Now you should know the essentials for making simple weapons. The next chapters will be all about examples and tricks, you can either read them, or directly start learning more advanced stuff, such as
Particle Tweaking if you want to create your own fire, laser, or just harmless, nice and impressive effects.