fungus icon indicating copy to clipboard operation
fungus copied to clipboard

Ink integration

Open chrisgregan opened this issue 8 years ago • 2 comments

Add an integration with Inkle's open source Ink format.

Requested here and here.

chrisgregan avatar Oct 21 '16 15:10 chrisgregan

I've been thinking about this.

One way to do it is for Box to take the names of an ink knot or a knot.stich and direct the flow based on player choice. The Choice Box then instructs the game to jump to a particular knot or knot.stitch location with _inkStory.ChoosePathString("myKnotName") and play through that. When that's over, the next Choice Box takes care of where the story should go next. We'd have to find a way to link ink's internal variables with FungusLua variables, so the branching can be as finely-tuned as in ink itself.

Alternatively, and I like this better, a blue Box can instruct the game to start playing the ink until the ink reaches -> END.

In both cases, we can take care of Stage changes, audio instructions and so on either with external functions or by observing variables or through keeping track of ink tags. I think that last one is the best solution.

I'll start working on something, but I'm not great at C# and would appreciate any help.

ladyisidore avatar Oct 28 '17 16:10 ladyisidore

I have successfully hacked these two to work together. The way I did it is by using the standard ink integrator example, but then having the ink integrator script set a string variable in an Main flowchart to the current line, then sending that flowchart a message to trigger a conversation block using that string instead of the text field. You can then write your Ink in Conversation format (Character [fade/nofade] [wait/nowait]: Line...), and it will be displayed as desired. This is just the first step, you then have to hook up the Continue button etc, but it's possible.

Antony-de-Fault avatar Feb 20 '20 18:02 Antony-de-Fault