argent77 Posted November 22, 2022 Share Posted November 22, 2022 [BG2] Bernard at the Copper Coronet should not open different stores depending on certain quest outcomes Bernard initially provides access to his regular store (BERNARD.STO) and switches over to his improved store (BERNARD2.STO) after helping out Hendak or Lehtinan, which provides better prices and several new items. With this switch all items previously sold to the original store will be permanently lost to you. Moreover, the improved version doesn't provide a scroll case, which is only available in the regular store for some reason. In the EE engine the switch can be made more consistent by updating the regular store to behave like the improved version. ChangeStoreMarkup() can be used to update buy and sell markup, and AddStoreItem() can be used to add the new items to the store. The only difference would be item order, as AddStoreItem() cannot insert items at specific positions. This issue is probably more controversal, since it can potentially affect mod compatibility. Thoughts? Quote Link to comment
CamDawg Posted November 22, 2022 Share Posted November 22, 2022 Given that we deliberately did this for Orrick's store in IWD, I think the case can be made. It would be nice to know what mods, if any, add stuff to Bernard's second store since they'd have to swap over to scripting instead. Quote Link to comment
argent77 Posted November 22, 2022 Share Posted November 22, 2022 (edited) 2 hours ago, CamDawg said: Given that we deliberately did this for Orrick's store in IWD, I think the case can be made. It would be nice to know what mods, if any, add stuff to Bernard's second store since they'd have to swap over to scripting instead. I have only found two mods which may conflict: - Item Randomiser: Randomized items in one of the stores may not be available. - Item Revisions: Replaces content of both stores with different items. IR replaces content of BERNARD.STO with mundane stuff and BERNARD2.STO with several unique items. Other mods, if there are any, would probably work similarly and add the more unique or expensive stuff to the second store. As such, it would probably make more sense to disable the first store and use only the second store instead. Edited November 22, 2022 by argent77 Quote Link to comment
CamDawg Posted December 1, 2022 Share Posted December 1, 2022 [bg2] The crossway (ar6104) in Sendai's Enclave lacks the area scripting to make drow items safe, unlike the rest of the interior Enclave areas. Quote Link to comment
Roberciiik Posted December 9, 2022 Share Posted December 9, 2022 Hello, There is an extra, additional, redundant space before the character's ability name after casting. For all languages. Maybe it is not a bug, however I think it could be unified to one space. Any chance to fix it? Thanks! Quote Link to comment
Bubb Posted December 9, 2022 Share Posted December 9, 2022 That's an engine problem. When the engine is formatting the feedback string, it omits "Casts" if the spell was an innate, but still appends the space as if it was there. Quote Link to comment
jmerry Posted December 10, 2022 Author Share Posted December 10, 2022 Black Pits 2 uses the AddStoreItem() script action to enhance the shops as you progress in the adventure. Unfortunately, it seems the command doesn't work quite like the developers thought it did. Particularly with charged items, there's no parameter in the action for charges. The four parameters it takes are store, item, quantity, and flags. What if the item has charges? Then things go wrong. As far as I can tell, if the item's first ability has multiple charges, then the action flat out doesn't work. If the first ability doesn't use charges or has only one but some later ability has charges, you'll get some quantity of fully charged items. Or restock at the same charge level that's already present. (Also of note, the action's name is misleading. If one or more of the item in question are already in the shop, it restocks to N total instances instead of adding N.) So, going through where the OHBHUB script tries to add charged items to shops and gets things wrong... End of tier 1: Rod of Resurrection and Rod of Reversal to the magical item merchant with AddStoreItem("OHBIMIM","RODS03",5,1) and AddStoreItem("OHBIMIM","RODS06",5,1). Doesn't work, no items added. I read that "5" as the intended number of charges. End of tier 2: Staff of Power to weapon merchant with AddStoreItem("OHBSDWM","STAF12",10,1). Should be AddStoreItem("OHBSDWM","STAF12",1,1) for one fully charged (10 and 10 charges) staff instead of ten. End of tier 3: Greenstone Amulet to magical item merchant with AddStoreItem("OHBIMIM","AMUL17",10,1). Thieves' Hood and White Dragon Scale to armorer with AddStoreItem("OHBHUEGR","HELM30",1,1) and AddStoreItem("OHBHUEGR","CHAN20",1,1). These don't work. In the case of the Greenstone Amulet, I read that "10" as the intended number of charges. End of tier 4: Gargoyle Boots to magical item merchant with AddStoreItem("OHBIMIM","BOOT12",1,1). Doesn't work, no items added. The Staff of Power can can be fixed with a simple REPLACE_TEXTUALLY so there's only one in the shop instead of ten. The other six don't have a clean fix without a patch to the game; either the troublesome items are in the shops from the beginning, we switch to the BP1 system of multiple shop versions (incidentally restocking everything instead of just what's in the hub script), or the items don't become available in the shops at all. Quote Link to comment
jmerry Posted December 11, 2022 Author Share Posted December 11, 2022 (edited) I actually figured out an absurd workaround for the non-working script actions and those BP2 stores: implement a mini-store in dialogue. These stores all have the "ignore reputation" flag so only charisma matters for prices... First, an edit to the hub script: Spoiler COPY_EXISTING ~ohbhub.BCS~ ~override~ DECOMPILE_AND_PATCH BEGIN REPLACE_TEXTUALLY ~AddStoreItem("OHBSDWM","STAF12",10,1)~ ~AddStoreItem("OHBSDWM","STAF12",1,1)~ REPLACE_TEXTUALLY ~AddStoreItem("OHBIMIM","RODS03",5,1)~ ~SetGlobal("HasRODS03","OHBIMIM",1)~ REPLACE_TEXTUALLY ~AddStoreItem("OHBIMIM","RODS06",5,1)~ ~SetGlobal("HasRODS06","OHBIMIM",1)~ REPLACE_TEXTUALLY ~AddStoreItem("OHBIMIM","AMUL17",10,1)~ ~SetGlobal("HasAMUL17","OHBIMIM",1)~ REPLACE_TEXTUALLY ~AddStoreItem("OHBHUEGR","HELM30",1,1)~ ~SetGlobal("HasHELM30","OHBHUEGR",1)~ REPLACE_TEXTUALLY ~AddStoreItem("OHBHUEGR","CHAN20",1,1)~ ~SetGlobal("HasCHAN20","OHBHUEGR",1)~ REPLACE_TEXTUALLY ~AddStoreItem("OHBIMIM","BOOT12",1,1)~ ~SetGlobal("HasRBOOT12","OHBIMIM",1)~ END BUT_ONLY Correct the quantity on the staff of power, set up variables for the other items. And then, a D file for the mini-store. Spoilered for considerable length. Spoiler /* Extra items for the Magical Item Merchant */ APPEND OHBIMIM IF ~~ THEN BEGIN ExtraItems SAY ~(The mind flayer pulls out a handful of items to show you. They are clearly for sale.)~ IF ~Global("HasRODS03","LOCALS",1) CheckStatLT(Player1Fill,16,CHR) PartyGoldGT(5999)~ THEN REPLY ~6000 gold for a Rod of Resurrection with five charges? I'll take it.~ DO ~GiveItemCreate("RODS03",LastTalkedToBy,5,0,0) TakePartyGold(6000) SetGlobal("HasRODS03","LOCALS",0)~ EXIT IF ~Global("HasRODS03","LOCALS",1) CheckStat(Player1Fill,16,CHR) PartyGoldGT(5679)~ THEN REPLY ~5680 gold for a Rod of Resurrection with five charges? I'll take it.~ DO ~GiveItemCreate("RODS03",LastTalkedToBy,5,0,0) TakePartyGold(5680) SetGlobal("HasRODS03","LOCALS",0)~ EXIT IF ~Global("HasRODS03","LOCALS",1) CheckStat(Player1Fill,17,CHR) PartyGoldGT(5399)~ THEN REPLY ~5400 gold for a Rod of Resurrection with five charges? I'll take it.~ DO ~GiveItemCreate("RODS03",LastTalkedToBy,5,0,0) TakePartyGold(5400) SetGlobal("HasRODS03","LOCALS",0)~ EXIT IF ~Global("HasRODS03","LOCALS",1) CheckStat(Player1Fill,18,CHR) PartyGoldGT(5079)~ THEN REPLY ~5080 gold for a Rod of Resurrection with five charges? I'll take it.~ DO ~GiveItemCreate("RODS03",LastTalkedToBy,5,0,0) TakePartyGold(5080) SetGlobal("HasRODS03","LOCALS",0)~ EXIT IF ~Global("HasRODS03","LOCALS",1) CheckStat(Player1Fill,19,CHR) PartyGoldGT(4799)~ THEN REPLY ~4800 gold for a Rod of Resurrection with five charges? I'll take it.~ DO ~GiveItemCreate("RODS03",LastTalkedToBy,5,0,0) TakePartyGold(4800) SetGlobal("HasRODS03","LOCALS",0)~ EXIT IF ~Global("HasRODS03","LOCALS",1) CheckStatGT(Player1Fill,19,CHR) PartyGoldGT(4479)~ THEN REPLY ~4480 gold for a Rod of Resurrection with five charges? I'll take it.~ DO ~GiveItemCreate("RODS03",LastTalkedToBy,5,0,0) TakePartyGold(4480) SetGlobal("HasRODS03","LOCALS",0)~ EXIT IF ~Global("HasRODS03","LOCALS",1) CheckStatLT(Player1Fill,16,CHR) PartyGoldLT(6000)~ THEN REPLY ~6000 gold for a Rod of Resurrection with five charges? I can't afford that.~ EXIT IF ~Global("HasRODS03","LOCALS",1) CheckStat(Player1Fill,16,CHR) PartyGoldLT(5680)~ THEN REPLY ~5680 gold for a Rod of Resurrection with five charges? I can't afford that.~ EXIT IF ~Global("HasRODS03","LOCALS",1) CheckStat(Player1Fill,17,CHR) PartyGoldLT(5400)~ THEN REPLY ~5400 gold for a Rod of Resurrection with five charges? I can't afford that.~ EXIT IF ~Global("HasRODS03","LOCALS",1) CheckStat(Player1Fill,18,CHR) PartyGoldLT(5080)~ THEN REPLY ~5080 gold for a Rod of Resurrection with five charges? I can't afford that.~ EXIT IF ~Global("HasRODS03","LOCALS",1) CheckStat(Player1Fill,19,CHR) PartyGoldLT(4800)~ THEN REPLY ~4800 gold for a Rod of Resurrection with five charges? I can't afford that.~ EXIT IF ~Global("HasRODS03","LOCALS",1) CheckStatGT(Player1Fill,19,CHR) PartyGoldLT(4480)~ THEN REPLY ~4480 gold for a Rod of Resurrection with five charges? I can't afford that.~ EXIT IF ~Global("HasRODS06","LOCALS",1) CheckStatLT(Player1Fill,16,CHR) PartyGoldGT(5999)~ THEN REPLY ~6000 gold for a Rod of Reversal with five charges? I'll take it.~ DO ~GiveItemCreate("RODS03",LastTalkedToBy,5,0,0) TakePartyGold(6000) SetGlobal("HasRODS06","LOCALS",0)~ EXIT IF ~Global("HasRODS06","LOCALS",1) CheckStat(Player1Fill,16,CHR) PartyGoldGT(5679)~ THEN REPLY ~5680 gold for a Rod of Reversal with five charges? I'll take it.~ DO ~GiveItemCreate("RODS06",LastTalkedToBy,5,0,0) TakePartyGold(5680) SetGlobal("HasRODS06","LOCALS",0)~ EXIT IF ~Global("HasRODS06","LOCALS",1) CheckStat(Player1Fill,17,CHR) PartyGoldGT(5399)~ THEN REPLY ~5400 gold for a Rod of Reversal with five charges? I'll take it.~ DO ~GiveItemCreate("RODS06",LastTalkedToBy,5,0,0) TakePartyGold(5400) SetGlobal("HasRODS06","LOCALS",0)~ EXIT IF ~Global("HasRODS06","LOCALS",1) CheckStat(Player1Fill,18,CHR) PartyGoldGT(5079)~ THEN REPLY ~5080 gold for a Rod of Reversal with five charges? I'll take it.~ DO ~GiveItemCreate("RODS06",LastTalkedToBy,5,0,0) TakePartyGold(5080) SetGlobal("HasRODS06","LOCALS",0)~ EXIT IF ~Global("HasRODS06","LOCALS",1) CheckStat(Player1Fill,19,CHR) PartyGoldGT(4799)~ THEN REPLY ~4800 gold for a Rod of Reversal with five charges? I'll take it.~ DO ~GiveItemCreate("RODS06",LastTalkedToBy,5,0,0) TakePartyGold(4800) SetGlobal("HasRODS06","LOCALS",0)~ EXIT IF ~Global("HasRODS06","LOCALS",1) CheckStatGT(Player1Fill,19,CHR) PartyGoldGT(4479)~ THEN REPLY ~4480 gold for a Rod of Reversal with five charges? I'll take it.~ DO ~GiveItemCreate("RODS06",LastTalkedToBy,5,0,0) TakePartyGold(4480) SetGlobal("HasRODS06","LOCALS",0)~ EXIT IF ~Global("HasRODS06","LOCALS",1) CheckStatLT(Player1Fill,16,CHR) PartyGoldLT(6000)~ THEN REPLY ~6000 gold for a Rod of Reversal with five charges? I can't afford that.~ EXIT IF ~Global("HasRODS06","LOCALS",1) CheckStat(Player1Fill,16,CHR) PartyGoldLT(5680)~ THEN REPLY ~5680 gold for a Rod of Reversal with five charges? I can't afford that.~ EXIT IF ~Global("HasRODS06","LOCALS",1) CheckStat(Player1Fill,17,CHR) PartyGoldLT(5400)~ THEN REPLY ~5400 gold for a Rod of Reversal with five charges? I can't afford that.~ EXIT IF ~Global("HasRODS06","LOCALS",1) CheckStat(Player1Fill,18,CHR) PartyGoldLT(5080)~ THEN REPLY ~5080 gold for a Rod of Reversal with five charges? I can't afford that.~ EXIT IF ~Global("HasRODS06","LOCALS",1) CheckStat(Player1Fill,19,CHR) PartyGoldLT(4800)~ THEN REPLY ~4800 gold for a Rod of Reversal with five charges? I can't afford that.~ EXIT IF ~Global("HasRODS06","LOCALS",1) CheckStatGT(Player1Fill,19,CHR) PartyGoldLT(4480)~ THEN REPLY ~4480 gold for a Rod of Reversal with five charges? I can't afford that.~ EXIT IF ~Global("HasAMUL17","LOCALS",1) CheckStatLT(Player1Fill,16,CHR) PartyGoldGT(2999)~ THEN REPLY ~3000 gold for a Greenstone Amulet with ten charges? I'll take it.~ DO ~GiveItemCreate("AMUL17",LastTalkedToBy,10,0,0) TakePartyGold(3000) SetGlobal("HasAMUL17","LOCALS",0)~ EXIT IF ~Global("HasAMUL17","LOCALS",1) CheckStat(Player1Fill,16,CHR) PartyGoldGT(2839)~ THEN REPLY ~2840 gold for a Greenstone Amulet with ten charges? I'll take it.~ DO ~GiveItemCreate("AMUL17",LastTalkedToBy,10,0,0) TakePartyGold(2840) SetGlobal("HasAMUL17","LOCALS",0)~ EXIT IF ~Global("HasAMUL17","LOCALS",1) CheckStat(Player1Fill,17,CHR) PartyGoldGT(2699)~ THEN REPLY ~2700 gold for a Greenstone Amulet with ten charges? I'll take it.~ DO ~GiveItemCreate("AMUL17",LastTalkedToBy,10,0,0) TakePartyGold(2700) SetGlobal("HasAMUL17","LOCALS",0)~ EXIT IF ~Global("HasAMUL17","LOCALS",1) CheckStat(Player1Fill,18,CHR) PartyGoldGT(2539)~ THEN REPLY ~2540 gold for a Greenstone Amulet with ten charges? I'll take it.~ DO ~GiveItemCreate("AMUL17",LastTalkedToBy,10,0,0) TakePartyGold(2540) SetGlobal("HasAMUL17","LOCALS",0)~ EXIT IF ~Global("HasAMUL17","LOCALS",1) CheckStat(Player1Fill,19,CHR) PartyGoldGT(2399)~ THEN REPLY ~2400 gold for a Greenstone Amulet with ten charges? I'll take it.~ DO ~GiveItemCreate("AMUL17",LastTalkedToBy,10,0,0) TakePartyGold(2400) SetGlobal("HasAMUL17","LOCALS",0)~ EXIT IF ~Global("HasAMUL17","LOCALS",1) CheckStatGT(Player1Fill,19,CHR) PartyGoldGT(2239)~ THEN REPLY ~2240 gold for a Greenstone Amulet with ten charges? I'll take it.~ DO ~GiveItemCreate("AMUL17",LastTalkedToBy,10,0,0) TakePartyGold(2240) SetGlobal("HasAMUL17","LOCALS",0)~ EXIT IF ~Global("HasAMUL17","LOCALS",1) CheckStatLT(Player1Fill,16,CHR) PartyGoldLT(3000)~ THEN REPLY ~3000 gold for a Greenstone Amulet with ten charges? I can't afford that.~ EXIT IF ~Global("HasAMUL17","LOCALS",1) CheckStat(Player1Fill,16,CHR) PartyGoldLT(2840)~ THEN REPLY ~2840 gold for a Greenstone Amulet with ten charges? I can't afford that.~ EXIT IF ~Global("HasAMUL17","LOCALS",1) CheckStat(Player1Fill,17,CHR) PartyGoldLT(2700)~ THEN REPLY ~2700 gold for a Greenstone Amulet with ten charges? I can't afford that.~ EXIT IF ~Global("HasAMUL17","LOCALS",1) CheckStat(Player1Fill,18,CHR) PartyGoldLT(2540)~ THEN REPLY ~2540 gold for a Greenstone Amulet with ten charges? I can't afford that.~ EXIT IF ~Global("HasAMUL17","LOCALS",1) CheckStat(Player1Fill,19,CHR) PartyGoldLT(2400)~ THEN REPLY ~2400 gold for a Greenstone Amulet with ten charges? I can't afford that.~ EXIT IF ~Global("HasAMUL17","LOCALS",1) CheckStatGT(Player1Fill,19,CHR) PartyGoldLT(2240)~ THEN REPLY ~2240 gold for a Greenstone Amulet with ten charges? I can't afford that.~ EXIT IF ~Global("HasBOOT12","LOCALS",1) CheckStatLT(Player1Fill,16,CHR) PartyGoldGT(37499)~ THEN REPLY ~37500 gold for Boots of the Gargoyle? I'll take them.~ DO ~GiveItemCreate("BOOT12",LastTalkedToBy,2,0,0) TakePartyGold(37500) SetGlobal("HasBOOT12","LOCALS",0)~ EXIT IF ~Global("HasBOOT12","LOCALS",1) CheckStat(Player1Fill,16,CHR) PartyGoldGT(35499)~ THEN REPLY ~35500 gold for Boots of the Gargoyle? I'll take them.~ DO ~GiveItemCreate("BOOT12",LastTalkedToBy,2,0,0) TakePartyGold(35500) SetGlobal("HasBOOT12","LOCALS",0)~ EXIT IF ~Global("HasBOOT12","LOCALS",1) CheckStat(Player1Fill,17,CHR) PartyGoldGT(33749)~ THEN REPLY ~33750 gold for Boots of the Gargoyle? I'll take them.~ DO ~GiveItemCreate("BOOT12",LastTalkedToBy,2,0,0) TakePartyGold(33750) SetGlobal("HasBOOT12","LOCALS",0)~ EXIT IF ~Global("HasBOOT12","LOCALS",1) CheckStat(Player1Fill,18,CHR) PartyGoldGT(31749)~ THEN REPLY ~31750 gold for Boots of the Gargoyle? I'll take them.~ DO ~GiveItemCreate("BOOT12",LastTalkedToBy,2,0,0) TakePartyGold(31750) SetGlobal("HasBOOT12","LOCALS",0)~ EXIT IF ~Global("HasBOOT12","LOCALS",1) CheckStat(Player1Fill,19,CHR) PartyGoldGT(29999)~ THEN REPLY ~30000 gold for Boots of the Gargoyle? I'll take them.~ DO ~GiveItemCreate("BOOT12",LastTalkedToBy,2,0,0) TakePartyGold(30000) SetGlobal("HasBOOT12","LOCALS",0)~ EXIT IF ~Global("HasBOOT12","LOCALS",1) CheckStatGT(Player1Fill,19,CHR) PartyGoldGT(27999)~ THEN REPLY ~28000 gold for Boots of the Gargoyle? I'll take them.~ DO ~GiveItemCreate("BOOT12",LastTalkedToBy,2,0,0) TakePartyGold(28000) SetGlobal("HasBOOT12","LOCALS",0)~ EXIT IF ~Global("HasBOOT12","LOCALS",1) CheckStatLT(Player1Fill,16,CHR) PartyGoldLT(37500)~ THEN REPLY ~37500 gold for Boots of the Gargoyle? I can't afford that.~ EXIT IF ~Global("HasBOOT12","LOCALS",1) CheckStat(Player1Fill,16,CHR) PartyGoldLT(35500)~ THEN REPLY ~35500 gold for Boots of the Gargoyle? I can't afford that.~ EXIT IF ~Global("HasBOOT12","LOCALS",1) CheckStat(Player1Fill,17,CHR) PartyGoldLT(33750)~ THEN REPLY ~33750 gold for Boots of the Gargoyle? I can't afford that.~ EXIT IF ~Global("HasBOOT12","LOCALS",1) CheckStat(Player1Fill,18,CHR) PartyGoldLT(31750)~ THEN REPLY ~31750 gold for Boots of the Gargoyle? I can't afford that.~ EXIT IF ~Global("HasBOOT12","LOCALS",1) CheckStat(Player1Fill,19,CHR) PartyGoldLT(30000)~ THEN REPLY ~30000 gold for Boots of the Gargoyle? I can't afford that.~ EXIT IF ~Global("HasBOOT12","LOCALS",1) CheckStatGT(Player1Fill,19,CHR) PartyGoldLT(28000)~ THEN REPLY ~28000 gold for Boots of the Gargoyle? I can't afford that.~ EXIT IF ~~ THEN REPLY #92157 DO ~ClearAllActions() StartStore("ohbimim",LastTalkedToBy(Myself))~ EXIT IF ~~ THEN REPLY #96016 EXIT END END EXTEND_BOTTOM OHBIMIM 0 IF ~OR(4) Global("HasRODS03","LOCALS",1) Global("HasRODS06","LOCALS",1) Global("HasAMUL17","LOCALS",1) Global("HasBOOT12","LOCALS",1)~ THEN REPLY ~What about those items over there? Are they for sale too?~ GOTO ExtraItems END EXTEND_BOTTOM OHBIMIM 3 IF ~OR(4) Global("HasRODS03","LOCALS",1) Global("HasRODS06","LOCALS",1) Global("HasAMUL17","LOCALS",1) Global("HasBOOT12","LOCALS",1)~ THEN REPLY ~What about those items over there? Are they for sale too?~ GOTO ExtraItems END EXTEND_BOTTOM OHBIMIM 8 IF ~OR(4) Global("HasRODS03","LOCALS",1) Global("HasRODS06","LOCALS",1) Global("HasAMUL17","LOCALS",1) Global("HasBOOT12","LOCALS",1)~ THEN REPLY ~What about those items over there? Are they for sale too?~ GOTO ExtraItems END EXTEND_BOTTOM OHBIMIM 9 IF ~OR(4) Global("HasRODS03","LOCALS",1) Global("HasRODS06","LOCALS",1) Global("HasAMUL17","LOCALS",1) Global("HasBOOT12","LOCALS",1)~ THEN REPLY ~What about those items over there? Are they for sale too?~ GOTO ExtraItems END /* Extra items for Hue Greenleaf */ APPEND OHBHUEGR IF ~~ THEN BEGIN ExtraItems SAY ~You've got a good eye! These are some of the best pieces I've found yet, and I'm giving you the first chance at them! Or maybe you'd like to see my regular selection?~ IF ~Global("HasHELM30","LOCALS",1) CheckStatLT(Player1Fill,16,CHR) PartyGoldGT(7499)~ THEN REPLY ~7500 gold for the Thieves' Hood? I'll take it.~ DO ~GiveItemCreate("HELM30",LastTalkedToBy,3,0,0) TakePartyGold(7500) SetGlobal("HasHELM30","LOCALS",0)~ EXIT IF ~Global("HasHELM30","LOCALS",1) CheckStat(Player1Fill,16,CHR) PartyGoldGT(7099)~ THEN REPLY ~7100 gold for the Thieves' Hood? I'll take it.~ DO ~GiveItemCreate("HELM30",LastTalkedToBy,3,0,0) TakePartyGold(7100) SetGlobal("HasHELM30","LOCALS",0)~ EXIT IF ~Global("HasHELM30","LOCALS",1) CheckStat(Player1Fill,17,CHR) PartyGoldGT(6749)~ THEN REPLY ~6750 gold for the Thieves' Hood? I'll take it.~ DO ~GiveItemCreate("HELM30",LastTalkedToBy,3,0,0) TakePartyGold(6750) SetGlobal("HasHELM30","LOCALS",0)~ EXIT IF ~Global("HasHELM30","LOCALS",1) CheckStat(Player1Fill,18,CHR) PartyGoldGT(6349)~ THEN REPLY ~6350 gold for the Thieves' Hood? I'll take it.~ DO ~GiveItemCreate("HELM30",LastTalkedToBy,3,0,0) TakePartyGold(6350) SetGlobal("HasHELM30","LOCALS",0)~ EXIT IF ~Global("HasHELM30","LOCALS",1) CheckStat(Player1Fill,19,CHR) PartyGoldGT(5999)~ THEN REPLY ~6000 gold for the Thieves' Hood? I'll take it.~ DO ~GiveItemCreate("HELM30",LastTalkedToBy,3,0,0) TakePartyGold(6000) SetGlobal("HasHELM30","LOCALS",0)~ EXIT IF ~Global("HasHELM30","LOCALS",1) CheckStatGT(Player1Fill,19,CHR) PartyGoldGT(5599)~ THEN REPLY ~5600 gold for the Thieves' Hood? I'll take it.~ DO ~GiveItemCreate("HELM30",LastTalkedToBy,3,0,0) TakePartyGold(5600) SetGlobal("HasHELM30","LOCALS",0)~ EXIT IF ~Global("HasHELM30","LOCALS",1) CheckStatLT(Player1Fill,16,CHR) PartyGoldLT(7500)~ THEN REPLY ~7500 gold for the Thieves' Hood? I can't afford that.~ EXIT IF ~Global("HasHELM30","LOCALS",1) CheckStat(Player1Fill,16,CHR) PartyGoldLT(7100)~ THEN REPLY ~7100 gold for the Thieves' Hood? I can't afford that.~ EXIT IF ~Global("HasHELM30","LOCALS",1) CheckStat(Player1Fill,17,CHR) PartyGoldLT(6750)~ THEN REPLY ~6750 gold for the Thieves' Hood? I can't afford that.~ EXIT IF ~Global("HasHELM30","LOCALS",1) CheckStat(Player1Fill,18,CHR) PartyGoldLT(6350)~ THEN REPLY ~6350 gold for the Thieves' Hood? I can't afford that.~ EXIT IF ~Global("HasHELM30","LOCALS",1) CheckStat(Player1Fill,19,CHR) PartyGoldLT(6000)~ THEN REPLY ~6000 gold for the Thieves' Hood? I can't afford that.~ EXIT IF ~Global("HasHELM30","LOCALS",1) CheckStatGT(Player1Fill,19,CHR) PartyGoldLT(5600)~ THEN REPLY ~5600 gold for the Thieves' Hood? I can't afford that.~ EXIT IF ~Global("HasCHAN20","LOCALS",1) CheckStatLT(Player1Fill,16,CHR) PartyGoldGT(17249)~ THEN REPLY ~17250 gold for White Dragon Scale armor? I'll take it.~ DO ~GiveItemCreate("CHAN20",LastTalkedToBy,3,0,0) TakePartyGold(17250) SetGlobal("HasCHAN20","LOCALS",0)~ EXIT IF ~Global("HasCHAN20","LOCALS",1) CheckStat(Player1Fill,16,CHR) PartyGoldGT(16329)~ THEN REPLY ~16330 gold for White Dragon Scale armor? I'll take it.~ DO ~GiveItemCreate("CHAN20",LastTalkedToBy,3,0,0) TakePartyGold(16330) SetGlobal("HasCHAN20","LOCALS",0)~ EXIT IF ~Global("HasCHAN20","LOCALS",1) CheckStat(Player1Fill,17,CHR) PartyGoldGT(15524)~ THEN REPLY ~15525 gold for White Dragon Scale armor? I'll take it.~ DO ~GiveItemCreate("CHAN20",LastTalkedToBy,3,0,0) TakePartyGold(15525) SetGlobal("HasCHAN20","LOCALS",0)~ EXIT IF ~Global("HasCHAN20","LOCALS",1) CheckStat(Player1Fill,18,CHR) PartyGoldGT(14604)~ THEN REPLY ~14605 gold for White Dragon Scale armor? I'll take it.~ DO ~GiveItemCreate("CHAN20",LastTalkedToBy,3,0,0) TakePartyGold(14605) SetGlobal("HasCHAN20","LOCALS",0)~ EXIT IF ~Global("HasCHAN20","LOCALS",1) CheckStat(Player1Fill,19,CHR) PartyGoldGT(13799)~ THEN REPLY ~13800 gold for White Dragon Scale armor? I'll take it.~ DO ~GiveItemCreate("CHAN20",LastTalkedToBy,3,0,0) TakePartyGold(13800) SetGlobal("HasCHAN20","LOCALS",0)~ EXIT IF ~Global("HasCHAN20","LOCALS",1) CheckStatGT(Player1Fill,19,CHR) PartyGoldGT(12879)~ THEN REPLY ~12880 gold for White Dragon Scale armor? I'll take it.~ DO ~GiveItemCreate("CHAN20",LastTalkedToBy,3,0,0) TakePartyGold(12880) SetGlobal("HasCHAN20","LOCALS",0)~ EXIT IF ~Global("HasCHAN20","LOCALS",1) CheckStatLT(Player1Fill,16,CHR) PartyGoldLT(17250)~ THEN REPLY ~17250 gold for White Dragon Scale armor? I can't afford that.~ EXIT IF ~Global("HasCHAN20","LOCALS",1) CheckStat(Player1Fill,16,CHR) PartyGoldLT(16330)~ THEN REPLY ~16330 gold for White Dragon Scale armor? I can't afford that.~ EXIT IF ~Global("HasCHAN20","LOCALS",1) CheckStat(Player1Fill,17,CHR) PartyGoldLT(15525)~ THEN REPLY ~15525 gold for White Dragon Scale armor? I can't afford that.~ EXIT IF ~Global("HasCHAN20","LOCALS",1) CheckStat(Player1Fill,18,CHR) PartyGoldLT(14605)~ THEN REPLY ~14605 gold for White Dragon Scale armor? I can't afford that.~ EXIT IF ~Global("HasCHAN20","LOCALS",1) CheckStat(Player1Fill,19,CHR) PartyGoldLT(13800)~ THEN REPLY ~13800 gold for White Dragon Scale armor? I can't afford that.~ EXIT IF ~Global("HasCHAN20","LOCALS",1) CheckStatGT(Player1Fill,19,CHR) PartyGoldLT(12880)~ THEN REPLY ~12880 gold for White Dragon Scale armor? I can't afford that.~ EXIT IF ~~ THEN REPLY ~Let me see your usual selection.~ DO ~ClearAllActions() StartStore("ohbhuegr",LastTalkedToBy(Myself))~ EXIT IF ~~ THEN REPLY #96015 EXIT END END EXTEND_BOTTOM OHBHUEGR 0 IF ~OR(2) Global("HasHELM30","LOCALS",1) Global("HasCHAN20","LOCALS",1)~ THEN REPLY ~What about those items over there? Are they for sale too?~ GOTO ExtraItems END A lot of replies there, but very formulaic. And yes, those are the exact same prices as if the item were in the store normally. Edited December 11, 2022 by jmerry Code correction Quote Link to comment
jmerry Posted December 12, 2022 Author Share Posted December 12, 2022 (edited) And with more information ... AddStoreItem() doesn't fail completely for charged items. It just divides the quantity parameter by the maximum charge number, rounding down. So, no need to mess with the dialogue store. Here's a revised fix for the items being added: Spoiler COPY_EXISTING ~ohbhub.BCS~ ~override~ DECOMPILE_AND_PATCH BEGIN REPLACE_TEXTUALLY ~AddStoreItem("OHBSDWM","STAF12",10,1)~ ~AddStoreItem("OHBSDWM","STAF12",1,1)~ REPLACE_TEXTUALLY ~AddStoreItem("OHBIMIM","RODS03",5,1)~ ~AddStoreItem("OHBIMIM","RODS03",10,1)~ REPLACE_TEXTUALLY ~AddStoreItem("OHBIMIM","RODS06",5,1)~ ~AddStoreItem("OHBIMIM","RODS06",10,1)~ REPLACE_TEXTUALLY ~AddStoreItem("OHBIMIM","AMUL17",10,1)~ ~AddStoreItem("OHBIMIM","AMUL17",50,1)~ REPLACE_TEXTUALLY ~AddStoreItem("OHBHUEGR","HELM30",1,1)~ ~AddStoreItem("OHBHUEGR","HELM30",3,1)~ REPLACE_TEXTUALLY ~AddStoreItem("OHBHUEGR","CHAN20",1,1)~ ~AddStoreItem("OHBHUEGR","CHAN20",3,1)~ REPLACE_TEXTUALLY ~AddStoreItem("OHBIMIM","BOOT12",1,1)~ ~AddStoreItem("OHBIMIM","BOOT12",2,1)~ END BUT_ONLY The new code adds one (fully charged) instance of the item to the store in each case, as was presumably intended. Well, partially charged items were probably intended for the amulet and rods, but we can't have that. This is the fix I'd actually recommend. Added in edit: here's a reference link for the thread in the IESDP forum testing the issues with AddStoreItem(): https://www.gibberlings3.net/forums/topic/36239-addstoreitem-fails-when-theres-already-a-copy-of-the-item-in-shop-or-when-it-is-an-item-with-charges/ Edited December 13, 2022 by jmerry Quote Link to comment
Graion Dilach Posted December 18, 2022 Share Posted December 18, 2022 DAMAGES.IDS in BGEE lacks a header row. BG2EE and IWDEE has such. Quote Link to comment
jmerry Posted December 18, 2022 Author Share Posted December 18, 2022 Checking ... BGEE lacks that header both with SoD and without SoD. Though ... does that have any actual impact? The ApplyDamage script action certainly works using the labels in that IDS. The presence or absence of a header row for an IDS seems to be entirely cosmetic, and entirely on the back end that you'll never see just playing the game. To quote the IESDP: "The IDS file header consists of two lines, either of which may be omitted. The first line is the file identifier (usually IDS or IDS V1.0). The second line is the number of entries in the file (this value is not always correct)." Quote Link to comment
Graion Dilach Posted December 18, 2022 Share Posted December 18, 2022 (edited) Yes, the IESDP entry is why I brought this up, because II don't know if that either should be interpreted as "one of them can be omitted but then the other needs to exist" or "both are optional". Personally I always use either as a XOR but English allows both interpretations. Edited December 18, 2022 by Graion Dilach Quote Link to comment
Abdal Posted January 3, 2023 Share Posted January 3, 2023 (edited) Hi, I noticed that there are problems installing the component "Improved Slayer Transformation" from Ascension after installing the latest current version of EEFIXPACK. The error that appears during the installation of this component: WARNING: no effects altered on SPIN823.spl ERROR locating resource for 'COPY' Resource [slayer2.spl] not found in KEY file: [./chitin.key] Stopping installation because of error. I know its still in beta and compability with other mods is likely one of the lesser concerns for now but I thought it might be good to bring it to notice so that such issues beforehand. I hope I'm not being a bother with this. Edited January 3, 2023 by Abdal Quote Link to comment
mickabouille Posted January 3, 2023 Share Posted January 3, 2023 I think that probably the same problem as Quote Link to comment
Abdal Posted January 3, 2023 Share Posted January 3, 2023 3 hours ago, mickabouille said: I think that probably the same problem as Did the method used on that thread work for you? Where exactly is the 40th line for 'BUT_ONLY' as there are more than a couple 'BUT_ONLY' in the improved_slayer_powers.tpa Quote Link to comment
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.