Jump to content

Having trouble adding dialogue to Semaj


Lauriel

Recommended Posts

One of the options in my mod will be to have the surviving cronies in the final battle with Sarevok (BGI portion of EET) flee when Sarevok falls.  I want them to say something and teleport out.  I'll be changing Tazok to run away in a panic, but for now, he teleports with the others.  Tazok works fine.  Angelo works fine.  However, Semaj totally loses his marbles when I attempt it.  He just stands there and casts the wizard teleport spell (from his class (or was it race?) script file) over and over and over and over and over.

EDIT: No, he just acted like there was no dialogue file attached.  He only lost his mind when I started pulling parts of his brains out.  Why would he ignore the attached dialogue file?  It's attached when I look at it in NI.

Here's what I have:

survivors_flee.tpa

Spoiler

// Modify existing Tazok dialogue file
COMPILE EVALUATE_BUFFER ~transitions/dialogues/tazok1.d~ USING ~transitions/languages/%s/dialogues.tra~

// New Angelo (GALDOR) dialogue file
COMPILE EVALUATE_BUFFER ~transitions/dialogues/angelo1.d~ USING ~transitions/languages/%s/dialogues.tra~

// New Semaj dialogue file
COMPILE EVALUATE_BUFFER ~transitions/dialogues/semaj1.d~ USING ~transitions/languages/%s/dialogues.tra~

// Attach new Angelo dialogue file to his CRE
COPY_EXISTING ~GALDOR.CRE~ ~override~
    WRITE_ASCII 0x2cc ~GALDOR~ #8   // dialogue

// Attach new Semaj dialogue file to his CRE
COPY_EXISTING ~SEMAJ.CRE~ ~override~
    WRITE_ASCII 0x2cc ~SEMAJ~ #8   // dialogue

// Area script to trigger dialogues
COPY_EXISTING ~BG0125.BCS~ ~override~
    DECOMPILE_AND_PATCH BEGIN
        APPEND_FILE TEXT ~transitions/scripts/New0125d.baf~
    END
BUT_ONLY_IF_IT_CHANGES

 

relevant portion of dialogues.tra:

Spoiler

@2010    = ~Noooo!  Retreat!  Retreat!~ [HOBGL05]    // I really want to hear him yell 'Noooo' like a hobgoblin.  Sorry, but I think it's hilarious.
@2011    = ~<CHARNAME> is too strong for us!  Run for your lives!~
@2012    = ~Sarevok has been defeated?!  This cannot be!  Flee while you can!~

 

tazok1.d

Spoiler

APPEND TAZOK2
    IF ~Global("#L_TazokHasFled","GLOBAL",0) !Dead("Tazok") Dead("Sarevok")~ THEN BEGIN Tazok_oh_no
        SAY @2010 // ~Noooo!  Retreat!  Retreat!~ [HOBGL05]
        IF ~~ DO ~SetGlobal("#L_TazokHasFled","GLOBAL",1) ActionOverride("Tazok",CreateVisualEffectObject("SPDIMNDR",Myself)) ActionOverride("Tazok",DestroySelf())~ EXIT
    END
END

 

angelo1.d

Spoiler

BEGIN GALDOR
IF ~Global("#L_AngeloHasFled","GLOBAL",0) !Dead("GALDOR") Dead("Sarevok")~ THEN BEGIN Angelo_flee
    SAY @2011 // ~<PRO_HESHE> is too strong for us!  Run for your lives!~
    IF ~~ DO ~SetGlobal("#L_AngeloHasFled","GLOBAL",1) ActionOverride("GALDOR",CreateVisualEffectObject("SPDIMNDR",Myself)) ActionOverride("GALDOR",DestroySelf())~ EXIT
END

 

semaj1.d

Spoiler

BEGIN SEMAJ
IF ~Global("#L_SemajHasFled","GLOBAL",0) !Dead("SEMAJ") Dead("Sarevok")~ THEN BEGIN Semaj_flee
    SAY @2012 // ~Sarevok has been defeated?!  This cannot be!  Flee while you can!~
    IF ~~ DO ~SetGlobal("#L_SemajHasFled","GLOBAL",1) ActionOverride("SEMAJ",CreateVisualEffectObject("SPDIMNDR",Myself)) ActionOverride("SEMAJ",DestroySelf())~ EXIT
END

 

What New0125d.baf should look like (I think):

Spoiler

IF
    Dead("Sarevok")
    Global("#L_SemajHasFled","GLOBAL",0)
THEN
    RESPONSE #100
        ActionOverride("SEMAJ",StartDialogueNoSet("SEMAJ"))
          Continue()
END

IF
    Dead("Sarevok")
    Global("#L_AngeloHasFled","GLOBAL",0)
THEN
    RESPONSE #100
        ActionOverride("GALDOR",StartDialogueNoSet("GALDOR"))
          Continue()
END

IF
    Dead("Sarevok")
    Global("#L_TazokHasFled","GLOBAL",0)
THEN
    RESPONSE #100
        ActionOverride("Tazok",StartDialogueNoSet("Tazok"))
          Continue()
END

 

I even tried the following for New0125d.baf

Spoiler

IF
    Dead("Sarevok")
    Global("#L_SemajHasFled","GLOBAL",0)
THEN
    RESPONSE #100
        SetGlobal("#L_SemajHasFled","GLOBAL",1)
        ActionOverride("SEMAJ",CreateVisualEffectObject("SPDIMNDR",Myself))
        ActionOverride("SEMAJ",DestroySelf())
          Continue()
END

IF
    Dead("Sarevok")
    Global("#L_AngeloHasFled","GLOBAL",0)
THEN
    RESPONSE #100
        ActionOverride("GALDOR",StartDialogueNoSet("GALDOR"))
          Continue()
END

IF
    Dead("Sarevok")
    Global("#L_TazokHasFled","GLOBAL",0)
THEN
    RESPONSE #100
        ActionOverride("Tazok",StartDialogueNoSet("Tazok"))
          Continue()
END

Hopefully I've done a simple newb mistake, but for the life of me, I can't get Semaj to work.

Side request - How do I get them to NOT say their normal introduction spiels   It drowns out the hobgoblin "noooo"  and also sort of is inconsistent with them running away like base cowards.

Edited by Lauriel
Fixing types AND other stuff...
Link to comment

The first question would be: did you test with a save where you didn't enter the Undercellar Temple already (maybe even test it with a new game and some cheats)? Because such changes to the cre file only show before the area with all its creatures is in the cache/safefile.

If you append to an existing dlg and want your added state to trigger in all cases, you ned to use WEIGHT so it gets pulled even though at the bottom of the dlg file:

Quote

APPEND TAZOK2
    IF WEIGHT #-1 //the "-1" will be transformed to the weight with the highest priority upon install

~Global("#L_TazokHasFled","GLOBAL",0) !Dead("Tazok") Dead("Sarevok")~ THEN BEGIN Tazok_oh_no
        SAY @2010 // ~Noooo!  Retreat!  Retreat!~ [HOBGL05]
        IF ~~ DO ~SetGlobal("#L_TazokHasFled","GLOBAL",1) ActionOverride("Tazok",CreateVisualEffectObject("SPDIMNDR",Myself)) ActionOverride("Tazok",DestroySelf())~ EXIT
    END
END

Other than that I don't see anything obvios.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...