Jump to content


Photo

Interjections


  • Please log in to reply
44 replies to this topic

#21 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 27 March 2004 - 06:24 PM

Oh dear.  Does that mean that if I number my PC responses in the B file I will end up with double numbers, too?  Or only in the J?  (Please let it only be the J!) :unsure:

*sigh* A dialog file is a dialog file is a dialog file. Just because you assign one to interjections and one to banters doesn't mean the theory behind constructing them is any different.

As for the GlobalTimerExpired(?TsujathaRandomFlirtTimer?)~: Failure("lexing: empty token"), you're missing either a "GLOBAL" or "LOCALS" in there. Not sure about the other ones.

#22 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 27 March 2004 - 06:28 PM

*sigh* A dialog file is a dialog file is a dialog file. Just because you assign one to interjections and one to banters doesn't mean the theory behind constructing them is any different.

As for the GlobalTimerExpired(?TsujathaRandomFlirtTimer?)~: Failure("lexing: empty token"), you're missing either a "GLOBAL" or "LOCALS" in there. Not sure about the other ones.

I was afraid of that. I was afraid that it held true for all .d files, but I was just hoping not. Sorry. :(

Thank you for the flirt timer part, though. That is helpful! I will add my Global in there, and see what I can do.

Thank you again!

Sillara
Check out my RPG forum!

#23 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 27 March 2004 - 07:41 PM

I think I live in this section of the forum. ;)

This my next problem. I have this in my J file:


IF
~Global("TsuSuldanTalk","GLOBAL",1)~
THEN
SAY ~Blah, blah, blah.~
IF ~~ THEN EXIT
END


And this in my TSUJATH.baf:


IF
InParty(Myself)
AreaCheck("AR2800")
Global("TsuSuldanTalk", "GLOBAL",0)
THEN
IncrementGlobal("TsuSuldanTalk", "GLOBAL",1)
StartDialogueNoSet(Player1)
END


But Weidu keeps giving me an error when compiling my J file, telling me there is a syntax/parsing error at the IF line in the J file. What did I do wrong? :unsure: I am thinking I must have left something out, but I am not sure what.

Sillara

Check out my RPG forum!

#24 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 27 March 2004 - 11:29 PM

I have adjusted what I have in my J file to the following:

IF
~Global("TsuSuldanTalk","GLOBAL",1)~
THEN SAY ~Blah.~
IF ~~ THEN DO SET GLOBAL("TsuSuldanTalk","GLOBAL",2)~
EXIT
END

But I am still not getting past the IF. My previous interjection in the file is an INTERJECT_COPY_TRANS which ends with an END. I have looked--in vain--for missing tildes, and I have tried moving the dialogue to the top of the file. Nothing has worked. I am afraid that I am simply doing it flat-out wrong, but I do not know what else to try. Any help would be greatly appreciated.

Sillara, the gradually growing desperate

Check out my RPG forum!

#25 -jcompton-

-jcompton-
  • Guest

Posted 28 March 2004 - 12:27 AM

I'm getting an image of a student trying to complete a math assignment by constantly asking "What is 6 times 3?" "Okay, now what is 4 times 5?", while refusing to learn the multiplication tables.

We exhort you. We implore you. Learn the structure of .d and DLG files. You will be able to solve simple problems much, much easier once you do.

IF
~Global("TsuSuldanTalk","GLOBAL",1)~
THEN SAY ~Blah.~
IF ~~ THEN DO SET GLOBAL("TsuSuldanTalk","GLOBAL",2)~
EXIT
END

But I am still not getting past the IF.


No, you won't, because this state lacks a label. This is a simple mistake, could happen to anyone, but again, I just can't shake this image that you are asking questions and plugging in answers without asking yourself what, structually, is going on.

It'll also be dying later on with your "DO SET GLOBAL" which is not valid construction.

As for why it's failing after the I_C_T, any new state being created must either be under a BEGIN (DLG) or an APPEND (DLG) command. An I_C_T would implicitly mark the end of a BEGIN.

#26 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 28 March 2004 - 12:40 AM

I have been trying. I am sorry that I do not learn quickly enough. I do try, though. I have been poring over my J file all day. (My B compiles at last!) Your image is, alas, incorrect. I do not have a copy of the multiplication tables before me. All I have is a great mass of papers, with, here and there amongst the irrelevant information, 6x3 or 7x12 written out. It is difficult. <_<

Regardless, I do thank you. I had not noticed the space between SET and GLOBAL. (I do know that it ought not to have one.) I did not know that using I_C_T meant I needed to type BEGIN again. Now I do.

Sillara, the slowly-learning
Check out my RPG forum!

#27 -jcompton-

-jcompton-
  • Guest

Posted 28 March 2004 - 12:42 AM

You will need APPEND, not BEGIN again. You can only BEGIN a DLG once.

#28 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 28 March 2004 - 12:54 AM

Thank you. I did not think a second BEGIN made sense, but I did not want to question it. I am a little bit shy right now. :unsure:

Sillara
Check out my RPG forum!

#29 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 16 April 2004 - 10:35 PM

And I return to the Interjection thread!

I am attempting to have a morning-after type talk, one set to begin after a certain on-rest LT. I have scripted in what looks (to me!) to be a valid construction, but, though it compiles, it never fires. I even have a firing code in the .baf to set it. Nothing. Also, my one specific trigger LT is still not firing, but that is technically the B file. Back to the J.


This is in my .baf:

IF
Global("TsujathaRomanceActive","GLOBAL",2)
Global("TsujathaLoveTalk","LOCALS",41)
Global("TsujathaSPOILER","GLOBAL",1)
InParty(Myself)
See(Player1)
THEN
RESPONSE #100
SetGlobal("TsujathaSunrise","GLOBAL",1)
Interact(Player1)
END


And this is in my J file:

IF
~Global("TsujathaRomanceActive","GLOBAL",2)
Global("TsujathaSunrise","GLOBAL",1)
Global("TsujathaMatch","GLOBAL",1)
Global("TsujathaSPOILER","GLOBAL",1)~
THEN BEGIN TsujathaSunriseTalk
SAY ~(You awaken, blah.)~
= ~(Blah.)~
IF ~~ THEN REPLY ~Blah.~ DO ~SetGlobal("TsujathaSunrise","GLOBAL",2)~ GOTO TsujathaSunriseTalk1a
IF ~~ THEN REPLY ~Thank you.~ DO ~SetGlobal("TsujathaSunrise","GLOBAL",2)~ GOTO TsujathaSunriseTalk2a
IF ~~ THEN REPLY ~Tsujatha.~ DO ~SetGlobal("TsujathaSunrise","GLOBAL",2)~ GOTO TsujathaSunriseTalk3a
END


And it goes from there. (Spoilers deleted.) It compiles properly, but it never, never fires.

Is there something I just do not know? No, it is not the LT itself, which is set to fire when the Local is 40 and 42, respectively. I want this to occur immediately after the LT Local 40, which is an on-rest one. That LT fires just fine.

What can I do? Any help is appreciated.

Sillara

If it makes any difference, I cannot get ANYTHING from J file to fire except for the flirt packs. Tsujatha NEVER interjects into anything. I even installed CamDawg's tweak pack in hopes of getting Tsujatha to talk, but it did not work.
Check out my RPG forum!

#30 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 17 April 2004 - 06:16 AM

RESPONSE #100
  SetGlobal("TsujathaSunrise","GLOBAL",1)
  Interact(Player1)
END

There's your problem. You need to use Dialog(Player1) or similar to start a dialog in the J file. Interact() is only for the B file.

As for your interjections, how are they coded?

#31 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 18 April 2004 - 07:13 PM

Firstly, thank you, Kismet!! I did not know that Dialog was for the J file and Interact for the B. That should work now. On to the rest of my interjection problems.

I have fixed most of my interjections, and they work! The troublesome ones are the area-triggered ones and the following:

INTERJECT SALVANAS 22 TsuSalvanas
== TSUJATJ IF ~IsValidForPartyDialog("Tsujath")
Global("TsujathaRomanceActive","GLOBAL",1)~ THEN ~Blah.~
== SALVANAS ~Blah.~
== TSUJATJ ~Blah.~
END

That was all I wanted. I did not want the PC choices to show back up, so I used Interject instead of I_C_T. The problem is not that it doesn't fire; it does. It is just that the last line, instead of having an End Dialogue on the button, has Tsujatha's last line: Blah. And below Tsujatha's line in the text box it has the infamous red NO VALID REPLIES OR LINKS. What can I do?

Thanks!

Sillara
Check out my RPG forum!

#32 -Ashara-

-Ashara-
  • Guest

Posted 18 April 2004 - 07:36 PM

I'd try to use EXIT before the END, but I have not done interjections yet :)

#33 dorotea

dorotea

    witch extraordinaire

  • Modder
  • 1927 posts

Posted 18 April 2004 - 08:08 PM

The best way to troubleshoot things like this is by re-engineering. Install your coded segment of the dialog. Then open cmd window and run weidu mydialog.dlg

This will make a mydialog.d file in your SoA main dir. Open it and see what does interject really do - as in it obviously creates the simple

IF ~~ THEN BEGIN xxx
SAY ~~
IF ~~ THEN yyy
END

structures out of your INTERJECT

Just see if you are happy with what you are getting - in any case I try to avoid interject out of principle, everything you really want can be done with CHAIN

Freedom cannot be equated with goodness, virtue, or perfection. Freedom has its own unique self-contained nature; freedom is freedom ? not universal goodness. Any confusion or deliberate equalization of freedom with goodness and excellence is in itself negation of freedom, and acceptance of the path of restraint and enforcement.

Nikolai Berdyaev - Christian Existentialist, Philosopher of Freedom.


The Longer Road mod
Redemption mod
Bitter Grey Ashes


#34 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 19 April 2004 - 05:19 PM

Putting an EXIT before the END makes Weidu refuse to even compile it. Sigh.

How can I do this with CHAIN? I like CHAIN. For instance, how can I have Tsujatha interject into the Bodhi dialogue in the vamping scene? It can't go back to the previous lines because he is not Anomen, and that makes no sense. I have written lines for Bodhi to say, but I cannot figure out how to put them there without using INTERJECT. Argh.

Thanks!

Sillara
Check out my RPG forum!

#35 Grim Squeaker

Grim Squeaker

    Fallen

  • Member
  • 1018 posts

Posted 19 April 2004 - 11:30 PM

Use INTERJECT. It's nice and easy to use. Change the END for an EXIT. WeiDU allows either (just like CHAIN) but we definately want to end the dialogue there.

You can easily INTERJECT into Bodhi's dialogue just like you did above with Salvanas. However you'll probably want to go back into Bodhi's original dialogue after your interjection so instead of 'EXIT' have 'END #' where # is the state number that you want to run next after your interjection is done.
"You alone can make my song take flight..."

#36 -Guest-

-Guest-
  • Guest

Posted 20 April 2004 - 07:47 AM

so instead of 'EXIT' have 'END #'


I assume GS means END GOTO dialog dialoglabel

As for how to use CHAIN, you will need to

ADD_TRANS_TRIGGER to the SILVANUS end dialog condition (ie Tsu is in not the party)

Then EXTEND_BOTTOM -> and add the transition that happens if Tsu is in

Then use CHAIN

GS - I still hate INTERJECT , it never works for me. :P

#37 Grim Squeaker

Grim Squeaker

    Fallen

  • Member
  • 1018 posts

Posted 20 April 2004 - 08:40 AM

Actually what I meant was:

END DialogueFile DialogueLabel

Yeah I screwed up...

I think INTERJECT is piss easy... but oh well...

I just followed the example in the readme!

INTERJECT IDRYAD1 1 MinscDryad
  == MINSCJ IF ~IsValidForPartyDialog("Minsc")~ THEN 
    ~Boo is outraged that the strange wizard would own these lovely ladies!
    Can Minsc and Boo help you nice girls?~
END IDRYAD2 1

"You alone can make my song take flight..."

#38 -Ashara-

-Ashara-
  • Guest

Posted 23 April 2004 - 03:52 AM

//////INTERJECTION IN ARKUSHULE NEEDS CHECKING!//////

INTERJECT ARKUSH 5 SafArkush5
== ~_SAFANJ~ IF ~IsValidForPartyDialogue("SAFANA")~ THEN
~Gypsy who wouldn't take the money? Wait! What did you see?~
== ~_ARKUSH~ IF ~IsValidForPartyDialogue("SAFANA")~ THEN
~Leave me!~
IF ~~ THEN DO ~EscapeArea() SetGlobal("SafArkush5","LOCALS",1)~
EXIT



INTERJECT ARKUSH 8 SafArkush8
== ~_SAFANJ~ IF ~IsValidForPartyDialogue("SAFANA")~ THEN
~What is it, old woman? What is <CHARNAME>'s fate?~
== ~_ARKUSH~ IF ~IsValidForPartyDialogue("SAFANA")~ THEN
~No names! I don't want to know names! Do not come nearer!~
IF ~~ THEN DO ActionOverride("Arkushule",Enemy()) SetGlobal("SafArkush8","LOCALS",1)~
EXIT

Uhm...any ideas what can cause the parse errors in this snippet? Nope, INTERJECT is not easy :)

#39 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 23 April 2004 - 04:39 AM

You don't need to set the variable as WeiDU will do that for you, albeit using GLOBAL rather than LOCALS.

I never put the .dlg file name in ~~, but I'm not sure if that makes any difference.

For INTERJECT you need to use END (and not EXIT) then the transition (if any).

#40 SimDing0

SimDing0

    GROUP ICON

  • Member
  • 1654 posts

Posted 23 April 2004 - 04:41 AM

I never put the .dlg file name in ~~, but I'm not sure if that makes any difference.

You have to use tildes when your filenames start with weirdo characters like underscores.
Repeating cycle of pubes / no pubes.

A Comprehensive Listing of IE Mods