NPC Creation Questions
Isandir
Member Posts: 458
I've been attempting to create my first NPC as part of DSotSC, and have run into difficulties not because of a lack of information, but rather too much. Numerous tutorials are available, many with conflicting information or varying focuses. (It seems too many of those I find were written between 2003-2009, prior to BG:EE.) I also attempted to follow the excellent guide that @Alkalurops created, while adapting the wording to the more often used +/++, but still have several questions that I'm hoping some of you can address:
1: Does all dialogue--joining/leaving/banter/interjections--go into the same .d file? If so, how is it separated in respect to blocks? (I.e., does it require a new BEGIN each time, etc.?)
2: Does BG:EE use the same item/location/alignment/etc. references as the original BG or as BGII?
3: How would a sample variable look if you wanted to have a conversation point appear based on alignment?
4: In response to Alkalurops' guide, @LiamEsler stated that only one DO command is needed in the dialogue file. Does that mean you simply create a separate section in the file that lists all possible actions based on variables, while referencing the relevant dialogue triggers? Can someone provide an example of what that would look like?
5: Is there a resource available that simply lists each of the commands that can be inserted into dialogue to cause an action? (I.e., leaving the party, turning hostile, etc.) Which of these go into the script file rather than the dialogue file?
6: Is anyone aware of a guide that combines all the different elements of dialogue--joining/leaving/banter/interjections--rather than focusing only on one?
7: As a separate subject, is there a simple guide to item creation similar to the ones I've found for NPC creation?
Thank you all!
1: Does all dialogue--joining/leaving/banter/interjections--go into the same .d file? If so, how is it separated in respect to blocks? (I.e., does it require a new BEGIN each time, etc.?)
2: Does BG:EE use the same item/location/alignment/etc. references as the original BG or as BGII?
3: How would a sample variable look if you wanted to have a conversation point appear based on alignment?
4: In response to Alkalurops' guide, @LiamEsler stated that only one DO command is needed in the dialogue file. Does that mean you simply create a separate section in the file that lists all possible actions based on variables, while referencing the relevant dialogue triggers? Can someone provide an example of what that would look like?
5: Is there a resource available that simply lists each of the commands that can be inserted into dialogue to cause an action? (I.e., leaving the party, turning hostile, etc.) Which of these go into the script file rather than the dialogue file?
6: Is anyone aware of a guide that combines all the different elements of dialogue--joining/leaving/banter/interjections--rather than focusing only on one?
7: As a separate subject, is there a simple guide to item creation similar to the ones I've found for NPC creation?
Thank you all!
0
Comments
A .DLG file is a "binary code" file and can be read by Baldur's Gate. Roughly speaking, each NPC has at least 1 .DLG file containing the dialog spoken by that creature.
Because writing binary files is pretty hard for us simple humans, Weimer created a .D file format, which contains "source code" that cannot be understood by Baldur's Gate, but can be compiled into binary .DLG files.
Each time you start a
BEGIN MyDialog
you tell WeiDU to start a new MyDialog.DLG file. If your .D file contains 3 of such blocks, you're basically creating 3 new .DLG files in the override folder.However, WeiDU is only capable of compiling ONE .D file at a time. Thus, when a conversation transitions from 1 dialog to another (for example: Minsc talks to Jaheira, thus MINSC.DLG => JAHEIRA.DLG), WeiDU needs to know about the existance of *both* dialogs in order to make the connection. Since WeiDU only compiles 1 .D file at a time, this file must contain all interconnected dialogs. Most references are identical to the original BG1. There may be some small adjustments because BG:EE uses the enhanced edition of the TOB engine, but I think the references themselves are the same. Not entirely sure what you're asking, but: Sigh... I really should rewrite my tutorial... I wrote it half a year ago when I was in a similar situation like you (new to BG modding, bits and pieces spread over multiple tutorials). LiamEsler is right though, so follow his advice. Basically: one DO statement with one string. It doesn't have to be multiline, for example:
~Enemy() Panic()~
is valid as well. Yes, I think my tutorial lists a few in Appendix I. Anyway:Conditions: http://gemrb.org/iesdp/scripting/triggers/bg2triggers.htm
Actions: http://gemrb.org/iesdp/scripting/actions/bg2actions.htm
Identifiers: http://gemrb.org/iesdp/files/ids/bg2/index.htm
Identifiers are used in both triggers and actions. For example, the Alignment trigger takes a value from align.ids
If you're doing some item/spell modding: http://gemrb.org/iesdp/opcodes/bg2tob.htm
You can use those in your dialogs and scripts. Not that I know. I intended to do so in my tutorial, but time... is not on my side.
But I intend to rewrite this one day... So take it with a grain of salt.