WormRage
Weapon Settings
|
Each weapon (or object) is a separate
definition file (.def) placed in the Weapon folder or a folder inside it. This
file defines everything to make the objects and effects for a weapon.
The file is just plain text and you can write
and change them with NotePad or any text editor.
To install a weapon file, its
file's path and name is placed in the 'weaponlist.cfg' file (found in the Weapon folder) as a separate line with
'on' or 'off'
before it, to set if the weapon should be loaded or not. **Prior to v1.50, ensure all config files have a return after
the last line!**
Weapons are made out of objects, each object
is defined by a block of lines.
Each line starts with a word to tell what
weapon settings you are defining - followed by the settings and their values.
Here are the different words that
can start a line and there settings:
Image, OBJECT, Fire,
Created, Pellet, Affect,
When, Ammo, Reload,
Makes.
All gray shaded settings are
optional.
|
(optional) |
|
|
"(BMP filename)" |
Must follow first - quotes recommended. |
|
tile=( w,h / size ) |
Sets the width & height of each frame for animation or instead use the word size (v1.50) to always use the full image size. |
|
hotspot=x,y |
(v1.50) Sets the center for every frame in this image. |
|
mask=r,g,b |
Sets the transparent colour in image. r,g,b is the Red, Green, Blue amounts, from 0 to 255 each. |
Most images will
work fine without a line like this. Only when an image fails to split correctly
(automatically) do you need to have an 'image=' line - or when you want to use another
colour other than magenta (255,0,255) for transparency.
(The image lines
(if needed) should come before you use the image as a setting value.)
|
|
|
|
"(object name)" |
Must follow first. |
|
TYPE=(object type) |
Object type can be one of these: Bullet - for bullets and anything that moves or collides
with things. Popoff - cuts out from earth the shape of maskImage(see
below) setting. Used for explosions. (Note: this type of object must
be stationary!) DestroyEarth - (v1.50) same as Popoff Casing - fills in earth the shape of maskImage(see
below) setting. Used for gun shells, dirtball effects, etc... MakeEarth - (v1.50) same as Casing SoftenRock - cuts out from earth and changes stone to earth
the shape of maskImage(see below) setting SoftenStone - (v1.50) same as
SoftenRock DestroyRock/DestroyStone - (v1.50) cuts out
from stone and earth together the shape of maskImage(see below)
setting MakeRock/MakeStone - (v1.50) fills in
with stone the shape of maskImage(see below) setting. GunFlash - special setting, not
guaranteed to stay Blood - special setting, not
guaranteed to stay Bungyrope - special setting, not
guaranteed to stay Bonus - special setting, not guaranteed to stay |
|
maskImage="(BMP filename)" |
Used to cut out/fill-in earth/stone a shape from a frame (normally the first) of the BMP picture. |
|
startMask=(frame No.) |
The first frame to use with maskImage. |
|
endMask=(frame No.) |
The final frame to use with maskImage. A random frame number between the startMask and endMask will be calculated, unless the angled setting is true - the objects current frame number that created this object will then be used. |
|
GUN="(BMP filename)" |
The enlarged gun's image. Must have a size of 40 by 18 pixels. Must be set for ANY weapon. |
|
flash="(BMP filename)" |
The images used for the gun barrel flashes - eventually, the program will do the rotations. |
|
barrelLength=( length ) |
The distance from the worm that pellets are created match this to half the length of gun image usually. The default value is 17, making it less than this will make the pellets hit the worm before being shot. |
|
shell=(object name) |
An object to spawn as a bullet casing. |
|
shellRate=(% rate) |
The percentage of bullet cases to bullets that are generated. |
|
affected=( yes / no) |
Set to 'yes' if this object can be attracted/repelled. |
|
affects=( yes / no ) |
Set to 'yes' if this object attracts/repels things. |
(This line must be
the first in an object's block of lines, since it sets the name of the object.)
Created |
|
(optional) |
|
trigger=(press/held/release) |
Set to 'press' to force the player to press the fire button every time they want to shoot again. |
|
delay=(frame count) |
Number of frames (1/75 second) to delay between repeating shots. |
1 |
guided=(sensitivity) |
Set the bullets to guided by the user if not 0. The higher the value the quicker the bullet turns. Normally about 0.01 is fine. |
|
recoil=(amount) |
Amount of recoil from gun for every bullet fired. |
|
sound="(WAV filename)" |
Sound used when created/fired. |
|
soundRepeatDelay=(frame count) |
Number of frames between Sound repeats. Use on fast-firing weapons with longer sounds to let them be heard properly. |
|
loop=( yes / no ) |
Loop the sound played while pellets for this object type exist. |
|
refresh=( yes / no ) |
Reuse the last object fired rather than create a new one. Used on vector weapons like the laser. |
|
spawn1="(object name)" |
(v1.50) The object named here is created when this object is made and automatically linked as a child. |
|
spawn2="(object name)" |
(v1.50) Another object named here is created when this object is made and automatically linked as a child. |
|
linkAction=(effect) |
(v1.50) If set, spawned objects
will be linked to this object and they will be affected in the following way
when this object dies: Die - it is made to die early. None no effect on spawned objects, except the link to
the parent is broken. |
This line can be
used to make an object just for a sound. E.g. when you want a bouncing object to
make a sound, make it spawn an object that defines the sound with a line like
this:
Object="(object name)"
Pellet
number=0
Created
sound="(WAV filename)"
Sight (v1.50) |
|
(optional) |
|
color=(r,g,b) |
The color of the
laser sight line. |
|
range=(distance) |
The distance (in
pixels) that the sight reaches. |
|
spotsWorm = ( yes / no ) |
Whether the
weapons target sight changes when the sight line hits a worm. |
|
scope=(BMP filename) |
If set to a (suitable)
image for a scope this weapon will show the area where the sight line ends. |
|
(optional) |
|
|
IMAGE="(BMP filename)" |
The image used for each pellet. |
|
shadow=(importance) |
(v1.50) How important it is to show a shadow on these
pellets. Set to one of the following: no never has a shadow. maybe shadow isnt important, use this setting if your
weapon slows down the game a lot. yes must have a shadow. |
|
transparent= ( yes / no ) |
(v1.50) Makes the pellet image transparent good for smoke. |
|
hotspot=x,y |
(v1.50) Sets the center for every frame in this image. |
|
number=(value) |
The number of pellets shot each time. |
|
death=(frame count/event) |
The number of frames till each pellet dies. Or, these event names: never; stopped. |
|
maxDeath=(frame count) |
If set, then number of frames till each pellet dies will be random between death and maxDeath. |
|
speed=(in pixels) |
The speed the pellets go. (Can have decimals.) |
|
maxSpeed=(in pixels) |
If set, then the speed of each pellet will be random between speed and maxSpeed. |
|
spread=(degrees) |
The angle of spread that pellets can be shot at. |
|
scatter=( evenly / random ) |
(v1.50) Whether th pellets are spread out evenly or randomly for the spread setting angle above: |
|
weight=(value) |
The weight of each pellet. |
|
startFrame=(frame No.) |
The first frame of the image shown for the pellet. |
|
endFrame=(frame No.) |
The last frame of the image shown for the pellet. |
|
animatedDelay=(frame count) |
The speed of animating frames. If no startFrame or endFrame is set, the program will work them out automatically (if possible) if this value is set. |
|
angled=( yes / no ) |
If set to 'yes' and the object is a 'BULLET' then there must be 32 frames (in the image) to choose the right angled image from. |
|
line1=(r,g,b) |
The first line colour. |
|
line2=(r,g,b) |
The last line colour. If set, then the line will gradually fade between line1 and line2's colours based on the lineFadeStep value. |
|
lineFadeStep=(% amount) |
The percentage change rate of fades between line1 and line2 colours. |
|
lineEffect=(type) |
(v1.50) The type of effect used to draw line objects.: gradient each line starting with line1 colour at one end and gradually changes to line2 colour at the other end. |
|
mass=(value) |
The mass (amount of material) that each pellet contains. Lower values cause less effect between attracting/repelling objects. |
|
materials=(types) |
A list (v1.50)
of the following materials (separated by commas) that are affected/or
this object is made of: earth - used in broken bits of earth, flames, etc... plastic - used for plastic objects metal - used for metal objects like most bullets. flesh - used for the worms and their giblets. All - (v1.50) all
materials. Flag - (v1.50) used for connecting flags with homes |
|
rotate=(angle) |
(v1.50) The rotate amount (every frame) to be added to the
angle the pellet is facing. |
(When object
type=CASING, then the pellet death will be set to 1. For objects of type POPOFF
or SOFTENSTONE, if the pellet death is not set, it will be calculated from the
animateDelay value and startFrame and endFrame to let every frame be shown once
before the pellets die.)
Senses 1 (v1.50) |
|
(optional) |
|
turn=(sensitivity) |
For homing objects, the speed of turn
(every frame) to turn towards the nearest worm. |
|
range=(distance) |
The distance (in
pixels) that the senses reach. |
|
sightOnly = ( yes / no ) |
Whether the
senses need a clear line of sight to sense a worm. |
|
(optional) |
|
|
reach=(in pixels) |
The distance from the object that it attracts or repels other objects. Note: the mass affects how great an affect is over distance. |
|
radius=(in pixels) |
The distance from the object that it takes an action (see below) on other objects. (v1.50) This is also now used in PopOff type objects to tell the radius of damage to worms. |
|
action=(effect) |
The effect on objects (of the right materials)
when they nearer than the affect radius: Rebound - other objects are reflected. Stop - other objects are stopped. Freeze - other objects are held stopped. Cling - other objects are held onto. (v1.50) Die - other objects are made to die. Destroy - other objects are destroyed without die effects
(e.g. without spawning a popoff, etc...). Suicide - (v1.50) this
object dies - allows you to make objects die when a worm is within radius
or when this object is shot. Transport (v1.50) other objects are moved to the location setting (see below) position on the level. |
|
score= (amount) |
(v1.50) The amount to add/subtract from each worms score
points when action is Die; Destroy; Suicide or
Transport.
(In Team play modes this will affect the teams score) |
|
location= x,y |
(v1.50) The location co-ordinates to transport objects
to. This happens when any objects are
within the radius distance - if the action setting is
set to Transport. |
|
|
|
|
HIT=(thing) |
The thing that when hit something happens: Worm - the worm is hit Ground - the earth or ground is hit Stone - (v1.50) stone is
hit Ceiling - the ceiling is hit Walls - the earth is hit from either side. Death - the object has reached its death |
|
action=(effect) |
The effect on this object: None - no effect on object. Rebound - it's reflected. Stop - it's stopped. Freeze - it's held stopped. Cling - it clings to things. (On stone or earth and (v1.50)worms) Die - it is made to die early. |
|
spawn1="(object name)" |
The object named here is created when this object hits either the Worm, Ground or Death. (Ceiling and Walls things don't spawn yet, but Ground means them too at present for this) |
|
spawn2="(object name)" |
Another object named here is created when this object hits either the Worm, Ground or Death. (Ceiling and Walls things don't spawn yet, but Ground means them too at present for this) |
|
damage=(amount) |
The amount of damage when the object hits the Worm only. (Note: if negative this increases the health of the Worm hit e.g. for Bonuses) |
|
impact=(amount) |
The amount of impact (pushed amount) on the Worm when the object hits it. |
|
bounce=(amount) |
The amount of bounce when the object hits this thing. Separate values for worm, ground, ceiling and walls. |
|
drag=(amount) |
The amount of drag on the object along the ground. |
|
pull=(amount) |
Special setting - for setting the pull on a bungy rope. (DON'T use yet on other objects) |
|
forced=( yes / no ) |
(v1.50) If set to yes, when
this object dies any spawned object/s must be created even if it means
delaying the death until there is space for the new object/s. Or used to ensure this object is
not overridden before it dies. |
|
(optional) |
|
|
PerShot=(amount) |
Amount of ammunition used per shot. |
|
max=(amount) |
Full amount of ammunition of gun. |
|
(optional) |
|
|
RATE=(amount) |
Amount of ammunition replaced per frame when weapon is reloading. |
|
sound="(WAV filename)" |
Sound used when reloading is finished. |
|
(optional) |
|
|
SPAWN1="(object name)" |
The object named here is created every number of frames set in delay (see below). |
|
spawn2="(object name)" |
The object named here is created every number of frames set in delay (see below). |
|
DELAY=(frame count) |
The number of frames between spawning objects. |
|
speedFactor=(value) |
The amount of the speed of the making object added to the initial speed of the spawned objects. |
Notes:
1 |
Only one of the settings marked with these can be used per object. |
See also: |