Jump to content

Three Modding-Related Questions


johnjihoonchang

Recommended Posts

Hi all,

 

I've been learning some of the mod tools for Infinity Engine/BG1, but I have a lot of questions still on how BG1 works. If you can answer any of these questions, it would be greatly appreciated:

 

1) How does the engine determine when to launch an NPC's AREA dialogues, insults/compliments and banter chat dialogues? Are there special scripts to determine who an NPC will insult or compliment? Are there special scripts that determine an NPC's "special" options? How are these things controlled?

 

2) Can anyone tell me how to translate the values regarding the percentage chance of rest interruption? Spying into the game with DLTCEP or Near Infinity, I can see different night and day values ranging from 2-30 and clearly the larger values mean more frequent interruptions. But the numbers definitely don't reflect percentage numbers or dice rolls--so what do they specifically represent?

 

3) If you are interrupted when resting by monsters, how does the engine determine which monsters to use and where to place them?

 

Thanks a lot!

 

jc

Link to comment
1) How does the engine determine when to launch an NPC's AREA dialogues, insults/compliments and banter chat dialogues? Are there special scripts to determine who an NPC will insult or compliment? Are there special scripts that determine an NPC's "special" options? How are these things controlled?

 

I'm only going to try to answer question number 1. I am simply not qualified to take a shot at 2 or 3.

 

NPC AREA dialogs happen because the NPC has a block of script in his BCS that goes like this:

 

IF
 CombatCounter(0)
 !See([ENEMY])
 See([PC])
 InParty(Myself)
 AreaCheck(ARxxxx)
 Global("NPCAreaComment","GLOBAL",0)
THEN
 RESPONSE #100
SetGlobal("NPCAreaComment","GLOBAL",1)
StartDialogNoSet(Player1)
END

 

Insults/compliments generally are BG1 things, and happen on calls from the interact.2da. Some NPCs have generic compliments or insults they hurl at each other. Ajantis is always calling Kivan and Khalid honorable men. Khalid is always asking Edwin and Montaron if they must be so evil. If you use NI to open the interact.2da, you will see whom each NPC will compliment/insult.

 

Banters happen on calls from the interdia.2da file, and it's more or less random.

 

Both of the latter two are on a game timer whose exact nature eludes me. I suspect it works on real time. Jcompton understands it, though, and has written a superb banter accellerator that makes banters happen more frequently.

 

Some banters are scripted to happen in specific places and under specific conditions. Those follow the same scripting rules as any other dialog, except that they can use Interact("NPCDV") instead of StartDialogNoSet(Player1).

 

Hope that helped.

Link to comment

IESDP covers scripting timers, not the banter-engine mechanism. That one is "hidden". Breaking into JC's Bantergoose from either Banter Pack of BG1NPC component that uses it as well will be more helpful.

 

I am just not sure why you need to understand it? It works independently, all you need to do to introduce your own banter is to APPEND them to B-file properly, and JC's accelerator is a fine already existing application.

 

Now, if you want timered banter, ie like a romance, then you use the scripting timers, plus StartDialogueNoSet() plus J-file (don't use Interact() and B for scripted, it might result in bugs if weighting is screwed up)

Link to comment
IESDP covers scripting timers, not the banter-engine mechanism. That one is "hidden". Breaking into JC's Bantergoose from either Banter Pack of BG1NPC component that uses it as well will be more helpful.

 

I am just not sure why you need to understand it? It works independently, all you need to do to introduce your own banter is to APPEND them to B-file properly, and JC's accelerator is a fine already existing application.

 

I'll look into the BG1NPC banter pack then. I'm mostly just really curious about how the invisible parts of the engine works and if I can get a sense of how the timer works, I might even be able to get a grasp of how much bantering one might expect to get over the course of X time. This information might be useful to developing the amount of banter to supply based on trial length runs of a mod.

 

I noticed that if you accelerate the banter without adding the rest of the banter pack, the game bursts through banter pretty fast and it gets stale (and your NPCs will kill each other a lot faster). So... some insight into a pseudomathematical determination of amount of banter per frequency of game timer might be useful to anyone who's modding.

 

My last playthrough of BG (no accelerator) let me notice that I only had two major banters even though I had many banterable characters and that ended with a very dead Monty and Xzar and Khalid calling Jaheira insufferable.

 

I'm also interested in figuring out how the insult/compliment timer works. It is more generic and I know it got done away with in latter IE, but hey. I just want to know, y'know?

 

jc

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...