Jump to content


Photo

Adding interjections...


  • Please log in to reply
29 replies to this topic

#1 Sticz

Sticz

    Monkey - In the time of Chimpanzees

  • Member
  • 385 posts

Posted 07 November 2005 - 06:55 PM

I have a pretty solid grasp now on how to add interjections for my generated character, and its a blast. Now, Im kinda addicted, and want to hear more witty banter with my other characters. I really like Viconia in my party, as well as Valygar. How do I add to their interjections? What is the best way to do this? What tutorial would I find this in, or what example can be found?


Sticz
"For a crazy person, you don't drool much." Complement from Dilbert's Wally.

#2 Grim Squeaker

Grim Squeaker

    Fallen

  • Member
  • 1018 posts

Posted 08 November 2005 - 12:42 AM

Hang on, do you want to add interjections or banters (as you use both words). I'm going to assume by your first sentence you mean interjections. Interjections really aren't hard, you just have to follow the format. This section from the WeiDU readme should explain the basics of INTERJECT and below it is a section on INTERJECT_COPY_TRANS (Or I_C_T for short).

However, if you've grasped how to do it for your NPC then its basically no different for a Bioware NPC. You just need to use their Death Variables (which can be looked up in any number of places e.g. their CRE files, interdia.2da etc) instead of your NPC's.

Edited by cmorgan, 03 January 2010 - 03:42 PM.
malformed url tag repaired after forum move

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

#3 Sticz

Sticz

    Monkey - In the time of Chimpanzees

  • Member
  • 385 posts

Posted 08 November 2005 - 08:21 PM

Well, for the Bioware NPCs, how do I add them to their existing files? I have a pretty firm grasp of the Interject commands, as my NPC is doing them all over the place. For instance, if I want to have Viconia talk some smack to Renal Bloodscalp, I see the file (BVICONI.DLG), how do I use Weidu to add to it? Does it fall under "append"? I have NOT done any append modding yet, all my stuff is just adding to a file Im inserting to begin with, not adjusting an existing one.

Are there any mods out there with good examples? Im using the Gareth mod for all my examples (basically rewrote him) as my NPC.

Sticz
"For a crazy person, you don't drool much." Complement from Dilbert's Wally.

#4 Lord Ernie

Lord Ernie
  • Modder
  • 755 posts

Posted 09 November 2005 - 06:27 AM

You don't have to 'add' the interject to any files. The Interject command interjects into an existing dialogue state, at which point you can have any NPC saying anything, by using their dialogue file, for example:

INTERJECT_COPY_TRANS KORGANJ 16 LE#KorganInterject
== BTASHIA IF ~InParty("Tashia")~ THEN @23
== KORGANJ IF ~InParty("Tashia")~ THEN @24
END

In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move - Douglas Adams

I like persons better than principles, and I like persons with no principles better than anything else in the world - Oscar Wilde

Give a man a fire, and he's warm for a day. But set a man on fire, and he's warm for the rest of his life. - Terry Pratchett


#5 Sticz

Sticz

    Monkey - In the time of Chimpanzees

  • Member
  • 385 posts

Posted 11 November 2005 - 04:50 PM

Got it, thanks, I was over-thinking. I have it down pretty pat now.

Sticz

BTW, when setting up interjections for ToB (& watchers keep if played in SoA) do I put the interjections in the 25 file? (IE VICONI25.d)? I am away from my desktop now and dont want to re-invent the wheel when I get back.

Sticz
"For a crazy person, you don't drool much." Complement from Dilbert's Wally.

#6 Sticz

Sticz

    Monkey - In the time of Chimpanzees

  • Member
  • 385 posts

Posted 13 November 2005 - 12:58 PM

Also, I am looking for a way to end a dialog. Looking over the Weidu documentation I dont see a clear answer except for extending the file. Is there a command that will let me exit the dialog? Right now if I sue INTERJECT it will come of as NO VALID REPLIES OR LINKS. I want to just have the conversation end with the target getting mad and attacking or something. I see a list of commands in IDS files, but only see StartDialog not EndDialog...
"For a crazy person, you don't drool much." Complement from Dilbert's Wally.

#7 Rabain

Rabain

    God

  • Member
  • 653 posts

Posted 13 November 2005 - 02:02 PM

Post the code of your interject. If you Interject you need to specify where the code goes after. If you use Interject_Copy_Trans the code goes back to where the original dialog was going (hence the Copy_trans part).
A knight without armour in a savage land...

#8 Shed

Shed

    -Shed-

  • Modder
  • 2636 posts

Posted 13 November 2005 - 02:39 PM

Do you want EXIT as in:

IF ~~ State
SAY ~Hi~
++ ~Bye.~ EXIT
END


#9 Sticz

Sticz

    Monkey - In the time of Chimpanzees

  • Member
  • 385 posts

Posted 13 November 2005 - 04:07 PM

Here's what I have now:

INTERJECT KELDOR 0 VICONIAKeldorn
== KELDOR IF ~InParty("VICONIA")~ THEN ~What ho?! YOU are the ones who travel with this Drow!~
== VICONIJ IF ~InParty("VICONIA")~ THEN ~Fitting that you are in the sewers knight! The vermin that reside here will not have to travel far to feast on your flesh!~
== KELDOR IF ~InParty("VICONIA")~ THEN ~Prepare to have your evil cleansed!~ DO ~ChangeEnemyAlly(Myself,Enemy)~
END


Im using INTERJECT because it doesnt link back, but... I get the NO VALID REPLIES OR LINKS afterwards and Im just as bad off. I tried EXIT, but that is not a proper command. Nor do I see any commands to end dialog in the IDS list.

Things that make you go hmmmm.


Sticz
"For a crazy person, you don't drool much." Complement from Dilbert's Wally.

#10 Shed

Shed

    -Shed-

  • Modder
  • 2636 posts

Posted 13 November 2005 - 04:12 PM

INTERJECT KELDOR 0 VICONIAKeldorn

== KELDOR IF  ~InParty("VICONIA")~ THEN ~What ho?! YOU are the ones who travel with this Drow!~

== VICONIJ IF ~InParty("VICONIA")~ THEN ~Fitting that you are in the sewers, knight! The vermin that reside here will not have to travel far to feast on your flesh!~

== KELDOR IF  ~InParty("VICONIA")~ THEN ~Prepare to have your evil cleansed!~ DO ~ChangeEnemyAlly(Myself,Enemy)~ EXIT

END


#11 Sticz

Sticz

    Monkey - In the time of Chimpanzees

  • Member
  • 385 posts

Posted 13 November 2005 - 04:42 PM

Negative, Ghostrider...

For some reason that isnt working. The EXIT after the text is getting me a parsing.parse_error. if I remove the EXIT it complies normally, so thats gotta be it. Im thinking that Ill have to extend the dialog and I havent done something like that yet. The directions from Weidu are a little hard for me to grasp.

Is there a way to just remove the PC portion of the conversation? That would work too.

Sticz
"For a crazy person, you don't drool much." Complement from Dilbert's Wally.

#12 Shed

Shed

    -Shed-

  • Modder
  • 2636 posts

Posted 14 November 2005 - 03:20 AM

OK, I've just checked up on it and in fact you aren't meant to use EXIT. What you are supposed to do, however, is specify the state that you wish to go to after your interjection. For example:

INTERJECT KELDOR 0 VICONIAKeldorn
== KELDOR IF  ~InParty("VICONIA")~ THEN ~What ho?! YOU are the ones who travel with this Drow!~
== VICONIJ IF ~InParty("VICONIA")~ THEN ~Fitting that you are in the sewers, knight! The vermin that reside here will not have to travel far to feast on your flesh!~
== KELDOR IF  ~InParty("VICONIA")~ THEN ~Prepare to have your evil cleansed!~ DO ~ChangeEnemyAlly(Myself,Enemy)~ 
END Somefile somestate

If you want to just end the dialogue there, then you can't use INTERJECT ;). What's the context of the dialogue? Is it a banter, or triggered at a certain point?

#13 Grim Squeaker

Grim Squeaker

    Fallen

  • Member
  • 1018 posts

Posted 14 November 2005 - 07:40 AM

Okay there does appear to be some confusion here. What you want is:

INTERJECT KELDOR 0 VICONIAKeldorn
== KELDOR IF  ~InParty("VICONIA")~ THEN ~What ho?! YOU are the ones who travel with this Drow!~
== VICONIJ IF ~InParty("VICONIA")~ THEN ~Fitting that you are in the sewers, knight! The vermin that reside here will not have to travel far to feast on your flesh!~
== KELDOR IF  ~InParty("VICONIA")~ THEN ~Prepare to have your evil cleansed!~ 
DO ~ChangeEnemyAlly(Myself,Enemy)~
EXIT

According to the WeiDU readme, INTERJECT takes the following form:

INTERJECT entryFilename entryLabel globalVariable chainText list chainEpilogue


One of the possible non-terminals chainEpilogue can be is EXIT, as required.

Edited by Grim Squeaker, 14 November 2005 - 09:48 AM.

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

#14 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 14 November 2005 - 09:22 AM

I tried Exit (sorry for butting in)! You do not want to know what it has done with my dialog.tlk yesterday. In the end, I had to write PC replies, even if they should not be there under any cicrumstances.

And I cannot even use I_C_T: it is a romance interjection after the second Slayer transformation (at rest). It should not allow two interjections in the row.

I am stuck with PC replies at the moment.

#15 Grim Squeaker

Grim Squeaker

    Fallen

  • Member
  • 1018 posts

Posted 14 November 2005 - 09:52 AM

I tried Exit (sorry for butting in)! You do not want to know what it has done with my dialog.tlk yesterday. In the end, I had to write PC replies, even if they should not be there under any cicrumstances.

And I cannot even use I_C_T: it is a romance interjection after the second Slayer transformation (at rest). It should not allow two interjections in the row.

I am stuck with PC replies at the moment.


You say you tried EXIT? What error did it throw? Because it should work according to the WeiDU syntax and I've never had a problem with using EXIT in that kind of situation. A way around it is to do the following:

...
DO ~ChangeEnemyAlly(Myself,Enemy)~
END
IF ~~ THEN EXIT

or even:

...
END
IF ~~ THEN DO ~ChangeEnemyAlly(Myself,Enemy)~ EXIT

Could you post your exact code including the EXIT you tried? I'm curious as to where its going wrong.

Edited by Grim Squeaker, 14 November 2005 - 09:54 AM.

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

#16 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 14 November 2005 - 10:26 AM

Thank you! Code
END
IF ~~ THEN EXIT compiled all right, and it shows in IE as if it works.

A rough example of my old code: (what it did was turning dialogue trees into some endless cycles):

INTERJECT Player1 7 NPCSlayerChange
== NPCJ IF ~InParty("NPC")~ THEN ~text1~
END
++ ~answer1~
DO ~SG("NPCSlayerChange",1)~ EXTERN NPCJ NPCSlayerChange1
++ ~answer2~
DO ~SG("NPCSlayerChange",1)~ EXTERN NPCJ NPCSlayerChange1
++ ~answer2~
DO ~SG("NPCSlayerChange",1)~ EXTERN NPCJ NPCSlayerChange1

CHAIN NPCJ NPCSlayerChange1
~text2~
DO ~ActionOverride(Player1,ReallyForceSpell(Myself,SLAYER_CHANGE))~
EXIT

INTERJECT Player1 10 NPCSlayerSurvived
== NPCJ IF ~InParty("NPC") G("NPCSlayerChange",1)~ THEN ~text3~
EXIT

The last line caused the nastiness, I assume.

#17 Grim Squeaker

Grim Squeaker

    Fallen

  • Member
  • 1018 posts

Posted 14 November 2005 - 10:33 AM

INTERJECT Player1 10 NPCSlayerSurvived
== NPCJ IF ~InParty("NPC") G("NPCSlayerChange",1)~ THEN ~text3~
EXIT

The last line caused the nastiness, I assume.


So did it not actually cause an error? I mean, did it compile alright?
"You alone can make my song take flight..."

#18 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 14 November 2005 - 10:49 AM

Yes, it compiled all right back then.

...but then I started to test and found out that all interjections were in the wrong places. Say, Simiaz' one suddenly appeared in Sola's dialogue, etc. When I opened IE to check out what the hell was going on, I found out that the dialogue tree went like this:

- normal state
- InParty(NPC) InMyArea(NPC) - my normal interjection
- IsValidForPartyDialogue(NPC) - an interjection with my NPC that I did not program at all.

More, in some places the dialogue tree simply went into an infinite loop. And all because of a single mistake... Brrr...

#19 Sticz

Sticz

    Monkey - In the time of Chimpanzees

  • Member
  • 385 posts

Posted 19 November 2005 - 06:54 PM

If I add an interjection, can I have the PC interject as well? How do I write that code? Is it the same as the dialogs?


Sticz
"For a crazy person, you don't drool much." Complement from Dilbert's Wally.

#20 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 20 November 2005 - 12:21 AM

Just use Player1.


EDIT: I've realised that you might have wanted PC's *replies*, not *interjections*.

So, the code for replies:

INTERJECT SOMENPCNAME 1 SOMENPCNAME_WITH_MY_NPC
== MYNPC IF ~InParty("MYNPC") See("MYNPC")~ THEN
~say something~
END
++ ~reply 1~ EXTERN MYNPC CHAINWITHMYNPC1
++ ~reply 2~ EXTERN MYNPC CHAINWITHMYNPC2
++ ~reply 3~ EXTERN MYNPC CHAINWITHMYNPC3

CHAIN MYNPC CHAINWITHMYNPC1
~say something else 1~
EXIT

CHAIN MYNPC CHAINWITHMYNPC2
~say something else 2~
EXIT

CHAIN MYNPC CHAINWITHMYNPC3
~say something else 3~
EXIT


Code for interjections:

I_C_T PLAYER1 16 IRENICUSISGONE
== PLAYER1 ~Is this a victory at all?~
END

Edited by Kulyok, 20 November 2005 - 12:30 AM.