Updated hook script document for new arguments of hs_barterprice.

Changed BarterPriceHook() to be in line with the version in 4.0 branch.
Fixed incorrect GlobalVar struct size leading to load game crashes and corrupted saves (from 4.0 development branch)
This commit is contained in:
NovaRain
2017-03-13 13:08:15 +08:00
parent 77349cbaec
commit 28c18c1925
4 changed files with 30 additions and 19 deletions
+5 -2
View File
@@ -235,9 +235,12 @@ Runs whenever the value of goods being purchased is calculated
critter arg1 - the critter doing the bartering (either dude_obj or inven_dude)
critter arg2 - the critter being bartered with
int arg3 - the default value of the goods
critter arg4 - the barter critter (has all of the goods being traded in its inventory)
critter arg4 - table of requested goods (being bought from NPC)
int arg5 - the amount of actual caps in the barter stack (as opposed to goods)
int arg6 - the value of all goods being traded before skill modifications
critter arg7 - table of offered goods (being sold to NPC)
int arg8 - the total cost of the goods offered by the player
int arg9 - set 1 if the "offers" button was pressed (not for a party member), otherwise 0
int ret1 - the modified value of all of the goods
@@ -402,7 +405,7 @@ hs_invenwield.int
Runs before wielding or unwielding an armor or a weapon by a critter (except when using inventory by PC).
An example usage would be to change critter art depending on armor being used or to dynamically customize weapon animations.
NOTE: when replacing a previously wielded armor or weapon, the unwielding hook will not be executed.
NOTE: when replacing a previously wielded armor or weapon, the unwielding hook will not be executed.
If you need to rely on this, try checking if armor/weapon already equipped when wielding hook is executed.
Critter arg1 - critter