Added new HOOK_USESKILLON and PartyMemberSkillFix option (#191)

This commit is contained in:
NovaRain
2018-10-24 12:19:30 +08:00
parent 3203152ca4
commit 5ab389a51a
9 changed files with 156 additions and 2 deletions
+9 -1
View File
@@ -75,7 +75,8 @@ Use32BitHeadGraphics=0
;Requires graphics mode 4 or 5
AllowDShowMovies=0
;Fade effect time length percentage modifier
;Fade effect time percentage modifier
;Default is 100. Decrease/increase this value to speed up/slow down fade effects
FadeMultiplier=100
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
@@ -631,6 +632,13 @@ DisplaySwiftLearnerExp=1
;Set to 1 to display party member's current level/AC/addict flag on the combat control panel
PartyMemberExtraInfo=0
;Set to 1 to fix the bug of using First Aid/Doctor skills when using them on the player
;This will cause the party member to apply his/her skills when you use First Aid/Doctor skills on the player, but only if
;the player is standing next to the party member
;Note that because the related engine function is not fully implemented, enabling this option without a global script
;that overrides First Aid/Doctor functions has very limited usefulness
PartyMemberSkillFix=0
;Set to 1 to skip loading game settings from a saved game, except for the game/combat difficulty settings
;Set to 2 to also skip loading the game/combat difficulty settings
SkipLoadingGameSettings=0
+2
View File
@@ -55,6 +55,8 @@
#define HOOK_GAMEMODECHANGE (31)
#define HOOK_USEANIMOBJ (32)
#define HOOK_EXPLOSIVETIMER (33)
#define HOOK_DESCRIPTIONOBJ (34)
#define HOOK_USESKILLON (35)
//Valid arguments to list_begin
#define LIST_CRITTERS (0)
+14
View File
@@ -544,3 +544,17 @@ An example usage would be to add an additional description to the item based on
Obj arg1 - the item
int ret1 - a pointer to the new text received by using "get_string_pointer" function
-------------------------------------------
HOOK_USESKILLON (hs_useskillon.int)
Runs before using any skill on any object. Lets you override the critter that uses the skill.
NOTE: the user critter can't be overridden when using Steal skill.
Critter arg1 - The user critter (usually dude_obj)
Obj arg2 - the target object/critter
int arg3 - skill being used
int ret1 - a new critter to override the user critter. Pass -1 to cancel the skill use, pass 0 to skip this return value
int ret2 - pass 1 to allow the skill being used in combat (only for dude_obj or critter being controlled by the player)