Clearing story text in inkgd

I initially thought this would be trivial, but I've spent many hours on this problem, and found no solution. Maybe I'm going mad.

I'm using inkgd to display an Ink "story", where the user can click choices and the text reacts. New text is added to the previous text, but this is unfortunately not what I want.

I need to be able to reset the text, so the previous stuff isn't shown. I've tried to manually do it by calling the existing reset_output( ) function, I've poked at the source code, and obviously searched the web... nothing, though it must be said, I'm not much of a programmer.

Any help would be most welcome.

Comments

  • DaveTheCoderDaveTheCoder Posts: 581Member
    edited November 19

    Does inkgd require the Mono edition of Godot? I looked into it several months ago, and that seemed to be the case.

  • christopher_aabychristopher_aaby Posts: 8Member

    I don't think that's the case anymore..? I'm not using Mono, and it's running just fine.

  • DaveTheCoderDaveTheCoder Posts: 581Member
    edited November 19

    Thanks. I'll try to take a look at it and see if I can duplicate the problem.

    I had previously experimented with Ink, Twine and Yarn, but couldn't get any of them to work the way I needed.

  • christopher_aabychristopher_aaby Posts: 8Member

    Thanks! I spent some time on paulloz' ink, but couldn't get it to run. It required building a C# project as far as I recall... probably Mono dependent too.

  • christopher_aabychristopher_aaby Posts: 8Member

    In case anyone has experience with other "dialog handlers", I'd love to hear your experiences. I'd hate to implement some other library, and run into some other problem I can't solve.

    At this point, it looks like I'll have to scrap all the Ink, and possibly write my own solution, just to be able to clear text... I feel my soul shriveling up :(

  • DaveTheCoderDaveTheCoder Posts: 581Member
    edited November 24

    Here are my notes from Feb 6-8, when I was evaluating Godot addons for Ink and Yarn. I think I skipped Twine because it required the Mono edition of Godot, which I prefer not to use, because I don't like the big footprint resulting from all the Microsoft DLLs on Linux.

    Downloaded inkgd 0.2.1 <inkgd-45f4b0e452a4e1ffa6d9ad3175e59776d0df6986.zip> from https://godotengine.org/asset-library/asset/349. MIT license.
    Extracted assets/inkgd/ into new Godot project InkTest.
    README https://github.com/ephread/inkgd/blob/0.2.1/README.md
    Unfortunately, this appears to require the Mono edition of Godot and uses an external C# application.

    I looked at Yarn. It's similar to Ink and Twine. It has "shortcut options", which are similar to Ink's weave feature.
    At first it looked like Unity is needed to run Yarn scripts. But there's a Godot plugin for it.
    Downloaded GDYarn 0.0.1 <GDYarn-bd5d787cd443709ee0e703e60d172fd99bd7f34f.zip> from https://godotengine.org/asset-library/asset/747.
    The .zip contains a sample Godot project GDYarn that includes the addon.

    When running scene test.tscn of project GDYarn, I got a bunch of error messages. I grepped for the first error, and started setting breakpoints. That led me to the yarn_runner.gd script and the property _yarnFiles.
    In test.tscn, in the Inspector, node Node2D/YarnRunner's property Yarn Files was set to:
    C:/Users/19254/Desktop/Projects/GodotEngine/Yarn/addons/kyper_gdyarn/examples/example1.yarn
    I used the browse icon to locate the file example1.yarn. That changed the property to:
    ~/GodotProjects/GDYarn/addons/kyper_gdyarn/examples/example1.yarn
    After that change, scene test.tscn runs without error, and seems to be a correct interpretation of the Yarn script example1,yarn!!!

    I tested exporting project GDYarn to Android, HTML5 and Linux/X11. Android and HTML5 fail with the display almost empty; Linux/X11 works. I suspect the problem could be that the .yarn file is being read via the global file system, rather than res://.

    Continued evaluating Yarn and plugin GDYarn. A problem with the plugin is that there are no helpful diagnostic messages about syntax errors. Another problem is that some of the important Yarn features don't seem to be supported, such as variable interpolation and conditional statements.

    After that, I implemented my own "dialog handler". It "works", but it's cumbersome to use, because the dialog is hard-coded. For example, here's a portion of the dialog:

            "not accepted":
                d(loc2
                        + '\nFiona: "Hello adventurer! I lost my necklace. Can you'
                        + ' find it for me?"')
                c('"Yes"', [
                    ["d", '\n"Yes, I will try."'
                            + '\nFiona: "Thank you!"'],
                    ["s", "quest_state", "accepted"],
                    ["c", '"Bye"', [
                        ["j", "k_game"]
                    ]],
                ])
                c('"No"', [
                    ["d", '\n"No"'
                            + '\nFiona: "If you change your mind, you\'ll'
                            + ' find me here."'],
                    ["c", '"Bye"', [
                        ["j", "k_game"]
                    ]],
                ])
    

    Here's the completed test of this dialog handler: http://beinoni.org/godot/Inklike_HTML5_3.4/

  • christopher_aabychristopher_aaby Posts: 8Member

    So no luck with inkgd?

  • MegalomaniakMegalomaniak Posts: 4,212Admin

    I don't think inkgd was an option back then or @DaveTheCoder wasn't aware of it yet.

  • DaveTheCoderDaveTheCoder Posts: 581Member

    As I noted in my previous post, I tried inkgd 0.2.1. I see that the current version of inkgd is 0.2.3. I plan on trying that to see if it makes a difference.

  • christopher_aabychristopher_aaby Posts: 8Member

    Cool, just checking in :)

  • DaveTheCoderDaveTheCoder Posts: 581Member
    edited November 25

    The README file for inkgd 0.2.3 says that inklecate is required. Isn't that a Windows .exe? The file also says that the mono runtime is required, except on Windows.
    Asset: https://godotengine.org/asset-library/asset/349
    Readme: https://github.com/ephread/inkgd

    If that's accurate, then I can't use inkgd, since I'm on Linux and don't want to install the Mono runtime.

  • MegalomaniakMegalomaniak Posts: 4,212Admin
    edited November 25

    I can't seem to find a clear list of requirements for inklecate but ink does list a clear mono dependency.

    edit: the image under the linked section does make mono requirement pretty obvious though:
    https://github.com/ephread/inkgd#editor

  • christopher_aabychristopher_aaby Posts: 8Member

    Inklecate is just an executable, available for Mac, Windows, Linux and Unity integration:
    https://github.com/inkle/ink/releases

    I do think you will need the Mono runtime on any other system than Windows... though as mentioned earlier, it runs fine for me in non-Mono Godot (Windows).

    Oh well, it was a long shot anyway... thanks for your efforts. I'll try writing something that can interface with a simple dialog database, it doesn't need a broad feature set anyway.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file