Jump to content


Definitions, Tools and Resources

  • This topic is locked This topic is locked
No replies to this topic

#1 berelinde



  • Modder
  • 4916 posts

Posted 08 July 2007 - 07:18 AM

Definitions, Tools, and Resources


Action: actions performed either as the result of dialogue or script. Examples include ~SetGlobal("TalkedToBrage","GLOBAL",1)~, ~RestParty()~, ~JoinParty()~, ~LeaveParty()~, ~EscapeArea()~, ~ClearAllActions()~, ~StartCutSceneMode()~, ~StartDialogueNoSet("Aerie")~, ~Interact("Viconia")~, ~RealSetGlobalTimer("QuestTimer","GLOBAL",7200)~. They follow the word THEN. In script, they follow RESPONSE #100, and in dialogue, they come immediately before the transition.

Dialogue file: The file an NPC will use for dialogue. For non-joinable NPCs, they only have one file, as a rule. For party-joinable NPCs, they use a variety of files, and each will be covered separately. Dialogue file names can only be 8 characters long. This can be checked by looking at pdialog.2da with Near Infinity.

Banter file: Intraparty banter, whether between the NPC and the PC or between two NPCs uses the banter file, or B file. The banter engine accesses this file periodically to cue unscripted banters, but it is possible to script banter file interactions using the action Interact("Aerie"). BioWare NPCs use B followed by the first 6 letters of their names for SoA, and the letter B followed by the first 5 letters of their names and 25 for ToB. So Aerie would use BAERIE.dlg and BAERIE25.dlg. Anomen would use BANOMEN.dlg and BANOME25.dlg.

Joined party dialogue file: dialogue that plays once the NPC is in the party. It includes interjections, player-initiated dialogue, and scripted dialogue that begins with StartDialogueNoSet(). It uses the joined party dialogue file, or J file. For the BioWare NPCs, this is the first 6 letters of their names, followed by the letter J for SoA, or the first 5 letters of their names followed by 25J for ToB. For Aerie, that would be AERIEJ.dlg and AERIE25J.dlg. Anomen would use ANOMENJ.dlg and ANOME25J.dlg.

Post-dialogue: dialogue that occurs after the NPC leaves the party, whether as a result of the player using the "reform party" button, displacement with another NPC, or NPC scripting. BioWare NPCs use the first 6 letters of their names followed by the letter P for SoA and the first 5 letters of their names followed by 25P for ToB. For Aerie, that would be AERIEP.dlg and AERIE25P.dlg. For Anomen, it would be ANOMENP.dlg and ANOME25P.dlg. Please note that it is necessary to set the post-dialogue file for cases where the NPC voluntarily leaves the party. We'll cover that later.

Un-joined dialogue file: party-joinable NPCs use this prior to joining. This is the dialogue file assigned to the creature. For the BioWare NPCs, it is usually just the first 6 letters of their names for SoA, or the first 5 letters of their names followed by 25A for ToB. Aerie uses AERIE.dlg and AERIE25A.dlg, repsectively. Anomen would use ANOMEN.dlg and ANOME25A.dlg. You only have to worry about ToB un-joined dialogue for NPCs that can be summoned via the fate spirit.

Script file: can be thought of as a series of programs in the background to direct the game. There are a number of different types of scripts. Script runs whenever the game is unpaused, but there are a few things to consider. Area scripts run whenever the game is unpaused and the area is in use. Creature scripts only run when the creature is alive. NPC override scripts run whenever the game is unpaused and the NPC is available for action, i.e. not dead, sleeping, stunned, petrified, etc. AI scripts like DPLAYER2.bcs run only when AI is turned on. We'll cover scripts more thoroughly when we discuss scripting, but here is a very brief discussion of three types.

Area script: runs whenever actors are in the area. Creature spawns and scripted actions unique to the area can be placed in the area script.

Override script: tells the NPC what to do. This is where NPC actions, like starting dialogue under certain conditions or leaving the party if reputation is uancceptable go. This doesn't run if the creature running the script is incapacitated or dead, although it does run if the creature is under a non-disabling spell effect, like silence.

State: The smallest separate component of a dialogue. The state is what will show up in one dialogue window. It contains two parts, the state itself, where the NPC speaks, and one or more transitions. The following example is a basic, uncomplicated state.

IF ~~ THEN BEGIN StateLabel
SAY ~This is a state, with a state label and a transition, EXIT.~

State Label: Identifies a particular state. In the compiled dialogue, it is numeric, but in the mod d file prior to compilation, it is better to use a unique label that contains at least one letter to avoid duplication of existing states.

Transition: The part of the state that moves on to the next state or exits the conversation. Typical transitions are EXIT (leaving the conversation), EXTERN (changing to a different dialogue file), GOTO (moving to a different state within the same dialogue file).

Trigger: conditions for something to happen. Used in dialogue and in script. Examples include ~Race(Player1,DWARF)~, ~InParty("HaerDalis")~, ~Global("AnomenRomanceActive","GLOBAL",1)~, ~ReputationLT(Player1,16)~, ~!CheckStat(Player1,17,WIS)~. They follow the word IF.


I have found these tools to be useful in NPC mod making. You won't need all of them right away, but you will definitely need WeiDU.

WeiDU essential dialogue utility
Near Infinity Game browser and editor
Crimson Editor text editor software
ConTEXT text editor software
Crimson Editor WeiDU highlighters makes it easier to spot coding mistakes, if you use Crimson Editor
ConTEXT WeiDU highlighters makes it easier to spot coding mistakes, if you use ConTEXT
DLTCEP game, creature, area, item editor the first thread on the forum has the download link
Infinity Explorer game browser
Audacity audio software
Ogg Vorbis sound file converter
ShadowKeeper game editor, but can also do CHR => CRE conversions


IE Modding Communities
Spellhold Studios
Pocket Plane Group
The Gibberlings Three
Black Wyrm Lair
Team Baldur's Gate
The Chosen of Mystra
RPG Dungeon

Community Resources
IESDP essential resource for the Infinity Engine
Sim's Complete Scripting Guide, by Sim DingO
PPG Modlist and Links index of mods with links to communities and tools
Community Modder Prefix Reservation

Edited by berelinde, 08 July 2007 - 08:19 AM.

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum