Within a script, is there a way to grab the strings of a conversation from the conversation file and return them as a string? I know that conversation files are fairly involved and usually contain more than just a sequence of strings, but the ones I am dealing with are simple and linear. Because of the way they are used, they have only one or two lines of text, with no options to branch the conversation, no starting conditional checks, no variables set, etc. I was hoping that there might be a function that returned either one long string with the conversation lines delimited by some special character or maybe a GetConvoFirstLine() & GetConvoNextLine() paired-function approach.
Why? I am fiddling with a mod where little "informational" conversations (e.g. "You notice that this part of the forest is unusually quiet...") start as a PC enters a trigger. The script that starts the conversation is a pretty generic conversetrigger.nss that calls ActionStartConversation with the conversation that has the same name as the trigger's tag name.
It's an okay system, but it has at least a couple unfortunate side-effects. First, it interrupts stealth. That's a disadvantage to stealthy characters but it's also immersion-breaking for a character to leave stealth mode just to notice that "This area is quite cold." Second, it interacts poorly with Tony K's AI, where a creature might have wandered near the trigger and being both de-stealthed and in a conversation doesn't ready the PC for a potentially hostile creature rushing up.
Anyway, I was toying with the idea of re-writing conversetrigger.nss so that, if it is called by a non-creature, it just delivers the conversation line as a floaty text and is done with it. The bottleneck is that I don't see an easy way to actually grab the text of the conversation. If there is a way to do this already written, it would be useful here.
Also, I am very new to the conversation functions. Obviously, if there is a way to use ActionStartConversation (or another function) in a way that doesn't break stealth, that would more neatly address the present issue without needing to extract conversation text.
BTW, Yes, I know that the right thing to do might be to use the toolset to go in and manually grab each conversation and turn it into floaty text, but this happens dozens of times during the module and I figured I would check into a less laborious workaround first. If there is a way to do what I am talking about, then I can just rewrite conversetrigger and be done with it.
'>
Modifié par MrZork, 12 mai 2011 - 06:32 .