Warning: This document is severely outdated.
This file explains the setup_attack function built into anything that is a damage source. Traditionally this is a weapon, but this code also applies to monster NPCs. __NOTOC__
Name
This can either be a descriptive string that will appear in the combat message, or a firearm mode. If this weapon is a gun, then you should #include <ammo.h> and use the defintions out of that file. I.e. SINGLE, DOUBLE, BURST. (see /includes/ammo.h for more details)
Skill
For old system weapons this should be one of the following:
assault_rifle at_weapon brawling clip_pistol demolition energy_weapons knife_fight knife_throw rifle smg
For new system weaponry this should be one of the following:
guns_assault_rifle guns_rifle guns_shotgun guns_smg guns_pistol
ranged_crossbow ranged_bow ranged_throwing
melee_staff melee_flail melee_entangle melee_blunt melee_blade melee_axe melee_knife
unarmed
Damage
EG. "1D6+3".
This was used in the old system to determine the amount of damage a weapon does. It will be replaced with damage_rating (see below) in the future.
This setting will be used in the %^BOLD%^future%^RESET%^ to determine damage. For the damage rating, it is advised that you add the below include to your file, and use the values in /includes/stats.h
#include <stats.h>
Definition Value Example ----------------------------------------------------------- DIVINE 7 Plasma Heavy LEGENDARY 6 Explosive Heavy, Plasma Med PERFECT 5 Explosive Med, Plasma Lt EXCELLENT 4 Explosive Lt, Laser Heavy GREAT 3 Rifle Heavy, Laser Med GOOD 2 Rifle Med, Laser Lt, Pistol Extra Hvy ABOVE_AVERAGE 1 Pistol Heavy AVERAGE 0 Rifle Lt BELOW_AVERAGE -1 Pistol Medium POOR -2 Pistol Light BAD -3 BB Gun, Unarmed Melee TERRIBLE -4 - WRETCHED -5 - ABHORRENT -6 - ABYSMAL -7 -
The base damage of a melee weapon should typically range somewhere between -4 and +3. Something along the lines of +3 would be a Proton Axe.
Damage Types
#include <damage_types.h>
This setting controls what kind of damage is inflicted. Different armors should ideally have different resistance rates. At this point of time, however, damage types are limited to just combat messages. Damage types can be combined E.G.:
"damage_type" : BLUNT + PUNCTURE,
COLD HEAT BLUNT PUNCTURE SLICE EXPLOSIVE ELECTRICITY LIGHT CHEMICAL DISEASE MALNUTRITION NUCLEAR POISON SONIC
Brennan Proposes:
Physical Damage (All armors have these basic damage resistances, in varying capacities) BLUNT PUNCTURE SLICE EXPLOSIVE
Elemental Damage (Only some armors will have these. Four classical elements, no earth so something else) HEAT COLD ELECTRICITY SONIC Status-type Damage (This sort of damage will also have a % chance to inflict status-type damage) NUCLEAR (10% chance to cause radiation sickness) DISEASE (10% chance to cause disease that will lower stats) POISON (10% chance to cause poison damage) MALNUTRITION (wtf? a gun that makes people hungry?)(10% chance to reduce fullness by x amount)
Attack_msgs
At the time of the writing of this file, the following attack messages exist. See the lower half of /daemons/messages_d.c for specific details.
attack-melee attack-headbutt attack-pistol-single attack-rifle-single attack-firearm-full-auto attack-firearm-burst attack-rifle-double attack-firearm attack-bite attack-whip attack-thrown attack-stab attack-slash attack-spray attack-sound attack-emp attack-arrow attack-sling
Ammo_type
The type of ammunition that this attack mode consumes. See standard list in /include/ammo.h
#include <ammo.h>
Ammo_consumed
How much firearm ammo this weapon attack consumes.
Jam_frequency
The percentage chance that this firearm attack has of jamming the weapon.
Not_random
This flag should be set to “1” for any switchable firearm flag. Random attack modes should be used mainly for monsters or melee weapons.
Accuracy
The accuracy of the weapon. A stat value from -7 to +7. See /include/stats.h or #include <stats.h>
Thrown
A flag for whether or not this attack mode is a thrown one. Uncertain if this is functional.
Hidden
Hidden attacks do not show up in a firearm setting. For “switchable” firearms, most empties should be set to hidden.
base_speed, blast_radius, equip_speed, unjam_speed, reload_speed, min_range, max_range
Originally intended for a tile based combat system, these arguments are useless and should be excluded from any new weapons.