ballistic
Subtype for any kind of ballistic gun This has a shitload of vars on it, and I'm sorry for that, but it does make making new subtypes really easy
Vars | |
accepted_magazine_type | What type (includes subtypes) of magazine will this gun accept being put into it |
---|---|
alternative_ammo_misfires | If only our alternative ammuntion misfires and not our main ammunition, we set this to TRUE |
alternative_caliber | our alternative ammo type. |
alternative_fire_sound | our alternative fire sound, in case we want our gun to be louder or quieter or whatever |
bolt_drop_sound | sound of dropping the bolt or releasing a slide |
bolt_drop_sound_volume | volume of bolt drop/slide release |
bolt_locked | Used for locking bolt and open bolt guns. Set a bit differently for the two but prevents firing when true for both. |
bolt_type | The bolt type controls how the gun functions, and what iconstates you'll need to represent those functions. BOLT_TYPE_STANDARD - The Slide doesn't lock back. Clicking on it will only cycle the bolt. Only 1 sprite. BOLT_TYPE_OPEN - Same as standard, but it fires directly from the magazine - No need to rack. Doesn't hold the bullet when you drop the mag. BOLT_TYPE_LOCKING - This is most handguns and bolt action rifles. The bolt will lock back when it's empty. You need yourgun_bolt and yourgun_bolt_locked icon states. BOLT_TYPE_NO_BOLT - This is shotguns and revolvers. clicking will dump out all the bullets in the gun, spent or not. see combat.dm defines for bolt types: BOLT_TYPE_STANDARD; BOLT_TYPE_LOCKING; BOLT_TYPE_OPEN; BOLT_TYPE_NO_BOLT |
bolt_wording | Phrasing of the bolt in examine and notification messages; ex: bolt, slide, etc. |
burst_fire_selection | Fire Selector Variables /// Tracks the firemode of burst weapons. TRUE means it is in burst mode. |
can_be_sawn_off | Whether the gun can be sawn off by sawing tools |
can_misfire | Misfire Variables /// Whether our ammo misfires now or when it's set by the wrench_act. TRUE means it misfires. |
can_modify_ammo | Can we modify our ammo type in this gun's internal magazine? |
cartridge_wording | Phrasing of the cartridge in examine and notification messages; ex: bullet, shell, dart, etc. |
casing_ejector | whether the gun ejects the chambered casing |
click_on_low_ammo | Whether our gun clicks when it approaches an empty magazine/chamber |
eject_empty_sound | sound of ejecting an empty magazine |
eject_sound | Sound of ejecting a magazine |
eject_sound_vary | whether eject sound should vary |
eject_sound_volume | volume of ejecting a magazine |
empty_alarm | Whether the gun alarms when empty or not. |
empty_alarm_sound | empty alarm sound (if enabled) |
empty_alarm_vary | whether empty alarm sound varies |
empty_alarm_volume | empty alarm volume sound |
empty_indicator | Whether the sprite has a visible indicator for being empty or not. |
hidden_chambered | pixel offset for the suppressor overlay on the y axis. Check if you are able to see if a weapon has a bullet loaded in or not. |
initial_caliber | our initial ammo type. Should match initial caliber, but a bit of redundency doesn't hurt. |
initial_fire_sound | our initial fire sound. same reasons for initial caliber |
internal_magazine | Whether the gun has an internal magazine or a detatchable one. Overridden by BOLT_TYPE_NO_BOLT. |
load_empty_sound | sound when inserting an empty magazine |
load_sound | sound when inserting magazine |
load_sound_vary | whether loading sound should vary |
load_sound_volume | volume of loading sound |
lock_back_sound | sound of when the bolt is locked back manually |
lock_back_sound_vary | whether lock back varies |
lock_back_sound_volume | volume of lock back |
mag_display | Whether the sprite has a visible magazine or not |
mag_display_ammo | Whether the sprite has a visible ammo display or not |
magazine | Actual magazine currently contained within the gun |
magazine_wording | Phrasing of the magazine in examine and notification messages; ex: magazine, box, etx |
misfire_percentage_increment | How much does shooting the gun increment the misfire probability? |
misfire_probability | How likely is our gun to misfire? |
misfire_probability_cap | What is the cap on our misfire probability? Do not set this to 100. |
must_hold_to_load | Whether we need to hold the gun in our off-hand to load it. FALSE means we can load it literally anywhere. Important for weapons like bows. |
rack_delay | length between individual racks |
rack_sound | sound of racking |
rack_sound_vary | whether racking sound should vary |
rack_sound_volume | volume of racking |
recent_rack | time of the most recent rack, used for cooldown purposes |
selector_switch_icon | If it has an icon for a selector switch indicating current firemode. |
semi_auto | Hides the bolt icon. Whether the gun has to be racked each shot or not. |
spawn_magazine_type | Change this if the gun should spawn with a different magazine type to what accepted_magazine_type defines. Will create errors if not a type or subtype of accepted magazine. |
spawnwithmagazine | Whether the gun will spawn loaded with a magazine |
special_mags | Whether the gun supports multiple special mag types |
suppressor_y_offset | pixel offset for the suppressor overlay on the x axis. |
tac_reloads | Whether the gun can be tacloaded by slapping a fresh magazine directly on it |
Procs | |
add_notes_ballistic | Outputs type-specific weapon stats for ballistic weaponry based on its magazine and its caliber. It contains extra breaks for the sake of presentation |
blow_up | used for sawing guns, causes the gun to fire without the input of the user |
chamber_round | Used to chamber a new round and eject the old one |
drop_bolt | Drops the bolt from a locked position |
eject_magazine | Handles all the logic of magazine ejection, if tac_load is set that magazine will be tacloaded in the place of the old eject |
get_ammo | Gets the number of bullets in the gun |
get_ammo_list | gets a list of every bullet in the gun |
insert_magazine | Handles all the logic needed for magazine insertion |
install_suppressor | Installs a new suppressor, assumes that the suppressor is already in the contents of src |
postfire_empty_checks | postfire empty checks for bolt locking and sound alarms |
prefire_empty_checks | Prefire empty checks for the bolt drop |
rack | updates a bunch of racking related stuff and also handles the sound effects and the like |
sawoff | Handles all the logic of sawing off guns, |
Var Details
accepted_magazine_type
What type (includes subtypes) of magazine will this gun accept being put into it
alternative_ammo_misfires
If only our alternative ammuntion misfires and not our main ammunition, we set this to TRUE
alternative_caliber
our alternative ammo type.
alternative_fire_sound
our alternative fire sound, in case we want our gun to be louder or quieter or whatever
bolt_drop_sound
sound of dropping the bolt or releasing a slide
bolt_drop_sound_volume
volume of bolt drop/slide release
bolt_locked
Used for locking bolt and open bolt guns. Set a bit differently for the two but prevents firing when true for both.
bolt_type
The bolt type controls how the gun functions, and what iconstates you'll need to represent those functions. BOLT_TYPE_STANDARD - The Slide doesn't lock back. Clicking on it will only cycle the bolt. Only 1 sprite. BOLT_TYPE_OPEN - Same as standard, but it fires directly from the magazine - No need to rack. Doesn't hold the bullet when you drop the mag. BOLT_TYPE_LOCKING - This is most handguns and bolt action rifles. The bolt will lock back when it's empty. You need yourgun_bolt and yourgun_bolt_locked icon states. BOLT_TYPE_NO_BOLT - This is shotguns and revolvers. clicking will dump out all the bullets in the gun, spent or not. see combat.dm defines for bolt types: BOLT_TYPE_STANDARD; BOLT_TYPE_LOCKING; BOLT_TYPE_OPEN; BOLT_TYPE_NO_BOLT
bolt_wording
Phrasing of the bolt in examine and notification messages; ex: bolt, slide, etc.
burst_fire_selection
Fire Selector Variables /// Tracks the firemode of burst weapons. TRUE means it is in burst mode.
can_be_sawn_off
Whether the gun can be sawn off by sawing tools
can_misfire
Misfire Variables /// Whether our ammo misfires now or when it's set by the wrench_act. TRUE means it misfires.
can_modify_ammo
Can we modify our ammo type in this gun's internal magazine?
cartridge_wording
Phrasing of the cartridge in examine and notification messages; ex: bullet, shell, dart, etc.
casing_ejector
whether the gun ejects the chambered casing
click_on_low_ammo
Whether our gun clicks when it approaches an empty magazine/chamber
eject_empty_sound
sound of ejecting an empty magazine
eject_sound
Sound of ejecting a magazine
eject_sound_vary
whether eject sound should vary
eject_sound_volume
volume of ejecting a magazine
empty_alarm
Whether the gun alarms when empty or not.
empty_alarm_sound
empty alarm sound (if enabled)
empty_alarm_vary
whether empty alarm sound varies
empty_alarm_volume
empty alarm volume sound
empty_indicator
Whether the sprite has a visible indicator for being empty or not.
hidden_chambered
pixel offset for the suppressor overlay on the y axis. Check if you are able to see if a weapon has a bullet loaded in or not.
initial_caliber
our initial ammo type. Should match initial caliber, but a bit of redundency doesn't hurt.
initial_fire_sound
our initial fire sound. same reasons for initial caliber
internal_magazine
Whether the gun has an internal magazine or a detatchable one. Overridden by BOLT_TYPE_NO_BOLT.
load_empty_sound
sound when inserting an empty magazine
load_sound
sound when inserting magazine
load_sound_vary
whether loading sound should vary
load_sound_volume
volume of loading sound
lock_back_sound
sound of when the bolt is locked back manually
lock_back_sound_vary
whether lock back varies
lock_back_sound_volume
volume of lock back
mag_display
Whether the sprite has a visible magazine or not
mag_display_ammo
Whether the sprite has a visible ammo display or not
magazine
Actual magazine currently contained within the gun
magazine_wording
Phrasing of the magazine in examine and notification messages; ex: magazine, box, etx
misfire_percentage_increment
How much does shooting the gun increment the misfire probability?
misfire_probability
How likely is our gun to misfire?
misfire_probability_cap
What is the cap on our misfire probability? Do not set this to 100.
must_hold_to_load
Whether we need to hold the gun in our off-hand to load it. FALSE means we can load it literally anywhere. Important for weapons like bows.
rack_delay
length between individual racks
rack_sound
sound of racking
rack_sound_vary
whether racking sound should vary
rack_sound_volume
volume of racking
recent_rack
time of the most recent rack, used for cooldown purposes
selector_switch_icon
If it has an icon for a selector switch indicating current firemode.
semi_auto
Hides the bolt icon. Whether the gun has to be racked each shot or not.
spawn_magazine_type
Change this if the gun should spawn with a different magazine type to what accepted_magazine_type defines. Will create errors if not a type or subtype of accepted magazine.
spawnwithmagazine
Whether the gun will spawn loaded with a magazine
special_mags
Whether the gun supports multiple special mag types
suppressor_y_offset
pixel offset for the suppressor overlay on the x axis.
tac_reloads
Whether the gun can be tacloaded by slapping a fresh magazine directly on it
Proc Details
add_notes_ballistic
Outputs type-specific weapon stats for ballistic weaponry based on its magazine and its caliber. It contains extra breaks for the sake of presentation
blow_up
used for sawing guns, causes the gun to fire without the input of the user
chamber_round
Used to chamber a new round and eject the old one
drop_bolt
Drops the bolt from a locked position
eject_magazine
Handles all the logic of magazine ejection, if tac_load is set that magazine will be tacloaded in the place of the old eject
get_ammo
Gets the number of bullets in the gun
get_ammo_list
gets a list of every bullet in the gun
insert_magazine
Handles all the logic needed for magazine insertion
install_suppressor
Installs a new suppressor, assumes that the suppressor is already in the contents of src
postfire_empty_checks
postfire empty checks for bolt locking and sound alarms
prefire_empty_checks
Prefire empty checks for the bolt drop
rack
updates a bunch of racking related stuff and also handles the sound effects and the like
sawoff
Handles all the logic of sawing off guns,