Link

Subcategories

Combat


attack_is_aimed

sfall.h

bool attack_is_aimed()

Returns 1 if the aimed attack mode is selected, 0 otherwise.

This is a macro, you need to include sfall.h to use it.


block_combat

void block_combat(bool value)

Deny the player to enter combat mode.


disable_aimed_shots

void disable_aimed_shots(int pid)

Allows overriding the normal rules regarding which weapons are allowed to make aimed attacks. (e.g. weapons that cause explosive damage normally cannot normally make aimed shots.) stops a weapon from making aimed shots even if it normally coulld. Affects player and NPCs alike. The list of edited weapons is not saved over game loads, so you need to call the function once at each reload. Use a pid of 0 to represent unarmed.


force_aimed_shots

void force_aimed_shots(int pid)

Allows overriding the normal rules regarding which weapons are allowed to make aimed attacks. (e.g. weapons that cause explosive damage normally cannot normally make aimed shots.) Will allow a weapon to make aimed shots even if it normally couldn’t. Affects player and NPCs alike. Does not override the effects of the fast shot trait. The list of edited weapons is not saved over game loads, so you need to call the function once at each reload. Use a pid of 0 to represent unarmed.


get_attack_type

int get_attack_type

get_bodypart_hit_modifier

int get_bodypart_hit_modifier(int bodypart)

Gets the hit percentage modifiers for aiming at specific bodyparts. Valid bodypart id’s are from 0 to 8.


get_critical_table

int get_critical_table(int crittertype, int bodypart, int level, int valuetype)

Gets current critical table. For details see critical hit tables. Requires OverrideCriticalTable to be set to 1 in ddraw.ini. (Disabled by default, because it noticably increases loading times.)


get_critter_current_ap

int get_critter_current_ap(CritterPtr)

Should only be used during the target critters turn while in combat. Calling it outside of combat typically returns the critters max ap, but don’t rely on that behaviour. (Specifically, if the critter has never before entered combat, it will probably return the critters base ap ignoring any extra bonuses from perks etc.)


get_last_attacker

ObjectPtr get_last_attacker(ObjectPtr critter)

Will return the last critter to deliberately launch an attack against the argument critter. If a critter has not launched/received an attack, it will return 0. Outside of combat always returns 0.


get_last_target

ObjectPtr get_last_target(ObjectPtr critter)

Will return the last critter to be deliberately attacked. Outside of combat always returns 0.


reset_critical_table

void reset_critical_table(int crittertype, int bodypart, int level, int valuetype)

Resets the critical table to default (or to the contents of CriticalOverrides.ini, if it exists). For details see ‘http://falloutmods.wikia.com/wiki/Critical_hit_tables’. Requires OverrideCriticalTable to be set to 1 in ddraw.ini. (Disabled by default, because it noticably increases loading times.)


set_bodypart_hit_modifier

void set_bodypart_hit_modifier(int bodypart, int value)

Alters the hit percentage modifiers for aiming at specific bodyparts. Valid bodypart id’s are from 0 to 8. Changes are not saved, and will reset to the defaults (or to the values specified in ddraw.ini if they exist) at each reload.


set_critical_table

void set_critical_table(int crittertype, int bodypart, int level, int valuetype, int value)

Used for modifying the critical table. For details see critical hit tables. Changes are not saved, and will reset to the defaults, (or to the contents of CriticalOverrides.ini, if it exists) at each game reload. Requires OverrideCriticalTable to be set to 1 in ddraw.ini. (Disabled by default, because it noticably increases loading times.)


set_critter_burst_disable

void set_critter_burst_disable(int critter, int disable)

set_critter_current_ap

void set_critter_current_ap(CritterPtr, int ap)

Should only be used during the target critters turn while in combat. Using it on the player will not automatically redraw the screen, so the ap bar will be incorrect until the player next clicks.