Link Search Menu Expand Document

Common fake perk/trait

Функции


clear_selectable_perks

void clear_selectable_perks()

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


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.


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_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_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.


show_real_perks

void show_real_perks()

Reverts the effect os hide_real_perks.