TheIntercept - The story you're trying to load is not valid.
Closed this issue · 6 comments
Describe the bug
The example story "The Intercept" does not load properly in Ink Preview, giving the following output in the Godot Output panel:
The story you're trying to load is not valid.
modules/mono/mono_gd/gd_mono_utils.cpp:369 - System.NullReferenceException: Object reference not set to an instance of an object
The same error is produced when trying to load both the Intercept.ink and the compiled Intercept.ink.json file using the Load...
button from the Ink Preview panel, as described in the readme.
To Reproduce
- Add Ink from the AssetLib
- Build project
- Activate ink plugin in Project Settings
- Go to Ink preview panel
- Load... the Intercept.ink (copied from this repo)
Alternatively:
- Build json by running inklecate:
$ ./inklecate.exe -j ./Intercept.ink
{"compile-success": true}
{"issues":[]}{"export-complete": true}
- Load... Intercept.ink.json
The same (quite unhelpful) error happens for both approaches.
Environment
- OS: Windows
- Godot version: 3.4.5 stable mono official
- godot-ink version: 0.10 (installed from AssetLib in Godot)
- ink version: 1.0.0 (inklecate_windows.zip from https://github.com/inkle/ink/releases/tag/v1.0.0)
Additional context
This is a new install of Godot Mono, which I've never used before, but I've successfully been able to build C# scripts with it following some tutorials. I've installed .NET 6.0 and activated dotnet CLI
in Mono Builds settings (MSBuild just spits out errors).
I'm able to see Ink settings under Project Settings, and I set the Inklecate Path
to my local inklecate.exe
file, but this didn't appear to make any difference in the output.
Update I have no idea why, but the Load (both for .ink and .json) works in the very recently released Godot 3.5.
When you saw that error, what was the status of the ink/json resource? Was it showing as imported correctly?
Ok, I have no idea what's going on, but I can't replicate the issue. Started a new project (with Godot 3.4.5) and replicated my steps. Hit a snag with the godot-ink plugin refusing to compile, resolved when I remembered to add the required text block to the .csproj file. After that it worked out of the box.
I did hit the error the first time so there is some brittleness in the process, but I can't seem to replicate it now, so I don't know. As you say, there was probably some issue when the file was imported.
Hi paulloz, I've bumped into this issue as well. I was able to replicate it by making changes to the .ink file for The Intercept.
Here you can see one version of the import error when inklecate's path is set; first I ran Godot with the .json referenced by InkPlayer. The error occured after setting inklecate path and adding the .ink file.
I attempted a variety of fixes including deleting and remaking the ink file, deleting .import files, all builds in the .mono, and even re-installing the add-on from scratch. It seemed like the inklecate path was broken after the change and the asset could no longer be compiled. After removing all references to the .ink file and using Inky to export a .json, I was able to load the asset and open it in "Ink Preview".
However, the .json story would not start in the UI despite a successful build and run.
Some additional details:
- Godot version: v3.5.1.stable.mono.official [6fed1ffa3]
- godot-ink version: 0.10
- ink_engine_runtime.dll and inklecate.exe version: 1.1.1 (commit permalink). Note that the packaged release is built with a Godot-incompatible version of .NET, so I compiled the repo with
<TargetFramework>net472</TargetFramework>
Here's an assortment of related errors a user may see:
The NullReferenceException is from using "Ink Preview" on the .ink after it fails to import:
And, without further ado, here's the project after it becomes corrupted this way:
InkTest.zip
The workaround for this seems to be remaking the project and reinstalling godot-ink before copying over the subfolders for res://. It may just be that Godot 3.5.1 and ink 1.1.1 have incompatibilities.
@AaronLip This plugin hasn't been updated to work with ink 1.1.1 yet. Sorry. It's on my to-do list, though.
No worries! For what it's worth, it works great if your ink files are finished before adding them