Jump to content

A dialogue problem


Guest someone

Recommended Posts

Guest someone

I'm making my own NPC and I'm not sure how to make it interject in a dialogue of another NPC that I made. I don't think i'm suppoesed to use I_C_T, since it's a new dialogue file and not an original bioware one, but I have no idea how to do this.

 

basically it's a scene in which amnish soldiers attack the NPC Horak, if they see him.

here's the code (taken from the new file that I made - AMNLEAD.D - which is assigned to an amnish soldier):

 

 

IF ~NumTimesTalkedTo(0)

See("HorakTheVile")~

 

THEN BEGIN OpenThreat

SAY ~There he is, that murderous maniac! At him lads, I want this mad bastard dead or alive!~

(here I want Horak to interject and say something, before you can reply)

IF ~~ THEN REPLY ~This isn't going to end well...~ EXIT

END

 

 

 

I hope you guys can help me, and if you do - please explain it like you would to a complete newbie :)

 

I tried to read some dialogues tutorial but i'm just lost...

Link to comment

You want to use:

 

IF ~NumTimesTalkedTo(0) See("HorakTheVile")~ THEN BEGIN OpenThreat
 SAY ~There he is, that murderous maniac! At him lads, I want this mad bastard dead or alive!~ 
 IF ~~ EXTERN HORAKJ OpenThreat1
END

APPEND HORAKJ 

IF ~~ THEN BEGIN OpenThreat1
 SAY ~Line of dialogue~
 IF ~~ THEN REPLY ~This isn't going to end well...~ EXIT
END

END // end append

You'll have to replace HORAKJ with his J file, though. :)

Link to comment
Guest Guest

Thanks, the compilation runs fine now but Horak doesn't say his line for some reason.

 

his J file is HorakJ.d, and it's currently empty except for the BEGIN HORAKJ on top. should I put something else in it? I must be doing something wrong =/

Link to comment
Guest Guest

I assigned Horak.dlg to Horak via near infinity, do I need to assign the HorakJ file too somehow?

 

anyway, here's the TP2 file (I removed most of the useless stuff to save space):

 

 

BACKUP ~HorakMod/backup~ 
AUTHOR ~blah (blah@Blah.blah)~ 
BEGIN ~Horak for BG2:SoA~ 

//---------------------------------------------------------------------------------------

COPY ~HorakMod/creatures/Horak.cre~ ~override/Horak.cre~ 

SAY NAME1 ~Horak the Vile~ 
SAY NAME2 ~Horak the Vile~ 

COMPILE ~HorakMod/dialogues/Horak.d~ 
COMPILE ~HorakMod/dialogues/HorakJ.d~ 
COMPILE ~HorakMod/scripts/Horak.baf~

//---------------------------------------------------------------------------------------

EXTEND_TOP ~AR0702.bcs~ ~HorakMod/areas/AR0702.baf~
EXTEND_TOP ~AR0700.bcs~ ~HorakMod/areas/AR0700.baf~ 

//---------------------------------------------------------------------------------------

APPEND ~pdialog.2da~ 
~Horak HorakP HorakJ HorakD Horak25P Horak25J Horak25D Horak25S~ 
UNLESS ~Horak~ 


APPEND ~interdia.2da~ 
~Horak HorakB HorakB25~ 
UNLESS ~Horak~ 

//---------------------------------------------------------------------------------------

COPY ~HorakMod/creatures/AMNLEAD.CRE~ ~override~
SAY NAME1 ~Amnish Squad Leader~
SAY NAME2 ~Amnish Squad Leader~

COMPILE ~HorakMod/dialogues/Amnlead.d~ 

COPY ~HorakMod/creatures/AMNFOOT.CRE~ ~override~
SAY NAME1 ~Foot Soldier~
SAY NAME2 ~Foot Soldier~

COMPILE ~HorakMod/Scripts/Seehorak.baf~

 

thanks for the help!

Link to comment

Is he a joinable NPC?

 

If not, you'll have to assign his dialogue file a different way, and his DV and override script, if he has one.

 

This is what I'm using for Haldamir.

COPY ~haldamir/character/b!hal.cre~ ~override~
 SAY NAME1 ~Haldamir~
 SAY NAME2 ~Haldamir~
 WRITE_ASCII 0x248 ~B!HALS~ #8 // assign override script
 WRITE_ASCII 0x2cc ~B!HAL~ #8 // assign pre-joining dialogue file
 WRITE_ASCII 0x280 ~B!HALDAMIR~ #32 // assign DV
 WRITE_ASCII 0x34  ~b!haldas~ #8	 // assign small portrait

 

For a non-joinable NPC, the pre-joining dialogue file will be the only dialogue file.

Link to comment
Guest Guest

He is a joinable NPC, and his Pre-join dlg file (Horak.dlg) is working just fine. the problem is with the interjection and the HorakJ file, that I'm not sure how to use properly.

 

the dialogue file of the amnish soldier looks like this:

 

BEGIN AMNLEAD

IF ~NumTimesTalkedTo(0) See("HorakTheVile")~ THEN BEGIN OpenThreat
 SAY ~There he is, that murderous criminal! At him lads, I want this mad sorcerer dead or alive!~
 IF ~~ EXTERN HORAKJ OpenThreat1
END 

APPEND HORAKJ 

IF ~~ THEN BEGIN OpenThreat1
 SAY ~something~ //   this is the line that Horak is supposed to interject
 IF ~~ THEN REPLY ~This isn't going to end well...~ EXIT

END

END

 

the HorakJ dialogue file is currently empty (I have no other interjections yet), and looks like this:

BEGIN HORAKJ

 

is there anything else supposed to be in the HorakJ file for this specific interjection, or what's in the amnish soldier dlg file enough?

 

I tried to assign the dialogue in the tp2 file, but it has the same effect: the dialogue is working fine until Horak's interjection.

 

I'm sorry if i can't explain the problem clearly, but i'm still very new to modding..

Link to comment
Guest Guest

Can anyone help? I read several dialogue guides and I just can't find the problem :laugh:

 

when I replace HORAKJ with MINSCJ, for example, it works perfectly and minsc interjects. I think that for some reason the HORAKJ file isn't assigned to my NPC, but have no idea why.

 

bah.

Link to comment

Hmm. Check out your pdialogue.2da in the override folder to see if the files did get assigned.

 

Also try to EXTERN into his join dialogue and B file to see if the problem is in particular with his J.

 

Is his Death Variable/Script name Horak or HorakTheVile ? You use HorakTheVile in your See function, but you assign to Horak in pdialogue.2DA assignment. I think that this might be the source of your problem.

Link to comment
Guest Guest
Hmm. Check out your pdialogue.2da in the override folder to see if the files did get assigned.

 

Also try to EXTERN into his join dialogue and B file to see if the problem is in particular with his J.

 

Is his Death Variable/Script name Horak or HorakTheVile ? You use HorakTheVile in your See function, but you assign to Horak in pdialogue.2DA assignment. I think that this might be the source of your problem.

 

Thanks Domi, it's working now ;)

I changed the DV to Horak, like the cre file. I blame on the tutorial that used a DV different than the cre and dialogue files :laugh:

 

Now I can finally continue working on the bloody thing, it annoyed me so much that I couldn't focus on other parts of the mod.

Link to comment

Archived

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

×
×
  • Create New...