Author Topic: Stupid Dialogue  (Read 1036 times)

Offline theacefes

  • XTREME METAL ROCKER PUNK CHICK WITH ULTRA SURFBOARD
  • Planewalker
  • *****
  • Posts: 90
  • Gender: Female
  • Is this thing on?
Stupid Dialogue
« on: October 07, 2005, 03:49:02 PM »
When I talk to my NPC, she states her initial dialogue just fine...but if I reject her at all (meaning I refuse her offer to join my party) I can't talk to her again. (NPC-has nothing to say to you)


Also...when I'm writing NPC-NPC or PC-NPC or PC-NPC-NPC banters, how do I do it so that I can make the banters occurs at a certain time, chapter, and place?
Ace

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Stupid Dialogue
« Reply #1 on: October 07, 2005, 04:04:37 PM »
When I talk to my NPC, she states her initial dialogue just fine...but if I reject her at all (meaning I refuse her offer to join my party) I can't talk to her again. (NPC-has nothing to say to you)

This is likely because the assigned dialogue doesn't have any state triggers which evaluate true after you've talked to them once. I seem to remember you were using NumTimesTalkedTo(0)... if you use that one, you logically will need _some_ other state trigger for another dialogue if it is possible to talk to them more than once. You may wish to look at some other NPC initial-meeting DLG files to see how this is managed (typically with a True() or NumTimesTalkedToGT() trigger.)

Quote
Also...when I'm writing NPC-NPC or PC-NPC or PC-NPC-NPC banters, how do I do it so that I can make the banters occurs at a certain time, chapter, and place?

Through the use of scripting.

IF
InParty(Myself)
InParty("whoever else")
AreaCheck(wherever you want it to be)
Global("Chapter","GLOBAL",x)
Global("HaveDoneThisTalk","LOCALS",0)
THEN
RESPONSE #100
SetGlobal("HaveDoneThisTalk","LOCALS",1)
StartDialogueNoSet("whoever else")
END

And you would have a very high-weighted state in the J dialogue for the NPC with a state trigger of Global("HaveDoneThisTalk","LOCALS",1). In general, you want any script-triggered state trigger weighted higher than standard banter, and any player-click dialogue weighted at the very, very bottom.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline theacefes

  • XTREME METAL ROCKER PUNK CHICK WITH ULTRA SURFBOARD
  • Planewalker
  • *****
  • Posts: 90
  • Gender: Female
  • Is this thing on?
Re: Stupid Dialogue
« Reply #2 on: October 07, 2005, 04:14:28 PM »
IF
InParty(Myself)
InParty("whoever else")
AreaCheck(wherever you want it to be)
Global("Chapter","GLOBAL",x)
Global("HaveDoneThisTalk","LOCALS",0)
THEN
RESPONSE #100
SetGlobal("HaveDoneThisTalk","LOCALS",1)
StartDialogueNoSet("whoever else")
END

Just to clarify, for "myself" what would I be putting in, or is it just 'myself'?  And..."havedonethistalk" is that the name of the banter?
Global  ("chapter", "GLOBAL", x) what is x?

And WHERE exactly do I put this script?  Right above the actual Chain dialogue?  Will this be a .d file?
Ace

Offline Ghreyfain

  • Moderator
  • Planewalker
  • *****
  • Posts: 4705
  • Gender: Male
    • Pocket Plane Group
Re: Stupid Dialogue
« Reply #3 on: October 07, 2005, 04:44:07 PM »
Quote
Just to clarify, for "myself" what would I be putting in, or is it just 'myself'? And..."havedonethistalk" is that the name of the banter?
Global ("chapter", "GLOBAL", x) what is x?

IF
InParty(Myself)                   // Myself is Myself, as seen in Object.IDS
InParty("whoever else")                // "whoever else" is the death variable for the NPC you want to ensure is in the party.  "J#Kelsey", "Viconia", "Anomen", etc. are all examples  You can find a Death Variable in an NPC's .CRE file.
AreaCheck(wherever you want it to be)       // AreaCheck("AR1000") would be the government district
Global("Chapter","GLOBAL",x)        // X is the chapter number.
Global("HaveDoneThisTalk","LOCALS",0)
THEN
RESPONSE #100
SetGlobal("HaveDoneThisTalk","LOCALS",1) // You can make HaveDoneThisTalk anything you want, as long as it's not longer than 32 characters.  A LOCAL variable is only checkable by a specific .cre that runs a scripts, as opposed to a GLOBAL, which any script can check.
StartDialogueNoSet("whoever else") // Another Death Variable
END

Quote
And WHERE exactly do I put this script? Right above the actual Chain dialogue? Will this be a .d file?

This script should be in your NPC's .cre file, in the OVERRIDE slot.  It will be written in .baf format (a text file with the extension .baf), and you'll compile it in your .TP2 as you would a .d file:

COMPILE ~mymod/myscripts/script.baf~

OR, to compile an entire folder of .bafs, you'd write:

COMPILE ~mymod/myscripts~
Earn Money Sleeping.

 

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)?: