Other


active_hand

int active_hand

create_message_window

void create_message_window(string message)

create_spatial

ObjectPtr create_spatial(int scriptID, int tile, int elevation, int radius)

Creates new spatial script with given SID, at given tile, and radius.


game_loaded

int game_loaded()

Returns 1 the first time it is called after a new game or game load, and 0 any time after. It works on an individual basis for each script, so one script wont interfere with others. Its primary use is for global scripts, so that they know when to call set_global_script_repeat, but it can be called from normal scripts too.


gdialog_get_barter_mod

int gdialog_get_barter_mod

get_game_mode

int get_game_mode()

A more flexible version of in_world_map. It will return a set of flags indicating which mode the game is currently in. These flags are the same as those used in the set_shader_mode function.


get_kill_counter

int get_kill_counter(int critterType)

get_light_level

int get_light_level()

Returns ambient light level in range 0..65536. The value returned by get_light_level may not exactly match that set by set_light_level, as set_light_level applies modifiers from the Night Vision perk.


get_npc_level

int get_npc_level(string npc)

get_proto_data

int get_proto_data(int pid, int offset)

Used to read the in-memory copies of the .pro files Fallout makes when they are loaded. The offset refers to the offset in memory from the start of the proto to the element you are reading.


get_unspent_ap_bonus

int get_unspent_ap_bonus()

Gets the AC bonus you receive per unused action point at the end of your turn in combat. To allow for fractional values, the value given if divided by 4. (Hence the default value is 4 and not 1.)


get_unspent_ap_perk_bonus

int get_unspent_ap_perk_bonus()

Similar to get_unspent_ap_bonus, but accounts for the extra AC granted by the h2h evade perk. (The default value of this is also 4, equivalent to doubling the original bonus.


get_uptime

int get_uptime()

Just a wrapper around the windows GetTickCount() function. It’s useful for making time fade effects in shaders, since they already have access to the current tick count.


get_viewport_x

int get_viewport_x()

get_viewport_y

int get_viewport_y()

get_window_under_mouse

int get_window_under_mouse()

get_year

int get_year

hero_select_win

void hero_select_win(int)

inc_npc_level

void inc_npc_level(int party_member_pid)

Takes a party member PID or an NPC name (deprecated, for compatibility with sfall 4.1.5/3.8.15 or earlier) as an argument. The NPC must be in your party. This function ignores player level requirements and the minimum 3 player level delay between NPC level gains. It also ignores the random element, regardless of sfall’s NPCAutoLevel setting.


input_funcs_available

int input_funcs_available()

The input functions are only available if the user has the input hook turned on in ddraw.ini. Use input_funcs_available to check.


mark_movie_played

void mark_movie_played(int id)

message_str_game

string message_str_game(int fileId, int messageId)

Works exactly the same as message_str, except you get messages from files in text/english/game folder. Use GAME_MSG_* defines or mstr_* macros from sfall.h to use specific msg file

  • Additional game msg files added by ExtraGameMsgFileList setting will have consecutive fileIds assigned beginning from 0x2000 to 0x2FFF. (e.g. if you set ExtraGameMsgFileList=foo,bar in ddraw.ini, foo.msg will be associated with 0x2000 and bar.msg with 0x2001.).
  • If a file has a specific number assigned in ExtraGameMsgFileList, its fileId will be (0x2000 + assigned number). (e.g. with ExtraGameMsgFileList=foo,bar:2,foobar in ddraw.ini, bar.msg will be associated with 0x2002 and foobar.msg with 0x2003.)

mod_kill_counter

void mod_kill_counter(int critterType, int amount)

nb_create_char

int nb_create_char()

nb_* functions are reserved for the brotherhood tactical training mod, and should be avoided.


resume_game

void resume_game()

set_base_hit_chance_mod

void set_base_hit_chance_mod(int max, int mod)

set_base_pickpocket_mod

void set_base_pickpocket_mod(int max, int mod)

Changes maximum chance of success and chance mod for each steal attempt. max will replace 95% success chance cap (so you can set 100% maximum chance, for instance). mod will add this much percent to each success chance. for example if your chance is 50% and mod is 20, you will get 70% actual success rate


set_critter_hit_chance_mod

void set_critter_hit_chance_mod(CritterPtr, int max, int mod)

set_critter_pickpocket_mod

void set_critter_pickpocket_mod(CritterPtr, int max, int mod)

The same as set_base_pickpocket, but applies only to specific critter.


set_df_model

void set_df_model(string name)

set_dm_model

void set_dm_model(string name)

set_hit_chance_max

void set_hit_chance_max(int percentage)

Effects all critters rather than just the player.


set_hp_per_level_mod

void set_hp_per_level_mod(int mod)

set_inven_ap_cost

void set_inven_ap_cost

set_movie_path

void set_movie_path(string filename, int movieid)

set_pickpocket_max

void set_pickpocket_max(int percentage)

Effects all critters rather than just the player.


set_pipboy_available

void set_pipboy_available(int available)

Will only accept 0 or 1 as an argument. Using any other value will cause the function to have no effect. Use 0 to disable the pipboy, and 1 to enable it.


set_proto_data

void set_proto_data(int pid, int offset, int value)

Used to alter the in-memory copies of the .pro files Fallout makes when they are loaded. The offset refers to the offset in memory from the start of the proto to the element you are reading. Changes are not stored on disc, and are not permanent. If you modify the protos, and then Fallout subsequently reloads the file your changes will be lost.


set_unspent_ap_bonus

void set_unspent_ap_bonus(int multiplier)

Alter the AC bonus you receive per unused action point at the end of your turn in combat. To allow for fractional values, the value given if divided by 4. (Hence the default value is 4 and not 1.)


set_unspent_ap_perk_bonus

void set_unspent_ap_perk_bonus(int multiplier)

Similar to set_unspent_ap_bonus, but effects the extra AC granted by the h2h evade perk. (The default value of this is also 4, equivalent to doubling the original bonus.


set_viewport_x

void set_viewport_x(int view_x)

set_viewport_y

void set_viewport_y(int view_y)

set_xp_mod

void set_xp_mod(int percentage)

sneak_success

int sneak_success

Returns 1 if last sneak attempt (roll against skill) was successful, 0 otherwise. This calls an internal engine function which is used to determine the perception range of critters (which you can override using HOOK_WITHINPERCEPTION).


stop_game

void stop_game()

toggle_active_hand

void toggle_active_hand