SpeechCenter wrote:Someone already suggested I add another column for comments and perhaps another user-editable column should go for multiple casts, what would be the possible values for a character, say Random Apeman?
Could you rephrase the question?
SpeechCenter wrote:I prefer to refrain from reading code comments as that's even more complex than reading the code, but if additional columns won't be a good alternative, I'll probably do javadoc style comment parser or something similar.
Our starting point was comments with a special prefix, e.g.
Code: Select all
// VOICE: This is a comment
cEgo.Say("Blah blah");
and then I gathered all comments with that prefix.
As for an implementation detail, I handled comments as separate lines (having two types, SpeechLine and CommentLine, both extending a generic Line), rather than additional data attached to the lines (which a separate column would do). This could be tricky to handle with the filtering, though.
SpeechCenter wrote:Please also send the cases where custom functions are not enough, even if it's as complex as you describe, it's still beneficial for me to know of these usages, and maybe I'll still be able to expand the capabilities.
Although I remembered there being a larger variety, I had a look and it seems there were actually mostly just two cases where tweaking was needed (apart from custom function names):
1. Parameter for Say or Display picked/generated dynamically, for example:
Code: Select all
String RogerResponses[5];
RogerResponses[0] = "&3030 It's you, Roger Wilco, apparently a guy with too much time on his hands.";
RogerResponses[1] = "&3031 It's you, Roger Wilco, lean, mean, cleaning machine.";
RogerResponses[2] = "&3032 It's you, Roger Wilco, doofus of all doofi.";
RogerResponses[3] = "&3033 It's you, Roger Wilco, janitor extraordinaire and space adventurer mediocre.";
RogerResponses[4] = "&3034 It's you, Roger Wilco, blatantly stalling when you should be extricating yourself from the wretched mess you've landed yourself in. Not that I'm complaining, it's quality entertainment.";
Display(RogerResponses[Random(4)]);
Cases like this can be impossible to always handle properly just via static analysis, so I think the most reasonable solution would be an option to mark these lines manually. Or just not manage those with this plugin
2. Mismatched characters.
For example, when Roger picks up the note left by Never Kenezer, the text is shown with Display(), which assigns it to the Narrator, but we actually want it to be voiced by Never and show up in his script rather than the Narrator's. So we manually tweaked the voice script data for cases like that.
Other examples like that:
* In addition to Display(), we also have an in-game character for the narrator (cNarr) who shows up in an easter egg and we merged their lines together to the same script.
* Sometimes characters are reused in non-obvious ways. For example, we have a self-destruct announcement by some computer that's implemented as a speech line of an off-screen Beatrice. And in the Furkunz Revolution cutscene on the moon, various apeman and Furkunz characters are reused for displaying generic battle lines. These are mostly cases where the issue could be resolved by creating separate characters for such occasions, though (as long as you don't use up the AGS character limit), and not really this plugin's responsibility.
Another issue was the AGS auto-numberer adding line numbers to various UI elements that didn't need them and we had to clean those up manually, but that might also be outside the scope of this plugin.