theartofme

Veteran
Veteran
Joined
Feb 21, 2019
Messages
31
Reaction score
39
First Language
English
Primarily Uses
RMMV
About
This plugin integrates Ink with RPG Maker MZ/MV. This allows you to write all your dialogue in Ink and display it using a simple plugin command, which for me at least is much easier than managing message box events!

Features
  • Run Ink scripts starting from arbitrary knots/stitches
  • Start battles and run common events
  • Share variables between Ink and RMMZ/RMMV
  • Define a cast of characters to allow names and faces to be put automatically into message boxes
The combined RMMZ/RMMV version has a couple of new features from the old RMMV version, notably around defining cast. This allows you to define an Ink script like so:

Code:
== dramatis_personae ==

PRIS: actor(2)

GALE: actor(3)

NPC: name(White Witch) image(Actor3, 3)

- > DONE


== some_npc_dialogue ==

PRIS: Who's that?

GALE: It looks like the White Witch!

PRIS: Is that the good one or the evil one?

GALE: White is usually good, but I'm not sure if we're in Narnia fanfic or not...

NPC: Ahem. It's impolite to talk about people's alignment in front of them.

NPC: Fortunately, I'm good, for today at least, so I won't turn you both into frogs.

- > DONE

When the above is run with the plugin command ink some_npc_dialogue it will show the dialogue in message boxes, with the actors' names and images used when they're speaking and the name and images set up for the NPC in the cast section when the NPC speaks.

See the help in the plugin itself for more details!

Download
Download link: view on Github (the same script is compatible with both RPG Maker MV and RPG Maker MZ)
Terms of use: this plugin is released under the terms of the MIT license, which allows you to use and modify the plugin as you wish so long as the license is retained unmodified. This means it is free to use for both commercial and noncommercial projects.
 
Last edited:

FrozenNorseman

Shivering
Veteran
Joined
Mar 14, 2018
Messages
92
Reaction score
310
First Language
Danish
Primarily Uses
RMMV
This definitely looks interesting. I haven't used Ink before, but I may have to have a closer look at it if I can implement it with this plugin.

Thank you :)
 

JJ Sonick

Villager
Member
Joined
Feb 23, 2013
Messages
24
Reaction score
5
First Language
English
Thanks for this! I've dabbled with Ink before when exploring Unity - it's great to see it integrated with RMMZ. I'll be testing it out soon. :LZSsmile:
 

Speedvore

RPG Making since RM95!
Veteran
Joined
Oct 3, 2015
Messages
31
Reaction score
10
First Language
English
Primarily Uses
RMMZ
This is a really great plugin and I've actually been hoping to find one that does something like this for a while now, so thanks so much for making this possible in MZ!

Do you have an example demo project that you could share that has some of these features working in MZ? The code you shared in this post was super helpful for me to get something working and better understand how to use the plugin. Though I've been having some trouble with the common event hashtag particularly, so I'd love to see an example of that working in a demo project to better understand how to implement it.
 

theartofme

Veteran
Veteran
Joined
Feb 21, 2019
Messages
31
Reaction score
39
First Language
English
Primarily Uses
RMMV
Here's a pretty rough test project:
Though I've been having some trouble with the common event hashtag particularly

Although it turns out that there was a bug with the common_event hashtag that caused a crash, so that was probably the problem you were having. A new version with the bug fixed has been uploaded to the github link; please use that instead of the version in the test project, since the one in the test project has some random stuff not related to the plugin itself.
 

Speedvore

RPG Making since RM95!
Veteran
Joined
Oct 3, 2015
Messages
31
Reaction score
10
First Language
English
Primarily Uses
RMMZ
Although it turns out that there was a bug with the common_event hashtag that caused a crash, so that was probably the problem you were having. A new version with the bug fixed has been uploaded to the github link; please use that instead of the version in the test project, since the one in the test project has some random stuff not related to the plugin itself.

Awesome thank you so much! The common events work perfectly now, and this project will serve as a really helpful reference when learning how to use all of the features available. :)
 

theartofme

Veteran
Veteran
Joined
Feb 21, 2019
Messages
31
Reaction score
39
First Language
English
Primarily Uses
RMMV
Minor update: the exported ink file (by default inkscript.ink.json) should now be put in the "ink" subfolder, instead of the "data" subfolder. Unlike RMMV, when RMMZ detects changes to the "data" folder (like exporting a new inkscript.ink.json) it tries to reload data in the editor, which will be bad if you've made any unsaved changes in the editor! Having a separate folder for ink data fixes this.
 
  • Like
Reactions: DK

faolae

Villager
Member
Joined
Nov 2, 2014
Messages
8
Reaction score
3
Primarily Uses
holy crap i didn't realize that someone cracked the code!! it's been a blast working with this plugin, thanks a bunch for making it! :D

however, i'm having some trouble. i'm trying to set up a nameable player character in inky and making that work with your plugin, but for whatever reason i'm running into a particular issue.

i set up the player character in inky like this:

Code:
VAR player = "Nara"
~ cast_link(player, 1, "Actor1", 0)

and i have the external functions from the plugin and their fallback functions set up in inky as well.

but when i tried to set up the name change event by using the #interrupt tag to stop inky from running, it keeps running inky regardless. for example, if i wrote:

Code:
== test ==
hello #interrupt
will this show up in rmmv?
-> next_divert

both "hello" and "will this show up in rmmv" show up in RMMV and inky will move on to the next divert, even though the console log says that inky stopped running.

so i had to use the -> DONE tag after my "name_input" knot in inky to make inky stop altogether in order to actually run the name input processing event.

this raised another issue. running the name input processing event in RMMV works as intended in changing the actor's name, but the change in the actor's name does not actually reflect in the inky script.

i tried setting up the player name variable in RMMV as the same name as it is in inky (so the variable name is "player" in both RMMV and inky), and whenever i tried reflecting that with {rmmv_var(player)}, i get a "0" in response. i tried the variable's number to be sure, {rmmv_var(1)}, and the same result, "0", still pops up.

not sure what i'm doing wrong, but please let me know if there's a solution to this. thanks!
 

theartofme

Veteran
Veteran
Joined
Feb 21, 2019
Messages
31
Reaction score
39
First Language
English
Primarily Uses
RMMV
Glad you're liking the plugin!

#interrupt is broken! I don't use it much myself, and I broke it accidentally. I'll fix it soon.

I've mostly been focusing on having the name defined in Ink, not RMMV, so I haven't handled that case very well - there's no sync from RMMV back to Ink. However, I did come up with a workarond:

Code:
VAR player = "Nara"
~ link_var(player, 1) // use whichever RMMV variable number you have free
~ cast_link(player, 1, "Actor1", 0)

link_var adds the sync both ways, not just one way, so Ink can change the RMMV variable and RMMV can change the Ink variable. Now you just need to set up the RMMV variable so that it contains an actor's name; if you're using the "Name Input Processing" event, then immediately after the name input processing event add a "Control Variables" event with the "operand" set to "script", and use this script:
Code:
$gameActors.actor(1).name()
Change the number to the actor you want the name of.

With all this in place, the actor name will sync back to RMMV.

Hopefully that unblocks you for now, next time I have a chance to work on the script I'll fix the #interrupt bug and add two-way syncing for actor names.

Note: my Ink script doesn't know about RMMV variable's names. You can name them anything you want, it only works with numbers.
 

faolae

Villager
Member
Joined
Nov 2, 2014
Messages
8
Reaction score
3
Primarily Uses
thanks a bunch for the help!! will keep that note in mind.
 

lordakisho

Villager
Member
Joined
Dec 28, 2020
Messages
6
Reaction score
1
First Language
English
Primarily Uses
RMMV
Minor update: the exported ink file (by default inkscript.ink.json) should now be put in the "ink" subfolder, instead of the "data" subfolder. Unlike RMMV, when RMMZ detects changes to the "data" folder (like exporting a new inkscript.ink.json) it tries to reload data in the editor, which will be bad if you've made any unsaved changes in the editor! Having a separate folder for ink data fixes this.
I may be doing something wrong. I created a folder named ink inside of the root of my game folder and placed the inkscript.ink.json in there. When I tried to run I got an error and could not launch game. I placed the file into the games Data folder and it works perfectly, But it does as you say and forces a restart with every update. Is there a particular way I need to set up or place the subfolder so the plugin can find it?

Thank you very much! This plugin is a massive life saver!
 
Last edited:

theartofme

Veteran
Veteran
Joined
Feb 21, 2019
Messages
31
Reaction score
39
First Language
English
Primarily Uses
RMMV
I may be doing something wrong. I created a folder named ink inside of the root of my game folder and placed the inkscript.ink.json in there. When I tried to run I got an error and could not launch game. I placed the file into the games Data folder and it works perfectly, But it does as you say and forces a restart with every update. Is there a particular way I need to set up or place the subfolder so the plugin can find it?

Also can you explain how expression works? I have mine set up as
== dramatis_personae ==
name: image(imagename, index)

If I want to use the expression to change to a different face image how would I code that, and would all the images have to be within the same fileset or can they be different. (When was learning how to make face images I saved each expression as an individual file.)

Thank you very much! This plugin is a massive life saver!
If it works in the data folder and not in the ink folder, try to download the latest script again. It shouldn't be able to find it in the data folder anymore.

Your ==dramatis_personae== is fine! If you want to change expressions, then you can make use of the expression() function. There's a (small!) example in the test project above. For expressions to work, all your expressions for an actor must be in the same image/fileset - there's no way for an expression to change images - and the same expression should be in the same place for each actor. It's best to use expression() in your ==init== knot so it's guaranteed to be run.

Call expression like any other Ink function, e.g.:
Code:
~ expression("happy", 1)
~ expression("sad", 2)

The expression name comes first, followed by the image index (starting from 0, going left-to-right then down). You can then use that expression as a hashtag, and it will change the image index. For example, if you have:
Code:
==dramatis_personae==
Alice: image(alicefaces, 0)
-> DONE
==init==
~ expression("happy", 1)
-> DONE

Then the following will use the first face in alicefaces.png:
Code:
Alice: This is my neutral face.

And this will use the second face in alicefaces.png:
Code:
Alice: This is my happy face! #happy
 

lordakisho

Villager
Member
Joined
Dec 28, 2020
Messages
6
Reaction score
1
First Language
English
Primarily Uses
RMMV
If it works in the data folder and not in the ink folder, try to download the latest script again. It shouldn't be able to find it in the data folder anymore.

Your ==dramatis_personae== is fine! If you want to change expressions, then you can make use of the expression() function. There's a (small!) example in the test project above. For expressions to work, all your expressions for an actor must be in the same image/fileset - there's no way for an expression to change images - and the same expression should be in the same place for each actor. It's best to use expression() in your ==init== knot so it's guaranteed to be run.

Call expression like any other Ink function, e.g.:
Code:
~ expression("happy", 1)
~ expression("sad", 2)

The expression name comes first, followed by the image index (starting from 0, going left-to-right then down). You can then use that expression as a hashtag, and it will change the image index. For example, if you have:
Code:
==dramatis_personae==
Alice: image(alicefaces, 0)
-> DONE
==init==
~ expression("happy", 1)
-> DONE

Then the following will use the first face in alicefaces.png:
Code:
Alice: This is my neutral face.

And this will use the second face in alicefaces.png:
Code:
Alice: This is my happy face! #happy
Thank you soo soo much! I played around with it and figured out the expression thing. I missed the ~ and code being so specific it was like nope. I’ll download the plug-in again. Thanks again!!
 

lordakisho

Villager
Member
Joined
Dec 28, 2020
Messages
6
Reaction score
1
First Language
English
Primarily Uses
RMMV
Thank you soo soo much! I played around with it and figured out the expression thing. I missed the ~ and code being so specific it was like nope. I’ll download the plug-in again. Thanks again!!
The redownload worked perfectly and expressions are rolling. Thank you so much!!
 

theartofme

Veteran
Veteran
Joined
Feb 21, 2019
Messages
31
Reaction score
39
First Language
English
Primarily Uses
RMMV
Awesome, glad I could help!
 

Latest Threads

Latest Posts

Latest Profile Posts

Ami
--- Stolen Item ---

M.Figher: I want to sell this Stone
Fence: Then...i can buy you 1500G
M.Figher: It's Deal!
(3 Days Later)
F.Fighter: M.Figher,Do you know about Stone that Mayor keep it in his Office? It's missing
M.Figher: Ahh,is that so... (Actually,i Stole it and Sell it to the Fence a few Days ago)
I've spent some cash on foley and other sound effects. I wonder sometimes if I made a poor choice, but I remember that I really want to improve the sound of my games. n...n; My frugalness haunts me sometimes.
elex 50s face.png

Experimenting with an old 50's style face set. I have done about a dozen variations of face sets for my characters, but am never happy with the results for very long. Different attempts. Second one is the same character as the first image. The third is Ivan, another character entirely.

Forum statistics

Threads
108,843
Messages
1,039,989
Members
141,308
Latest member
Zuyuliena
Top