User Tools

Site Tools


world_setup:weapons_reference

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
world_setup:weapons_reference [2020/02/17 17:45] – [CONTROL] mitworld_setup:weapons_reference [2020/02/17 19:11] (current) – [Weapons.txt Field Reference] mit
Line 2: Line 2:
 ===== Weapons.txt Field Reference ====== ===== Weapons.txt Field Reference ======
  
-Data\Weapons.txt sets up the behaviours for each weapon type on your world. The following parameters are supported ; some are only applicable to particular configurations.+Your server's **Data\Weapons.txt** sets up the behaviours for each weapon type on your world. The following parameters are supported ; some are only applicable to particular configurations.
    
  
Line 10: Line 10:
  
 ==== CONTROL ==== ==== CONTROL ====
-**[[world_setup:weapons_reference:control modes|Weapon Control Modes Reference]]**+>>[[world_setup:weapons_reference:control modes|Weapon Control Modes Reference]]\\
 This affects how the player fires the weapon. You can use it to make weapons that need a quick keypress to fire, or weapons that increase their fire 'strength' the longer the key is held down. All of these modes generate a 'Fire Parameter' value from 0.0 to 1.0 that is passed to the 'FIRE=' function described below. By combining different 'Control=' and 'Fire=' functions you can make weapons where holding the key down controls the fire angle, or range, or type, etc.  This affects how the player fires the weapon. You can use it to make weapons that need a quick keypress to fire, or weapons that increase their fire 'strength' the longer the key is held down. All of these modes generate a 'Fire Parameter' value from 0.0 to 1.0 that is passed to the 'FIRE=' function described below. By combining different 'Control=' and 'Fire=' functions you can make weapons where holding the key down controls the fire angle, or range, or type, etc. 
  
 ==== FIRE ==== ==== FIRE ====
 +>> [[world_setup:weapons_reference:fire modes|Weapon Fire Modes Reference]]\\
 This field controls how the weapon object is launched once it is fired. It is used to define things like the initial trajectory and speed of the weapon object, and defines how the Fire parameter (described above) is interpreted. In a similar way, each Fire function generates a further parameter that is applied to the Object you specify below.  This field controls how the weapon object is launched once it is fired. It is used to define things like the initial trajectory and speed of the weapon object, and defines how the Fire parameter (described above) is interpreted. In a similar way, each Fire function generates a further parameter that is applied to the Object you specify below. 
- 
-Details of all the valid weapon fire modes can be found [[world_setup:weapons_reference:fire modes|here]]. 
  
 ===== Main Weapon Script Fields ===== ===== Main Weapon Script Fields =====
Line 22: Line 21:
  
 ==== OBJECT ==== ==== OBJECT ====
 +>> [[world_setup:weapons_reference:object types|Weapon Object Types Reference]]\\
 This field defines the physical properties of the weapon being fired - some bounce, some have gravity applied, some don't, etc. The behaviour of some of these objects is affected by the parameter passed in from the Fire function (see above). In most cases, this comes from the script Param field. This field defines the physical properties of the weapon being fired - some bounce, some have gravity applied, some don't, etc. The behaviour of some of these objects is affected by the parameter passed in from the Fire function (see above). In most cases, this comes from the script Param field.
-Details of all the valid weapon fire modes can be found [[world_setup:weapons_reference:object types|here]]. 
  
 ==== SPEED ==== ==== SPEED ====
Line 49: Line 48:
 ==== PARAM ==== ==== PARAM ====
 This is a global parameter value that can take on different meanings depending on the Fire and Control type chosen. It is often ignored, but it's essential for MGs and a few other weapon types, for example. E.g. Param=400 This is a global parameter value that can take on different meanings depending on the Fire and Control type chosen. It is often ignored, but it's essential for MGs and a few other weapon types, for example. E.g. Param=400
- 
-==== ITEM ==== 
-This is the item (ammo) required to use the weapon. If set to NONE, no ammo is required. (This is the default if this field is omitted).  
- 
-==== MAXCARRIED ==== 
-The amount of a weapon item that can be carried. E.g. MaxCarried=50 
- 
-==== AMMOPERLIFE ==== 
-Adding this field provides an alternate method for controlling how many times a player may use a particular weapon item. It overrides the Item/Ammo options. The value you provide here is the number of times the weapon can be fired until the player next dies. e.g. AmmoPerLife=3  means the weapon can be fired 3 times in each 'life'. (The count is reset if their vehicle explodes or their character dies). 
- 
-==== ENERGY ==== 
-This field is only required when using *settings -> Subgame -> Weapons Control Mode  set to 2.  In this mode each player has an 'energy bar', which is depleted when they receive damage and when they fire weapons. The amount of energy each weapon takes is set in this field. The total amount of energy for each player is 65000, so (ignoring any energy recharge rate), setting a weapon to Energy=32500 means it could be fired twice before the player ran out of energy. 
  
 ==== BUILDDAMAGE ==== ==== BUILDDAMAGE ====
Line 76: Line 63:
 ==== VELEFFECT ==== ==== VELEFFECT ====
 This controls whether the speed that the player is moving it is included in the speed that the weapon is launched at. 0 means it isn't, 1 means it is (default). E.g. VelEffect=1 This controls whether the speed that the player is moving it is included in the speed that the weapon is launched at. 0 means it isn't, 1 means it is (default). E.g. VelEffect=1
 +
 +===== Ammunition & Item restrictions =====
 +
 +==== ITEM ====
 +This is the item (ammo) required to use the weapon. If set to NONE, no ammo is required. (This is the default if this field is omitted). 
 +
 +==== MAXCARRIED ====
 +The amount of a weapon item that can be carried. E.g. MaxCarried=50
 +
 +==== AMMOPERLIFE ====
 +Adding this field provides an alternate method for controlling how many times a player may use a particular weapon item. It overrides the Item/Ammo options. The value you provide here is the number of times the weapon can be fired until the player next dies. e.g. AmmoPerLife=3  means the weapon can be fired 3 times in each 'life'. (The count is reset if their vehicle explodes or their character dies).
 +
 +==== ENERGY ====
 +This field is only required when using *settings -> Subgame -> Weapons Control Mode  set to 2.  In this mode each player has an 'energy bar', which is depleted when they receive damage and when they fire weapons. The amount of energy each weapon takes is set in this field. The total amount of energy for each player is 65000, so (ignoring any energy recharge rate), setting a weapon to Energy=32500 means it could be fired twice before the player ran out of energy.
 +
  
 ===== Weapon Graphics & Sounds ===== ===== Weapon Graphics & Sounds =====
Line 84: Line 86:
 ==== SOUND ==== ==== SOUND ====
 This is the sound played when this weapon is fired. The value given corresponds to the 'Assignable Sound' number that you choose on the server's Tools -> Sound Selector dialog in the following way: sound=500 would play assignable sound 1. sound=501 would play assignable sound 2, etc.  This is the sound played when this weapon is fired. The value given corresponds to the 'Assignable Sound' number that you choose on the server's Tools -> Sound Selector dialog in the following way: sound=500 would play assignable sound 1. sound=501 would play assignable sound 2, etc. 
 +==== SOUND2 ====
  
 ==== MUZZLE ==== ==== MUZZLE ====
Line 143: Line 146:
 [Not working at the moment]. Including this value means that, when a weapon hits a target, any players standing within the region receive some damage. The value is the splash damage radius in metres. e.g. SplashRadius=10  means anyone within 10 metres of the weapon when it hits something will receive damage. The amount of splash damage players receive varies according to how far from the weapon they were..  [Not working at the moment]. Including this value means that, when a weapon hits a target, any players standing within the region receive some damage. The value is the splash damage radius in metres. e.g. SplashRadius=10  means anyone within 10 metres of the weapon when it hits something will receive damage. The amount of splash damage players receive varies according to how far from the weapon they were.. 
  
- +==== REQUIRETARGET ==== 
 +If set to 1, the weapon can't be fired unless the player has acquired a target through the system activated by server command: ***targetingmode [PLAYERNAME] [mode] [dist]** 
 +FIXME : Link to targetingmode page :) 
 + 
 +==== NOTIFYMODE ==== 
 +You can use NotifyMode to have the server trigger a script function when something happens to the weapon. \\ 
 +**NotifyMode = 1**, means the server triggers the "WeaponHitGround" event when the weapon hits the ground (with the weapon number as param).\\ 
 +**NotifyMode = 2**, means the server triggers the "WeaponHitPlayer" event when the weapon hits a player. \\ 
 +**NotifyMode = 3** activates both the above systems.\\ 
 + 
 + 
 +==== RESTRICTIONS ==== 
 +Currently this just supports mode 1, which means the weapon is not allowed to be fired if the player is within 30m of a crow flag. Further, more configurable options will be added if/as required. 
 ===== Weapons debugging and comments ===== ===== Weapons debugging and comments =====
  
world_setup/weapons_reference.1581983111.txt.gz · Last modified: 2020/02/17 17:45 by mit

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki