Dialog Database Index Thing

irock

  • *
  • Posts: 2879
Ladies and gentlemen, prepared to be blown away!

I don't really know what I'm asking for, how many things I'm asking for, if it can be done with an extension, if it requires modifying the game engine, how difficult it would be or if it could be done at all. That's why this thread is in "Working with StencylWorks" - I want a discussion right now.

In a nutshell, I want a global script or multiple scene scripts of dialog and dialog commands that I can reference parts of from behaviors.

This idea is totally rough and based on the easy (in my opinion) way Cave Story does dialog.

A behavior would reference #0200 from a script, then the content between #0200 and the next number would play.

#0200

<KEY><MSG><NAM=Farnsworth>Good news, everyone!<NOD>
I've decided that I don't want to live
on this planet anymore!<NOD><CLR>Now, I know you may be wondering
what I did with the soup.<NOD> Well, I ate it.<WAI=0.8>
So leave.<NOD><END>






The benefit of this is, it's significantly faster to make dialog this way and you have quick access to pre-defined actions via commands in brackets.

This isn't essential to anything I'm working on right now, but it would enable me to create some games I really want to create in the future. I want to know how feasible something (loosely) like this is in Stencyl. If it's not feasible at all, are there any other easy ways I could accomplish dialog? I know the answer's probably going to be "this is physically impossible you are crazy" or "yeah, I'll have it done in 5 years" but I might as well try!

Jon

  • *
  • Posts: 17524
This would be best handled as a two-part extension, one part for StencylWorks and one part on the engine side (yeah, we don't have engine-side extensions but they will come soon after launch).

Darkhog

  • Posts: 1243
Irock, this can be done by enhancing Greg's Dialogpack, but I see problem - those codes are too long. I personally prefer RPG Maker-type dialog codes (specifically those in AMS by DubeAlex for RMXP)

\name[Farnsworth] (or just \n[Farnsworth) = <NAM=Farnsworth>
\! = <NOD>
(here my idea, cause AMS do it little different) \d[0.8] = <Wai=0.8> (d for delay).

CLR won't be needed as dialog will be broken into individual messages based on amount of lines/message box set in configuration of behavior. Because we using \ already for escapecodes, we may want to use / instead. Also I propose those codes:
/f[fontname] - changes font of message used from now on to next /f command
/fname[fontname] - changes font of namebox - that way we may have 2 different fonts - one for namebox and one for normal messages.
/s[time] - changes delay between individual characters when no /d is used (/s[0.1]very fast text./s[5] very slooow text).
// displays / character.

There are no impossible things. There is only lack of skills.
Don't click this if your computer has less than 641 kilobytes of RAM.
Stencyl stencyling stencylish stencylers :D

Alexin

  • *
  • Posts: 3132
I accomplished something similar, though you want a full solution while mine is a hack. I have a single scene script that interprets commands on the fly. The commands are provided via a list attribute and it currently supports two types.

It's possible to tell the camera where to move or look at and how fast it moves. It's also possible to display text on a panel that you can move and reshape using tweening.

Support for more features is easy to add in, but its rapidly becoming unmanageable and monolithic. I'd be glad to see a full and solid solution around this.
"Find the fun"
alexin@stencyl.com

irock

  • *
  • Posts: 2879
Irock, this can be done by enhancing Greg's Dialogpack, but I see problem - those codes are too long. I personally prefer RPG Maker-type dialog codes (specifically those in AMS by DubeAlex for RMXP)

\name[Farnsworth] (or just \n[Farnsworth) = <NAM=Farnsworth>
\! = <NOD>
(here my idea, cause AMS do it little different) \d[0.8] = <Wai=0.8> (d for delay).

CLR won't be needed as dialog will be broken into individual messages based on amount of lines/message box set in configuration of behavior. Because we using \ already for escapecodes, we may want to use / instead. Also I propose those codes:
/f[fontname] - changes font of message used from now on to next /f command
/fname[fontname] - changes font of namebox - that way we may have 2 different fonts - one for namebox and one for normal messages.
/s[time] - changes delay between individual characters when no /d is used (/s[0.1]very fast text./s[5] very slooow text).
// displays / character.
Darkhog, I don't like these command names you got from an RPG Maker XP AMS. They don't stand out enough and they're less easy to associate to a command. Granted, I have no idea what DOM stands for, if anything.

I probably shouldn't have enclosed them in brackets. They could just be like <MSG <NOD <CLR <NAM:Farnsworth <KEY ALMOST LIKE CAVE STORY

Though, the names of the commands are probably the easiest things to set up and could likely be easily changed.


I accomplished something similar, though you want a full solution while mine is a hack. I have a single scene script that interprets commands on the fly. The commands are provided via a list attribute and it currently supports two types.

It's possible to tell the camera where to move or look at and how fast it moves. It's also possible to display text on a panel that you can move and reshape using tweening.

Support for more features is easy to add in, but its rapidly becoming unmanageable and monolithic. I'd be glad to see a full and solid solution around this.
I'd be interested in seeing that, mostly for curiosity's sake and to see what you had to do to accomplish that.

The more I think about it, the more useful commands sound even outside of dialog. You could save a lot of time by triggering more complex actions with just commands.

Winzenheimer

  • Posts: 97
This may not be exactly what you want Irock, but it could get your feet of the ground. I've put together a dialogue behavior that's available on the Forge called Simple Dialogue V4. Every function inside of it has been labeled for easy modding.

Best of luck.

Epic428

  • Posts: 1118
When I see your script I think of XML, Couldn't it be possible to type all of your dialog into an XML document, and then write up a behavior that accesses the document, and performs certain functions using your commands?

Though, I'm not sure that it is currently possible to include an XML document in SW, the way we would want to, at this time.
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs

Alexin

  • *
  • Posts: 3132
I'm an apologist of XML but I'm not using because I don't know how to export correctly along the game.
"Find the fun"
alexin@stencyl.com

Epic428

  • Posts: 1118
Just to take my idea one step further, and if it becomes possible to use XML, a really good extension to SW would be to have a dialog editor.
 
Basically, the dialog editor would allow the developer to create dialog groups (which in your case would be the #0200), in these dialog groups the player would have the ability to customize every aspect of the dialog such as, start and stop points, speed of text, color, font, dialog type(i.e actor or scene), etc.

Then each actor will have it's own editor that allows the developer to determine which dialog groups play, and under what conditions they should play. This would keep from having to write duplicate groups for multiple actors.

Then when the game gets compiled, the Dialog editor outputs the XML document that the dialog behavior reads off of. This behavior, for the most part, should not need to be changed by the developer, as it basically display's the dialog, and runs any additional functions, based off the information it obtains from the XML document.

Further extensions beyond this would entail the ability to expand into an RPG world, where certain quests/dialog's would give items to, or take items from the player.

Scene dialog types would display pertinent info such as, "Item xxxxx added to inventory." or  "Quest xxxx added." Actor dialog types would display interactive dialog, and then you could expand into cutscene/cinematic dialog types as well.

Basically the point of the editor would be to attempt to simplify the ability to add dialog to games, yet provide as much customization as possible.

I think this could also help build on the idea of Stencyl, because it could make it easier for some one who doesn't know much programming, or even XML, by writing out the necessary document for the game to read from, while allowing developers to to create from within a simple to use GUI.

Anyway, I'm sure my idea could use some improvements or modifications, but I think it could be a great ground to start with for anyone who might be looking to make a big extension.
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs

Rhys

  • Posts: 1046
I started work on this but I lost the file somewhere followed by completely losing interest. I know how to do it, it's just I can't stay focused on game dev atm.

tabletop

  • Posts: 343
Just to take my idea one step further, and if it becomes possible to use XML, a really good extension to SW would be to have a dialog editor.
 
Basically, the dialog editor would allow the developer to create dialog groups (which in your case would be the #0200), in these dialog groups the player would have the ability to customize every aspect of the dialog such as, start and stop points, speed of text, color, font, dialog type(i.e actor or scene), etc.

Then each actor will have it's own editor that allows the developer to determine which dialog groups play, and under what conditions they should play. This would keep from having to write duplicate groups for multiple actors.

Then when the game gets compiled, the Dialog editor outputs the XML document that the dialog behavior reads off of. This behavior, for the most part, should not need to be changed by the developer, as it basically display's the dialog, and runs any additional functions, based off the information it obtains from the XML document.

Further extensions beyond this would entail the ability to expand into an RPG world, where certain quests/dialog's would give items to, or take items from the player.

Scene dialog types would display pertinent info such as, "Item xxxxx added to inventory." or  "Quest xxxx added." Actor dialog types would display interactive dialog, and then you could expand into cutscene/cinematic dialog types as well.

Basically the point of the editor would be to attempt to simplify the ability to add dialog to games, yet provide as much customization as possible.

I think this could also help build on the idea of Stencyl, because it could make it easier for some one who doesn't know much programming, or even XML, by writing out the necessary document for the game to read from, while allowing developers to to create from within a simple to use GUI.

Anyway, I'm sure my idea could use some improvements or modifications, but I think it could be a great ground to start with for anyone who might be looking to make a big extension.

This, Dialogue really is the final frontier when it comes to what kind of games are possible to be created, and an easy to use system would open up a whole new generation of games made with stencyl that contain more depth.

Strasteo

  • Posts: 322
Dialogue is certainly something I would love for games. In fact, its integral for a few of my game ideas, actually. I think that this proposed solution is great.

Perhaps also include a way to show a picture of the character speaking along with the text box? Cave Story changes pictures every so often of the character currently speaking to show more emotion, and there's other games that do the same, I believe. I think Gunstar Heroes does something along those lines.

Anyway, would be a nice feature to include if such an extension was made.

irock

  • *
  • Posts: 2879
Yeah, Cave Story does it with <FAC####

I think the ideal solution would to have these commands trigger behaviors, so custom commands would be easy to make by anyone. <FAC would trigger a behavior that draws a face, and the number after it would set an attribute to that number so the behavior knows what face to draw.

RandomJibberish

  • Posts: 82
Being able to generate as well as read XML files (or similar) with Stencyl could be really useful, especially on standalone games. Some player created content such as the data for custom characters and levels could be stored as files in the game's folder to make sharing with other players easy, for example.

This sort of dialogue system is great btw, would speed up dialogue heavy games a lot.

Epic428

  • Posts: 1118
Unless someone starts this project before I can, meaning within the next couple months, once my current project is pretty well finished, I will have to brush up on my Java, and relearn some of its basics again, seeing it has been about 6 years since I last used it. But, I will attempt to work on such an extension, though, I'm sure I could use a lot of community input on it once started.

I think before then it might be worthwhile looking into adding support for XML documents, and blocks for parsing, etc. Otherwise it will have to be a Code Mode behavior to make it easier.
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs