Hello,
I'm trying to export all of the storytelling to plugin file because I find the event editor to be extremely tedious and annoying to use. I'm a software developer (so I know my way around js) with a background in Ren'Py and I'd love to edit the dialogues in a similar way.
What I find difficult is executing the normal, typical dialogue like such:
How can I implement the showText function to work as intended? I'm guessing it has to be done with callbacks (when text is dismissed show the next text message etc.) but I have no idea how to do that.
To my understanding, the interpreter doesn't have any 'addCommand' function and calling interpreter.command101(params) directly would be problematic because it already assumes the text command has already been issued and the method just tweaks the box a bit to fit the text passed previously and elsewhere.
Initially I tried to do something like this:
But the interpreter doesn't stop the script interpretation afaik, just the event stack interpretation. That means that the consecutive dialogue messages would have to be put in different events and that's exactly the opposite of what I'd like to do.
I'm new to RPGM so I don't understand much of it. If you have any recommendations or advices then please, go ahead.
PS.
So far I've been accessing the interpreter by passing it as an argument in Event->Script->PluginManager.callCommand and I feel like there's an easier way of doing it.
I'm trying to export all of the storytelling to plugin file because I find the event editor to be extremely tedious and annoying to use. I'm a software developer (so I know my way around js) with a background in Ren'Py and I'd love to edit the dialogues in a similar way.
What I find difficult is executing the normal, typical dialogue like such:
JavaScript:
function scenario_1(){
showText(mc, "Huh, so that's what this is all about...");
showText(mark, "Wait until you see the main hall.");
}
How can I implement the showText function to work as intended? I'm guessing it has to be done with callbacks (when text is dismissed show the next text message etc.) but I have no idea how to do that.
To my understanding, the interpreter doesn't have any 'addCommand' function and calling interpreter.command101(params) directly would be problematic because it already assumes the text command has already been issued and the method just tweaks the box a bit to fit the text passed previously and elsewhere.
Initially I tried to do something like this:
JavaScript:
$gameMessage.add('my text');
interpreter.setWaitMode('message');
But the interpreter doesn't stop the script interpretation afaik, just the event stack interpretation. That means that the consecutive dialogue messages would have to be put in different events and that's exactly the opposite of what I'd like to do.
I'm new to RPGM so I don't understand much of it. If you have any recommendations or advices then please, go ahead.
PS.
So far I've been accessing the interpreter by passing it as an argument in Event->Script->PluginManager.callCommand and I feel like there's an easier way of doing it.