Jump to content


Photo

Interjections


  • Please log in to reply
21 replies to this topic

#1 Sticz

Sticz

    Monkey - In the time of Chimpanzees

  • Member
  • 385 posts

Posted 22 October 2005 - 10:42 AM

Got the dialog thing down, how I want my cheezy ranger to join, but how do I add interjections. Interjections are about the only things I want her to say, banters are something Ill work on later. Any links?


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

#2 Seifer

Seifer

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

  • Member
  • 4505 posts

Posted 22 October 2005 - 10:53 AM

The best place to begin would be the official documentation that comes with Weidu; -

http://www.weidu.org...iDU.html#htoc11

Beyond that, use the search function in this forum to look for other examples of what people have come up against.

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

#3 Sticz

Sticz

    Monkey - In the time of Chimpanzees

  • Member
  • 385 posts

Posted 22 October 2005 - 01:11 PM

Ok, I read through that and have scoured through the NPCs that I have: Valen, Alassa, Fade and Alora. None of them have anything in common as to how they are written. I have how to write the interjections down, I think, but... getting the game to pull from my CHARJ.d file is where Im confused. For example, in Valen, there is reference to VALENJ in the .2da file but there is no corresponding file to go with it. I found the file that governs her interjections, but I dont see any command lines that direct the game to go to those files. Fade confused me to no end, Alassa has interjections, I believe, but I cant find them in her files. Alora had what appeared to be only one interjection, and it was different than anyone else's so that was no good by comparison.

I know the PDIALOG.2da needs to be ammended with the dialog files that are contained in their respective folders, which seems to be in either "English" or "Dialog" but I see no clear paths that link the 2da and that folder. I have read through this link:

http://www.weidu.org...iDU.html#htoc11 and feel confident in writing the interjection, its just getting it to be applied to the Party member that im having headaches with.


Any one have a link to a really easily done NPC that I can use as a template?

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

#4 Rabain

Rabain

    God

  • Member
  • 653 posts

Posted 23 October 2005 - 02:08 AM

When the dialog is Compiled by Weidu at installation the interjections in your J file will be added to dialog.tlk and the appropriate destination states will be added dialog file of the npc you are interjecting into. So long as your Pdialog.2da is patched correctly the game engine will handle the interjections (i.e when <CHARNAME> talks to someone who your NPC will interject into the game engine will find the appropriate interjection in your J file and display it).


This is a one line Interjection from an NPC I was doing:

I_C_T UDPHAE01 61 bwtouchphae
== BWTOUCHJ IF ~IsValidForPartyDialog("bwtouchx")~ THEN ~(These drow always the same, kill this, kill that. No wonder they such big hit at parties!)~
END

At installation Weidu will up date UDPHAE01 at dialogue state 61 with a link to BWTOUCHJ if my npc bwtouchx is valid in the party for dialog. Weidu will also create a dialog state in BWTOUCHJ with the same state label (bwtouchphae) so that the two files connect. The game engine handles the rest during the dialog.

Note: Be aware that IsValidForPartyDialog() does not work in some circumstances so you might want to try out various checks, InParty(), See() etc but others can give you better info on this that I.

Jason Compton's Ghareth npc is good for examples though coding has probably changed a little (as above) since then but it all seems to work in game so...have fun!
A knight without armour in a savage land...

#5 Sticz

Sticz

    Monkey - In the time of Chimpanzees

  • Member
  • 385 posts

Posted 23 October 2005 - 12:13 PM

Gareth should work, looking it over I will probably just bootleg his arse and do a little bit of changing of variables and such. He's actually got about everything I need, I think, thanks for the info on him!

Any other advise that may lead me to more options is always appreciated.

Thanks,


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

#6 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 28 October 2005 - 05:01 AM

I suppose it is relevant to the topic, so:

I was going to use "!Dead()" and "InMyArea()" for I_C_T, (I do not think InParty() is relevant, as long as it does not crash the game; more dialogue is good), but now I have doubts: does InMyArea() work on SOA-only install? Or does it, like MakeGlobal(), require TOB?

Edited by Kulyok, 28 October 2005 - 05:03 AM.


#7 Ghreyfain

Ghreyfain
  • Member
  • 137 posts

Posted 28 October 2005 - 10:42 AM

I sort of thought InMyArea() was for traps, i.e. you're standing within the bounding box. That could be another trigger I'm thinking of, though. IsOverMe(), maybe.

#8 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 28 October 2005 - 11:14 AM

Yeah, exactly. IESDP says:

IsOverMe(O:Object*) - Only for trigger regions. Returns true only if the specified object is over the trigger running the script.

InMyArea(O:Object*) - Returns true only if the specified object is in the same area as the active CRE.


But well, I got home, where I have BG2 installed, ran IE and checked for InMyArea() code. Turned out it is present in SOA, so I guess it'll work. Wish me luck. :)

#9 Sticz

Sticz

    Monkey - In the time of Chimpanzees

  • Member
  • 385 posts

Posted 28 October 2005 - 12:44 PM

Using the Gareth NPC mod as a template, I have made most of my character. However, I want her to have interjections with the Dryads in the begining of game. Here's what I have, I just kinda copied what was there and changed some of the text and .DLG file:

I_C_T IDRYAD1 1 NIKKIdryad
== NIKKIJ IF ~IsValidForPartyDialog("NIKKI")~ THEN ~Dryads, tree people to put it plainly. Good natured for the most part <CHARNAME>.~
END


However, this doesnt work. My intention is to have the text right after the first bimbo says "Protect me". Is there something Im missing? Most of the other interjections are written like this unless they converse.

Any help would be...well, helpful


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

#10 Rabain

Rabain

    God

  • Member
  • 653 posts

Posted 28 October 2005 - 02:16 PM

Is NIKKI the death variable in the creature file?

@Kulyok: I would use anything like InMyArea() in combination with See() because if you don't you could find yourself in situations where someone is having a conversation with your NPC even though your NPC is halfway across the map and it was another party member who got to them first.
A knight without armour in a savage land...

#11 Sticz

Sticz

    Monkey - In the time of Chimpanzees

  • Member
  • 385 posts

Posted 28 October 2005 - 03:32 PM

No, NIKKI is the NPCs name.
"For a crazy person, you don't drool much." Complement from Dilbert's Wally.

#12 jcompton

jcompton
  • Modder
  • 492 posts

Posted 28 October 2005 - 05:54 PM

That may explain it, then. Virtually all scripting triggers require the use of the CRE's death variable/script name, not the displayed name.

#13 Sticz

Sticz

    Monkey - In the time of Chimpanzees

  • Member
  • 385 posts

Posted 28 October 2005 - 06:10 PM

Well, that is the only one I wrote, but it works on the others that I just changed names on. The CRE name is what I use on everything else: NIKKI works on the other interjections. I also didnt see any files listing the death variable for Gareth. I dont think Im missing anything though.

For example, my character, Nikki, does an interjection when the PC has talked to Lenthan, it works fine with NIKKI. It still does not work for the dryads, is this because they have kind of a banter going on between themselves?

If I do need a death variable, what does it consist of? Gareth doesnt have one that I have seen, it just re-states the dialog name, and I didnt see any links when I was changing all the files.

This is pretty much the last piece I need to figure out on this mod Im making... So thanks for any help =D


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

#14 jcompton

jcompton
  • Modder
  • 492 posts

Posted 28 October 2005 - 07:01 PM

One of the major killers of IsValid is if the conversation is happening WITH the NPC that is meant to be interjecting. So if the dryads are instigating the conversation with her, it won't ever work.

#15 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 28 October 2005 - 11:43 PM

@Rabain: I know, but I'd rather risk it, since too often some of my party members lag behind\stand behind a wall\etc, and I want to hear what they have to say. Especially considering that a NPC I want to interact would probably walk with a Staff of the Magi all the time. I am willing to forsake realism (a little), and I hope the payoff is good enough.

#16 Rabain

Rabain

    God

  • Member
  • 653 posts

Posted 29 October 2005 - 03:55 AM

@Kulyok: no worries just thought I'd mention it.

@Sticz: most modders name their main dialog file with the same name as the death variable. The Death Variable can be found by looking at the cre file in NI and finding the Scriptname field (it is a few lines below Alignment) or by using DLTCEP and looking in Edit Cre under the Icons & Scripts Tab at the very bottom right.

Just to clarify on what Jason said, if you are using IsValidForPartyDialog("NIKKI") then one of your party has to be initiating the conversation otherwise the Dryads are going to be looking for Nikki as part of their party and that's never going to happen! Change it to something like Kulyok is using: InMyArea("NIKKI"), See("NIKKI") or whatever.
A knight without armour in a savage land...

#17 Sticz

Sticz

    Monkey - In the time of Chimpanzees

  • Member
  • 385 posts

Posted 29 October 2005 - 03:56 AM

No, they are not in direct conversation with the NPC, they are addressing the PC. It may be that there are just too many actors in that particular part of the text, Ill try it with a later part in the dialog and see if that does anything...


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

#18 Rabain

Rabain

    God

  • Member
  • 653 posts

Posted 29 October 2005 - 04:16 AM

This is about who starts the converstion not about who in the party is being spoken to.

If the Dryad initiated the conversation then the IsValidxxx might not work because it is the Dryad who is looking for Nikki in her party. If it was the PC who started the conversation then the PC would be looking for Nikki and she is in the party.
A knight without armour in a savage land...

#19 --jastey--

--jastey--
  • Guest

Posted 29 October 2005 - 06:05 AM

I don't understand what you are saying about the "IsValidForPartyDialogue", Rabain. What do you mean by PC-initiated dialogues, there is always the game character making the first line. ?

#20 Rabain

Rabain

    God

  • Member
  • 653 posts

Posted 29 October 2005 - 09:43 AM

Okay I have reread JC's comment above and from what I gather if the NPC (Nikki) is the party member conversing with the Dryad then the interjection won't find her valid for dialog as she is already in a dialog (?) ...if that makes sense. (She can't find herself valid for party dialog)

Sticz states that not the case and that they are conversing with the PC and not Nikki and it still does not work.

My idea was that IsValidFor might be treated differently depending on who initiated the dialogue. Now I can't guarantee this is the case as I don't know how the engine handles this...anyone? Kind of like CutSceneID for dialog, if a party member owns the dialog then the engine will find the party member. However if a non-party npc owns the dialog they may not find such party specific dialogs. Did I just make all that up...probably but IsValidFor has been discussed numerous times and it seems to work and not work for no reason...maybe this is the reason?

Anyone in the end it comes down to using whatever works for you! :)
A knight without armour in a savage land...