Jump to content


Photo

Interjections


  • Please log in to reply
10 replies to this topic

#1 Sleeta

Sleeta
  • Member
  • 139 posts

Posted 31 October 2004 - 11:32 AM

Interjections by an NPC into a standard game conversation, that is -- I seem to have developed something of a block on these things.  I swear, I cannot figure out how to do these at all.  I tend to learn by example, so if someone could post how to do them with a few small examples, it would really help me.
"It's always somethin' . . . 'Phenalope, check for traps.' 'Phenalope, open this here lock and get us the treasures.' 'Phenalope, my destiny's too hard, gimmie an ale and sing me a jaunty tune . . . ' "
Phenalope - When you just need a hug or a hamstring cut. A Baldur's Gate 2 NPC Friendship Mod. Because not everyone wants to get into your heroic britches.

"I was like a poor sinner who'd just found out he'd got to heaven after all."
~ Preacher

#2 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 31 October 2004 - 11:50 AM

Interjections is really quite simple. Take this example from the weidu-readme:

INTERJECT_COPY_TRANS TOLGER 75 AquaTolger
  == AQUALUNJ   IF ~IsValidForPartyDialogue("Aqualung")~ THEN 
    ~Hey, that's a really crummy offer! Where did those little girls go? I
    could be sitting on a park bench, I don't need this aggravation! Who
    are you, anyway?~
  == TOLGER     IF ~IsValidForPartyDialogue("Aqualung")~ THEN 
    ~You poor old sod, you see it's only me. Now, did anyone else have a
    smart remark they wanted to make?~
END
Firstly, you should in almost all cases use INTERJECT_COPY_TRANS, except the rare occasions when you really need a plain INTERJECT.

TOLGER is the dialogue-file you wish to interject in.

75 is the state after which you want the following string to be shown. You can look up the states with Infinity Explorer, the program I find best to look up states with.

AquaTolger is the name of the interjection. It can be anything.

Then, we have the interjection itself. Don't forget the IF ~IsValidForPartyDialogue("[interjecter]")~!

After that, we have the response.

Lastly, we have an END which ends the interjection and the next state of the original dialogue is triggered.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#3 Sleeta

Sleeta
  • Member
  • 139 posts

Posted 31 October 2004 - 12:08 PM

*smacks forehead* Thanks! I think I understand now. I was worried about having to change or fiddle with other dialogues for this (what a genius am I.). This makes things a lot easier, obviously. I appreciate it! :)
"It's always somethin' . . . 'Phenalope, check for traps.' 'Phenalope, open this here lock and get us the treasures.' 'Phenalope, my destiny's too hard, gimmie an ale and sing me a jaunty tune . . . ' "
Phenalope - When you just need a hug or a hamstring cut. A Baldur's Gate 2 NPC Friendship Mod. Because not everyone wants to get into your heroic britches.

"I was like a poor sinner who'd just found out he'd got to heaven after all."
~ Preacher

#4 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 31 October 2004 - 01:01 PM

Sure thing. ;)

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#5 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 01 November 2004 - 08:38 AM

AquaTolger is the name of the interjection. It can be anything.


...with a caveat. State names in d coding are generally irrelevant as WeiDU converts thm all to numbers for compilation. However, I_C_T is another matter as it adds a global variable check to the transition and a global variable set to the transition action list. In SC's example, the transition is predicated on Global("AquaTolger","GLOBAL,0) and following the transition will SetGlobal("AquaTolger","GLOBAL,1) so you should follow the usual prefixing etiquette to avoid conflicts.

Then, we have the interjection itself. Don't forget the IF ~IsValidForPartyDialogue("[interjecter]")~!


It's a personal preference, but I would suggest avoiding IVFPD like the plague as it's broken. Try using an InParty, See, StateCheck combo.

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#6 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 01 November 2004 - 09:29 AM

Ah, well. I just used the example from the readme and explained it. Thanks for cleaning up the mess, Cam. ;)

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#7 -Ashara-

-Ashara-
  • Guest

Posted 01 November 2004 - 10:35 AM

I would also recommend using I_C_T2 when you interject *after* a remarque by an NPC which has an action row following it. I_C_T would transfer the actions to the last speaker (and if you interjected, you made the interjecting party your speaker). I_C_T2 will keep actions with the original speaker.

The best way I know (and the one I still do not like because it is destructive) for doing interjections after a PC responce is to use a combination of

A_T_T (ADD_TRANSACTION_TRIGGER) to the whole block of replies:

A_T_T ~!InParty("MyNewNPC")~

and then

do EXTEND_BOTTOM

command on that whole block adding a copy of PC's replies and EXTERN into NPC reaction on the one you'd like to have NPC comment upon.

Edited by domi, 01 November 2004 - 10:36 AM.


#8 Seifer

Seifer

    The best Anti-Paladin weapon is a tin opener...!

  • Member
  • 4505 posts

Posted 01 November 2004 - 10:36 AM

Isn't I_C_T2 still undocumented?

how come you always look so damn cool in every photo I see you in?!?


Speaking of modding, I listened to IER 3 yesterday, so you can have another quote for your signature: how come you sound so damn cool, as well as look it? It's unfair. Seriously.


Still a cyberjock, still hacking the matrix, still unsure of what that means.

TeamBG member - http://www.teambg.eu

#9 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 01 November 2004 - 10:51 AM

Yeah but it's essentially I_C_T without the DO actions transferred to the interjectee.

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#10 -Ashara-

-Ashara-
  • Guest

Posted 01 November 2004 - 11:50 AM

Well, the only alternative to it is to use I_C_T and add another line for the NPC who has to do the actions. Failing that with I_C_T you'd end up with action transfer.

#11 Seifer

Seifer

    The best Anti-Paladin weapon is a tin opener...!

  • Member
  • 4505 posts

Posted 07 November 2004 - 06:36 AM

Since interjections seem to give a lot of people problems, I'm going to pin this one as an example of how to actually do them.

Seif

how come you always look so damn cool in every photo I see you in?!?


Speaking of modding, I listened to IER 3 yesterday, so you can have another quote for your signature: how come you sound so damn cool, as well as look it? It's unfair. Seriously.


Still a cyberjock, still hacking the matrix, still unsure of what that means.

TeamBG member - http://www.teambg.eu