Shiptest 13 - Modules - TypesVar Details - Proc Details

gun

Vars

adjust_fire_select_icon_state_on_safetyIf true, we put "safety_" before fire_select_icon_state_prefix's prefix. ex. "safety_laser_single"
burst_delayThe rate of fire when firing in a burst. Not the delay between bursts
burst_sizehow many shots per burst, Ex: most machine pistols, M90, some ARs are 3rnd burst, while others like the GAR and laser minigun are 2 round burst.
current_cooldownThis prevents gun from firing until the coodown is done, affected by lag
currently_firing_burstAre we firing a burst? If so, dont fire again until burst is done
default_firemodeafter initializing, we set the firemode to this
dry_fire_textText showed when attempting to fire with no round or empty round.
dual_wield_spreadIf dual wielding, add this to the spread
fire_delayThe rate of fire when firing full auto and semi auto, and between bursts; for bursts its fire delay + burst_delay after every burst
fire_select_icon_state_prefixBASICALLY: the little button you select firing modes from? this is jsut the prefix of the icon state of that. For example, if we set it as "laser", the fire select will use "laser_single" and so on.
firemode_indexFiremode index, due to code shit this is the currently selected firemode
gun_firemodesOur firemodes, subtract and add to this list as needed. NOTE that the autofire component is given on init when FIREMODE_FULLAUTO is here.
gun_firenamesA acoc list that determines the names of firemodes. Use if you wanna be weird and set the name of say, FIREMODE_OTHER to "Underbarrel grenade launcher" for example.
has_safetyDoes this gun have a saftey and thus can toggle it?
manufacturerThe manufacturer of this weapon. For flavor mostly. If none, this will not show.
muzzle_flashEffect for the muzzle flash of the gun.
muzzle_flash_colorColor of the muzzle flash effect.
muzzle_flash_lumBrightness of the muzzle flash effect.
muzzleflash_iconstateIcon state of the muzzle flash effect.
projectile_damage_multiplierAlters projectile damage multiplicatively based on this value. Use it for "better" or "worse" weapons that use the same ammo.
randomspread???, no clue what this is. Original desc: //Set to 0 for shotguns. This is used for weapons that don't fire all their bullets at once.
recoilScreen shake when the weapon is fired while wielded.
recoil_backtime_multipliera multiplier of the duration the recoil takes to go back to normal view, this is (recoil*recoil_backtime_multiplier)+1
recoil_deviationthis is how much deviation the gun recoil can have, recoil pushes the screen towards the reverse angle you shot + some deviation which this is the max.
recoil_unwieldedScreen shake when the weapon is fired while unwielded.
safetyIf the saftey on? If so, we can't fire the weapon
safety_wordingThe wording of safety. Useful for guns that have a non-standard safety system, like a revolver
sawn_descSet the description of the gun to this when sawed off
sawn_offThis triggers some sprite behavior in shotguns and prevents further sawoff, note that can_be_sawn_off is on gun/ballistic and not here, wtf.
spreadHow much the bullet scatters when fired while wielded.
spread_unwieldedHow much the bullet scatters when fired while unwielded.
suppressedwhether or not a message is displayed when fired
trigger_guardtrigger guard on the weapon. Used for hulk mutations and ashies. I honestly dont know how usefult his is, id avoid touching it
weapon_weightaffects if you can fire it unwielded or even dual wield it. LIGHT means dual wield allowed, HEAVY and higher means you have to wield to fire
wield_delayHow long between wielding and firing in tenths of seconds
wield_slowdownSlowdown for wielding
wield_timeStoring value for above

Procs

on_unwieldtriggered on unwield of two handed item
on_wieldtriggered on wield of two handed item
process_fireHandles everything involving firing.
set_gun_lightSwaps the gun's seclight, dropping the old seclight if it has not been qdel'd.
simulate_recoilour final spread value our randomized value after checking if we are wielded or not bonus

Var Details

adjust_fire_select_icon_state_on_safety

If true, we put "safety_" before fire_select_icon_state_prefix's prefix. ex. "safety_laser_single"

burst_delay

The rate of fire when firing in a burst. Not the delay between bursts

burst_size

how many shots per burst, Ex: most machine pistols, M90, some ARs are 3rnd burst, while others like the GAR and laser minigun are 2 round burst.

current_cooldown

This prevents gun from firing until the coodown is done, affected by lag

currently_firing_burst

Are we firing a burst? If so, dont fire again until burst is done

default_firemode

after initializing, we set the firemode to this

dry_fire_text

Text showed when attempting to fire with no round or empty round.

dual_wield_spread

If dual wielding, add this to the spread

fire_delay

The rate of fire when firing full auto and semi auto, and between bursts; for bursts its fire delay + burst_delay after every burst

fire_select_icon_state_prefix

BASICALLY: the little button you select firing modes from? this is jsut the prefix of the icon state of that. For example, if we set it as "laser", the fire select will use "laser_single" and so on.

firemode_index

Firemode index, due to code shit this is the currently selected firemode

gun_firemodes

Our firemodes, subtract and add to this list as needed. NOTE that the autofire component is given on init when FIREMODE_FULLAUTO is here.

gun_firenames

A acoc list that determines the names of firemodes. Use if you wanna be weird and set the name of say, FIREMODE_OTHER to "Underbarrel grenade launcher" for example.

has_safety

Does this gun have a saftey and thus can toggle it?

manufacturer

The manufacturer of this weapon. For flavor mostly. If none, this will not show.

muzzle_flash

Effect for the muzzle flash of the gun.

muzzle_flash_color

Color of the muzzle flash effect.

muzzle_flash_lum

Brightness of the muzzle flash effect.

muzzleflash_iconstate

Icon state of the muzzle flash effect.

projectile_damage_multiplier

Alters projectile damage multiplicatively based on this value. Use it for "better" or "worse" weapons that use the same ammo.

randomspread

???, no clue what this is. Original desc: //Set to 0 for shotguns. This is used for weapons that don't fire all their bullets at once.

recoil

Screen shake when the weapon is fired while wielded.

recoil_backtime_multiplier

a multiplier of the duration the recoil takes to go back to normal view, this is (recoil*recoil_backtime_multiplier)+1

recoil_deviation

this is how much deviation the gun recoil can have, recoil pushes the screen towards the reverse angle you shot + some deviation which this is the max.

recoil_unwielded

Screen shake when the weapon is fired while unwielded.

safety

If the saftey on? If so, we can't fire the weapon

safety_wording

The wording of safety. Useful for guns that have a non-standard safety system, like a revolver

sawn_desc

Set the description of the gun to this when sawed off

sawn_off

This triggers some sprite behavior in shotguns and prevents further sawoff, note that can_be_sawn_off is on gun/ballistic and not here, wtf.

spread

How much the bullet scatters when fired while wielded.

spread_unwielded

How much the bullet scatters when fired while unwielded.

suppressed

whether or not a message is displayed when fired

trigger_guard

trigger guard on the weapon. Used for hulk mutations and ashies. I honestly dont know how usefult his is, id avoid touching it

weapon_weight

affects if you can fire it unwielded or even dual wield it. LIGHT means dual wield allowed, HEAVY and higher means you have to wield to fire

wield_delay

How long between wielding and firing in tenths of seconds

wield_slowdown

Slowdown for wielding

wield_time

Storing value for above

Proc Details

on_unwield

triggered on unwield of two handed item

on_wield

triggered on wield of two handed item

process_fire

Handles everything involving firing.

Returns TRUE or FALSE depending on if it actually fired a shot. Arguments:

set_gun_light

Swaps the gun's seclight, dropping the old seclight if it has not been qdel'd.

Returns the former gun_light that has now been replaced by this proc. Arguments:

simulate_recoil

our final spread value our randomized value after checking if we are wielded or not bonus