Jump to content

Banter Question


MacMonkey

Recommended Posts

Good evening,

 

Sorry to keep bothering, but I have another question...

 

Is there a way to have a a character's joining dialog start with narration (from a narrator) or from the player, rather than from the NPC?

 

Example:

Narrator (or Player 1 thought/perspective): As you enter the inn you notice a strange woman watching you. After a short moment she comes over to you.

 

Lynn: Don't I know you from somewhere?

 

Dialogue continues normally...

 

Is this a situation where I would need to create another character (narrator), or does this character already exist, or something else? Also, if I need to create a narrator, do I need to put the B (and the append) in front of the name for its banter.

 

Help please.

 

Thank you,

 

MM

Link to comment

There's a dialogue file (player1.dlg) that's kinda used as a narrator in a few places. It's how you get the dizzy dialogues in the Spellhold maze, the slayer changes, and a lot of the hell dialogues. The easiest example is probably the bit when Lonk dies at Spellhold (from ar1515.bcs):

 

 

IF
    Dead("ppworker")
    Global("playerTalk","AR1515",0)
    Global("speakWhenLonkDead","GLOBAL",0)
THEN
    RESPONSE #100
        SetGlobal("playerTalk","AR1515",1)
        SetGlobal("speakWhenLonkDead","GLOBAL",1)
        ActionOverride(Player1,StartDialog("player1",Player1))
END

 

This trips the "Lonk is dead, and there are whispers and ravings as the inmates realize they are free. You hope you have done the right thing..." line before you convince the inmates to fight. player1.dlg isn't actually assigned to Player1, which is why you have to do the ActionOverride/StartDialog dance.

Link to comment

Ok...Now I am not quite sure how to code the actual dialogue.

 

IF

See(Player1)
Range(Player1,20)
NumTimesTalkedTo(0)
Global("M2LynnMet","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("M2LynnMet","GLOBAL",1)
MoveToObject(Player1)
StartDialogueNoSet(Player1)
ActionOverride(Player1,StartDialog("player1",Player1))
END
Then my dialogue file...
This is what I want "player1" to say ->~ As you enter the inn you notice a strange woman watching you. After a short moment she comes over to you.~
Then I would like to continue the dialogue...
CHAIN IF ~Global("M2LynnMet","GLOBAL",1) ~ THEN M2Karma b1

~Don't I know you from somewhere?~

DO ~SetGlobal("M2LynnMet","GLOBAL",2)~
END
I have attempted 12 different ways to try to get this to work, and I am having no luck.
Again, I am sure there is something very small I am missing...
Please help,
MM
Link to comment

 

Ok...Now I am not quite sure how to code the actual dialogue.

ALTERNATIVE 1

IF

See(Player1)
Range(Player1,20)
NumTimesTalkedTo(0)
Global("M2LynnMet","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("M2LynnMet","GLOBAL",1)
StartDialogueNoSet(Player1)
END
IF~Global("M2LynnMet","GLOBAL",1)~THEN BEGIN M2Karma b1
SAY~ *As you enter the inn you notice a strange woman watching you. After a short moment she comes over to you.*~
IF~~THEN DO~
ClearAllActions()
StartCutSceneMode()
SetGlobal("M2LynnMet","GLOBAL",2)

MoveToObject(Player1)
EndCutsceneMode()
StartDialogueNoSet(Player1)~EXIT
END
CHAIN IF ~Global("M2LynnMet","GLOBAL",2) ~ THEN M2Karma b2

~Don't I know you from somewhere?~

DO ~SetGlobal("M2LynnMet","GLOBAL",3)~
END
_________________________________________________________________________________
ALTERNATIVE 2

IF

See(Player1)
Range(Player1,20)
NumTimesTalkedTo(0)
Global("M2LynnMet","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("M2LynnMet","GLOBAL",1)
ClearAllActions()
StartCutSceneMode()
DisplayStringWait(Myself,@009) //or whatever number is appropriate in yout tra-file
Wait(6)
MoveToObject(Player1)
EndCutSceneMode()
StartDialogueNoSet(Player1)
END
In your tra file put
@009 =~As you enter the inn you notice a strange woman watching you. After a short moment she comes over to you~
In you joined d file
CHAIN IF ~Global("M2LynnMet","GLOBAL",1) ~ THEN M2Karma b1

~Don't I know you from somewhere?~

DO ~SetGlobal("M2LynnMet","GLOBAL",2)~
END
____________________________________________________________________________________
I have attempted 12 different ways to try to get this to work, and I am having no luck.
Again, I am sure there is something very small I am missing...
Please help,
MM

 

Here are two alternatives to try out -

One thing important

please stay away from player1.d or baldur.bcs, always try to do things within your own files, otherwise you may cause damage to your own game and to others (if you wish to someday publish your mod). Only tamper with those files if you expertly know exactly what you are doing - and even then use them only if all else fails.

 

PS If you still think a narrator is the best solution then do a bit of homework, i.e.create an (invisible) creature including a script and an own dialogue, a script to spawn it and one to remove it etc....)

 

 

ALTERNATIVE 3

IF

See(Player1)
Range(Player1,20)
NumTimesTalkedTo(0)
Global("M2LynnMet","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("M2LynnMet","GLOBAL",1)
ActionOverride(Player1,StartDialog("player1",Player1))
END

APPEND Player1

IF~Global("M2LynnMet","GLOBAL",1)~THEN BEGIN M2Karma b1

SAY~ *As you enter the inn you notice a strange woman watching you. After a short moment she comes over to you.*~
IF~~THEN DO~
ClearAllActions()
StartCutSceneMode()
SetGlobal("M2LynnMet","GLOBAL",2)

ActionOverride("M2Karma","MoveToObject(Player1))
EndCutsceneMode()
ActionOverride("M2Karma","StartDialogueNoSet(Player1))~EXIT
END

END

CHAIN IF ~Global("M2LynnMet","GLOBAL",2) ~ THEN M2Karma b2

~Don't I know you from somewhere?~

DO ~SetGlobal("M2LynnMet","GLOBAL",3)~
END
Link to comment

 

 

Ok...Now I am not quite sure how to code the actual dialogue.

ALTERNATIVE 1

IF

See(Player1)
Range(Player1,20)
NumTimesTalkedTo(0)
Global("M2LynnMet","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("M2LynnMet","GLOBAL",1)
StartDialogueNoSet(Player1)
END
IF~Global("M2LynnMet","GLOBAL",1)~THEN BEGIN M2Karma b1
SAY~ *As you enter the inn you notice a strange woman watching you. After a short moment she comes over to you.*~
IF~~THEN DO~
ClearAllActions()
StartCutSceneMode()
SetGlobal("M2LynnMet","GLOBAL",2)

MoveToObject(Player1)
EndCutsceneMode()
StartDialogueNoSet(Player1)~EXIT
END
CHAIN IF ~Global("M2LynnMet","GLOBAL",2) ~ THEN M2Karma b2

~Don't I know you from somewhere?~

DO ~SetGlobal("M2LynnMet","GLOBAL",3)~
END
_________________________________________________________________________________
ALTERNATIVE 2

IF

See(Player1)
Range(Player1,20)
NumTimesTalkedTo(0)
Global("M2LynnMet","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("M2LynnMet","GLOBAL",1)
ClearAllActions()
StartCutSceneMode()
DisplayStringWait(Myself,@009) //or whatever number is appropriate in yout tra-file
Wait(6)
MoveToObject(Player1)
EndCutSceneMode()
StartDialogueNoSet(Player1)
END
In your tra file put
@009 =~As you enter the inn you notice a strange woman watching you. After a short moment she comes over to you~
In you joined d file
CHAIN IF ~Global("M2LynnMet","GLOBAL",1) ~ THEN M2Karma b1

~Don't I know you from somewhere?~

DO ~SetGlobal("M2LynnMet","GLOBAL",2)~
END
____________________________________________________________________________________
I have attempted 12 different ways to try to get this to work, and I am having no luck.
Again, I am sure there is something very small I am missing...
Please help,
MM

 

Here are two alternatives to try out -

One thing important

please stay away from player1.d or baldur.bcs, always try to do things within your own files, otherwise you may cause damage to your own game and to others (if you wish to someday publish your mod). Only tamper with those files if you expertly know exactly what you are doing - and even then use them only if all else fails.

 

PS If you still think a narrator is the best solution then do a bit of homework, i.e.create an (invisible) creature including a script and an own dialogue, a script to spawn it and one to remove it etc....)

 

 

ALTERNATIVE 3

IF

See(Player1)
Range(Player1,20)
NumTimesTalkedTo(0)
Global("M2LynnMet","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("M2LynnMet","GLOBAL",1)
ActionOverride(Player1,StartDialog("player1",Player1))
END

APPEND Player1

IF~Global("M2LynnMet","GLOBAL",1)~THEN BEGIN M2Karma b1

SAY~ *As you enter the inn you notice a strange woman watching you. After a short moment she comes over to you.*~
IF~~THEN DO~
ClearAllActions()
StartCutSceneMode()
SetGlobal("M2LynnMet","GLOBAL",2)

ActionOverride("M2Karma","MoveToObject(Player1))
EndCutsceneMode()
ActionOverride("M2Karma","StartDialogueNoSet(Player1))~EXIT
END

END

CHAIN IF ~Global("M2LynnMet","GLOBAL",2) ~ THEN M2Karma b2

~Don't I know you from somewhere?~

DO ~SetGlobal("M2LynnMet","GLOBAL",3)~
END

 

Just found - Alternative3 may not work if other modders added to Player1 already, in this case the line

APPEND Player1

IF~Global("M2LynnMet","GLOBAL",1)~THEN BEGIN M2Karma b1

may need a

 

APPEND Player1

IF WEIGHT #-7~Global("M2LynnMet","GLOBAL",1)~THEN BEGIN M2Karma b1

which actually is another good reason to stay away from files like Player1...

 

And

These narrator scenarios happen at utterly important points in the game

- the PC realises he/she lost her soul to Irenicus

- the party faces the final battle at the tree of life

- (the PC sees a woman in a bar??)

Link to comment

Wow! Thank you very much for all that work and explanation!

 

First, this was my first cutscene!!!!! Thank you! Thank you! Thank you! I had been avoiding the whole idea because I thought they were going to be extremely tricky. I am no longer afraid of cutscenes! :)

 

Next, I am now sufficiently afraid of player1. Thank you.

 

Next, I think I might try the invisible creature idea. I had started it, but scrubbed it because I was not sure how to get the two dialogues to mess. I got an error when I tried (not able to find dialogue).

 

One more question, if I may...

 

Reading NPC-NPC banter without tutorials, it looks like there should be a way to start dialogue with someone other than the NPC within whose banter you are coding. Is that true? Anytime I have tried, I have gotten an error. My first line of dialogue must start with say or ~.

 

Anyway, thank you again for helping me out. I really appreciate it.

 

(Oh, side note. Yes, I plan to share my mod...If I can ever get the crazy thing made. It is very slow going, but I feel like I am learning, so that is a plus.)

 

Thank you again Cam and Roxanne.

 

MM

Link to comment

Wow! Thank you very much for all that work and explanation!

 

First, this was my first cutscene!!!!! Thank you! Thank you! Thank you! I had been avoiding the whole idea because I thought they were going to be extremely tricky. I am no longer afraid of cutscenes! :)

 

Next, I am now sufficiently afraid of player1. Thank you.

 

Next, I think I might try the invisible creature idea. I had started it, but scrubbed it because I was not sure how to get the two dialogues to mess. I got an error when I tried (not able to find dialogue).

 

One more question, if I may...

 

Reading NPC-NPC banter without tutorials, it looks like there should be a way to start dialogue with someone other than the NPC within whose banter you are coding. Is that true? Anytime I have tried, I have gotten an error. My first line of dialogue must start with say or ~.

 

Anyway, thank you again for helping me out. I really appreciate it.

 

(Oh, side note. Yes, I plan to share my mod...If I can ever get the crazy thing made. It is very slow going, but I feel like I am learning, so that is a plus.)

 

Thank you again Cam and Roxanne.

 

MM

You can start dialog (start dialogue is done either by script - like you did already or at random - random dialogues must be in your b file and their triggers must be such that they can start without additional input e.g. IF~InParty("MyNPC") InParty("Imoen2") Global("MyNPCTalkImoen","GLOBAL",0)~THEN...The banter file is periodically checked for dialogues that have not yet run but you have no control of when that happens, so it is not easy to test).

 

To put other NPC banters into your own d file you can use either

 

CHAIN

IF~some conditions~THEN Imoen2J TalkToMyNPC1 >>>In this case Imoen will start the dialogue

DO~incrementsomecondition~

==MyNPCJ~bla~

==SomeOtherNPC IF~InParty("SomeotherNPC")~THEN~blabla~

==MyNPC IF~InParty("SomeotherNPC")~THEN~blabla answer~

==Imoen2J ~Do I care about all your blabla?~EXIT

 

OR you use

APPEND filename (without dlg extension)

Everything here is written like in any other d file

END (>>>this is a second END after the END of the last dialogue block and it indicated the end of the append)

Link to comment

Archived

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

×
×
  • Create New...