While actual conversations with NPCs will generally take a different form in the full game, there is still something about an old school scripted dialog system that gives me warm and fuzzy feelings.
My experiences on Neverwinter Nights modding showed me that this sort of system could be used for a variety of scripted user interfaces by modders, etc. and it's a pretty good way to present interactive information. Any add on quests that the custom content community will end up putting together will surely have one or two of these... either to propel the story through an NPC dialog in a proper way or to represent a book of information, etc..
So, Mythruna just got one... and it's pretty powerful because it's pretty much entirely based on the embedded scripting engine.
As a test, I've used it to make an in-game help system. You can see it in action in the screen shot below:
And for the curious, here is the dialog script that makes that happen:
defOption( id:"place", text:"What is this place?" ) {
showPrompt( """\
This is the public server setup to help test the networking
support of the Mythruna test builds. This server is run
by the creator of the game and it is common to meet him here.
"""
) {
option( "build" )
option( "objects" )
option( "blueprints" )
option( "map" )
option( text:"Done" );
}
}
defOption( id:"build", text:"How do I build?" ) {
showPrompt( """\
When a block material is shown in the bottom of the
screen, the right mouse button will place that block
type and the left mouse button will remove any type
of block.
"""
) {
option( "build2" )
option( text:"Done" );
}
}
defOption( id:"build2", text:"How do I change block type?" ) {
showPrompt( """\
The mouse wheel will scroll through the major block
groups and other tools. The ctrl key + mouse wheel
will change the sub-type or shape of a material.
"""
) {
option( "place" )
option( "objects" )
option( "blueprints" )
option( "map" )
option( text:"Done" );
}
}
defOption( id:"objects", text:"How do I place objects?" ) {
showPrompt( """\
Use the mouse wheel to find the 'Objects' tool.
Ctrl + mouse wheel changes object to be placed.
Right mouse button places or opens the menu of
an existing object. Left mouse button drags.
"""
) {
option( "place" )
option( "build" )
option( "blueprints" )
option( "map" )
option( text:"Done" );
}
}
defOption( id:"blueprints", text:"How do I make my own objects?" ) {
showPrompt( """\
The in game object builder can be accessed using one of the
following methods:<br>
- press TAB and click 'Blueprints'<br>
- press 'b'
"""
) {
option( "blueprints2" )
option( text:"Done" );
}
}
defOption( id:"blueprints2", text:"How does the blueprint editor work?" ) {
showPrompt( """\
The controls work similar to in game. Use the move keys to
rotate the platform. Mouse wheel, ctrl + mouse wheel, left
click, and right click all work the same as in game.
Select an existing object to edit or click 'New' to start a
new one.<br>
After editing, click 'Save' to save your work and have it
available to be placed in game.
"""
) {
option( "place" )
option( "build" )
option( "objects" )
option( "map" )
option( text:"Done" );
}
}
defOption( id:"map", text:"How do I see the map?" ) {
showPrompt( """\
The in game overland map can be accessed using one of the
following methods:<br>
- press TAB and click 'Map'<br>
- press 'm'
"""
) {
option( "place" )
option( "build" )
option( "objects" )
option( "blueprints" )
option( text:"Done" );
}
}
showPrompt( """\
Welcome to the Mythruna Public Server.
Please select a help option from below.
"""
) {
option( "place" )
option( "build" )
option( "objects" )
option( "blueprints" )
option( "map" )
option( text:"Never mind" )
}
The power of the scripting language (Groovy) is that I can customize it to make things flow more fluently. Hopefully those of you interesting in the future of customization can understand what's going on above and can see the possibilities.
Because that's actually Groovy code, making any of those options or prompts conditional is simply a matter of adding the appropriate "if" statement.