How to Tweak
+3
Gene42
TheAndrey
Dzani
7 posters
Worms 4 and Ultimate Mayhem tweaking mods :: 3D PC games // Tweaking that we major in :: Worms 4 mayhem :: Tweaking Tutorials
Page 1 of 1
How to Tweak
Make sure you read What is Tweaking before accessing here.
WeaponTweak.xml - Weapon Tweaking Tutoriall
Weapon tweaking is probably one of the easiest thing (along with Local tweaking) you can start with, though, unlike Local.xml tweaks, you can do extremely advanced weapons when your skills get better.
Let's start!
The most basic thing you can do in tweaks is changing values. Changing more and more values, until you get something that looks like what you wanted.
Where to get those values? Open WeapTwk.xml with a text editor, and scroll down to this part:
Code:
Pick any weapon you want in this list. For this example, we will choose kWeaponBazooka, which is possibly one of the most simple weapons.
Use the search function of your text editor (you can usually activate it by pressing Ctrl+F) to search the word "kWeaponBazooka". Search until you get to this part:
Code:
The interesting part is between <PayloadWeaponPropertiesContainer id='kWeaponBazooka-0'> and the next </PayloadWeaponPropertiesContainer>
This part is pretty easy to understand even though you have absolutely no knowledge of programming at all. Each property is enclosed between two tags:
Code:
You want to change the value, never change the name, or it will make the game crash in most cases!
Sometimes, you may encounter this:
Code:
This means that the property has no value. Actually, the two following lines have the same meaning:
Code:
Got it? Well, now it's time to have some fun with the easiest properties.
Simple properties
Damage
The easiest thing most people want to do when learning this is changing the damage caused by the weapon. Go for it, then. Look for this part in your weapon:
Code:
WormDamageMagnitude is the maximum amount of damage inflicted by the weapon, ImpulseMagnitude is the blast power of the explosion (how far the worms are sent), WormDamageRadius and ImpulseRadius are respectively the radiuses within which worms can get damage, and can be moved by the explosion. LandDamageRadius is the radius of the hole made by the explosion, and ImpulseOffset is the vertical offset of the explosion (a positive value will make the explosion higher than the impact location, a negative value will make it lower). It is usually negative, so worms can still be sent into the air even when they are hit in the head.
Size
Maybe you want to make it bigger too.
Code:
Just change the value of Scale to make it look bigger. If you want the collision radius to be bigger as well, you should change Radius as well.
Actually, Scale is how big the model is drawn in game, and Radius is the radius of the collision sphere, or to make it simple, how big it is considered by the game engine. There is no perfect Scale/Radius ratio, it depends on the 3D model you are using for your weapon. Just try different values until you have correct results (projectile not clipping with land or floating above the ground).
Speed and angles
You can also change a few minor parameters, such as how far you can launch the bazooka, and at which angles.
Code:
Code:
Code:
You may wonder what "true" and "false" mean. Those are called "boolean values", they can have only two values : true (yes) or false (no). Each property has its own type of value. You can't give a boolean value to a numerical property, and you can't give a number to a boolean property.
If IsPoweredWeapon is true, then you will be able to charge your shot, the more it is charged, the more your projectile will go fast. In this case, BasePower is the minimum velocity of the projectile, and MaxPower is the maximum velocity, when you perform a fully charged shot.
When this property is false, you can't charge your shot, and the velocity of the projectile is fixed to BasePower. In this case, you don't need to set MaxPower.
MinAimAngle and MaxAimAngle are respectively the minimum aim angle, and the maximum aim angle (what were you expecting, seriously?), in radians.
An easy way to remember how to quickly convert radians into degrees is 3.14 rad = 180°. Thus, 6.28 rad = 360°, 1.57 rad = 90°, 0.785 = 45°, etc...
Here, the bazooka can be aimed at a total of 180°. If you want it not to be aimed down, just set MinAimAngle to 0. Or if you want to be do something pointless and give it the ability to aim at 360°, set MinAimAngle to -3.14, and MaxAimAngle to 3.14. You will be able to see yourself upside down if you aim completely up, or completely down.
Wind and gravity
Finally, you can modify it so it is neither affected by wind, nor by gravity. Thus, it will go straight forward.
Code:
Well, just set both values to false, and you get a bazooka shell that goes straight forward.
You should set IsPoweredWeapon to false, and put a higher value to BasePower so the bazooka isn't too slow.
That's all for now, you will learn more advanced properties in the next chapters. Good luck and have fun!
Clusters
The way clusters are defined in Worms 4: Mayhem is mainly what makes tweaking so powerful. With it, you can simulate nearly anything you want, from simple clusters to nice fireworks effects, the "explosive bounciness" effect from the 2D Worms series, or even fire and earthquakes with more experience.
Basic explanation
For this explanation, we will use kWeaponClusterGrenade, which is the weapon data for the Cluster Bomb. Search "kWeaponClusterGrenade" until you get to this part:
Code:
Scroll down until you get to this:
Code:
This is probably pretty easy to understand, NumBomblets is the number of clusters, BombletMaxConeAngle is the maximum angle (in radians, remember) within which the clusters will spread, BombletMaxSpeed and BombletMinSpeed are respectively the maximum and minimum velocity they can get.
The most interesting property is BombletWeaponName. Scroll up until you get to this (and don't get confused between kWeaponClusterGrenade and kWeaponClusterBomb!)
Code:
This is the weapon data for the clusters of the Cluster Bomb.
Looks like a weapon, just like kWeaponBazooka or kWeaponClusterGrenade. Because it is a weapon. It does not appear in the inventory, but it is a weapon anyway, and this is the reason why tweaking is so powerful. Because you can create as many weapons as you want in WeapTwk.xml, which can't be added into the inventory, but can still be used as clusters. Any weapon can be used as a cluster of another weapon.
For instance, go back to kWeaponClusterGrenade, and set its BombletWeaponName to kWeaponHolyGrenade. Run the game, and enjoy!
Any weapon can be used as a cluster, and you can even make a weapon cluster into itself (in this case, setting BombletWeaponName to kWeaponClusterGrenade).
The only limitation is that you can't set melee weapons as clusters (you don't want to do that anyway), same for guns (shotgun, sniper rifle) and sentry guns. Animals will lose their walking or flying ability, and homing missiles will lose their homing ability.
Now for more advanced stuff.
Creating clusters
You need some knowledge about how XML object models work. If you haven't read the tutorial about Understanding XOM, try to read it. If you can hardly understand anything, here is a simpler explanation of what you need.
Each weapon must have the following structure:
1: A declaration in the XDatabank, near the beginning of the file:
Code:
-----> Declaration goes here
<ColorResources href='Payload.FuseTimerInitialColor'/>
Let's say you want to call your cluster kWeaponMyCluster. The declaration will be:
Code:
Pretty simple, isn't it? This declaration is necessary so the game loads the actual cluster.
kWeapon is a naming convention, you don't have to add it to the name of your weapon, but it is recommended anyway for practical reasons.
2: A XContainerResourceDetails block. You can put it wherever you want but it is recommended to insert it near the end of the file, before </xomObjects> so you can find it again later.
Code:
---> XContainerResourceDetails block goes here
</xomObjects>
</xomArchive>
The actual structure of a XContainerResourceDetails block is:
Code:
Just replace NAME by the name of your weapon, kWeaponMyCluster for this example. The property Flags should never be changed. Don't forget to add "-0" to the name in the Value tag.
3: A PayloadWeaponPropertiesContainer, right after your XContainerResourceDetails block. Its structure should be:
Code:
Instead of writing the XContainerResourceDetails and the PayloadWeaponPropertiesContainer, you can copy them from any payload weapon (Bazooka, Grenade, Cluster Bomb, etc...) and just change the names, and the properties you want.
And there you go, you have created your own cluster and you can use it in any weapon by setting its BombletWeaponName to the name of your cluster (kWeaponMyCluster).
GRAPHICS AND SOUNDS
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 animations
The 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 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 complete list of available model names
Payload2ndGraphicsResourceID 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 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 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.
Effects
Now, 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 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:
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!
Sounds
You 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 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 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 identifiers
https://worms4mayhem.forumotion.com/Sound-h3.htm
End. 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.
Written by _kilburn
WeaponTweak.xml - Weapon Tweaking Tutoriall
Weapon tweaking is probably one of the easiest thing (along with Local tweaking) you can start with, though, unlike Local.xml tweaks, you can do extremely advanced weapons when your skills get better.
Let's start!
The most basic thing you can do in tweaks is changing values. Changing more and more values, until you get something that looks like what you wanted.
Where to get those values? Open WeapTwk.xml with a text editor, and scroll down to this part:
Code:
<ContainerResources href='kWeaponAirstrike'/>
<ContainerResources href='kWeaponAlienAbduction'/>
<ContainerResources href='kWeaponBananaBomb'/>
<ContainerResources href='kWeaponBananette'/>
<ContainerResources href='kWeaponBaseballBat'/>
<ContainerResources href='kWeaponBazooka'/>
<ContainerResources href='kWeaponClusterBomb'/>
<ContainerResources href='kWeaponClusterGrenade'/>
<ContainerResources href='kWeaponConcreteDonkey'/>
<ContainerResources href='kWeaponDynamite'/>
...
Pick any weapon you want in this list. For this example, we will choose kWeaponBazooka, which is possibly one of the most simple weapons.
Use the search function of your text editor (you can usually activate it by pressing Ctrl+F) to search the word "kWeaponBazooka". Search until you get to this part:
Code:
<XContainerResourceDetails id='kWeaponBazooka'>
<Value href='kWeaponBazooka-0'/>
<Name>kWeaponBazooka</Name>
<Flags>81</Flags>
</XContainerResourceDetails>
<PayloadWeaponPropertiesContainer id='kWeaponBazooka-0'>
<IsAimedWeapon>true</IsAimedWeapon>
<IsPoweredWeapon>true</IsPoweredWeapon>
<IsTargetingWeapon>false</IsTargetingWeapon>
<IsControlledBomber>false</IsControlledBomber>
<IsBomberWeapon>false</IsBomberWeapon>
<IsDirectionalWeapon>true</IsDirectionalWeapon>
...
</PayloadWeaponPropertiesContainer>
The interesting part is between <PayloadWeaponPropertiesContainer id='kWeaponBazooka-0'> and the next </PayloadWeaponPropertiesContainer>
This part is pretty easy to understand even though you have absolutely no knowledge of programming at all. Each property is enclosed between two tags:
Code:
<Name>Value</Name>
You want to change the value, never change the name, or it will make the game crash in most cases!
Sometimes, you may encounter this:
Code:
<Name />
This means that the property has no value. Actually, the two following lines have the same meaning:
Code:
<Name />
<Name></Name>
Got it? Well, now it's time to have some fun with the easiest properties.
Simple properties
Damage
The easiest thing most people want to do when learning this is changing the damage caused by the weapon. Go for it, then. Look for this part in your weapon:
Code:
<WormDamageMagnitude>50</WormDamageMagnitude>
<ImpulseMagnitude>0.29</ImpulseMagnitude>
<WormDamageRadius>72</WormDamageRadius>
<LandDamageRadius>52</LandDamageRadius>
<ImpulseRadius>110</ImpulseRadius>
<ImpulseOffset>-45</ImpulseOffset>
WormDamageMagnitude is the maximum amount of damage inflicted by the weapon, ImpulseMagnitude is the blast power of the explosion (how far the worms are sent), WormDamageRadius and ImpulseRadius are respectively the radiuses within which worms can get damage, and can be moved by the explosion. LandDamageRadius is the radius of the hole made by the explosion, and ImpulseOffset is the vertical offset of the explosion (a positive value will make the explosion higher than the impact location, a negative value will make it lower). It is usually negative, so worms can still be sent into the air even when they are hit in the head.
Size
Maybe you want to make it bigger too.
Code:
<Scale>1</Scale>
<Radius>5</Radius>
Just change the value of Scale to make it look bigger. If you want the collision radius to be bigger as well, you should change Radius as well.
Actually, Scale is how big the model is drawn in game, and Radius is the radius of the collision sphere, or to make it simple, how big it is considered by the game engine. There is no perfect Scale/Radius ratio, it depends on the 3D model you are using for your weapon. Just try different values until you have correct results (projectile not clipping with land or floating above the ground).
Speed and angles
You can also change a few minor parameters, such as how far you can launch the bazooka, and at which angles.
Code:
<IsPoweredWeapon>true</IsPoweredWeapon>
Code:
<BasePower>0.125</BasePower>
<MaxPower>0.475</MaxPower>
Code:
<MinAimAngle>-1.57</MinAimAngle>
<MaxAimAngle>1.57</MaxAimAngle>
You may wonder what "true" and "false" mean. Those are called "boolean values", they can have only two values : true (yes) or false (no). Each property has its own type of value. You can't give a boolean value to a numerical property, and you can't give a number to a boolean property.
If IsPoweredWeapon is true, then you will be able to charge your shot, the more it is charged, the more your projectile will go fast. In this case, BasePower is the minimum velocity of the projectile, and MaxPower is the maximum velocity, when you perform a fully charged shot.
When this property is false, you can't charge your shot, and the velocity of the projectile is fixed to BasePower. In this case, you don't need to set MaxPower.
MinAimAngle and MaxAimAngle are respectively the minimum aim angle, and the maximum aim angle (what were you expecting, seriously?), in radians.
An easy way to remember how to quickly convert radians into degrees is 3.14 rad = 180°. Thus, 6.28 rad = 360°, 1.57 rad = 90°, 0.785 = 45°, etc...
Here, the bazooka can be aimed at a total of 180°. If you want it not to be aimed down, just set MinAimAngle to 0. Or if you want to be do something pointless and give it the ability to aim at 360°, set MinAimAngle to -3.14, and MaxAimAngle to 3.14. You will be able to see yourself upside down if you aim completely up, or completely down.
Wind and gravity
Finally, you can modify it so it is neither affected by wind, nor by gravity. Thus, it will go straight forward.
Code:
<IsAffectedByGravity>true</IsAffectedByGravity>
<IsAffectedByWind>true</IsAffectedByWind>
Well, just set both values to false, and you get a bazooka shell that goes straight forward.
You should set IsPoweredWeapon to false, and put a higher value to BasePower so the bazooka isn't too slow.
That's all for now, you will learn more advanced properties in the next chapters. Good luck and have fun!
Clusters
The way clusters are defined in Worms 4: Mayhem is mainly what makes tweaking so powerful. With it, you can simulate nearly anything you want, from simple clusters to nice fireworks effects, the "explosive bounciness" effect from the 2D Worms series, or even fire and earthquakes with more experience.
Basic explanation
For this explanation, we will use kWeaponClusterGrenade, which is the weapon data for the Cluster Bomb. Search "kWeaponClusterGrenade" until you get to this part:
Code:
<XContainerResourceDetails id='kWeaponClusterGrenade'>
<Value href='kWeaponClusterGrenade-0'/>
<Name>kWeaponClusterGrenade</Name>
<Flags>81</Flags>
</XContainerResourceDetails>
<PayloadWeaponPropertiesContainer id='kWeaponClusterGrenade-0'>
<IsAimedWeapon>true</IsAimedWeapon>
<IsPoweredWeapon>true</IsPoweredWeapon>
<IsTargetingWeapon>false</IsTargetingWeapon>
<IsControlledBomber>false</IsControlledBomber>
<IsBomberWeapon>false</IsBomberWeapon>
<IsDirectionalWeapon>true</IsDirectionalWeapon>
Scroll down until you get to this:
Code:
<NumBomblets>4</NumBomblets>
<BombletMaxConeAngle>0.28</BombletMaxConeAngle>
<BombletMaxSpeed>0.24</BombletMaxSpeed>
<BombletMinSpeed>0.12</BombletMinSpeed>
<BombletWeaponName>kWeaponClusterBomb</BombletWeaponName>
This is probably pretty easy to understand, NumBomblets is the number of clusters, BombletMaxConeAngle is the maximum angle (in radians, remember) within which the clusters will spread, BombletMaxSpeed and BombletMinSpeed are respectively the maximum and minimum velocity they can get.
The most interesting property is BombletWeaponName. Scroll up until you get to this (and don't get confused between kWeaponClusterGrenade and kWeaponClusterBomb!)
Code:
<XContainerResourceDetails id='kWeaponClusterBomb'>
<Value href='kWeaponClusterBomb-0'/>
<Name>kWeaponClusterBomb</Name>
<Flags>81</Flags>
</XContainerResourceDetails>
<PayloadWeaponPropertiesContainer id='kWeaponClusterBomb-0'>
<IsAimedWeapon>false</IsAimedWeapon>
<IsPoweredWeapon>false</IsPoweredWeapon>
<IsTargetingWeapon>false</IsTargetingWeapon>
<IsControlledBomber>false</IsControlledBomber>
<IsBomberWeapon>false</IsBomberWeapon>
<IsDirectionalWeapon>false</IsDirectionalWeapon>
This is the weapon data for the clusters of the Cluster Bomb.
Looks like a weapon, just like kWeaponBazooka or kWeaponClusterGrenade. Because it is a weapon. It does not appear in the inventory, but it is a weapon anyway, and this is the reason why tweaking is so powerful. Because you can create as many weapons as you want in WeapTwk.xml, which can't be added into the inventory, but can still be used as clusters. Any weapon can be used as a cluster of another weapon.
For instance, go back to kWeaponClusterGrenade, and set its BombletWeaponName to kWeaponHolyGrenade. Run the game, and enjoy!
Any weapon can be used as a cluster, and you can even make a weapon cluster into itself (in this case, setting BombletWeaponName to kWeaponClusterGrenade).
The only limitation is that you can't set melee weapons as clusters (you don't want to do that anyway), same for guns (shotgun, sniper rifle) and sentry guns. Animals will lose their walking or flying ability, and homing missiles will lose their homing ability.
Now for more advanced stuff.
Creating clusters
You need some knowledge about how XML object models work. If you haven't read the tutorial about Understanding XOM, try to read it. If you can hardly understand anything, here is a simpler explanation of what you need.
Each weapon must have the following structure:
1: A declaration in the XDatabank, near the beginning of the file:
Code:
...
<ContainerResources href='kWeaponSentryGunPayload'/>
<ContainerResources href='kWeaponSheep'/>
<ContainerResources href='kWeaponShotgun'/>
<ContainerResources href='kWeaponSniperRifle'/>
<ContainerResources href='kWeaponStarburst'/>
<ContainerResources href='kWeaponSuperAirstrike'/>
<ContainerResources href='kWeaponSuperSheep'/>
-----> Declaration goes here
<ColorResources href='Payload.FuseTimerInitialColor'/>
Let's say you want to call your cluster kWeaponMyCluster. The declaration will be:
Code:
<ContainerResources href='kWeaponMyCluster'/>
Pretty simple, isn't it? This declaration is necessary so the game loads the actual cluster.
kWeapon is a naming convention, you don't have to add it to the name of your weapon, but it is recommended anyway for practical reasons.
2: A XContainerResourceDetails block. You can put it wherever you want but it is recommended to insert it near the end of the file, before </xomObjects> so you can find it again later.
Code:
<XColorResourceDetails id='Payload.FuseTimerUrgentColor'>
<Value r='255' g='255' b='255' a='255' />
<Name>Payload.FuseTimerUrgentColor</Name>
<Flags>64</Flags>
</XColorResourceDetails>
---> XContainerResourceDetails block goes here
</xomObjects>
</xomArchive>
The actual structure of a XContainerResourceDetails block is:
Code:
<XContainerResourceDetails id='NAME'>
<Value href='NAME-0'/>
<Name>NAME</Name>
<Flags>81</Flags>
</XContainerResourceDetails>
Just replace NAME by the name of your weapon, kWeaponMyCluster for this example. The property Flags should never be changed. Don't forget to add "-0" to the name in the Value tag.
3: A PayloadWeaponPropertiesContainer, right after your XContainerResourceDetails block. Its structure should be:
Code:
<PayloadWeaponPropertiesContainer id='NAME-0'>
(properties)
</PayloadWeaponPropertiesContainer>
Instead of writing the XContainerResourceDetails and the PayloadWeaponPropertiesContainer, you can copy them from any payload weapon (Bazooka, Grenade, Cluster Bomb, etc...) and just change the names, and the properties you want.
And there you go, you have created your own cluster and you can use it in any weapon by setting its BombletWeaponName to the name of your cluster (kWeaponMyCluster).
GRAPHICS AND SOUNDS
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 animations
The 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 complete list of available model names
Payload2ndGraphicsResourceID 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.
Effects
Now, 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!
Sounds
You 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 identifiers
https://worms4mayhem.forumotion.com/Sound-h3.htm
End. 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.
Written by _kilburn
Re: How to Tweak
i understand this things but i want to change more. I wanna change the smoke launched from weapons.
TheAndrey- Standard Member
- Posts : 2
Activity Points : 2
Reputation : 0
Join date : 2010-09-04
Re: How to Tweak
can some1 help me with this? thx :lol!:
TheAndrey- Standard Member
- Posts : 2
Activity Points : 2
Reputation : 0
Join date : 2010-09-04
Thanks
Thank You, that was very helpful, Im new here and have only done some basic tweaking (thanks to this tutorial )I was wondering if you would put up some more advanced tweaking tutorials though please
Gene42- Standard Member
- Posts : 1
Activity Points : 1
Reputation : 0
Join date : 2010-09-27
Moved Post
Here is a tutorial by me on how to change a few things in the tweak file
And this is how to change some things in the game mode which can be found in the local.xml file.
And this is how to change some things in the game mode which can be found in the local.xml file.
Last edited by Fireworm on Tue Nov 09, 2010 7:56 am; edited 1 time in total
Fireworm- Standard Member
- Posts : 493
Activity Points : 622
Reputation : 88
Join date : 2010-01-27
Age : 29
Re: How to Tweak
aaahhhh.....are there any tutorial about advanced tweak....?
AfterWorm29- Standard Member
- Posts : 17
Activity Points : 19
Reputation : 0
Join date : 2010-10-11
Age : 27
Location : Wondering around the world
Re: How to Tweak
Advance tweaking for which file?AfterWorm29 wrote:aaahhhh.....are there any tutorial about advanced tweak....?
Fireworm- Standard Member
- Posts : 493
Activity Points : 622
Reputation : 88
Join date : 2010-01-27
Age : 29
Re: How to Tweak
Iceworm wrote:Advance tweaking for which file?AfterWorm29 wrote:aaahhhh.....are there any tutorial about advanced tweak....?
weapon and particle effect
AfterWorm29- Standard Member
- Posts : 17
Activity Points : 19
Reputation : 0
Join date : 2010-10-11
Age : 27
Location : Wondering around the world
Re: How to Tweak
At the time I made those video, I almost decided to make a WeapTwk tutorial. Maybe when I get back into playing it I will make a video on it. And maybe PartTwk as well, but I have the least knowledge on PartTwk-ing, even though I have done it before. Sometimes I was interested in _Kilburn's weapons, so I compared it with the normal files to see how he did some of the stuff. After leaning the basics, most of the stuff after that I learned myself.
Fireworm- Standard Member
- Posts : 493
Activity Points : 622
Reputation : 88
Join date : 2010-01-27
Age : 29
Re: How to Tweak
hhhm.... speaking about _kilburn i love his tweak but its is very hard to understand need to do something like him :bounce: :bounce:
AfterWorm29- Standard Member
- Posts : 17
Activity Points : 19
Reputation : 0
Join date : 2010-10-11
Age : 27
Location : Wondering around the world
Re: How to Tweak
traduce to portuguese dzani
please
please
please
please
Pointo- Standard Member
- Posts : 61
Activity Points : 80
Reputation : 1
Join date : 2011-09-30
Location : Portugal
Similar topics
» Tweak made by TheKingDragonFire (M1-THOMPSON) Only Tweak
» TWEAK HELP
» What do you tweak most?
» Hud tweak
» tournament (tweak)
» TWEAK HELP
» What do you tweak most?
» Hud tweak
» tournament (tweak)
Worms 4 and Ultimate Mayhem tweaking mods :: 3D PC games // Tweaking that we major in :: Worms 4 mayhem :: Tweaking Tutorials
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|