Garfield Posted December 31, 2006 Share Posted December 31, 2006 Here is the thing: I'd like to have my NPC talk to Crazy Celvan in the Docks, as Bioware NPCs do. Problem is... I don't know how to code that... I cannot use INTERJECT(_COPY_TRANS) can I? Because otherwise it will be added after some other NPC's dialogue. So how can I do the following: Have Celvan speak his "poem" when my NPC talks to him (I've looked at the triggers in NI, I know I should use RandomNum), then have the NPC answering, then going back to Celvan's dlg, at state 2:"Tee-hee hee!" I guess I should append something to Celvan's dlg, then extern it to my NPC's dlg, and go back to Celvan's buuuuuuuuuuut... I am a total noob in anything containing APPEND or EXTERN Thanks to anyone who can help Link to comment
berelinde Posted December 31, 2006 Share Posted December 31, 2006 I don't know who Crazy Celvan in the Docks *is*. Which game (there's a docks area of Baldur's Gate, too, don't forget)? Is he added by a mod? If he's added by a mod, best to leave him alone. Never a good idea to mod somebody else's mod unless you arrange it in advance. Also, install order becomes an issue. If he's just a BioWare NPC non-joinable that I never ran into, and there are a few, then you should be perfectly fine with INTERJECT_COPY_TRANS *unless* something happens after talking to him, like a journal entry, giving gold, a reputation point loss/gain, or going hostile, or unless the PC has responses after the state you want to interject into. If an action (setting a global, journal entry, giving gold, going hostile) occurs after the state you want to interject after, you have 2 choices: you can either use INTERJECT_COPY_TRANS2 (*if* there are no PC responses), or you can still use I_C_T, but you're going to need to give Celvan a line after yours. Interjection order is installation order dependant. The mod installed last gets to interject first, as a rule. Here's one of Gavin's interjections, so you can see what I mean. This is what Mirianne, the lady in Beregost whose husband is taking too long to come home says in unmodified game. Her states are 0, 1, and 2. IF ~NumberOfTimesTalkedTo(0) ~ THEN BEGIN 0 // from: SAY #75613 /* ~My husband had to make a sudden business trip to Amn and I'm so worried for him. "Mirianne," he always said. "Mirianne, who knows the road better than old Roe?" But the highways just aren't as safe as they once were and there hasn't been a messenger from Amn here in months. Could you keep your eyes open along the southern roads and let me know if you find anything?~ */ IF ~~ THEN UNSOLVED_JOURNAL #75614 /* ~Mirianne's husband I was moved by the pleas of Mirianne of Beregost, today. Her husband, Roe, had to make a trip south to Amn and she is understandably worried for his safety. I have sworn to keep my eyes open for any news of relevance I might encounter in my journeys down that road.~ */ EXIT IF ~ReactionLT(LastTalkedToBy,FRIENDLY_LOWER) PartyHasItem("_SCRL3I") ~ THEN BEGIN 1 // from: SAY #75615 /* ~"My dearest Mirianne, "The road has been difficult but I have arrived safely here in Amn. I think it would be wisest if I returned by sea, however, perhaps sometime after the first snows have fallen. I trust this letter reaches you. The halfling I hired to carry it struck me as an honest enough chap. Always and forever, Roe..." Oh, thank you for such good tidings. Please, let me give you this ring to keep you safe in your travels.~ */ IF ~~ THEN DO ~GiveItem("_RING06",LastTalkedToBy) TakePartyItem("_SCRL3I") AddexperienceParty(300) EraseJournalEntry(75614) EraseJournalEntry(75619) ~ SOLVED_JOURNAL #75616 /* ~Mirianne's husband I have completed the task that a nameless halfling messenger, now dead and mourned, started deep in the heart of Amn. Mirianne has received her husband's letter by my hand, and I am glad to hear that it bears good tidings of his safety. I am humbled by her offer of a simple ring to keep me safe. Be it magic or superstition, I know not, but I will wear it, at least, to remember her by.~ */ EXIT IF ~ReactionGT(LastTalkedToBy,NEUTRAL_UPPER) PartyHasItem("_SCRL3I") ~ THEN BEGIN 2 // from: SAY #75615 /* ~"My dearest Mirianne, "The road has been difficult but I have arrived safely here in Amn. I think it would be wisest if I returned by sea, however, perhaps sometime after the first snows have fallen. I trust this letter reaches you. The halfling I hired to carry it struck me as an honest enough chap. Always and forever, Roe..." Oh, thank you for such good tidings. Please, let me give you this ring to keep you safe in your travels.~ */ IF ~~ THEN DO ~GiveItem("_RING06",LastTalkedToBy) TakePartyItem("_SCRL3I") AddexperienceParty(300) EraseJournalEntry(75614) EraseJournalEntry(75619) ~ SOLVED_JOURNAL #75616 /* ~Mirianne's husband I have completed the task that a nameless halfling messenger, now dead and mourned, started deep in the heart of Amn. Mirianne has received her husband's letter by my hand, and I am glad to hear that it bears good tidings of his safety. I am humbled by her offer of a simple ring to keep me safe. Be it magic or superstition, I know not, but I will wear it, at least, to remember her by.~ */ EXIT Gavin used to live in Beregost, in a house directly behind hers, so it would be very inappropriate for him to have nothing to say about Roe's disappearance. So this is what I'm going to do. Mirianne gets the extra line after Gavin's just to be sure that the actions of giving the experience, the ring, and the journal entry, don't get transferred to Gavin (bad juju if that happens!). /* Mirianne in Beregost */ I_C_T ~_MIRIAN~ 0 BGavinMirianne1 == ~_MIRIAN~ IF ~InParty("B!GAVIN") InMyArea("B!GAVIN") !StateCheck("B!GAVIN",CD_STATE_NOTVALID)~ THEN ~Gavin, I know it has been a while since you were our neighbor, but you'll help an old friend, won't you?~ == ~B!GAVINJ~ IF ~InParty("B!GAVIN") InMyArea("B!GAVIN") !StateCheck("B!GAVIN",CD_STATE_NOTVALID)~ THEN ~Of course, Mirianne. We'll keep our eyes open and send word if we hear anything.~ == ~_MIRIAN~ IF ~InParty("B!GAVIN") InMyArea("B!GAVIN") !StateCheck("B!GAVIN",CD_STATE_NOTVALID)~ THEN ~Thank you! I know Roe can take care of himself, but I would rest so much easier if I just knew that he is safe.~ END I_C_T ~_MIRIAN~ 1 BGavinMirianne2 == ~_MIRIAN~ IF ~InParty("B!GAVIN") InMyArea("B!GAVIN") !StateCheck("B!GAVIN",CD_STATE_NOTVALID)~ THEN ~And thank you, Gavin, for doing a favor for an old friend.~ == ~B!GAVINJ~ IF ~InParty("B!GAVIN") InMyArea("B!GAVIN") !StateCheck("B!GAVIN",CD_STATE_NOTVALID)~ THEN ~I am glad to hear that Roe is in good health and will be on his way home soon. Give him my best when you see him.~ == ~_MIRIAN~ IF ~InParty("B!GAVIN") InMyArea("B!GAVIN") !StateCheck("B!GAVIN",CD_STATE_NOTVALID)~ THEN ~I will. Take care of yourself out there.~ END I_C_T ~_MIRIAN~ 2 BGavinMirianne3 == ~_MIRIAN~ IF ~InParty("B!GAVIN") InMyArea("B!GAVIN") !StateCheck("B!GAVIN",CD_STATE_NOTVALID)~ THEN ~And thank you, Gavin, for doing a favor for an old friend.~ == ~B!GAVINJ~ IF ~InParty("B!GAVIN") InMyArea("B!GAVIN") !StateCheck("B!GAVIN",CD_STATE_NOTVALID)~ THEN ~I am glad to hear that Roe is in good health and will be on his way home soon. Give him my best when you see him.~ == ~_MIRIAN~ IF ~InParty("B!GAVIN") InMyArea("B!GAVIN") !StateCheck("B!GAVIN",CD_STATE_NOTVALID)~ THEN ~I will. Take care of yourself out there.~ END Link to comment
devSin Posted December 31, 2006 Share Posted December 31, 2006 I don't know who Crazy Celvan in the Docks *is*.berelinde is henceforth banished from the community. Tee-hee hee! Link to comment
berelinde Posted December 31, 2006 Share Posted December 31, 2006 So is anybody going to tell me, or am I going to have to do a massive web search to find out how ignorant I am Never mind. Now I remember. Tricky one, that. It would make more sense if other NPCs, like Minsc, got a crack at him first. Brain is fried. Seriously cranking out dialog today. Link to comment
devSin Posted December 31, 2006 Share Posted December 31, 2006 Crazy Celvan is in the Athkatla docks (AR0300) and has little poems for some of the PCs (see CELVAN.DLG). Note that his dialogue coding sucks ass and most states were False()d for whatever reason. Link to comment
Garfield Posted December 31, 2006 Author Share Posted December 31, 2006 Tricky one, that. It would make more sense if other NPCs, like Minsc, got a crack at him first. Actually he fires his poem randomly at one and only one NPC, that is why I was try to avoir the interjection command. Well, I'll skip that bit, my one-day style NPC has already been under construction for 3 wholes day! Shame on me Link to comment
berelinde Posted December 31, 2006 Share Posted December 31, 2006 @devSin: Yuck. I'll be avoiding him, too, then, when I get to BG2. I've got better things to do than agonize over headache-inducing code. @Garfield: sounds like a good plan. A few easter eggs are nice, surprise interjections with inconsequential non-joinables, but there's no sense in wasting time on something that isn't going to contribute to either the pc's or the joinable npc's story. Still, now you have the skeleton for a basic interjection. Also @Garfield: are you going to drop a few hints about this mysterious NPC? Don't feel bad about 3 days. I've been working on mine since August, and I'm still only about 85% done, and Tutu's shorter than BG2. Link to comment
Garfield Posted December 31, 2006 Author Share Posted December 31, 2006 Also @Garfield: are you going to drop a few hints about this mysterious NPC? Don't feel bad about 3 days. I've been working on mine since August, and I'm still only about 85% done, and Tutu's shorter than BG2. Huhu, soon enough, since I have all banters coded, and already a handfull of interjections. Some more, a install test, and I think I could uncover it for an alpha run Judging from what I've seen though, Gavin is not even close to a one-day Banters, romance, voicing... Lol, mine does not even have a custom quest Link to comment
Domi Posted December 31, 2006 Share Posted December 31, 2006 Actually Crazy Celvan is not all that difficult to do. You simply append to his file your character's limerick: APPEND CELVAN IF WEIGHT #0 ~See("P#KIVAN") InParty("P#KIVAN") InMyArea("P#KIVAN") RandomNum(2,1) Global("P#KivanCelvan","AR0300",0) ~ THEN BEGIN P#KivanCelvanusLimerick SAY @297 IF ~~ THEN DO ~SetGlobal("P#KivanCelvan","AR0300",1)~ EXTERN ~P#KIVJ~ P#KivanCelvanusLimerick1 END END APPEND P#KIVJ IF ~~ THEN BEGIN P#KivanCelvanusLimerick1 SAY @298 IF ~~ THEN EXTERN ~CELVAN~ 1 END END Link to comment
Garfield Posted January 1, 2007 Author Share Posted January 1, 2007 I expected something to do with APPENDs and EXTERNs, which I had never really used before. But thanks to your example I now understand how it works and how to link back to a part of existing dialogue. Big thanks to you Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.