Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: Kulyok
« on: September 06, 2013, 02:20:57 AM »

Posted by: Kulyok
« on: September 03, 2013, 10:29:43 AM »

So, my NPC is almost ready, and I think there's really, really a huge reason why I never coded Bodhi's abduction for myself before(only for jcompton and SisterVigilante's mods):

Branwen needs two scripts for SoA and two for ToB - a regular script and a dream script. Bodhi's abduction adds SIX MORE: AR0809, Cleanse, Bodhiamb, Vampamb, vampire cutscene, vampire script. Add to this a body(new item!), vampire Branwen(new creature!), Waukeen knows how much annoying bits of dialogue(EXTEND_BOTTOM's all around) and like three hours of testing(and it was three hours of testing for me, after I just copied working Nalia's code!)
Ha. I really hope Bioware guys cursed like dock workers upon realizing how much work that blasted abduction was.
Posted by: Kulyok
« on: August 29, 2013, 02:30:33 AM »

I remembered: I did code a full Bodhi abduction once, for Nalia romance(okay, twice, for Angelo, but Angelo's case was a rather big quest in itself), and, yes, it was a pain in the ass. Speaking of which, Nalia's romance is traified, but if you're reading this topic and you don't mind traified files, that's where you can steal it from. (Or I'm going to steal my code from Nalia to the test mod NPC, and you'll be able to steal that).
Posted by: Kulyok
« on: August 27, 2013, 12:23:36 PM »

One banter is easier than two, naturally. :) You should start the banter with whatever character you want, it doesn't matter. If you want Khalid to start it, then place KHALIDJ instead of JAHEIRAJ. However, if your banter is between PC and Khalid, then any other character(Jaheira or Imoen) should only talk if they are available for dialogue, which usually goes like this:

// and you need a script with it, naturally.
CHAIN IF ~Global("VariableIsPrefixed","GLOBAL",1)~ THEN KHALIDJ chainuniquename
~Hello. <CHARNAME> and I are talking here. Hey!~
DO ~SetGlobal("VariableIsPrefixed","GLOBAL",2)~
END
++ ~Hey.~ EXIT
+ ~InParty("Jaheira") Detect("Jaheira") !StateCheck("Jaheira",CD_STATE_NOTVALID)~ + ~You know, Jaheira is here and she'd like a word.~ EXTERN JAHEIRAJ chainseconduniquename
// Pay attention to actual file names. It's probably not JaheiraJ but JaheiJ or JaheirJ, and if it's Tutu, it starts with a _.

CHAIN JAHEIRAJ chainseconduniquename
~I can speak for myself! Off with you!~
EXIT

Without these conditions? Your game may crash.
Posted by: Cahir
« on: August 27, 2013, 11:51:11 AM »

Have you read any tutorials about how to use CHAIN?

I suggest you do that, heh.

As for your second question, if you don't want it to occur as part of the same dialog, you will need to script the dialogues to occur consecutively. I suggest you keep it simple and just have it in the one dialogue. The number one rule when writing dialog: keep it simple. If it involves doing something you don't understand, simplify it. :)

Ok, I did a bit of reading about CHAIN and I think I understand it now, more or less anyway.

Logic said to me that if I need to have two separate banters appear consecutively I need to code them separately, but after I read Your explanation it occurred to me that for IE engine it's no difference if I code them separately using a script that connects them or if I code them as one banter. Either way all dialogue lines will appear on screen one by one, but it's definitely easier for me to code them as one banter. Plain and simple, just needed an explanation that my brain will digest :)

So one more question about it and I think I'll be ready tackle the dialogue :) In Your example You started CHAIN by using EXTERN to JaheiraJ, but if I want Khalid to actually start a banter I should initialize it using EXTERN to KhalidJ, right? And code all lines in Khalid Banter? Am I thinking correctly? Or is it a specific reason why You started CHAIN with Jaheira that I don't understand?

Anyway, You Guys rock! Really.
Posted by: Kulyok
« on: August 27, 2013, 07:44:27 AM »

Okay, while I'm still working on the NPC: are there any basic NPC-related dialogue/script coding things you'd like to be shown? Some specific interjection or dialogue? Well, not _very_ complicated, or I won't be able to perform, but still. :) It's best that you formulate your request as simple and detailed as possible.
Posted by: Cahir
« on: August 26, 2013, 05:07:59 PM »

All right, all right, don't kick me when I'm down :) I did read tutorials about CHAIN but it's one of the things I can't grasp. But I'll read it again with fresh mind.

I will try to code this part of dialog tomorrow and put it here. Will be grateful if You can check it then.

Anyway Kaeloree, You're most helpful and I really start to understand a little.
Posted by: Kaeloree
« on: August 26, 2013, 05:00:37 PM »

Have you read any tutorials about how to use CHAIN?

I suggest you do that, heh.

As for your second question, if you don't want it to occur as part of the same dialog, you will need to script the dialogs to occur consecutively. I suggest you keep it simple and just have it in the one dialogue. The number one rule when writing dialog: keep it simple. If it involves doing something you don't understand, simplify it. :)
Posted by: Cahir
« on: August 26, 2013, 04:56:17 PM »

Sorry for double post but I....overestimated my initial comprehend capabilities.

1. Why CHAIN IF (first line) refers to JAHEIRAJ not for example KHALIDJ (it's Khalid who starts the banter)
2. Why there is EXTERN JAHEIRAJ after IMOEN interject? I had in mind that Khalid-Jaheira banter is kind a separate thing than PC-Imoen banter - the latter is not a result of the former. Yes, they trigger one after another but are kind of not connected. I hope You know what I mean :)

Posted by: Kaeloree
« on: August 26, 2013, 04:53:53 PM »

"chainname" is just the name you are giving to the state. It must be unique, like all state names. "interject1" and "interject2" are the unique identifiers for the subsequent two states.

As for CLASS_ALL, I'm not actually sure that's correct; I've had problems with it in the past where players have reported their dual and multiclasses weren't being recognised. Better to be safe. :)

If your chain has a condition to trigger, you use CHAIN IF ~/* condition */~ THEN DIALOGNAME STATENAME, otherwise if there is no trigger condition (as is the case most of the time), you can save time by writing CHAIN DIALOGNAME STATENAME.
Posted by: Cahir
« on: August 26, 2013, 04:33:01 PM »

Kaeloree big thanks!

Actually it makes a lot of sense to me which is surprising :P

Only thing I do not understand is chainname. How should I understand it? What does it refer to?

EDIT. Unless I misunderstood something CLASS_ALL does account for dual and multiclassing according to http://gemrb.org/iesdp/files/ids/bg2/class.htm

EDIT 2: Ok I do not understand one more thing, what is the difference between conditions after CHAIN IF (...) THEN JAHEIRAJ and the ones after my initial state?
Posted by: Kaeloree
« on: August 26, 2013, 04:23:33 PM »

CHAIN IF ~/* conditions */~ THEN JAHEIRAJ chainname
~Here is your initial state.~
+ ~/* conditions */~ + ~Here is your first response.~ EXTERN JAHEIRAJ interject1
+ ~/* conditions */~ + ~Here is your second response.~ EXTERN IMOENJ interject 2

CHAIN JAHEIRAJ interject1
~Here's Jaheira's response.~
== KHALIDJ ~Here's Khalid's response.~
EXIT

CHAIN IMOENJ interject2
~Here's Imoen's response.~
EXTERN JAHEIRAJ interject1

Hopefully that makes some sense. :) The only problem you might encounter CLASS_ALL does not account for dual or multiclass combinations, so you'll have to specify them individually.
Posted by: Cahir
« on: August 26, 2013, 04:15:05 PM »

During a break from BG2-mod-testing-run I thought I will try to code a dialogue....and gals and guys...I think I'm coding :P

Well, it's probably won't work, I suppose, but....there is IF, there is THEN and even END, soooo...it's a progress :)

But..how to add a short banter between Khalid and Jaheira and/or between PC-Jaheira as a reaction for one of dialogue replies, like say some sort of two person interjection.
I can't find such case in other mods .d files - there are only either regular banters or one dialog line interjections - but not for the lack of word banter interjections.

Let's say I have a dialog when first reply depends on CHARNAME class - this I can code ;D.
Then I need to
- trigger short Khalid-Jaheira banter as a result of mage/cleric reply
- trigger short PC-Imoen banter and immediately after the same Khalid-Jaheira banter as above, as a result of bard reply
- trigger the same Khalid-Jaheira banter as a result of other classes reply

Probably I will put some short interjections/banter as a result of consecutive replies, but if I understand how to do this I think I can repeat it.

I'll be very grateful to You modding aces for advice!
Posted by: kimmuryiel
« on: August 26, 2013, 12:56:43 PM »

and I am awaiting either expectantly :) but, in the meantime, taking a break while I wait for dialog to sexually harass my favorite Red Wizard :)
Posted by: Kulyok
« on: August 26, 2013, 12:27:28 PM »

It worked! Okay, it's not magic(though it must be, because I copy-pasted your command and it worked immediately), it's just I'm so used to traifying files with Weidu outside of the game that I've never even realized I had to do it in the game directory. My apologies for the confusion, and thank you for helping to figure it out!

(But I'm already kind of halfway/thirdway/quarterway to making that study mod NPC, so).