mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Updated documents for hook/function changes
This commit is contained in:
+2
-2
@@ -15,7 +15,7 @@ UseCommandLine=0
|
||||
;This section allows you to set multiple paths to folders containing mods or patches
|
||||
;Paths to folders and Fallout .dat files are supported
|
||||
;The PatchFileXX options are available from 0 to 99. Larger numbers take precedence over smaller numbers (same as patchXXX.dat)
|
||||
;The complete data load order is:
|
||||
;The complete order of how the engine finds game data is:
|
||||
;master_patches > critter_patches > PatchFile99..PatchFile0 > patchXXX.dat > sfall.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
|
||||
;PatchFile0=mods\RP_data
|
||||
;PatchFile1=
|
||||
@@ -288,7 +288,7 @@ UseFileSystemOverride=0
|
||||
;If you want to load multiple patch files (up to 1000) at once, you can include a %d in the file name (sprintf syntax)
|
||||
;PatchFile=patch%03d.dat
|
||||
|
||||
;Set to 1 to use the modified data load order for the engine to find game data
|
||||
;Set to 1 to change the order of how the engine finds game data
|
||||
;Original: patchXXX.dat > critter_patches > critter_dat > f2_res_patches > f2_res_dat > master_patches > master_dat
|
||||
;Modified: master_patches > critter_patches > extra_patches > patchXXX.dat > sfall.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
|
||||
;This option is always enabled in 4.3/3.8.30 or later. The information is left for reference only
|
||||
|
||||
@@ -275,6 +275,10 @@
|
||||
#define weapon_attack_mode2(pid) ((get_proto_data(pid, PROTO_FLAG_EXT) bwand 0x000000F0) / 0x10)
|
||||
#define weapon_attack_mode(pid, attackType) (weapon_attack_mode1(pid) if (attackType == ATKTYPE_LWEP1 or attackType == ATKTYPE_RWEP1) else weapon_attack_mode2(pid))
|
||||
|
||||
#define get_tile_fid_ext(tile, elev, mode) get_tile_fid(((mode bwand 0xF) * 0x10000000) bwor ((elev bwand 0xF) * 0x1000000) bwor (tile bwand 0xFFFFFF))
|
||||
#define get_tile_ground_fid(tile, elev) get_tile_fid_ext(tile, elev, 0)
|
||||
#define get_tile_roof_fid(tile, elev) get_tile_fid_ext(tile, elev, 1)
|
||||
|
||||
|
||||
/* SFALL_FUNCX MACROS */
|
||||
|
||||
@@ -320,7 +324,6 @@
|
||||
#define get_npc_stat_max(stat) sfall_func2("get_stat_max", stat, 1)
|
||||
#define get_npc_stat_min(stat) sfall_func2("get_stat_min", stat, 1)
|
||||
#define get_sfall_arg_at(argNum) sfall_func1("get_sfall_arg_at", argNum)
|
||||
#define get_string_pointer(text) sfall_func1("get_string_pointer", text)
|
||||
#define get_terrain_name(x, y) sfall_func2("get_terrain_name", x, y)
|
||||
#define get_text_width(text) sfall_func1("get_text_width", text)
|
||||
#define hide_win sfall_func0("hide_window")
|
||||
@@ -360,6 +363,7 @@
|
||||
#define set_car_intface_art(artIndex) sfall_func1("set_car_intface_art", artIndex)
|
||||
#define set_combat_free_move(value) sfall_func1("set_combat_free_move", value)
|
||||
#define set_cursor_mode(mode) sfall_func1("set_cursor_mode", mode)
|
||||
#define set_dude_obj(critter) sfall_func1("set_dude_obj", critter)
|
||||
#define set_flags(obj, flags) sfall_func2("set_flags", obj, flags)
|
||||
#define set_iface_tag_text(tag, text, color) sfall_func3("set_iface_tag_text", tag, text, color)
|
||||
#define set_ini_setting(setting, value) sfall_func2("set_ini_setting", setting, value)
|
||||
|
||||
@@ -691,10 +691,12 @@ An example usage would be to add an additional description to the item based on
|
||||
|
||||
Does not run if the script of the object overrides the description.
|
||||
|
||||
__NOTE:__ Returning a pointer to the new text received from the `get_string_pointer` function is still valid, but the method is DEPRECATED and is left for backward compatibility only.
|
||||
|
||||
```
|
||||
Obj arg0 - the object
|
||||
|
||||
int ret0 - a pointer to the new text received by using the get_string_pointer function
|
||||
String ret0 - the new description text to use
|
||||
```
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
@@ -230,6 +230,20 @@ FUNCTION REFERENCE
|
||||
##### `void set_critter_pickpocket_mod(object critter, int max, int mod)`
|
||||
- The same as above, but applies only to specific critter.
|
||||
|
||||
-----
|
||||
##### `int get_tile_fid(int tileData)`
|
||||
- Returns FID information about the square under the given tile at elevation 0.
|
||||
- Pass elevation as 4-bit number in bits 25-28 to access other elevations.
|
||||
- Pass result mode in bits 29-32: 0 - ground FID, 1 - roof FID, 2 - raw data. Following macros are available in **sfall.h**:
|
||||
|
||||
-----
|
||||
##### `int get_tile_ground_fid(int tileNum, int elevation)`
|
||||
- Returns FID of a ground tile at given tile number and elevation.
|
||||
|
||||
-----
|
||||
##### `int get_tile_roof_fid(int tileNum, int elevation)`
|
||||
- Returns FID of a roof tile at given tile number and elevation. Note that FID of 1 is used when there is no actual roof.
|
||||
|
||||
-----
|
||||
##### `void reg_anim_combat_check`
|
||||
- Allows enabling all `reg_anim_*` functions in combat (including vanilla functions) if set to 0. It is automatically reset at the end of each frame, so you need to call it before `reg_anim_begin() ... reg_anim_end()` code block.
|
||||
@@ -257,7 +271,7 @@ FUNCTION REFERENCE
|
||||
|
||||
-----
|
||||
##### `void reg_anim_turn_towards(object, tile/target, delay)`
|
||||
- Makes object change its direction to face given tile num or target object.
|
||||
- Makes object change its direction to face given tile number or target object.
|
||||
|
||||
-----
|
||||
##### `void reg_anim_callback(procedure proc)`
|
||||
@@ -569,10 +583,16 @@ sfall_funcX metarule functions
|
||||
`object sfall_func0("outlined_object")`
|
||||
- Returns an object that is currently highlighted by hovering the mouse above it
|
||||
|
||||
----
|
||||
#### set_dude_obj
|
||||
`object sfall_func1("set_dude_obj", critter)`
|
||||
- Take control of a given critter
|
||||
- Passing 0 will reset control back to "real" dude
|
||||
|
||||
----
|
||||
#### real_dude_obj
|
||||
`void sfall_func0("real_dude_obj")`
|
||||
- Returns the initial `dude_obj` after taking control of other critters in combat
|
||||
- Returns the initial `dude_obj` after `set_dude_obj` was used
|
||||
|
||||
----
|
||||
#### get_ini_sections
|
||||
@@ -700,7 +720,8 @@ sfall_funcX metarule functions
|
||||
----
|
||||
#### get_string_pointer
|
||||
`int sfall_func1("get_string_pointer", string text)`
|
||||
- Returns a pointer to a string variable or to a text
|
||||
- (DEPRECATED) Returns a pointer to a string variable or to a text
|
||||
- __NOTE:__ this function is intended for use only in `HOOK_DESCRIPTIONOBJ`. Starting from sfall 4.3.9/3.8.39, you can return normal strings directly in the hook without calling the function
|
||||
|
||||
----
|
||||
#### dialog_message
|
||||
|
||||
@@ -310,7 +310,7 @@ _^ - These functions require AllowUnsafeScripting to be enabled in ddraw.ini_
|
||||
0x8251 - `int charcode(string string)`\
|
||||
0x8253 - `int typeof(any value)`
|
||||
|
||||
0x823a - `int get_tile_fid(int tile)`
|
||||
0x823a - `int get_tile_fid(int tileData)`
|
||||
|
||||
0x823b - `int modified_ini()`
|
||||
|
||||
|
||||
@@ -310,9 +310,9 @@
|
||||
0x8251 - int charcode(string string)
|
||||
0x8253 - int typeof(any value)
|
||||
|
||||
0x823a - int get_tile_fid(int tile)
|
||||
0x823a - int get_tile_fid(int tileData)
|
||||
|
||||
0x823b - int modified_ini
|
||||
0x823b - int modified_ini()
|
||||
|
||||
0x823e - void force_aimed_shots(int pid)
|
||||
0x823f - void disable_aimed_shots(int pid)
|
||||
|
||||
Reference in New Issue
Block a user