Perks and traits

Subcategories

Functions


add_trait

sfall.h

void add_trait(int traitID)

adds the specified trait to the player


apply_heaveho_fix

void apply_heaveho_fix

clear_selectable_perks

void clear_selectable_perks()

Restores the “select a perk” box to its default state.


get_perk_available

int get_perk_available(int perk)

get_perk_owed

int get_perk_owed

has_fake_perk

int has_fake_perk(string name)

Returns the number of levels the player has of the perks with the given name or ID of extra perk.


has_fake_trait

int has_fake_trait(string name)

Returns the number of levels the player has of the traits with the given name or ID of extra trait.


hide_real_perks

void hide_real_perks()

Prevent the “select a perk” box from displaying any of the original 119 perks.


perk_add_mode

void perk_add_mode(int type)

Modifies what happens when a fake perk is selected from the perks dialog. It is treated as a set of flags - if bit 1 is set then it is added to the player’s traits, if bit 2 is set it is added to the player’s perks, and if bit 3 is set it is removed from the list of selectable perks. The default is 0x2.


remove_trait

void remove_trait(int traitID)

seq_perk_freq

void seq_perk_freq(int value)

Sets the number of levels between each perk.


set_fake_perk

void set_fake_perk(string name, int level, int image, string desc)

Used to add additional traits and perks to the character screen. They will be saved correctly when the player saves and reloads games, but by themselves they will have no further effect on the character. For perks, the allowed range for levels is between 0 and 100; setting the level to 0 removes that perk. For traits, the level must be 0 or 1. The image is a numeric ID that corresponds to an entry in skilldex.lst. The name is limited to 63 characters and the description to 255 characters by sfall, but internal Fallout limits may be lower.


set_fake_trait

void set_fake_trait(string name, int active, int image, string desc)

Used to add additional traits and perks to the character screen. They will be saved correctly when the player saves and reloads games, but by themselves they will have no further effect on the character. For perks, the allowed range for levels is between 0 and 100; setting the level to 0 removes that perk. For traits, the level must be 0 or 1. The image is a numeric ID that corresponds to an entry in skilldex.lst. The name is limited to 63 characters and the description to 255 characters by sfall, but internal Fallout limits may be lower.


set_perk_agl

void set_perk_agl(int perkID, int value)

set_perk_chr

void set_perk_chr(int perkID, int value)

set_perk_desc

void set_perk_desc(int perkID, string value)

set_perk_end

void set_perk_end(int perkID, int value)

set_perk_freq

void set_perk_freq(int value)

Sets the number of levels between each perk. Setting to 0 will reset it back to the default. This overrides the effects of the skilled trait. Not saved into the save game, so needs to be called once per reload. Be careful not to let the player obtain a perk when no perks are available to pick, or the game may crash.


set_perk_image

void set_perk_image(int perkID, int value)

set_perk_int

void set_perk_int(int perkID, int value)

set_perk_lck

void set_perk_lck(int perkID, int value)

set_perk_level

void set_perk_level(int perkID, int value)

set_perk_level_mod

void set_perk_level_mod(int levels)

Sets a modifier between +25 and -25 that is added/subtracted from the player’s level for the purposes of deciding which perks can be chosen.


set_perk_name

void set_perk_name(int perkID, string value)

set_perk_owed

void set_perk_owed(int value)

set_perk_per

void set_perk_per(int perkID, int value)

set_perk_ranks

void set_perk_ranks(int perkID, int value)

set_perk_skill1

void set_perk_skill1(int perkID, int value)

set_perk_skill1_mag

void set_perk_skill1_mag(int perkID, int value)

set_perk_skill2

void set_perk_skill2(int perkID, int value)

set_perk_skill2_mag

void set_perk_skill2_mag(int perkID, int value)

set_perk_stat

void set_perk_stat(int perkID, int value)

set_perk_stat_mag

void set_perk_stat_mag(int perkID, int value)

set_perk_str

void set_perk_str(int perkID, int value)

set_perk_type

void set_perk_type(int perkID, int value)

set_perkbox_title

void set_perkbox_title(string title)

Used to change the title of the “select a perk” box, or by using “” it will be set back to the default.


set_pyromaniac_mod

void set_pyromaniac_mod(int bonus)

set_selectable_perk

void set_selectable_perk(string name, int active, int image, string desc)

Used to add additional items to “select a perk” box by setting the ‘active’ parameter to 1, and to remove them again by setting it to 0.


set_swiftlearner_mod

void set_swiftlearner_mod(int bonus)

show_real_perks

void show_real_perks()

Reverts the effect os hide_real_perks.