mercurier Posted May 2, 2023 Posted May 2, 2023 In my game the party lost 2 reputation when Dorn joined but regained only 1 when he leaved. Could this behavior caused by component "#4051 // Decrease the rate at which reputation improves -> Reputation increases at about 1/2 the normal rate: 34.3"? Quote
jmerry Posted May 3, 2023 Posted May 3, 2023 (edited) Yes. The reputation change when Dorn enters and leaves in BGEE is handled through his dialogue, unlike the cases of Viconia and Baeloth who use blocks of BALDUR.BCS. The SCS reputation component checks all BCS and DLG files for reputation change actions and modifies them, with the exception of BALDUR.BCS and BALDUR25.BCS (and one more script for a mod NPC). The comment on that exclusion says it's to keep the Viconia reputation shifts intact. Recommended change (for stratagems/gameplay/reputation.tpa): add an exclusion for DORNP.DLG. Here's some code for it, mirroring the existing code for excluding scripts: Old: Spoiler COPY_EXISTING_REGEXP GLOB ~%tutu_var%.*\.dlg~ ~override~ PATCH_IF FILE_CONTAINS_EVALUATED (~%SOURCE_RES%.dlg~ ~ReputationInc~) THEN BEGIN PATCH_TRY PATCH_SILENT DECOMPILE_AND_PATCH BEGIN REPLACE_TEXTUALLY ~ReputationInc(1)~ ~SetGlobal("DMWWRepBoost","GLOBAL",1)~ REPLACE_TEXTUALLY ~ReputationInc(2)~ ~ReputationInc(1)~ END PATCH_VERBOSE WITH DEFAULT PATCH_PRINT ~SCS warning: could not recompile %SOURCE_RES%.dlg (don't worry, this is harmless, though it points to a problem in some other mod)~ END END BUT_ONLY New: Spoiler ACTION_FOR_EACH ~dialog~ IN dornp dornp_ // Dorn's Rep decrease/increase upon joining/leaving party in BGEE BEGIN OUTER_INNER_PATCH ~~ BEGIN TO_LOWER ~dialog~ // guard against own incompetence END OUTER_SPRINT $rep_skip_dialog( ~%dialog%~) ~~ END COPY_EXISTING_REGEXP GLOB ~%tutu_var%.*\.dlg~ ~override~ PATCH_IF FILE_CONTAINS_EVALUATED (~%SOURCE_RES%.dlg~ ~ReputationInc~) THEN BEGIN SPRINT ~dialog~ ~%SOURCE_RES%~ TO_LOWER ~dialog~ PATCH_IF !(VARIABLE_IS_SET $rep_skip_dialog( ~%dialog%~)) BEGIN PATCH_TRY PATCH_SILENT DECOMPILE_AND_PATCH BEGIN REPLACE_TEXTUALLY ~ReputationInc(1)~ ~SetGlobal("DMWWRepBoost","GLOBAL",1)~ REPLACE_TEXTUALLY ~ReputationInc(2)~ ~ReputationInc(1)~ END PATCH_VERBOSE WITH DEFAULT PATCH_PRINT ~SCS warning: could not recompile %SOURCE_RES%.dlg (don't worry, this is harmless, though it points to a problem in some other mod)~ END END END BUT_ONLY Just replace the "old" code with the "new" code. Or if you've already installed the component, you can hotfix it by going through the actions of DORNP.DLG (BGEE) or DORNP_.DLG (EET) in Near Infinity. Replace each instance of ReputationInc(1) with ReputationInc(2). Also, while we're at it, SoD needs some compatibility code; bdbaldur.BCS should be added to the list of excluded scripts, as three companions in SoD cost you rep while in the party. That's a simple change: ACTION_FOR_EACH ~script~ IN baldur baldur25 // Viconia's Rep decrease/increase upon joining/leaving party sola // ditto for Solaufein BEGIN OUTER_INNER_PATCH ~~ BEGIN TO_LOWER ~script~ // guard against own incompetence END OUTER_SPRINT $rep_skip_script( ~%script%~) ~~ END becomes ACTION_FOR_EACH ~script~ IN baldur baldur25 bdbaldur // Viconia's Rep decrease/increase upon joining/leaving party. Also M'Khiin and Baeloth. sola // ditto for Solaufein BEGIN OUTER_INNER_PATCH ~~ BEGIN TO_LOWER ~script~ // guard against own incompetence END OUTER_SPRINT $rep_skip_script( ~%script%~) ~~ END To hotfix that one, go through bdbaldur.BCS and replace each instance of ReputationInc(1) with ReputationInc(2). The relevant blocks run from about line 150 to 200, unless something adds to the top of the script. Edited May 3, 2023 by jmerry Corrected for EET and SoD compatibility Quote
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.