Jump to content

Joinable NPC Dialog help


plainab

Recommended Posts

Alright. I've got a joinable npc that I have made. The boring but working version is available here: abSolestia.zip. However, I've attempted to spice things up a bit. Now when I run the game, it crashes to desktop at the point when the npc joins the party. I did make a new cre to replace the one I originally had. I first assumed it was some setting on that new cre file, but when I tried my old cre file (the one I know works from the zip file above) it still crashed to desktop. My only other thoughts are that I've had two other non-joinable cres who before stood there and said nothing, but now have some comments to say right before the joinable NPC joins. Could somebody please take a look at my .d file and explain to me where I've gone wrong and what some possible solutions could be? Thank you.

BEGIN abhalf1
IF ~Global("ab_soljoinded","GLOBAL",0)~ THEN BEGIN 1half1
SAY @1050 //~You need to be talking to Solestia. She's the one in charge...~
IF ~~ THEN EXIT
END

IF ~Global("ab_halfchain","GLOBAL",1)~ THEN BEGIN 2half1
  SAY @1051 //~Take care of Solestia. She's a good woman.~
  IF ~~ THEN EXTERN abhalf2 3half2
END

BEGIN abhalf2
IF ~Global("ab_soljoinded","GLOBAL",0)~ THEN BEGIN 1half2
SAY @1100 //~Solestia is the one you need to speak with...~
IF ~~ THEN EXIT
END

IF ~Global("ab_halfchain","GLOBAL",1)~ THEN BEGIN 2half2
  SAY @1101 //~Keep an eye on Solestia. She's got a habit of taking things from her friends. Just for practice, at least she always returned what she took from me.~
  IF ~~ THEN EXTERN abhalf1 2half1
END

IF ~Global("ab_halfchain","GLOBAL",1)~ THEN BEGIN 3half2
  SAY @1102 //~Hey, where's that magic bag I found last year in those ruins...~
  IF ~~ THEN EXTERN ab_sol 9sol
END

BEGIN ab_sol

IF ~NumTimesTalkedTo(0)~ THEN BEGIN 1sol
SAY @1000 //~Hi. I am Solestia. These are my cousins Shorty and Slinger.~
IF ~~ THEN REPLY @1003 GOTO 1sola
END
IF ~~ THEN BEGIN 1sola
 SAY @1001 //~Are you looking for work? My cousins and I are. How about we look for work together?~
 = @1004 //~I've got a bow, some arrows... All I need is a target...~
 = @1006 //~What do you say?~
IF ~~ THEN REPLY @1007 GOTO 2sol //~Yes, we may look for work together so long as you do not target my back with your bow and arrows.~
IF ~~ THEN REPLY @1008 GOTO 3sol //~We both maybe looking for work, but we aren't doing it together.~
END

IF ~~ THEN BEGIN 2sol
SAY @1009 //~Have no fear! I would never willingly target your back or your front for that matter. Well not with my bow and arrows anyway... *wink*~
IF ~~ THEN GOTO 8sol
END

IF ~~ THEN BEGIN 3sol
SAY @1010 //~If you should change your mind, I might still be here.~
IF ~~ THEN DO ~SetGlobal("ab_solreject","GLOBAL",1)~ EXIT
END

IF ~!NumTimesTalkedTo(0)
  Global("ab_solreject","GLOBAL",1)~ THEN BEGIN 4sol
SAY @1011 //~Change your mind have you?~
IF ~~ THEN REPLY @1012 GOTO 8sol //~Yes, I have. Come with us.~
IF ~~ THEN REPLY @1013 DO ~IncrementGlobal("ab_solreject","GLOBAL",1)~ EXIT //~No, I must have mistaken you for some commoner.~
END

IF ~!NumTimesTalkedTo(0)
  Global("ab_solreject","GLOBAL",2)~ THEN BEGIN 5sol
SAY @1026 //~You've come again. Are we to join forces this time?~
IF ~~ THEN REPLY @1027 GOTO 8sol //~Why yes! We have a use for you and your bow...~
IF ~~ THEN REPLY @1028 DO ~IncrementGlobal("ab_solreject","GLOBAL",1)~ EXIT //~Did you guys hear something? I thought I heard a bunch of hot air go by.~
END

IF ~!NumTimesTalkedTo(0)
  Global("ab_solreject","GLOBAL",3)~ THEN BEGIN 6sol
SAY @1014 //~I'm getting a little tired of you.~
 = @1015 //~If you don't wish for me to join with you then leave me alone.~
 IF ~~ THEN DO ~IncrementGlobal("ab_solreject","GLOBAL",1)~ EXIT
END

IF ~!NumTimesTalkedTo(0)
  Global("ab_solreject","GLOBAL",4)~ THEN BEGIN 7sol
SAY @1016 //~I told you to leave me alone!~
 = @1017 //~Have at them my cousins!~
 IF ~~ THEN DO ~ActionOverride("Slinger",Enemy())
			 ActionOverride("Shorty",Enemy())
			 Enemy()
			 Attack(LastTalkedToBy(Myself))~ EXIT
END

IF ~~ THEN BEGIN 8sol
SAY @1002 //~Hey cousins, <CHARNAME> has asked me to join up. I'll be seeing you around.~
 IF ~~ THEN DO ~SetGlobal("ab_halfchain","GLOBAL",1)~ EXTERN abhalf2 2half2
END

IF ~~ THEN BEGIN 9sol
SAY @1005 //~I've no clue what you're talking about Shorty. I saw you with it yesterday. Did you check the inn we stayed at last night? You two go look for it. I'll go with <CHARNAME>.~
IF ~~ THEN DO ~SetGlobal("ab_soljoined","GLOBAL",1)
			ActionOverride("Slinger",EscapeArea())
			ActionOverride("Shorty",EscapeArea())
			JoinParty()~ EXIT
END

BEGIN ab_solP

IF ~Global("ab_soljoined","GLOBAL",1)~ THEN BEGIN p1sol
SAY @1018 //~Are we to part ways?~
IF ~~ THEN REPLY @1019 DO ~JoinParty()~ EXIT //~Sorry, it was a mistake. Please help carry our loot...~
IF ~~ THEN REPLY @1020 DO ~SetGlobal("ab_soljoined","GLOBAL",0)
						SetGlobal("ab_solCCgo","GLOBAL",1)
						MoveGlobal("ar0406","Solestia",[1475.1925])~ EXIT //~Yes, we must part ways for a little while. Please go back to the Copper Cornet. If I should need you again, I'll look for you there.~
END

IF ~Global("ab_solCCgo","GLOBAL",1)~ THEN BEGIN p2sol
SAY @1021 //~You've come back. Do you need my services again?~
IF ~~ THEN REPLY @1022 DO ~SetGlobal("ab_soljoined","GLOBAL",1)
						JoinParty()~ EXIT //~Yes.~
IF ~ReactionLT(LastTalkedToBy(),14)~ THEN REPLY @1023 EXIT //~Not at this time.~
IF ~ReactionGT(LastTalkedToBy(),8)~ THEN REPLY @1024 GOTO p3sol //~No, I just wanted to make sure that you arrived here safely.~
END

IF ~~ THEN BEGIN p3sol
SAY @1025 //~I regret that we won't be working together, but I do thank you for your concern. Until next time...~
IF ~~ THEN EXIT
END

BTW commented out text is not always accurate. I've done some corrections to the tra that are not reflected in this file...

Link to comment

I solved my own problem. Apparently, it had nothing to do with the .d file. I reverted to my old .d file and I still had the same crash. The problem ended up being a container that I had added to my cre's inventory. I needed to make a sto file with an identical name. Who knew?

It works now and I've got a nice little banter between Solestia and her two cousins when she joins the party. Now it's time to expand it some more...

Link to comment

I corrupt item would have been my guess, too, as I never managed to get a CTD due to dialogue. The most horrible thing happening there was usually a NVLOR (no valid links or reply) bug, whereas bugged items are a nice and reproducible way to create CTDs, same as buggy or missing animations / sounds in an area.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...