Author Topic: Problems with pdialogue...  (Read 4834 times)

Offline Lykainon

  • Planewalker
  • *****
  • Posts: 21
Problems with pdialogue...
« on: November 17, 2008, 04:36:50 PM »
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.

Code: [Select]
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


Offline Kulyok

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 6253
  • Gender: Female
  • The perfect moment is now.
Re: Problems with pdialogue...
« Reply #1 on: November 18, 2008, 12:53:38 AM »
Make sure you're appending .tp2 correctly. Better yet, post the contents of your .tp2 here.

Offline Lykainon

  • Planewalker
  • *****
  • Posts: 21
Re: Problems with pdialogue...
« Reply #2 on: November 18, 2008, 01:13:27 AM »
Okay, I hadn't even considered the problem might be in the .tp2 but now that you say it, it seems very likely considering that while I at least have some idea of what I'm doing in the .d file, parts of .tp2 are pretty much just copy-pasting with a very faint idea of what I'm actually doing.

Code: [Select]
BEGIN ~Buff Hunkey - Intergalactic Hero~
COPY ~BuffHunkey\FtBuff10.cre~ ~override\FtBuff10.cre~
SAY NAME1 ~Buff~
SAY NAME2 ~Buff Hunkey~

COMPILE ~BuffHunkey\FtBuff.d~

APPEND ~pdialog.2da~
~FtBuffHunkey FtBuffP FtBuffJ FtBuffD FtBuf25P FtBuf25J FtBuf25D FtBuf25~
UNLESS ~FtBuffHunkey~

//COMPILE ~BuffHunkey\FtBuff.baf~

COPY ~BuffHunkey/FtBuff10.cre~ ~override/FtBuff10.cre~
 SAY NAME1 ~Buff~
 SAY NAME2 ~Buff Hunkey~
 WRITE_SHORT 0x244 0
 WRITE_BYTE  0x246 ~%FtIGhero%~
 WRITE_BYTE  0x247 0x40


EXTEND_TOP ~Ar0602.bcs~ ~BuffHunkey\ar0602.baf~

The actual .tp2 is actually a bit longer since it also includes his kit but I figured that part probably wasn't to blame (for this particular screw-up at least).
« Last Edit: November 18, 2008, 01:17:29 AM by Lykainon »

Offline Kulyok

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 6253
  • Gender: Female
  • The perfect moment is now.
Re: Problems with pdialogue...
« Reply #3 on: November 18, 2008, 01:29:13 AM »
APPEND ~pdialog.2da~
~FtBuffHunkey FtBuffP FtBuffJ FtBuffD FtBuf25P FtBuf25J FtBuf25D FtBuf25~
UNLESS ~FtBuffHunkey~

- this is your problem. "FtBuffHunkey" = it  is your character's "death variable"(called "script name" in Near Infinity). It's too long - it should be 8 symbols or less. Replace it in both lines and be careful to replace it in your .cre file, too.

Does it sound too difficult? If it does, re-read Ghrey's tutorial on this(or theacefes's tutorial at gibberlings3.net - both are good, and theacefes writes about editing .cre files, as I recall).

Offline Lykainon

  • Planewalker
  • *****
  • Posts: 21
Re: Problems with pdialogue...
« Reply #4 on: November 18, 2008, 01:46:13 AM »
Ah, damnit. I remember reading about the eight letter limitation but for some reason it slipped my mind. I don't think I'll have much problem fixing it though (like I said, I know that tutorial by heart by now ;)).

Thanks for the advice, I'll report my fantastic success or utter failure as soon as possible.

Offline Lykainon

  • Planewalker
  • *****
  • Posts: 21
Re: Problems with pdialogue...
« Reply #5 on: November 18, 2008, 01:58:15 AM »
Didn't help. While I'm sure my overly long death variable (which it's actually called in NI btw, at least in my version) caused one problem or the other, it wasn't to blame for this one. I changed it in the .tp2, the cre and reinstalled the mod but as far as I can tell, nothing changed.
« Last Edit: November 18, 2008, 02:02:26 AM by Lykainon »

Offline Kulyok

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 6253
  • Gender: Female
  • The perfect moment is now.
Re: Problems with pdialogue...
« Reply #6 on: November 18, 2008, 02:06:01 AM »
Then do what we all do: separate two files and compile two dialog files, BEGIN FtBuffP and BEGIN FtBuff. Make sure to change .tp2, too.

Also, I am not sure that
IF "" THEN REPLY works. I know that IF ~~ THEN REPLY does. Your call, though.

Offline Lykainon

  • Planewalker
  • *****
  • Posts: 21
Re: Problems with pdialogue...
« Reply #7 on: November 18, 2008, 02:19:07 AM »
Sounds like a plan, I'll give it a try. Thanks.

And IF "" THEN REPLY works fine, all of the dialogue before BEGIN FtBuffP works like it should as far as I know.

Offline Lykainon

  • Planewalker
  • *****
  • Posts: 21
Re: Problems with pdialogue...
« Reply #8 on: November 18, 2008, 02:32:42 AM »
No change.  :(  Just to make sure I did what you said... I copied the P-section from FtBuff.d into a .d file of its own and told .tp2 to compile the new file as well. That's what you meant, right?

EDIT: I also reinstalled everything afterwards, I'm not that much of a newbie. ;)

Offline Kulyok

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 6253
  • Gender: Female
  • The perfect moment is now.
Re: Problems with pdialogue...
« Reply #9 on: November 18, 2008, 02:45:44 AM »
Quite. Well, what I'd advise now may seem silly, but if everything fails, try this: continue working on your mod, add various dialogue, banters and such. After you're done, you'll feel more competent, and you'll deal with Pfile problem.

From here, we can only advise - you know more, because you see your mod from the inside.

Right. So, my current advice:
 WRITE_SHORT 0x244 0
 WRITE_BYTE  0x246 ~%FtIGhero%~
 WRITE_BYTE  0x247 0x40
- I don't like these, because I don't know what they mean. Seriously. (And I coded like several NPC mods or something). If they're blocking your death variable thing(which is possible), they are blocking your p file and other files, too. Cut them. Leave FtBuff in your dialogue file and in your script name in Near Infinity.

Or do this:

COPY ~BuffHunkey/FtBuff10.cre~ ~override/FtBuff10.cre~
 SAY NAME1 ~Buff~
 SAY NAME2 ~Buff Hunkey~
WRITE_ASCII 0x248 ~FtBuff~ #8 // override
WRITE_ASCII 0x2cc ~FtBuff~ #8 // dialogue
WRITE_ASCII 0x280 ~FtBuff~ #32 //DV

Offline Lykainon

  • Planewalker
  • *****
  • Posts: 21
Re: Problems with pdialogue...
« Reply #10 on: November 18, 2008, 03:27:58 AM »
The part you don't understand is more or less directly copied from a tutorial (http://www.shsforums.net/index.php?showtopic=7381) and is what assigns the new kit to the new NPC.

Your suggestion could work, since I can get him to join without problems the current issue wouldn't cause much trouble for my continued work on him. What does the WRITE_ASCII stuff do? (Not technically exactly what it does in modding terms but rather what you hope they'll do to my mod.)

Offline Kulyok

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 6253
  • Gender: Female
  • The perfect moment is now.
Re: Problems with pdialogue...
« Reply #11 on: November 18, 2008, 03:57:28 AM »
The part you don't understand is more or less directly copied from a tutorial (http://www.shsforums.net/index.php?showtopic=7381) and is what assigns the new kit to the new NPC.

You mean, you haven't even got the leaving file working, and you're already trying to assign a new kit? That's one thing I'd caution against, yeah.

Quote
Your suggestion could work, since I can get him to join without problems the current issue wouldn't cause much trouble for my continued work on him. What does the WRITE_ASCII stuff do? (Not technically exactly what it does in modding terms but rather what you hope they'll do to my mod.)

It assigns your NPC three important things it cannot function without: basic dialogue(the one you hear when you meet him), his death variable(the one his pdialog file and other files are attached to) and his script file(the one which rules his actions - for example, if he is going to say something in the Temple District, you'll have to mention it in his script).

Basically, if you screwed up NI(which you almost certainly did, as your leaving dialogue isn't working), these three lines will take care of it.

Offline Lykainon

  • Planewalker
  • *****
  • Posts: 21
Re: Problems with pdialogue...
« Reply #12 on: November 18, 2008, 04:06:32 AM »
You mean, you haven't even got the leaving file working, and you're already trying to assign a new kit? That's one thing I'd caution against, yeah.

I added it before I realized this particular problem. And yeah, it's probably not the smartest thing to learn both at once but I really, really wanted him as a proper Intergalactic Hero (which currently is a crippled fighter with a fancy title and description...) as soon as possible.  8)

It assigns your NPC three important things it cannot function without: basic dialogue(the one you hear when you meet him), his death variable(the one his pdialog file and other files are attached to) and his script file(the one which rules his actions - for example, if he is going to say something in the Temple District, you'll have to mention it in his script).

Basically, if you screwed up NI(which you almost certainly did, as your leaving dialogue isn't working), these three lines will take care of it.

Sweet. I'll give it a shot and if it still won't work I think I'll spend some quality time on the kit. I'm still a little scared of trying to do banters, quests and other NPC-related stuff like that.

Offline Lykainon

  • Planewalker
  • *****
  • Posts: 21
Re: Problems with pdialogue...
« Reply #13 on: November 18, 2008, 04:22:55 AM »
Hmm... still no change. I also tried him with the kit uninstalled and the kit-assigning disabled in case that screwed something up but it didn't help either.

Offline Kulyok

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 6253
  • Gender: Female
  • The perfect moment is now.
Re: Problems with pdialogue...
« Reply #14 on: November 18, 2008, 06:18:44 AM »
Should work, though. I'd do the usual steps: restore a clean backup(so that .2da files are clean), install the mod anew and start a new game, just to be sure.

Oh! Have you checked the flags? In Near Infinity(or whatever editor you're using), "export allowed" flag should be off, not on. Just in case.

jastey*

  • Guest
Re: Problems with pdialogue...
« Reply #15 on: November 18, 2008, 06:23:07 AM »
Oh! Have you checked the flags? In Near Infinity(or whatever editor you're using), "export allowed" flag should be off, not on. Just in case.

That's what I was thinking, too.
And the usual subjects: Spell-check the DV in the cre file and in the tp2-pathing, spell-check the names of the dlgs (it's something one of these simple things...).

-jastey

jastey*

  • Guest
Re: Problems with pdialogue...
« Reply #16 on: November 18, 2008, 06:24:41 AM »
... I wanted to say it's sometimes one of these simple things. I am not *that* arrogant...

Offline Lykainon

  • Planewalker
  • *****
  • Posts: 21
Re: Problems with pdialogue...
« Reply #17 on: November 18, 2008, 07:18:12 AM »
I know there aren't any flags on (although I suppose I could check in case I forgot to save after removing them or whatever) and I checked the DV-spelling earlier but I'll go do a little spellchecking.

EDIT:
There weren't any flags set and both the death variable and dialogue names seemed correctly spelled everywhere. This is literally starting to give me a headache (although I suppose lack of proper food and sleep might have something to do with that as well. I should do something about that...)
« Last Edit: November 18, 2008, 10:25:37 AM by Lykainon »

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: