User Tag List

Results 1 to 4 of 4

Thread: Character Dialogue

  1. #1
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    Dec 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Character Dialogue

    Hi, I'm trying to make a small zelda-like RPG game, but I'm having a bit of trouble figuring out how to do the dialogue system. I'd rather not have to dig through the Event Editor to have to change or add a line of dialogue, so I was looking for a way to load an external file into the game to use for dialogue.

    I think the Array object might be able to do this, as it has a 'Load Array From File' action, but I'm not sure how this action works, or if it even works in the Newgrounds version of TGF2. Would I be able to use this to load a file I can edit outside of TGF2 into the game to read the character dialogue information from? Would it still work one the game is up on Newgrounds?

    If it helps, this is the kind of data I'm trying to load, and what it'd be used for:

    1, "MainCharacter", 0, "Hello World!"

    The first value would be the one checked by the event after starting to talk or pressing the 'next' button, telling it what to do, so for example having 1 in there would have dialogue for the character portrait on the left, 2 would be the character on the right, 3 would end the talking screen and return to the game, and so on.
    The second value would be the animation for a character portrait object to use, with different animations being different characters or "Stopped" being blank. Here it would be the animation 'MainCharacter'.
    The third value is the animation direction, which would control the expression on the character's face.
    The fourth value would be the string to load into the String object to show up on the screen.

    When the player presses the next button, it increases a counter, which tells the events to look at the next row/line down in the file/array/whatever.
    Would the array object be suitable for this, or would there be a better way? Or am I stuffed and will just have to make everything manually in the Event Editor?

    Thanks in advance!

  2. #2
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    Dec 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Character Dialogue

    Okay, I'm an idiot who only just found the tutorials page, an lo and behold it explains how to load dialogue from an external file using .ini files. That solves most of my problems, but still leaves the main problem:

    Does this still work in the Newgrounds version? Specifically when exported to play on Newgrounds?

  3. #3
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    Dec 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Character Dialogue

    Thanks to whoever 'Clickteam' is over on the Newgrounds forum for suggesting using different paragraphs within a string object, and using a new string object for each conversation. This post's basically for anyone searching through the forums wondering the same thing I was wondering.

    I basically took this and ran with it using sub-strings to get all the required data for each dialogue line into each paragraph. To copy/past my post from the other forums:

    If I have each paragraph of the string object contain the required data in a fixed number of characters at the start of the string, I should be able to use the Sub-String expressions from the Special Object to get the required info from the string. So for example, the string:
    Code:
    01NPC0000100Computer    Hello World!
    would have the following data:
    Characters 0 & 1: Value 01 - Checked by Condition to know what to do
    Characters 2 - 9: String "NPC00001" - Animation for character portrait object to change to, to show a certain character
    Characters 10 & 11: Value 00 - Direction for character portrait object to 'look in', changing character portrait's expression
    Characters 12 - 23: String "Computer " - Character name to show in a small box above main dialogue text
    Characters 24 and onwards: String "Hello World!" - What the character actually says

    I could then use these to run the various bits and bobs of my dialogue system. In fact, doing it this way means I can be a lot more flexible than using a .ini, because I only need the first two characters as numbers to tell it what to do and the rest of the string after that can be used for different actions depending on that first number, instead of having to assign a name to every single value.
    So that's how I'm planning to get around using external .ini files. It's a bit clunky, but from what I've been testing so far, it seems to work. Once again, thanks to whoever it was who suggested using a string object!

  4. #4
    Clickteam Clickteam
    Kisguri's Avatar
    Join Date
    Jun 2006
    Location
    Bakersfield, CA
    Posts
    3,058
    Mentioned
    39 Post(s)
    Tagged
    3 Thread(s)

    Re: Character Dialogue

    Clickteam is me! So I am glad it worked out for you! We look forward to seeing your creation!


    Clickteam on Twitter - Clickteam on Facebook

Similar Threads

  1. Dialogue Box
    By Jibs in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 26th November 2011, 12:51 AM
  2. Character Image: Load Character Images from Folder
    By aidmm in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 9th May 2011, 06:56 PM
  3. Help with dialogue
    By Gummy in forum Multimedia Fusion 2 - Technical Support
    Replies: 18
    Last Post: 13th January 2010, 12:44 AM
  4. Dialogue
    By Gummy in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 12th January 2010, 02:01 PM
  5. Dialogue
    By Mycale in forum Multimedia Fusion 2 - Technical Support
    Replies: 19
    Last Post: 21st July 2008, 08:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •