playMaker

Author Topic: Using Playmaker with Ink  (Read 2057 times)

TheJazz

  • Playmaker Newbie
  • *
  • Posts: 2
Using Playmaker with Ink
« on: July 27, 2021, 10:02:15 PM »
I want to create a text-based choice game using Playmaker and Ink. I wonder if Ink can be used well with Playmaker. Has anyone here done it before? I would appreciate it if someone could help me out.

wetcircuit

  • Full Member
  • ***
  • Posts: 158
    • wetcircuit.com
Re: Using Playmaker with Ink
« Reply #1 on: July 27, 2021, 10:45:58 PM »
Yes.

There are some actions on the Inkle github.

you'll need to scan the strings that Ink outputs, to parse stage instructions and other instructions for Unity.

Ink outputs blocks of text, or choices.... I set up different UI to handle the paragraphs, and a different UI for the choices as buttons.

TheJazz

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Using Playmaker with Ink
« Reply #2 on: July 28, 2021, 07:29:11 AM »
I couldn't find the actions on the Inkle GitHub.

Could you tell me the name of the Actions needed on the playmaker?

wetcircuit

  • Full Member
  • ***
  • Posts: 158
    • wetcircuit.com

whereAmI

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Using Playmaker with Ink
« Reply #4 on: October 25, 2021, 10:55:26 AM »
Here are the actions: https://github.com/inkle/ink-unity-integration/issues/22#issuecomment-304062888

Hi wetcircuit,

I am fairly new to Unity and C# but I am starting to get the hang of it.

I wanted to use Playmaker with Ink to create a 2d mobile game(much like inkle's sorcery!) wherein Ink handles the story, setting of variables, choice selection, etc. while Playmaker handles display of ink Story, Jumping to Knots/Stitches on click, Get Variables, and handle everything else with regards to the scene.

With my current Knowledge of Unity, Playmaker, and C#. I am having trouble understanding how to use the scripts on the Github link you have sent.

Things that I would like to learn more about:
1.) How to setup playmaker read and display the ink stories specific knots/stitches.
2.) How to make playmaker get/set global variables from ink.
3.) How to make playmaker get choices from ink.
4.) How to make playmaker get tags.
5.) How to make playmaker save and load ink.
6.) How playmaker and use External Functions.
7.) How to use Var Observers with Ink.
Basically everything posted in the Ink Github link that you have sent.
Can you please help enlighten me?
There is still not any documentation being made for ink and Playmaker even after a few years.

Things I have done so far....
1.)What I did was first create an Empty gameObject on the Scene.
2.)I then proceeded to "Add Component Script" named PlaymakerInkProxy.cs and then added my story as the ink JSON Asset.
3.)I am lost at Playmaker's FSM window...
I tried to setup the state of the game object using all ink scripts from the action browser but there is nothing happening.

I have already succeeded in displaying the ink story using c# code but I really want it to run with Playmaker..
Can you please help me :'( :'(

wetcircuit

  • Full Member
  • ***
  • Posts: 158
    • wetcircuit.com
Re: Using Playmaker with Ink
« Reply #5 on: October 25, 2021, 11:18:35 AM »

...

Things that I would like to learn more about:
1.) How to setup playmaker read and display the ink stories specific knots/stitches.
2.) How to make playmaker get/set global variables from ink.
3.) How to make playmaker get choices from ink.
4.) How to make playmaker get tags.
5.) How to make playmaker save and load ink.
6.) How playmaker and use External Functions.
7.) How to use Var Observers with Ink.
Basically everything posted in the Ink Github link that you have sent.
Can you please help enlighten me?
There is still not any documentation being made for ink and Playmaker even after a few years.

...

Hi, tbh it has been a few years since I've really used Ink…

But I agree, there ought to be some documentation or at least a youtube… It's a great system, but yeah a little too open-ended and opaque to just 'jump in'.

I will try setting up a Unity/Ink/Playmaker project and make some kind of tutorial...

whereAmI

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Using Playmaker with Ink
« Reply #6 on: October 25, 2021, 11:29:56 AM »
Oh my Gosh! Thank you very much, please do so only if you are not busy with anything else would not want to take up too much of your time for my project.

A simple ink story will do, one that will just allow me to have an overview on how to use it with Playmaker.

btw if you are not using ink anymore for your game dialogues or as a story editor. What are you using as of the moment maybe I can try those assets out too for my writing.

wetcircuit

  • Full Member
  • ***
  • Posts: 158
    • wetcircuit.com
Re: Using Playmaker with Ink
« Reply #7 on: October 25, 2021, 01:32:25 PM »
I would stick with Ink. imo it is the best system for this kind of thing.

There are Unity-native dialog/branching systems but Ink is more flexible and scales up to larger stories/projects.

I'll see what I can do about the tutorial… I need to get back into it.

whereAmI

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Using Playmaker with Ink
« Reply #8 on: October 25, 2021, 03:01:48 PM »
Good to know that ink is by far the best option to use as a narrative engine, I found it to be a really flexible tool.

Anyways, I'll be eagerly waiting for your tutorial, I'm sure it will become the sole basis of future integrations: (a Playmaker-Ink Gateway on the unity asset store perhaps)
I have been pulling my hair out for a few days now trying to make Playmaker work with Ink and I have almost lost hope in using either of them. You don't know how much you are helping me.
Good thing I reached out to you!

whereAmI

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Using Playmaker with Ink
« Reply #9 on: October 26, 2021, 05:55:34 AM »
...
Things that I would like to learn more about:
1.) How to setup playmaker read and display the ink stories specific knots/stitches.[/u]
2.) How to make playmaker get/set global variables from ink.
3.) How to make playmaker get choices from ink.
4.) How to make playmaker get tags.
5.) How to make playmaker save and load ink.
6.) How playmaker and use External Functions.
7.) How to use Var Observers with Ink.
Basically everything posted in the Ink Github link that you have sent.
Can you please help enlighten me?
There is still not any documentation being made for ink and Playmaker even after a few years.
...

The following discoveries will be based on the Playmaker-Ink Actions file uploaded by rvilgalys on:
https://github.com/inkle/ink-unity-integration/issues/22#issuecomment-304062888
+
The Playmaker-Ink Tutorials done by wetcircuit on:
{Placeholder for link}


Discoveries:
A. THIS IS HOW YOU CAN USE PLAYMAKER-INK ACTIONS ON A GAMEOBJECT:

Pre-Requisites: Download the zip file from the Github link above and transfer it inside the assets folder of your current project.

AI.) Create a New Game Object on the scene (make sure that it is not a Child of something.)

AII.) Make sure to highlight your Game Object on the [Hierarchy] and then on the [Inspector Window]: Add "PlaymakerInkProxy" script as a component. (You can drag and drop it from your [Project window] to the [Inspector window])

AIII.) Once you have added the component you will see the script on the [Inspector Window] and you need to set the ink JSON Asset as your ink story json file.(You can do this by locating the your ink's (.json) file in your project assets and then drag and drop it unto the ink JSON Asset bar located inside the script)

AIV.) Now you can use INK commands on the Game Object's states in the Playmaker FSM window. (The different Playmaker-Ink Actions will now be available to search in Playmaker's [Actions Browser])

USEFUL READS:
One limitation of Playmaker-Ink and a possible workaround from Ink's Founders
- https://github.com/inkle/ink-unity-integration/issues/40
Important tip for using External Functions with Ink
- https://www.patreon.com/posts/tips-and-tricks-18637020

whereAmI

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Using Playmaker with Ink
« Reply #10 on: October 26, 2021, 05:56:33 AM »
UPDATE #1:
I have been tinkering with a few setting inside the FSM window and have gotten "InkGetVariable.cs Action" to get values from my INK File. To make this work you need to be precise with your input inside "Ink Get Variable" State:
(Let's say for example I want to get a variable I typed on ink like VAR strength = 7 and I want to get the value inside my Game Object named "Player" this is what it's going to look like in the object's FSM state window.)
Proxy[Required]: Player
Name String[Required]: strength (name of variable so this is case-sensitive.)
and then for the the following fields:
Return String:, Return Int:, Return Bool:, Return Float:
{if you want to return a value then leave the field, on the default value}
{if you don't want to return a value make sure to click the Button on the right side to set it to None.}
(It is very important that you only leave one field at default value and the other fields set to None)
« Last Edit: October 26, 2021, 05:59:45 AM by whereAmI »