////////////////////////////////////////////////////////////////////// // Constant include file for the D20 combat override system. // // You should only edit these values if you know what you're doing! // // Refer to "gun_configure" for configuration settings. // ////////////////////////////////////////////////////////////////////// /////////////////// // D20 CONSTANTS // /////////////////// // Custom item property IDs const int ITEM_PROPERTY_FIREARM_MAGAZINE = 151; const int ITEM_PROPERTY_FIREARM_RATE_OF_FIRE = 152; const int IP_CONST_FIREARM_ROF_SEMI_AUTOMATIC = 1; const int IP_CONST_FIREARM_ROF_AUTOMATIC = 2; /////////////////// // COMBAT SYSTEM // /////////////////// // CONFIGURATION // When current bullets fall below this percentage of the magazine size, the "Low ammo!" message appears. // This is in decimal form so 0.20 would mean 20%. // Default: 0.20 const float GUN_LOW_AMMO_MESSAGE_DISPLAY_PERCENTAGE = 0.20; // VARIABLE NAMES // Name of the variable stored on firearms which keeps track of the number of bullets remaining in the gun const string GUN_MAGAZINE_BULLET_COUNT = "GUN_MAGAZINE_BULLET_COUNT"; // Name of the tag and resref of the firearm magazine item (I.E: The arrows) const string GUN_FIREARM_MAGAZINE_RESREF = "firearm_magazine"; // Name of the tag and resref of the enhanced firearm magazine item const string GUN_ENHANCED_FIREARM_MAGAZINE_RESREF = "e_gun_mag"; // Name of the tag and resref of the incendiary firearm magazine item const string GUN_INCENDIARY_FIREARM_MAGAZINE_RESREF = "i_gun_mag"; // Tag and resref prefix for ammo box items (default: ammo_box_) const string GUN_NORMAL_AMMO_BOX_PREFIX = "ammo_box_"; // Tag and resref prefix for enhanced ammo box items (default: e_ammo_box_) const string GUN_ENHANCED_AMMO_BOX_PREFIX = "e_ammo_box_"; // Tag and resref prefix for incendiary ammo box items (default: i_ammo_box_) const string GUN_INCENDIARY_AMMO_BOX_PREFIX = "i_ammo_box_"; // Tag and resref of the "Gas Canister" objects which explode on death const string GUN_GAS_CANISTER_TAG = "gas_canister"; // Name of the variable stored on a firearm which keeps track of the weapon's critical rating const string GUN_CRITICAL_RATING = "GUN_CRITICAL_RATING"; // Temporary variable names const string GUN_TEMP_UNLOADING_AMMO = "UNLOADING_AMMO"; // Tracks whether or not ammo was just unloaded (Prevents OnUnequip from firing when true) const string GUN_TEMP_RELOADING_GUN = "RELOADING_GUN"; // Tracks whether or not a PC is reloading a gun const string GUN_TEMP_AMMO_TYPE = "AMMO_TYPE"; // Tracks ammo type loaded on firearm magazines const string GUN_TEMP_CURRENT_RATE_OF_FIRE = "GUN_CUR_RATE_OF_FIRE"; // Tracks the current rate of fire chosen for a gun const string GUN_TEMP_GUN_EQUIPPED = "GUN_EQUIPPED"; // Prevents guns from firing the OnEquip script when a PC enters the server. const string GUN_TEMP_AMMO_PRIORITY = "GUN_AMMO_PRIORITY"; // Tracks the ammunition chosen as priority for a gun. Refer to AMMO_PRIORITY_* constants for more info const string GUN_TEMP_AMMO_LOADED_TYPE = "GUN_TEMP_AMMO_LOADED_TYPE"; // Tracks which type of ammunition is loaded into a gun (Uses the GUN_AMMUNITION_PRIORITY_* constants) const string GUN_TEMP_PREVENT_AMMO_BOX_BUG = "GUN_TEMP_PREVENT_AMMO_BOX_BUG"; // Used to prevent an ammo bug. Refer to gun_mod_unequip for more info. // GUN TYPES const int ITEM_PROPERTY_FIREARM_TYPE = 144; const int GUN_TYPE_INVALID = 0; const int GUN_TYPE_HANDGUN = 1; const int GUN_TYPE_RIFLE = 2; const int GUN_TYPE_SHOTGUN = 3; const int GUN_TYPE_SMG = 4; const int GUN_TYPE_MAGNUM = 5; const int GUN_TYPE_ASSAULT_RIFLE = 6; // FIREARM DAMAGE const int ITEM_PROPERTY_FIREARM_FIREPOWER = 145; // CRITICAL RATING const int ITEM_PROPERTY_FIREARM_CRITICAL_RATING = 143; // FIREARM ADDITIONAL AMMO CLASSES const int ITEM_PROPERTY_FIREARM_ADDITIONAL_AMMO_CLASSES = 142; const int IP_CONST_FIREARM_ADDITIONAL_AMMO_CLASSES_ENHANCED = 1; const int IP_CONST_FIREARM_ADDITIONAL_AMMO_CLASSES_INCENDIARY = 2; // FIREARM RANGES const int ITEM_PROPERTY_FIREARM_RANGE = 146; const int IP_CONST_FIREARM_RANGE_NEAR = 1; const int IP_CONST_FIREARM_RANGE_MID = 2; const int IP_CONST_FIREARM_RANGE_FAR = 3; // FIREARM RELOAD SPEEDS const int ITEM_PROPERTY_FIREARM_RELOAD_SPEED = 147; const int IP_CONST_FIREARM_RELOAD_SPEED_VERY_SLOW = 1; const int IP_CONST_FIREARM_RELOAD_SPEED_SLOW = 2; const int IP_CONST_FIREARM_RELOAD_SPEED_MEDIUM = 3; const int IP_CONST_FIREARM_RELOAD_SPEED_FAST = 4; const int IP_CONST_FIREARM_RELOAD_SPEED_VERY_FAST = 5; // FIREARM AMMO TYPES const int ITEM_PROPERTY_FIREARM_AMMO_TYPE = 149; const int IP_CONST_FIREARM_AMMO_TYPE_HANDGUN = 1; const int IP_CONST_FIREARM_AMMO_TYPE_RIFLE = 2; const int IP_CONST_FIREARM_AMMO_TYPE_SHOTGUN = 3; const int IP_CONST_FIREARM_AMMO_TYPE_SMG = 4; const int IP_CONST_FIREARM_AMMO_TYPE_MAGNUM = 5; // TIMING RELATED // Determines the amount of time it takes to fire off a round of a firearm const float GUN_ATTACK_SPEED_VERY_SLOW = 3.5; const float GUN_ATTACK_SPEED_SLOW = 2.7; const float GUN_ATTACK_SPEED_MEDIUM = 1.8; const float GUN_ATTACK_SPEED_FAST = 1.5; const float GUN_ATTACK_SPEED_VERY_FAST = 1.0; // Determines the amount of time it takes to reload a firearm const float GUN_RELOAD_SPEED_VERY_SLOW = 4.2; const float GUN_RELOAD_SPEED_SLOW = 3.6; const float GUN_RELOAD_SPEED_MEDIUM = 2.8; const float GUN_RELOAD_SPEED_FAST = 2.2; const float GUN_RELOAD_SPEED_VERY_FAST = 1.2; // Determines the minimum and maximum distance for each range setting. Accuracy and // damage is maximized when a creature fires the weapon in the correct range // Distances are in meters. const float GUN_RANGE_NEAR_MINIMUM = 3.5; const float GUN_RANGE_NEAR_MAXIMUM = 6.0; const float GUN_RANGE_MID_MINIMUM = 5.5; const float GUN_RANGE_MID_MAXIMUM = 8.5; const float GUN_RANGE_FAR_MINIMUM = 14.0; const float GUN_RANGE_FAR_MAXIMUM = 27.5; // Ammunition priorities const int GUN_AMMUNITION_PRIORITY_BASIC = 0; const int GUN_AMMUNITION_PRIORITY_ENHANCED = 1; const int GUN_AMMUNITION_PRIORITY_INCENDIARY = 2; // Weapon Modes const int GUN_WEAPON_MODE_SINGLE_SHOT = 0; const int GUN_WEAPON_MODE_THREE_ROUND_BURST = 1; // Gun information struct struct GunInfoStruct { object oGun; int iGunType; int iFirepower; int iRangeSetting; int iReloadSetting; int iAmmoType; int iRateOfFire; int iMagazineSize; int iCriticalRating; int bEnhancedAvailable; int bIncendiaryAvailable; int iDurability; }; // Error checking //void main(){}