Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlayMaker integration #22

Closed
ladyisidore opened this issue Sep 25, 2016 · 12 comments
Closed

PlayMaker integration #22

ladyisidore opened this issue Sep 25, 2016 · 12 comments

Comments

@ladyisidore
Copy link

How difficult would it be to integrate ink with something like PlayMaker? I'm assuming it wouldn't be impossible, but is this something I could do myself with some Unity scripting or would it be more complicated than that?

@tomkail
Copy link
Collaborator

tomkail commented Nov 23, 2016

I'm actually not sure! I've never used it myself, but I've seen that a lot of popular plugins have PlayMaker integration, so maybe it's something we should look at, if there was enough interest.
If you ever did make anything for it let us know!

@joaobsneto
Copy link
Contributor

Hi. I'm trying to achieve this same thing. In my studio we are using Ink language to write the dialogs, but the support of Ink run time it's not enough for us. We want the dialog system to trigger animations and perform many other actions in the game. So Playmaker is a good choice so far. As there are no integrations available, I'm interest in writing this integration. Should I read the json file to generate the playmaker FSM or is there a class that will provide the specifications of the ink file without need to consider the version of the file?

@robbiew
Copy link

robbiew commented Apr 26, 2017

Has anyone made any progress with Playmaker integration? I'm doing simple things, like interacting with Ink variables -> Playmaker FSM variables, but would be awesome to be able to use Playmaker to manage the game content, line by line -- i.e. while(_story.canContinue), the story.currentChoices list and loop back, etc.

Not a very experienced C# developer (hence Playmaker) but I started with passing canContinue into an FSM variable, then using that to instantiate a text prefab.

At this point might just be better continuing to learn C# :)

@joaobsneto
Copy link
Contributor

I did, but in a very specific way. We have a conversation system in Playmaker that is very tedious to set up. I code a tool that generate Playermaker FSM from a Ink file. I made a sub language and I did not implemented all the functions from Ink in it. The result is pretty good, but it works only for my game.
In your case, you mean to create Custom Playermaker Actions that interact with some Ink runtime object?

@robbiew
Copy link

robbiew commented Apr 27, 2017

I've yet to write custom Playmaker actions, but I'm just using some functions to deal with text/choice prefab instantiation that work well, and then I'm just using Ink tags > FSM variables to trigger changes at game runtime. Simple, but works OK.

@rvilgalys
Copy link

Hello!

I made some simple playmaker actions that could be a bit buggy (and there's almost no error handling yet), but they work in the testing I've done. In any case, here they are if anyone else would like to try them out. With a bit more work, could be something to add here or to the Playmaker Ecosystem.

I've not quite figured out how to bind an external function to a playmaker event or deal with variables that aren't typed correctly when someone tries to set the wrong thing. I would also still like to add the save/load stuff and variable observers to it.

How it works: Stick the PlaymakerInkProxy script on some game object in the scene, and give it the JSON file as usual. All the Actions need to access the proxy to work. Both InkStoryContinue and InkGetNextChoice work with the usual Loop-Finished mechanic that Playmaker uses for arrays and other stuff.

What works:
Get/Set Variables as long as you know what you're doing and aren't trying to get the wrong type (not sure if bool is working though)
Get Tags (global or all)
StoryContinue & Choices
Go to Story Path

Still to do:
Load / Save
Read / Visit Counts
Variable Observers (The syntax of the delegate function in the example file is a bit over my head)
External Function Binding to an event

InkPlaymaker.zip

@wetcircuit
Copy link

@rvilgalys , thank you for sharing your Playmaker actions!

@tomkail
Copy link
Collaborator

tomkail commented May 7, 2018

If the playmaker package is still getting worked on, we should probably link to it from the front page, since I'd imagine there are lots of devs who'd love this!

@tomkail tomkail closed this as completed May 7, 2018
@tomkail tomkail reopened this May 7, 2018
@chrysoula
Copy link

I picked up Playmaker and am hoping to figure out how to use it with ink... sounds like it’s a challenge?

@rvilgalys
Copy link

@chrysoula If you grab those actions, they will work for the basics of running through Ink and getting the input / output.

@tomkail -- I'll see if I can make some time and improve these a bit -- since writing these I've gotten much better at C#, but that also means I don't use Playmaker nearly as often. Would love to contribute something useful though! Ink is absolutely fantastic to work with.

@tomkail tomkail changed the title Integration with other Unity3d assets? PlayMaker integration May 18, 2018
@wetcircuit
Copy link

Hi, I assume @rvilgalys has moved on from Playmaker, but maybe someone could help out with actions for Load / Save?

I can't see any way to Load/Save through Playmaker's Call Method on the proxy component (or the Basic Ink Example Script).

I can save individual variables externally via Playmaker, but it would be great to have the option to load and save the actual ink….

@tomkail
Copy link
Collaborator

tomkail commented Oct 23, 2022

Does anybody have anything to share with the community RE playmaker? Else I'll close this out :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants