Hey,
With the help of a metric ton of tutorials I've been trying to learn modding over the last few days. My progress has been a little uneven to say the least but I think that at the very least I'm not getting worse at it. Anyhow, I've run into a problem with the .d file for my NPC that I just can't figure out. The normal dialogue works out well, including talking too him a second time (if I didn't take him into the party). If I let him join and then kick him out the problems start however. Instead of his own dialogue he seems to borrow words from another NPC (I suspect Haer'dalis but I haven't checked).
I've been working on the problem for a while now but I can't seem to get it right (in fact, a few of my attempted sollutions have messed things up even worse). Since I'm using Ghreyfain's NPC-creating for dummies tutorial (I've read that thing enough to recite it in my sleep by now...) I even tried copy-pasting the right parts of the dialogue from his example and into my .d file changing absolutely nothing but the words and variable-names. Still the same problem.
Since I guess it's possible that the actual problem is somewhere else in the file I'm including all of .d below. Thanks in advance to whomever figures it out.
BEGIN FtBuff
IF ~NumTimesTalkedTo(0)~ THEN BEGIN FirstContact
SAY ~You haven't seen a rocketship lying around, have you?~
IF "" THEN REPLY ~A rocketship? What's that?~ GOTO Rocketship
IF "" THEN REPLY ~I don't think so. Who are you by the way?~ GOTO WhoRU
END
IF "" THEN BEGIN Rocketship
SAY ~It's the ultimate symbol of intergalatic justice, the pride of every spaceman and the ultimate way to compensate nature's betrayl! It's also a really cool thing used to fly between planets.~
IF "" THEN REPLY ~Planets? Don't you mean 'planes'?~ GOTO Planets
IF "" THEN REPLY ~Right... So, who are you?~ GOTO WhoRU
END
IF "" THEN BEGIN WhoRU
SAY ~You're kidding, right? I am Buff Hunkey, intergalatic hero. Winner of a thousand battles. Smither of a billion villians. Charmer of a...eh, gazillion women. Employee of the month two years running at Intergalatic Hero Corps and all around stunningly handsom good guy. Are you sure you don't recognize me?~
IF "" THEN REPLY ~Yeah. In fact, I don't think I've even heard of you~ GOTO NotHeard
IF "" THEN REPLY ~Right, Buff Hunkey. Didn't recognize you at first. Got a new haircut or something?~ GOTO Recognized
END
IF "" THEN BEGIN NotHeard
SAY ~Really? What sort of a backwater, redneck village do you come from? Surely every civilized lifeform in the known universe has heard of Buff Hunkey, intergalactic hero, and his heroic deeds.~
IF "" THEN REPLY ~Oh, you said BUFF Hunkey. Of course I've heard of you.~ GOTO Recognized
IF "" THEN REPLY ~Sorry. I have no idea of who you are.~ GOTO NotHeard2
IF "" THEN REPLY ~Backwater village? Shut up about Candlekeep or I'll make you.~ GOTO NoCrap
END
IF "" THEN BEGIN NoCrap
SAY ~Buff Hunkey didn't take any crap from the crapbeetles of Helomia 7 and I sure won't take any from you. Beat or I'll start blastin'.~
IF "" THEN REPLY ~Fine. I hope you never find your stupid rocketship.~ GOTO Leave
IF "" THEN REPLY ~Sorry, I'm just kidding. Of course I've heard of you, Buff.~ GOTO Recognized
END
IF "" THEN BEGIN Leave
SAY ~Bah! No one leaves Buff Hunkley, intergalatic hero. Not if I leave you first!~
IF "" THEN EXIT
END
IF "" THEN BEGIN Planets
SAY ~Planes? No, I'm pretty sure they're called planets. Buff Hunkey got a heroic B in astronomy at the Space Academy.~
IF "" THEN REPLY ~Whatever you say. What's your name again?~ GOTO WhoRU
IF "" THEN REPLY ~Good to know. I should really be going now. Bye.~ GOTO GoAway
END
IF "" THEN BEGIN Recognized
SAY ~Excellent! So how can Buff Hunkey, most impressive performer of heroic deeds and savior of foxy ladies, help you this fine day?~
IF "" THEN REPLY ~I'm trying to hunt down a powerful wizard called Irenicus so if you think you can take it you're welcome to come along.~ GOTO Join
IF "" THEN REPLY ~I'm good, thanks. See you around.~ GOTO GoAway
END
IF "" THEN BEGIN GoAway
SAY ~Okay-dokay. Keep your eyes open for my rocketship, will you? Buff Hunkey is in dire need of transportation.~
IF "" THEN EXIT
END
IF "" THEN BEGIN NotHeard2
SAY ~This cannot be! Show me to your nearest diabolical villian or scary alien so I can blast 'em with my raygun and show my humongous capacity for heroic deeds!~
IF "" THEN REPLY ~I don't think I got the time for that. See you around.~ GOTO Leave
IF "" THEN REPLY ~I'm just playing, big man. Of course I've heard of you, Buff.~ GOTO Recognized
END
IF "" THEN BEGIN Join
SAY ~Bah! Buff Hunkey spit in the face of danger and kicks death in the groin! I will join your hunt for this devious, diabolical villain.~
IF "" THEN REPLY ~Great. I'm sure you'll be an... interesting addition to our cause.~ DO ~SetGlobal("BuffJoined","LOCALS",1)
JoinParty()~ EXIT
IF "" THEN REPLY ~Actually I don't think we need you right now. See you around though.~ GOTO GoAway
END
IF ~NumTimesTalkedToGT(0)~ THEN BEGIN ReturnDialogue
SAY ~I see you have returned for another glare at Buff Hunkey, intergalactic hero! You haven't seen my rocketship, have you?~
IF "" THEN REPLY ~I'm afraid I haven't. I wanted to ask you something...~ GOTO Recognized
IF "" THEN REPLY ~Who are you again?~ GOTO WhoRU
IF "" THEN REPLY ~What is a rocketship?~ GOTO Rocketship
IF "" THEN REPLY ~Just came by to say hello. See you around, Buff.~ GOTO GoAway
END
BEGIN FtBuffP
IF ~Global("BuffJoined","LOCALS",1)~ THEN BEGIN KickOut
SAY ~You got to be kidding me? If your mission goes on without Buff Hunkey, intergalactic hero, it will be doomed. DOOMED!~
IF ~~ THEN REPLY ~You're right. Stay with me and we'll perform deeds of untold heroism together.~ DO ~JoinParty()~ EXIT
IF ~~ THEN REPLY ~I need your help, Buff, but I can no longer keep your bravery and heroism to myself. Go out into the world and save humanity!~ DO ~SetGlobal("BuffJoined","LOCALS",0)~ EXIT
IF ~~ THEN REPLY ~I'm getting pretty tired of your constant boasting. Beat it, spaceman.~ DO ~SetGlobal("BuffJoined","LOCALS",0)~ EXIT
END
IF ~Global("BuffJoined","LOCALS",0)~ THEN BEGIN Rejoin
SAY ~Ah-HA! I knew you would realize that you need Buff Hunkey, intergalactic hero, by your side to succeed.~
IF ~~ THEN REPLY ~You are correct. Now get in line, history is waiting to be written.~ DO ~SetGlobal("BuffJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Just came by to check up on you. I'm sure you will find your rocketship soon.~ EXIT
END