Jump to content


Photo

How to ensure your banters always run when you want them to.


28 replies to this topic

#16 Kulyok

Kulyok
  • Members
  • 5642 posts
  • Gender:Female
  • Location:Moscow, Russia

Posted 15 March 2007 - 12:39 PM

Thanks! It is good to know. I suspected it was fast, too.

I guess I'd still add an InParty/See or something, just in case of a *veeeery* malevolent player. But for now I'm off to sleep, and I'll be eager to read the consensus(and to edit the first post) in the morning. :)

#17 jastey

jastey
  • Gibberlings
  • 5356 posts
  • Gender:Female

Posted 02 October 2007 - 10:17 AM

Am I right that this splitting of setting the variable and triggering of the dialogue only makes sense (only is required) for NPCs, not for non-joinable characters?

#18 berelinde

berelinde

    The Typo Queen

  • Gibberlings
  • 8594 posts
  • Location:New Jersey, USA

Posted 02 October 2007 - 10:27 AM

I'd think so, though I usually break it into two anyway.

The biggest thing that causes these misfires is the player issuing movement commands. Since the player doesn't issue movement commands to non-joinables, their script isn't likely to be interrupted.

Just to say it: I leave the script blocks in the dream script alone. They fire when the player hits rest, so the script won't be interrupted by movement anyway.
Must. Write. Faster.

cmorgan: "None of us get old around here, just more proficient at doing more stuff with less braincells!"

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum

#19 jastey

jastey
  • Gibberlings
  • 5356 posts
  • Gender:Female

Posted 02 October 2007 - 10:39 AM

Just to say it: I leave the script blocks in the dream script alone. They fire when the player hits rest, so the script won't be interrupted by movement anyway.

That's an important hint in connection to this tutorial.

For non-joinable characters, that's what I thought. Thank you!

Kulyok, the idea behind this tutorial is really great. Thank you for writing it! Ajantis will be coded that way and Drizzt.

#20 Kulyok

Kulyok
  • Members
  • 5642 posts
  • Gender:Female
  • Location:Moscow, Russia

Posted 02 October 2007 - 12:02 PM

Thank you. :)

And, yes, you don't have to split the blocks for
- non-joinable characters
- dream scripts.

#21 jastey

jastey
  • Gibberlings
  • 5356 posts
  • Gender:Female

Posted 23 October 2007 - 04:21 AM

So... do you think we've solved the problem, now that the second block runs immediately no matter what?

What was the last word on this? In my trigger blocks I repeat conditions, like See(Player1) !StateCheck() etc. just to prevent the rare occasion where this might be of importance, and I see BG1NPC is coded that way, too.

So, was it no conditions or including See etc. checks?

#22 Kulyok

Kulyok
  • Members
  • 5642 posts
  • Gender:Female
  • Location:Moscow, Russia

Posted 23 October 2007 - 04:57 AM

The last word for me is RE and Xan, I guess. :)
Here:

// Break-up talk
IF
Global("O#XanRT15","GLOBAL",0)
OR(2)
GlobalGT("AsylumPlot","GLOBAL",54)
GlobalGT("Chapter","GLOBAL",4)
InParty(Myself)
Global("O#XanRomanceActive","GLOBAL",1) 
See(Player1)
!StateCheck(Player1,CD_STATE_NOTVALID) 
!StateCheck(Myself,CD_STATE_NOTVALID)
CombatCounter(0)
!See([ENEMY])
THEN
RESPONSE #100
SetGlobal("O#XanRT15","GLOBAL",1)
END

IF
Global("O#XanRT15","GLOBAL",1)
InParty(Myself)
See(Player1) // not needed if StartDialogueNoSet
!StateCheck(Player1,CD_STATE_NOTVALID) 
!StateCheck(Myself,CD_STATE_NOTVALID)
THEN
RESPONSE #100
PlaySong(0)
PlaySound("O#XAN")
Interact(Player1)
END

If you're using J file and StartDialogueNoSet, you don't really need a See() check in the second block, since SDNS is more forgiving - even if characters are in different areas, a banter will trigger without en error; however, if you prefer to avoid that for the sake of realism, See() or Range() or InMyArea() would still be preferable.

#23 jastey

jastey
  • Gibberlings
  • 5356 posts
  • Gender:Female

Posted 23 October 2007 - 10:09 AM

Thank you.
I use "InMyArea(Player1)", most of the times.

#24 Nijel

Nijel
  • Members
  • 13 posts

Posted 01 June 2009 - 02:23 PM

Usefull tutorial. I've read about issues with interject(), especially annoying during romances and less good than StartDialogueNoSet, so is there really no issue with StartDialogueNoSet ?

#25 berelinde

berelinde

    The Typo Queen

  • Gibberlings
  • 8594 posts
  • Location:New Jersey, USA

Posted 01 June 2009 - 03:10 PM

You mean Interact(), right?

It doesn't much matter, except that if you're going to use the B file instead of the J file, state weighting becomes very important.

State weighting is still important in the J file as well, but all you've got to do is get scripted dialogue ahead of the PID with WEIGHT #-1.
Must. Write. Faster.

cmorgan: "None of us get old around here, just more proficient at doing more stuff with less braincells!"

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum

#26 Crimpson

Crimpson
  • Members
  • 34 posts

Posted 28 October 2009 - 07:23 AM

I should probably know this by now but i haven't found the answer.

IF
InParty(Myself)
See(Player1)
Global("MyBanter","GLOBAL",1)
THEN
RESPONSE #100
Interact(Player1) // calls forth a banter from BMyNPC.d
END

where do you tell the game what file to look for? my banter file is JK#NanyJ. should it find it automatically? or where do i put in the directory?

#27 cmorgan

cmorgan

    journeyman investigator

  • Gibberlings
  • 6913 posts
  • Gender:Male
  • Location:Glencoe, IL, USA

Posted 28 October 2009 - 08:29 AM

Full treatment:

Dialog Files and How They Are Referenced tutorial

It leads you through the information step by step.

Shortcut:

Your banters are not in JK#NanyJ, they will be in JK#NanyB or JK#BNany or something like that - j = joined, b = banter, p = (post) after-joined-and-dropped, no designation = non-joinable.

Adding the references to pdialog.2da tells te game where to look automatically.

The game can tell which file to look at by the call used in the script; Interact() calls b-file, Dialog() (and all related calls) calls the j-file.

But the tutorial steps you through all of this, provides samples, and provides a list of (almost all) existing NPC file names in released mods.

Edited by cmorgan, 28 October 2009 - 08:39 AM.

I love deadlines. I love the whooshing noise they make as they go by. - Douglas Adams

#28 Dakk

Dakk
  • Members
  • 805 posts
  • Gender:Male

Posted 04 April 2011 - 02:37 AM

It's like haiku. But spam.
Spam-haiku.

#29 jastey

jastey
  • Gibberlings
  • 5356 posts
  • Gender:Female

Posted 04 April 2011 - 12:07 PM

It's like haiku. But spam.
Spam-haiku.

Spam was deleted.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users