void create_message_window(string message)
ObjectPtr create_spatial(int scriptID, int tile, int elevation, int radius)
Creates new spatial script with given SID, at given tile, and radius.
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.
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
int get_kill_counter(int critterType)
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 applies modifiers from the Night Vision perk.
int get_npc_level(string npc)
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.
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_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.
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.
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
The input functions are only available if the user has the input hook turned on in
input_funcs_available to check.
void mark_movie_played(int id)
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
ExtraGameMsgFileListsetting will have consecutive fileIds assigned beginning from 0x2000 to 0x2FFF. (e.g. if you set
foo.msgwill be associated with 0x2000 and
- If a file has a specific number assigned in
ExtraGameMsgFileList, its fileId will be (0x2000 + assigned number). (e.g. with
bar.msgwill be associated with 0x2002 and
void mod_kill_counter(int critterType, int amount)
nb_* functions are reserved for the brotherhood tactical training mod, and should be avoided.
void set_base_hit_chance_mod(int max, int 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
void set_critter_hit_chance_mod(CritterPtr, int max, int mod)
void set_critter_pickpocket_mod(CritterPtr, int max, int mod)
The same as
set_base_pickpocket, but applies only to specific critter.
void set_df_model(string name)
void set_dm_model(string name)
void set_hit_chance_max(int percentage)
Effects all critters rather than just the player.
void set_hp_per_level_mod(int mod)
void set_movie_path(string filename, int movieid)
void set_pickpocket_max(int percentage)
Effects all critters rather than just the player.
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.
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.
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.)
void set_unspent_ap_perk_bonus(int multiplier)
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.
void set_viewport_x(int view_x)
void set_viewport_y(int view_y)
void set_xp_mod(int percentage)
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