Daeros_Trollkiller Posted October 30, 2020 Share Posted October 30, 2020 I am working on an update to SoD to BG2 IU, and I wanted to have one of the new items I am bringing in crafted by Taerom Thunderhammer in Beregost using the dialogue for ankheg shells as a guide. The problem is I cant seem to get the new dialogue to trigger, even though my party meets the conditions (as far as I can tell anyway). My goal is to get him to create a remorhaz shell helm (imported from IWD) Here is the code in the .d file I am compiling. It appends to the existing taerom.dlg just fine, but I just cannot get it to trigger. I am sure I am missing something, I just cant figure out what. Here is what it looks like after appended into the game: IF WEIGHT #9 ~ PartyHasItem("cdrem") ~ THEN BEGIN 20 // from: SAY #272425 /* ~Surely it cannae be? Is that shimmering piece o' carapace ye have there from a Remorhaz? How did ye manage to find such a horrid beast in these parts, much less slay it?! No matter, if ye are willing to part with it, I can pay a sum of 2,000 gold. I believe I could make a fine helmet out of it.~ */ IF ~ Global("MakeRemorhelm","GLOBAL",0) ~ THEN REPLY #200197 /* ~I'm not interested in selling it just now, though it would be to you if I do.~ */ GOTO 22 IF ~~ THEN REPLY #272426 /* ~I'd like to see what goods you have for sale.~ */ DO ~StartStore("Taerum",LastTalkedToBy(Myself)) ~ EXIT IF ~~ THEN REPLY #272427 /* ~A more than fair offer, a pleasure doing business with you again, Taerom.~ */ GOTO 21 IF ~ GlobalGT("MakeRemorhelm","GLOBAL",0) ~ THEN REPLY #272428 /* ~Nothing at the moment, thank you.~ */ EXIT END IF ~~ THEN BEGIN 21 // from: 20.2 SAY #272444 /* ~Ah, this will make a right-kingly helm, may even turn aside a spell or two. Something this exotic may even draw the eye of Entar Silvershield! I thank you, <CHARNAME>. I will surive this iron shortage yet.~ */ IF ~~ THEN DO ~TakePartyItem("cdrem") DestroyItem("cdrem") GiveGoldForce(2000) ~ SOLVED_JOURNAL #272430 /* ~A Fortuitous Hunt! 2,000 gold for a single remorhaz shell, a worthy price for felling such a dangerous beast.~ */ EXIT END IF ~~ THEN BEGIN 22 // from: 20.0 SAY #272445 /* ~A terrible shame. To work with something so exotic and rare would have been a real pleasure, and bring much needed coin to my smithy. Hmmm, <CHARNAME>, an offer for ye, if you'll hear it. For 6,000 gold, I will make a fine helm with it for you. Less than my usual fare for such a piece, but I could use the work.~ */ IF ~~ THEN REPLY #272432 /* ~A very generous offer for certain, but more than I can afford for now.~ */ GOTO 23 IF ~ PartyGoldGT(5999) ~ THEN REPLY #272433 /* ~A fair deal for the quality of your workmanship, Taerom. 6,000 gold it is then.~ */ GOTO 24 END IF ~~ THEN BEGIN 23 // from: 22.0 SAY #272446 /* ~Ye be short on gold? Since your party is obviously battle-hardened enough to slay a remorhaz, ye may want to try your luck in exploring the ruins of Durlag's tower. It be a deadly place, for sure, but such places tend to be rich in artifacts and gold as well.~ */ IF ~~ THEN UNSOLVED_JOURNAL #272447 /* ~Another offer from Taerom For 6,000 gold, Taerom "Thunderhammer" can make me a new helmet from that remorhaz shell I found. He also told me that if we need the gold, we might want to check into exploring the ruins of Durlag's tower. A very deadly and forlorn place, but likely to be just as weathly in treasure.~ */ EXIT END IF ~~ THEN BEGIN 24 // from: 22.1 SAY #272436 /* ~Then a deal is struck! Working with this material will take some time, but once finished, you will have a helm that even the grand dukes will envy. Come back after five days, and it will be ready for you.~ */ IF ~~ THEN REPLY #272443 /* ~6056~ */ DO ~TakePartyGold(6000) TakePartyItem("cdrem") DestroyItem("cdrem") SetGlobal("MakeRemorhelm","GLOBAL",1) SetGlobalTimer("TaeromRemorhelm","GLOBAL",FIVE_DAYS) ~ UNSOLVED_JOURNAL #272437 /* ~A New Helmet In five days, Taerom "Thunderhammer" of Beregost should have my new remorhaz-shell helmet ready for me. I will look intimidating in it!~ */ EXIT IF ~ PartyGoldGT(7999) ~ THEN REPLY #272438 /* ~On second thought, I am desperately in need of the helmet now. I happen to get singed and zapped a lot. How about I give you 8,000 gp to have it done tomorrow?~ */ DO ~TakePartyGold(8000) TakePartyItem("cdrem") DestroyItem("cdrem") SetGlobal("MakeRemorhelm","GLOBAL",1) SetGlobalTimer("TaeromRemorhelm","GLOBAL",ONE_DAY) ~ GOTO 25 END IF ~~ THEN BEGIN 25 // from: 24.1 SAY #272439 /* ~Only for you, <CHARNAME>.~ */ IF ~~ THEN UNSOLVED_JOURNAL #272440 /* ~A New Helmet In one day, Taerom "Thunderhammer" of Beregost should have my new remorhaz-shell helmet ready for me. I will look intimidating in it!~ */ EXIT END IF WEIGHT #10 ~ GlobalTimerExpired("TaeromRemorhelm","GLOBAL") Global("MakeRemorhelm","GLOBAL",1) ~ THEN BEGIN 26 // from: SAY #272441 /* ~Ah, you have returned. And here be the helm I promised you. Enchanting, isn't it? A finer helmet I've never made. Wear it well.~ */ IF ~~ THEN DO ~GiveItemCreate("cdrelm",LastTalkedToBy(Myself),1,0,0) DestroyItem("cdrem") SetGlobal("MakeRemorhelm","GLOBAL",2) EraseJournalEntry(272447) EraseJournalEntry(272437) EraseJournalEntry(272440) ~ SOLVED_JOURNAL #272448 /* ~An Exquisite Helmet Taerom "Thunderhammer" of Beregost has crafted an exquisite helmet out of my remorhaz shell. It cost a fortune but the craftsmanship is superb!~ */ EXIT END And here is the source: APPEND TAEROM IF ~PartyHasItem("cdrem")~ THEN BEGIN 20 SAY @8016 IF ~Global("MakeRemorhelm","GLOBAL",0)~ THEN REPLY @6047 GOTO 22 IF ~~ THEN REPLY @6048 DO ~StartStore("Taerum",LastTalkedToBy(Myself))~ EXIT IF ~~ THEN REPLY @6049 GOTO 21 IF ~GlobalGT("MakeRemorhelm","GLOBAL",0)~ THEN REPLY @6050 EXIT END IF ~~ THEN BEGIN 21 SAY @8017 IF ~~ THEN DO ~TakePartyItem("cdrem") DestroyItem("cdrem") GiveGoldForce(2000)~ SOLVED_JOURNAL @6058 EXIT END IF ~~ THEN BEGIN 22 SAY @8018 IF ~~ THEN REPLY @6051 GOTO 23 IF ~PartyGoldGT(5999)~ THEN REPLY @6052 GOTO 24 END IF ~~ THEN BEGIN 23 SAY @8019 IF ~~ THEN UNSOLVED_JOURNAL @6053 EXIT END IF ~~ THEN BEGIN 24 SAY @8020 IF ~~ THEN REPLY 6056 DO ~TakePartyGold(6000) TakePartyItem("cdrem") DestroyItem("cdrem") SetGlobal("MakeRemorhelm","GLOBAL",1) SetGlobalTimer("TaeromRemorhelm","GLOBAL",FIVE_DAYS)~ UNSOLVED_JOURNAL @6054 EXIT IF ~PartyGoldGT(7999)~ THEN REPLY @6055 DO ~TakePartyGold(8000) TakePartyItem("cdrem") DestroyItem("cdrem") SetGlobal("MakeRemorhelm","GLOBAL",1) SetGlobalTimer("TaeromRemorhelm","GLOBAL",ONE_DAY)~ GOTO 25 END IF ~~ THEN BEGIN 25 SAY @8021 IF ~~ THEN UNSOLVED_JOURNAL @6057 EXIT END IF ~GlobalTimerExpired("TaeromRemorhelm","GLOBAL") Global("MakeRemorhelm","GLOBAL",1)~ THEN BEGIN 26 SAY @8022 IF ~~ THEN DO ~GiveItemCreate("cdrelm",LastTalkedToBy(Myself),1,0,0) DestroyItem("cdrem") SetGlobal("MakeRemorhelm","GLOBAL",2) EraseJournalEntry(@6053) EraseJournalEntry(@6054) EraseJournalEntry(@6057)~ SOLVED_JOURNAL @6059 EXIT END END Would greatly appreciate any pointers or suggestions here. Thanks! Quote Link to comment
jastey Posted October 30, 2020 Share Posted October 30, 2020 I guess adding WEIGHT #-1 to states would solve the problem. This way, your dialogue will be called with higher weight than the exising ones if the conditions are met. IF WEIGHT #-1 ~PartyHasItem("cdrem")~ THEN BEGIN 20 SAY @8016 IF ~Global("MakeRemorhelm","GLOBAL",0)~ THEN REPLY @6047 GOTO 22 IF ~~ THEN REPLY @6048 DO ~StartStore("Taerum",LastTalkedToBy(Myself))~ EXIT IF ~~ THEN REPLY @6049 GOTO 21 IF ~GlobalGT("MakeRemorhelm","GLOBAL",0)~ THEN REPLY @6050 EXIT END (...) IF WEIGHT #-1 ~GlobalTimerExpired("TaeromRemorhelm","GLOBAL") Global("MakeRemorhelm","GLOBAL",1)~ THEN BEGIN 26 SAY @8022 (...) On a different note: I can only advice you also give your mod variables your unique prefix. Quote Link to comment
Daeros_Trollkiller Posted October 30, 2020 Author Share Posted October 30, 2020 1 hour ago, jastey said: I guess adding WEIGHT #-1 to states would solve the problem. This way, your dialogue will be called with higher weight than the exising ones if the conditions are met. IF WEIGHT #-1 ~PartyHasItem("cdrem")~ THEN BEGIN 20 SAY @8016 IF ~Global("MakeRemorhelm","GLOBAL",0)~ THEN REPLY @6047 GOTO 22 IF ~~ THEN REPLY @6048 DO ~StartStore("Taerum",LastTalkedToBy(Myself))~ EXIT IF ~~ THEN REPLY @6049 GOTO 21 IF ~GlobalGT("MakeRemorhelm","GLOBAL",0)~ THEN REPLY @6050 EXIT END (...) IF WEIGHT #-1 ~GlobalTimerExpired("TaeromRemorhelm","GLOBAL") Global("MakeRemorhelm","GLOBAL",1)~ THEN BEGIN 26 SAY @8022 (...) On a different note: I can only advice you also give your mod variables your unique prefix. Thank you Jastey! I will give this a shot. I was in the "trying to get it working" phase, so I hadn't added my prefix yet I am beginning to understand dialogues and scripts more, but still pretty green with them. Quote Link to comment
Daeros_Trollkiller Posted October 31, 2020 Author Share Posted October 31, 2020 @Jastey That did the trick, thanks once again for helping this old man learn this stuff Quote Link to comment
jastey Posted October 31, 2020 Share Posted October 31, 2020 Cool! Thanks for letting me know. 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.