Skip to content

The-Chinese-Room/Inkpot

Repository files navigation

Inkpot

Inkpot - A container for Ink within the Unreal Engine developed by The Chinese Room.

This is a plugin for Unreal Engine 5.4 or later.
This is version 1.11.21 of the plugin.
The head revision contains work in progress towards the upcoming release.

Inkpot is a wrapper for the wonderful narrative scripting language Ink developed by Inkle Studios.

For a demo of how this integrates with an Unreal project (& a load more documentation) see the inkpot demo.

For general support and chat with other users, check out Inkle's discord
(You'll find Inkpot chat in #unreal-projects)

Changelog

Changes in 1.11.21

Added tools menu section for inkpot, for easier launching of the blotter.
Blotter QoL, list value update in blotter now more streamlined, items now have check box entries.
Exposed VisitCountAtPathString to Inkpot Story.
Added library functions to test the type of an Inkpot value.
Added delegate to allow notify when a line has finished being displayed.
Fixed bad plugin declarations, no more dependency warnings.
Refined blotter update, list values are now updated rather than being replaced for each update.
Set is now SetText on blotter strings.

Changes in 1.10.21

Introducing the Blotter! or Inkpot Debugger, an Unreal editor utility widget that allows the viewing of and setting of Ink variables at runtime.
Full support for Ink List creation & manipulation in blueprints.
Added documentation to the headers for most blueprint facing functions, story, values & lists.
Ink function evaluation now supported from Blueprints.
Added variable existence checks. All setter or getter functions from story now report success, plus generic test function IsVariableDefined.
Fixed crash when calling begin story with a null asset.
Fixed crash when calling function with empty variable declarations.

Changes in 1.03.21

Added new abstract factory creation for stories, class UInkpotStory can now be subclassed on a per project basis.
Switched settings back to regular UDeveloperSettings as backed by CVAR version did not seem to work.
Fixed for 5.4 compilation error, template instantiation context error in InkPlusPlusTest.cpp(738).
Fixed compiler warnings in 5.4.
Fixed assertion when attempting to access no existent variable in story.
Fixed typo in headers that would fail on certain compilers ( #include "Coreminimal.h" should have been #include "CoreMinimal.h" )
FIxed Deprecation warning for GetAssetRegistryTags.
Updated serialize function to match parent in UInkpotStoryAsset.

Changes in 1.02.21

Fixed assertion when accessing variables that do not exist in the ink script.
Fixed relative path resolution bug that caused Ink source files to not import.
Improved compilation logging.

Changes in 1.01.21

Added tag accessor methods to InkpotLine & InkpotChoice.

Changes in 1.00.21

Inkplusplus port now matches version 21 of the Ink runtime engine, Ink version 1.1.1.
.net version updated to 5.0

Changes in 0.4.20

Settings backed by CVars added.
First pass on auto reload and replay of ink source.

Changes in 0.3.20

JSON serialisation now functional.

Changes in 0.2.20

External functions are now implemented, along with functional tests.

Changes in 0.1.20

Initial release.

Requirements

Inkpot works with version 5.4 of Unreal.
Inkpot includes a C++ port of Ink-engine-runtime version 21, which can be found in the InkPlusPlus module.

.Net framework 5.0

InkleCate requires the .net framework 5.0 which you can download from here.
https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-5.0.17-windows-x64-installer
(Without this you will not be able to import Ink source)

Visual Studio 2022

This plugin is distributed as source code which needs compiling.
You will need to install Visual Studio 2022.
https://visualstudio.microsoft.com/vs/

Installing the plugin

Make sure you have .Net framework 5.0 and Visual Studio 2022 installed.

In your project folder, create a folder named Plugins and copy the Inkpot plugin there.
Make sure the inkpot folder is called simply 'Inkpot'.

LIke this:

[Project Root Directory]/Plugins/Inkpot/

For an example of how this plugin should sit in your project see the InkpotDemo.
https://github.com/The-Chinese-Room/InkpotDemo

FAQ

I cannot compile the plugin.

My Ink files will not import.

  • Make sure you have .Net framework 5.0 installed.
    Inkpot uses Inklecate to compile the Ink files and it needs .net 5.0.
    Without this the Ink files will not import.

  • Inkpot has only been tested as an application plugin and not an engine plugin.
    It needs to be located in the project's plugins folder and not the engine plugin folder.

  • The plugin folder name should be simply 'inkpot',
    If you unzipped it directly to your project, it will likely be called 'inkpot-release'.
    eg \plugins\inkpot

  • See the inkpotdemo for how it should look in your project.
    https://github.com/The-Chinese-Room/InkpotDemo

My Ink file changes will not update on reimport.

  • Inky, the Ink script editor, will silently fail when saving to read only files.
    Some version control systems will make the file read only when you check them out, eg perforce.
    This can lead to some confusion when running Inky alongside Unreal & Inkpot.

Module Structure

Inkpot is made from three modules.

InkPlusPlus

InkPlusPlus is the name of the module that contains the C++ port of the Ink Engine Runtime which can be found here
https://github.com/inkle/ink/tree/master/ink-engine-runtime

When porting the code from C# to C++ we came to the conclusion that we should keep the source as close to the original C# as possible to make updates easier.
This has now been updated to Inkversion 21, Ink v1.1.1.

Inkpot

A set of wrapper classes for InkPlusPlus to simplify Blueprint coding.
Manages the lifetime of the Ink story and provides the interface for Ink variable setting, getting and change notification.

InkpotEditor

This is the unreal editor facing part of Ink pot.
This manages the defintion of data types in Unreal for inkpot and the compilation of new Ink scripts as they are added to the project.
It also contains the unit tests for InkPlusPlus.

Other folders

There area couple of supporting folders that make up the Inkpot distribution.

TestInkSource

All the Unit tests for Ink.
Currently 180 tests.

Third Party

This contains a copy of InkleCate and is used by the script importer to compile the scripts.

Thanks to

Inkle
for creating Ink. We've used this for much more than narrative.

UnrealInk
for giving us a good basis for creating InkPlusPlus.

Colin, Seb & Canute at TCR
for the brilliant job in porting the Ink Engine Runtime to C++, along with the editor asset handling, unit tests and Unreal integration, most of the work here in fact.