Rename the option from previous commit to FullItemDescInBarter and added it to ddraw.ini.

Edited info about HOOK_DESCRIPTIONOBJ and the new return value of HOOK_BARTERPRICE to documents.
Minor edits to ddraw.ini to avoid misunderstanding.
This commit is contained in:
NovaRain
2018-07-28 22:27:32 +08:00
parent 93cd7a08ad
commit 0bda53e109
4 changed files with 22 additions and 14 deletions
+5 -2
View File
@@ -378,7 +378,7 @@ UseScrollingQuestsList=1
;PremadeFIDs=201,203,202
;Use this line to modify the list of cities and their associated global variables used for city reputations
;Syntax is 'city id : global id', with each city/global pair separated by a comma.
;Syntax is 'city id:global id', with each city/global pair separated by a comma.
;CityRepsList=0:47,2:48,1:49,4:50,5:51,3:52,8:53,6:54,7:55,13:56,10:57,11:59,14:61,17:63,19:64,18:65,25:66,9:294,20:308
;Set this to a valid path to save a copy of the console contents
@@ -564,7 +564,7 @@ InstantWeaponEquip=0
;To add additional game msg files, uncomment the next line and set a comma delimited list of filenames without .msg extension
;By default, the files will have consecutive numbers assigned beginning with 0
;You can use the syntax 'filename : number' to manually assign numbers to specific msg files, with each pair separated by a comma
;You can use the syntax 'filename:number' to manually assign numbers to specific msg files, with each pair separated by a comma
;If a file after the specified pair does not have a number assigned, it will have the next consecutive number from the last pair
;You need to use the message_str_game script function to get messages from the files
;ExtraGameMsgFileList=
@@ -578,6 +578,9 @@ WorldMapFontPatch=0
;Set to 1 to keep the selected attack mode when moving the weapon between active item slots
KeepWeaponSelectMode=1
;Set to 1 to display full item description for weapon/ammo in barter screen
FullItemDescInBarter=0
;Set to 1 to display sfall built-in credits at the bottom of credits.txt contents instead of at the top
CreditsAtBottom=0
+5 -5
View File
@@ -265,7 +265,7 @@ 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, pass -1 for modify only offered goods
int ret1 - the modified value of all of the goods (pass -1 if you just want to modify offered goods)
int ret2 - the modified value of all offered goods
-------------------------------------------
@@ -537,9 +537,9 @@ int ret2 - overrides the result of engine calculation: 0/1 - failure, 2/3 -
HOOK_DESCRIPTIONOBJ (hs_descriptionobj)
Runs while using the item description icon in the player's inventory, or trade window.
Allows to override the description of the item (for example: add additional parameters to the description).
Runs when using the examine action icon to display item description. You can override the description of the item.
An example usage would be to add additional parameters to the description.
Obj arg1 - the item
Obj arg1 - the item
int ret1 - a pointer to the new "text" received using the macro function 'get_string_pointer' from FuncX functions
int ret1 - a pointer to the new text received by using "get_string_pointer" function
+1 -1
View File
@@ -495,7 +495,7 @@ Some utility/math functions are available:
- returns a pointer to a string variable or to a text
> void sfall_func1("dialog_message", string text)
- displays a message in the NPC response window in dialog or trade mode
- displays a message in the NPC response window in dialog or barter screen
------------------------
------ MORE INFO -------
+11 -6
View File
@@ -1548,19 +1548,24 @@ void BugFixes::init()
MakeJump(0x424BA2, compute_damage_hack);
dlogr(" Done", DL_INIT);
// Fix descriptions info items weapon/ammo in barter
dlog("Applying barter item description fix.", DL_INIT);
// Fix missing AC/DR mod stats when examining ammo in barter screen
dlog("Applying fix for displaying ammo stats in barter screen.", DL_INIT);
MakeCalls(obj_examine_func_hack_ammo0, {0x49B4AD, 0x49B504});
SafeWrite16(0x49B4B2, 0x9090);
SafeWrite16(0x49B509, 0x9090);
MakeCall(0x49B563, obj_examine_func_hack_ammo1);
SafeWrite16(0x49B568, 0x9090);
showItemDescription = (GetConfigInt("Misc", "BarterItemDescriptions", 1) != 0);
if (showItemDescription) {
HookCall(0x49B452, obj_examine_func_hack_weapon); // it's jump
}
dlogr(" Done", DL_INIT);
// Display full item description for weapon/ammo in barter screen
showItemDescription = (GetConfigInt("Misc", "FullItemDescInBarter", 0) != 0);
if (showItemDescription) {
dlog("Applying full item description in barter patch.", DL_INIT);
HookCall(0x49B452, obj_examine_func_hack_weapon); // it's jump
dlogr(" Done", DL_INIT);
}
}
}