Added new hook script for controlling FID of character figure on inventory screen

This commit is contained in:
phobos2077
2017-04-01 02:12:20 +07:00
parent 203dcdf6be
commit 6e0fe881df
4 changed files with 63 additions and 0 deletions
+1
View File
@@ -46,6 +46,7 @@
#define HOOK_WITHINPERCEPTION (23)
#define HOOK_INVENTORYMOVE (24)
#define HOOK_INVENWIELD (25)
#define HOOK_ADJUSTFID (26)
//Valid arguments to list_begin
#define LIST_CRITTERS (0)
+14
View File
@@ -436,3 +436,17 @@ int arg3 - slot (INVEN_TYPE_*)
int arg4 - 1 when wielding, 0 when unwielding
int ret1 - overrides hard-coded handler (-1 - use engine handler, any other value - override) - NOT RECOMMENDED
-------------------------------------------
HOOK_ADJUSTFID (hs_adjustfid.int)
Runs after calculating character figure FID on the inventory screen, whenever the game decides that character appearance might change.
Also happens on other screens, like barter.
NOTE: FID has following format: 0x0ABBCDDD, where A is object type, BB - animation code (always 0 in this case), C - weapon code, DDD - FRM index in LST file.
int arg1 - the vanilla fid calculated by the engine according to critter base FID and armor/weapon being used
int ret1 - overrides the calculated FID with provided value