Ineffable Wingbolt Dahak Posted May 5, 2009 Share Posted May 5, 2009 I'm trying to setup a quick animation where people X & Y walk up to you, kick off a conversation, and seek your opinion. However, to complicate matters I need to distinguish between X & Y when ever the speaker changes. To do this I was hoping to control the name and picture. So the flow is as follows: Cutscene Begin Dialogue X speaks. (State 1) Y speaks. (State 2) PC answers. (State 3) If PC answer = A, Then show X responds, str 1-4, Else show Y response, str 5-8 (State 4) If X responds (from state 4), nextstate = 5 If Y responds (from state 4), nextstate = 6 However, I cannot find calls to do this and I could swear it was possible. How can I achieve this switching while assuring the player is aware if X or Y speaking to them (dialogue pic and name)? Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk Ephesos Posted May 6, 2009 Share Posted May 6, 2009 As far as I know, there's no way to switch dialogue pictures while you're talking. I think there's no way to do it aside from just making the player read the text. (Or, you could make one dialogue pic with both of them in there.) Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted May 6, 2009 Share Posted May 6, 2009 So, if you call the set dialog picture function (whatever it's called) while in talk mode, it has no effect? Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk Ephesos Posted May 6, 2009 Share Posted May 6, 2009 Okay, I just checked. If you put the set_char_dialogue_pic() call in the first dialogue node, it will trigger and the picture will appear. Anywhere else and it won't update properly. Quote Link to comment Share on other sites More sharing options...
Ineffable Wingbolt Dahak Posted May 6, 2009 Author Share Posted May 6, 2009 Only the first node, eh? Bummer. Hm.... Can you confirm something for me? Can I pass a message while in dialogue mode so that the second person speaks after receiving the message? As follows: Town Script -Pass Message 1 (To X) X Script -Auto-Dialogue Begins (X) -PC answers, Pass Message 2 (To Y) -End Dialogue Y Script -Auto-Dialogue Begins (Y) -PC answers, Pass Message 3 (To X) -End Dialogue X Script -Auto-Dialogue Begins (X) -PC answers, Pass Message 4 (To Y) -End Dialogue Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted May 6, 2009 Share Posted May 6, 2009 Sure you can. However, I would recommend ignoring the 'messaging' system, not only do I think that they wouldn't work for this, but that it's generally rather useless. You should be able to store the needed information using SDF's, from the code section of the dialogue nodes. The only tricky bit I can see would be avoiding a gap between sections of dialog, but that shouldn't be too bad. Quote Link to comment Share on other sites More sharing options...
Ineffable Wingbolt Dahak Posted May 6, 2009 Author Share Posted May 6, 2009 Originally Posted By: Ephesos Okay, I just checked. If you put the set_char_dialogue_pic() call in the first dialogue node, it will trigger and the picture will appear. Anywhere else and it won't update properly. Was this from initiating dialogue with a character or calling it from a town script? Originally Posted By: Niemand Sure you can. However, I would recommend ignoring the 'messaging' system, not only do I think that they wouldn't work for this, but that it's generally rather useless. You should be able to store the needed information using SDF's, from the code section of the dialogue nodes. The only tricky bit I can see would be avoiding a gap between sections of dialog, but that shouldn't be too bad. Yeah, but the whole point is control the name and picture displayed while in dialogue mode. BoA seems structured for 1 on 1 dialogue only. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted May 6, 2009 Share Posted May 6, 2009 Yes, that's what I was talking about, looking at that layout you had given above. Within each chunk of dialogue, set flags, and then check the flags when figuring out how to start the next chunk. Quote Link to comment Share on other sites More sharing options...
Ineffable Wingbolt Dahak Posted May 6, 2009 Author Share Posted May 6, 2009 How we you thinking of starting the next chuck? Did you mean to do this by calling each chuck from a creature script? Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted May 6, 2009 Share Posted May 6, 2009 Ah, that. That was the problem I alluded to. I would say the town script's START_STATE might be your best bet, but, as mentioned there might be a slight delay. I had thought this was what you were suggesting yourself, which was why I didn't elaborate before. Quote Link to comment Share on other sites More sharing options...
Ineffable Wingbolt Dahak Posted May 6, 2009 Author Share Posted May 6, 2009 However, if you call a dialogue from a town script you do not get a picture or name. In addition, once dialogue begins the current town script's state stops without completing. Quote Link to comment Share on other sites More sharing options...
Rotghroth Rhapsody Duck in a Top Hat Posted May 6, 2009 Share Posted May 6, 2009 Okay, here's my idea. You should have an invisible character somewhere, and he comes with the two, and starts the dialogue with the picture and the name of whichever is talking. (You wouldn't be able to switch pictures, but as Ephesos said, you could have two in the picture and just use set_name. But if set_pic or whatever doesn't work, then perhaps set_name won't, and so my idea won't.) This would probably work with just one of the two characters, but this way there's no chance of the names getting switched at the end, if that would affect anything. Sorry, but this is all I can contribute with my limited scripting knowledge, other than verification that this would, in fact, have to come from a creature script. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted May 6, 2009 Share Posted May 6, 2009 @Dahak: I had forgotten that begin_talk_mode() behaves differently based on context. So yeah, it seems like you would want to put in the creature script, likely after having temporarily set both creature's scripts to run every turn. There would still likely be an awkward pause, but maybe it won't look too bad; I may have to do some testing. (I'm also intrigued by the documentation's tangential mention of using begin_talk_mode() from a terrain script. I'm curious if it really works and what, if anything, interesting could be accomplished by doing so, although it doesn't seem relevant to this problem.) @Duck: I'm afraid that I don't see any reason to involve a third creature, as there's nothing it could do that the pre-existing two couldn't. Quote Link to comment Share on other sites More sharing options...
Ineffable Wingbolt Dahak Posted May 6, 2009 Author Share Posted May 6, 2009 Well, I can manage the next bit of dialogue to pop up from the creature scripts, but as implied the party has to execute a turn in order to kick off the next chunk. If only there was a way to force a turn to end. Edit: Or, the other way would be to somehow force a state in the creature script to execute. Once the dialogue begins the current creature script terminates. Quote Link to comment Share on other sites More sharing options...
Ineffable Wingbolt Dahak Posted May 6, 2009 Author Share Posted May 6, 2009 Experimentation has yielded some interesting behavior. If someone has a windows machine can confirm...? First, the set_name and set_char_dialogue_pic calls only work when in the code block of the first node, but they also only work the dialogue is initiated. After that, even if you loop back to the first node, you cannot change the name or pic until you initiate the dialogue again. Second, the call message_dialog will overwrite text strings 1-8 with with 2x 256 string pieces of text when called from the code block of a dialogue node. Third, you can run begin_talk_mode from within a dialogue. However this kills the current dialog and treats it as if it had been called from a town script. No name or dialog pic will be displayed. So, as far as I can find, I can't force this to work. The only thing left is to try messaging and see if receiving a message triggers a creature's script. Edit: Messaging won't work. The following two scripts which talk to each other behave oddly. The terrain script calls node 2, which message the terrain script to begin node 3. So, the player only sees node 3. Don't know how many times it ran that branch, but obviously the last node on the branch is what the player first sees. Code: beginterrainscript; variables;body;beginstate INIT_STATE; set_script_mode(3);break;beginstate START_STATE; if (get_flag (0,0) == 3) message_dialog("Jill active.",""); if (get_flag(0,0) == 3) { begin_talk_mode(3); } else begin_talk_mode(2);break; Code: begintalkscript;variables;begintalknode 2; state = -1; nextstate = -1; question = "Jack, where is Jill?"; text1 = "Done talking to Jack."; code = set_name(6, "Jack"); set_char_dialogue_pic(6, 1945,0); set_flag(0,0,3); give_ter_script_message(0,2); // Go to Jill break;begintalknode 3; state = -1; nextstate = -1; question = "Jill, where is Jack?"; text1 = "Done talking to Jill"; code = set_name(6, "Jill"); set_char_dialogue_pic(6, 1947,0); set_flag(0,0,2); give_ter_script_message(0,3); // Go to Jack break; Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted May 6, 2009 Share Posted May 6, 2009 Originally Posted By: Dahak Second, the call message_dialog will overwrite text strings 1-8 with with 2x 256 string pieces of text when called from the code block of a dialogue node. JV's ported scenarios do this a lot. It's to maintain backwards compatibility with BoE. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.