Dialogue System Template (Templates)

From the Asset Store
Create complex dialogues with ease with this tool/template!
  • If you talking about C3, you can use the JSON spacing data prop for SpriteFont, I think the format changed between C2 and C3.

    Example (for a different font, just showing the format):

    [[6,"|"],[8,".,:!'"],[9,";"],[10,"il-`ยฐ"],[11,"j\\"],[12,"I5\"()"],[13,"rstz13?[]*"],[14,"Jcf"],[15,"aegx2478~/$"],[16,"Sbkopy069#"],[17,"dhnquv_ยฃ"],[18,"BEFLP"],[19,"<>"],[20,"Z+="],[21,"CGKTXY"],[22,"DRmโ‚ฌ"],[23,"HOUw%"],[24,"N&@"],[25,"AQV"],[29,"MW"]]
    

    Lumicreative.com I DM'd you the working C3 runtime project.

  • The "Set character width" action should still work, and indeed it does, only not for the "space" character. It does work however if you actually map the space character, but you didn't have to previously.

  • Thanks for pointing me in the right direction. It's working!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The import option doesn't seem to work for Import CSV, Import Dictionary, Import JSON.

    I'm using C3 BTW. I failed to notice that the project was for C2 before purchasing.

  • Yeah... the utility uses a lot of shody "Execute Javascript" calls with most of them relying on the presence of the jQuery library, it came bundled with the runtime back then.

    Turn the console on and you'll see a bunch of "$ is not defined" errors as you click the import buttons.

    You could try this : construct.net/en/make-games/addons/162/jquery-plugin

    I tried for a bit and it seems to bring those dead buttons back to life !

  • Hmmm. Doesn't seem to be working for me after installing plugin. Maybe it's C2 versus C3.

  • You need to actually add the "jQuery" object. Although it's an empty object devoid of ACEs and visual representation, its presence will ensure that jQuery is present throughout the project.

  • That did the trick! Thanks!

  • I'm still having an headache with pre-wordwrap on C3 runtime. I tried to remap space on spritefont, and defined character witdh in JSON format spacing data in spritefont. And i'm not able to get it to work.

    An example

    Lumicreative.com Did You manage to fix that problem?

    Magistross Do You have any suggestions?

    I would be really appreciated in any kind of help :)

  • There is definitely something wrong with the "Dialogue_ProcessText" function last part (the one that pre-insert line breaks so word-wrapping is flawless). I suspect the "TextWidth" expression from the SpriteFont object to be the culprit...

    I'd need to debug it thoroughly by comparing behaviors from C2 and C3 runtime, but alas my free time isn't what it used to be...

  • There is definitely something wrong with the "Dialogue_ProcessText" function last part (the one that pre-insert line breaks so word-wrapping is flawless). I suspect the "TextWidth" expression from the SpriteFont object to be the culprit...

    I'd need to debug it thoroughly by comparing behaviors from C2 and C3 runtime, but alas my free time isn't what it used to be...

    Thank You for an answer! At least i got some clue where to look at.

  • agouibo There seems to be some discrepencies between how the SpriteFont object measure its text between the C2 and C3 runtime.

    My template use a temporary SpriteFont object to measure single lines of text and insert line breaks accordingly so they occurs between complete words only. However, even if this temporary object is set to have a width of 5000, the C3 runtime seems to execute the "TextWidth" expression still with the default width of the SpriteFont object. Everything breaks down and no line breaks get inserted.

    A dirty workaround for this is to set the SpriteFont object's default width to 5000 or something, so the "TextWidth" expression works as it should.

  • Magistross

    It works! Thank You so much for Your time to figure it out.

  • Is it possible to highlight some of the words in different color?

  • The spritefont object can't have some of its characters recolored temporarily. There is really no easy way to that without resorting to some clever workaround.

    You can map additionnal characters that are almost exact "copies" of existing ones and are mapped to differently colored characters. To create your additionnal characters set, you can use something like this : lingojam.com/WeirdTextGenerator

    In your SpriteFont sprite, you then add additionnal characters to match your new characters set and apply whatever color you need.

    For example :

    abc... are mapped to white characters

    ๐”ž๐”Ÿ๐” ... are mapped to red characters

    ๐’ถ๐’ท๐’ธ... mare mapped to green characters

    etc.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)