Jump to content

Mod NPC Villain questions


ericp07

Recommended Posts

You'd want to come up with your own variable names, of course. ;-) Something like TheBadGuyDlg.D

BEGIN ~lala~
IF ~Global("Talk","GLOBAL",0)~ THEN BEGIN First
SAY ~Hi! Let's fight!~
IF ~~ THEN DO ~SetGlobal("Talk","GLOBAL",1)~ EXIT
END

IF ~Global("Talk","GLOBAL",1)~ THEN BEGIN Last
SAY ~I'm gonna tell my mommy!~
IF ~~ THEN DO ~SetGlobal("Talk","GLOBAL",2)~ EXIT
END

Make sure that WEREWOLF is right for BG2 (it could be leftover from TotSC). Keep in mind that werewolf chunk usually spawns in an entirely new creature (you lose all your script and dialogue).

Link to comment
You'd want to come up with your own variable names, of course. ;-) Something like TheBadGuyDlg.D
BEGIN ~lala~
IF ~Global("Talk","GLOBAL",0)~ THEN BEGIN First
SAY ~Hi! Let's fight!~
IF ~~ THEN DO ~SetGlobal("Talk","GLOBAL",1)~ EXIT
END

IF ~Global("Talk","GLOBAL",1)~ THEN BEGIN Last
SAY ~I'm gonna tell my mommy!~
IF ~~ THEN DO ~SetGlobal("Talk","GLOBAL",2)~ EXIT
END

Make sure that WEREWOLF is right for BG2 (it could be leftover from TotSC). Keep in mind that werewolf chunk usually spawns in an entirely new creature (you lose all your script and dialogue).

 

I see that the structure is the same as for the code I've inserted in my NPC's J.d file. OK, that takes care of EP#Taegh.d. As for WEREWOLF, I'll see how/if it works in-game. If it doesn't, I'll copy the code I use to make the Beast of Malar shapeshift from one form to the other. I wouldn't expect the werewolf form to do anything other than attack and fight to the death, which is fine for the second and final encounter. If I have to set up some added conditions or anything...I'll burn cross that bridge when I come to it ???

 

Thanks!

Eric

Link to comment

The villains, cleric and ranger both, still need their .baf files, I think, but I'm not sure what needs to go in them, as it looks like I've already taken care of the details for these two enemy NPCs with the other files (each has a .d file, each uses SHOUTDLG for override script, cleric uses PRIES18B for default script; ranger uses WTARSGT for class script and WEREWOLF for race script). Can the characters function without .baf files? If not, what do they need?

 

Thanks,

Eric

Link to comment

BAF files are compiled into BCS files, like the ones you are already using.

But if you want your ranger to DRYAD_TELEPORT when the first battle's over and destroy his minhp item before the second battle starts, you'll need to create a specific script for that. You could e.g. replace SHOUTDLG with this:

IF
 NumTimesTalkedTo(0)
 See([PC])
THEN
 RESPONSE #100
StartDialogueNoSet([PC])
END

IF
 HPLT(Myself,30)
 //some trigger to keep this from happening during the second fight
THEN RESPONSE #100
 DisplayStringHead(Myself,~I'll be back!~) //Something to explain what's happening to the player
 ForceSpell(Myself,DRYAD_TELEPORT)
END

IF
 //some trigger to determine this is the second fight
 HasItem("minhp1",Myself)
THEN RESPONSE #100
 DestroyItem("minhp1")
END

Link to comment
BAF files are compiled into BCS files, like the ones you are already using.

But if you want your ranger to DRYAD_TELEPORT when the first battle's over and destroy his minhp item before the second battle starts, you'll need to create a specific script for that. You could e.g. replace SHOUTDLG with this:

IF
 NumTimesTalkedTo(0)
 See([PC])
THEN
 RESPONSE #100
StartDialogueNoSet([PC])
END

IF
 HPLT(Myself,30)
 //some trigger to keep this from happening during the second fight
THEN RESPONSE #100
 DisplayStringHead(Myself,~I'll be back!~) //Something to explain what's happening to the player
 ForceSpell(Myself,DRYAD_TELEPORT)
END

IF
 //some trigger to determine this is the second fight
 HasItem("minhp1",Myself)
THEN RESPONSE #100
 DestroyItem("minhp1")
END

 

OK, for the trigger, I'll use a variable (that also appears in EP#MelJ.d) called EP#FirstCopyOfTaeghenHasTalked, which gets set to 1 for the first encounter, and to 2 for the second and final encounter, if that's sufficient. I added some meaningful text for the DisplayStringHead, too :)

 

Thanks!

Eric

Link to comment

Archived

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

×
×
  • Create New...