Coder Social home page Coder Social logo

godot-ink's Introduction

GodotInk

An ink integration for Godot Engine 4.

If you use and like this project, please consider buying me a coffee.
ko-fi

Usage

You'll find a quick-start guide, and the general documentation on the project's wiki.

Installation

The following instructions assume that you have a working Godot and .NET installation. If not, please refer to the official engine documentation.

  1. Download and extract the code at the root of your project. You should see a new addons/GodotInk/ folder in your project's directory.

  2. Add the following line in your .csproj file (before the closing </Project> tag).

    <Import Project="addons\GodotInk\GodotInk.props" />

    If you don't have a .csproj file, click the Create C# Solution button in the editor's Project/Tools menu.

  3. Build your project once.

  4. Enable GodotInk in your project settings.

License

GodotInk is released under MIT license (see the LICENSE file for more information).

godot-ink's People

Contributors

francoisdlt avatar goldenxp avatar lunarcloud avatar nobbele avatar paulloz avatar shadybug avatar shinyu6 avatar valknight avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

godot-ink's Issues

Unable to activate plugin

Screenshot 2019-04-18 at 18 31 27

Just by downloading the latest commit and adding it to an empty Godot project, I get the error message that the plugin does not compile. When I open the file in the editor I do not see anything suspicious.

My Godot version is v3.1.stable.mono.official.

Any ideas?

Have (better) error messages

We need to provide better (or any) error messages in several easily fixable misuses.

This is not the full list but:

  • Trying to use .LoadStory(String) with the path to a file instead of the raw content of the state
  • Trying to set .InkFile to a path instead of the resource object
  • ...

Error when activating plugin for the first time in 3.2

When starting a new project, when I go to activate the plugin in 3.2 I get the following error

Unable to load addon script from path: 'res://addons/paulloz.ink/PaullozDotInk.cs' There seems to be an error in the code, please check the syntax.

Stitch not showing in editor

Hi,

The following little test ink file containing a stitch;

-> top_knot

=== top_knot ===
Hello world!
* [How are you] -> okay

=== okay 
I am okay 
-> DONE

-> END

Would display this in ink editor;
image

Inside of the Ink preview in Godot, it looks like this;
image

Not sure if related to #23

TheIntercept - The story you're trying to load is not valid.

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

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.

Unable to use plugin

I managed to read a Godot file some time ago with the older version of the plugin.

However with the new version:

  • I can not activate the plugin. When I try to switch the plugin to active, Godot crashes.
  • There is no Ink tab in the editor.
  • I can not see Ink-files in the resource view. (no .ink and no .json files) Therefore I can also not import them.
  • Without the import, I can not set an Ink file in the InkStory node. (I think)

I am on the newest Godot-Mono version 3.1.1.

Can you give me a pointer how I might start using the plugin?

Localization support a-la YarnSpinner

YarnSpinner is used to integrate Yarn files into Unity. They include this nifty tool for localizing your dialog into other languages: https://www.secretlab.com.au/blog/2016/9/27/yarn-spinner-localisation

To summarize; it locates every line visible to the player and appends a '#Line:line_number' at the end.
Then it exports them all to a .csv with the first column being #Line:line_number, followed by native_language, localized_language_1, etc.
It can then import that .csv and replace the dialog in-game to the preferred language.

Ink offers a lot of features that can make it hard to localize using this method. However for most users making games featuring basic dialog or simple trees this would be incredibly useful, it would be nice to see as an option.

Selecting choices skips the following line?

In the story inspector (haven't tried this in my own code yet), selecting a choice doesn't display the text of the choice nor the text immediately following it in the output. For example, with The Intercept:

- 	They are keeping me waiting. 
		*	Hut 14[]. The door was locked after I sat down. 
		I don't even have a pen to do any work. There's a copy of the morning's intercept in my pocket, but staring at the jumbled letters will only drive me mad. 
		I am not a machine, whatever they say about me.

The output gets displayed as this:

They are keeping me waiting.
---
I don't even have a pen to do any work. [...]

As you can see, it doesn't display the line that should be following after the first: Hut 14. The door was locked after I sat down.
Is there a reason for this? Is this only a problem with the inspector, or will I see this problem in my code too?

Errors after rebuilding the game during installation on Godot 4.1.1

I've got the latest copy of the code from the repo, moved "addons" folder from the zip into my project's folder, made edit to .csproj file, exported project once like it says in the installation guide (deleted .godot folder before that and restarted the editor after for a good measure), and upon trying to activate the plugin, I get the following error:
res://addons/GodotInk/plugin.gd:10 - Parse Error: Invalid cast. Cannot convert from "res://addons/GodotInk/Src/InkStoryImporter.cs" to "EditorImportPlugin".

Support for Multiple .INK files in 1 Project

Describe the bug
If you have multiple .INK Files that reference each other with diverts, some will fail to Import properly because they are seen as Invalid INK files because the divert targets are in another file. The MAIN .INK file compiles because it has the sub-files INCLUDED, but the sub-files don't work unless they also INCLUDE all related files to them.

To Reproduce
Create an INK file called Locations.ink and an INK file called Characters.ink and an Ink file called Main.ink. Have Main include the other 2. Add Diverts from Locations to Characters and from Characters to Locations. Godot will likely fail on import on 1 or more of these - but it depends on which order they are imported.

Environment

  • OS: Windows 10 64b
  • Godot version: 3.2.3 Mono
  • godot-ink version: latest as of 3/14/21
  • ink version: Unknown? Latest Inklecate downloaded as of 3/5/21

Additional context
A related note is that if you make a change in a Subfile that is INCLUDED in your main file, it doesn't recompile the story until the MAIN file is updated.

BindExternalFunction in GDScript fails (regression from 0.7)

Describe the bug
Calling BindExternalFunction in GDScript works in version 0.7, but fails in version 0.8 with the following error message :

variant_to_mono_object: Attempted to convert Variant to an unmarshallable managed type. Name: 'Func`1' Encoding: 21.
  <Erreur C++>  Method failed. Returning: __null
  <Source C++>  modules/mono/mono_gd/gd_mono_marshal.cpp:690 @ variant_to_mono_object()

To Reproduce
story.BindExternalFunction("<ink_func_name>",self,"<godot_func_name>")

Environment

  • OS: macOS
  • Godot version: 3.3
  • godot-ink version: 0.8
  • ink version: 0.9

Additional context
I'm using GDScript and I'm not sure I'm using the correct syntax for the BindExternalFunction ...

Missing installation info for mac

Describe the bug

I'm a bit confused so apologies for my lack of knowledge. On my current Godot 4.1.1 there is no button to create the .csproj file, so I don't think I can follow the installation instructions.
This is the only option I have in the Tools:
image

Is there something I'm missing or doing wrong maybe?

To Reproduce

Environment

  • OS: macOS 12.6
  • Godot version: 4.1.1

Additional context

MacOS Godot Will Not Allow Add-on to be Enabled

Godot v 3.2.2
MacOS v 10.15.7

Copied godot-ink into the add-on folder of a blank, new project.
Shows up in Project -> Project Setting -> Plugins.
When I click Enable box, I get the following pop-up:
"Warning!
Unable to load addon script from path: 'res://addons/paulloz.ink/PaullozDotInk.cs'."

Just for the hell of it:
Opening the import_ink.gd in Godot works just fine, it opens it in the script editor.
Trying to open InkDoc.tscn I get the following pop-up:
"Error loading: InkDock.tscn
Load failed due to missing dependencies:
res://addons/paullozink.ink/InkDock.cs
res://addon/paullozink.ink/InkStory.cs"

I can choose Fix Dependencies to find the .cs files, but they only show up in the file browser when I switch from "All Recognized" to "All Files."

Even after Fixing Dependencies and Opening the Scene anyway, I still am unable to enable the add-on as described above.

.json files not showing new text in dock, and .ink files cannot be loaded in 3.2.1

Hello, just thought I'd point out this potential bug, and look for some solutions.

Here's a test .json, after clicking one choice, the next options do not show up.
image
my script also does not load the texts after the choices, even after calling .ChooseChoiceIndex and .Continue.

Further, the .ink version has loading errors when loading via the import dock or the Ink Story node:
image

please advise, I'm not sure I'm missing something obvious! Thank you

How to Clone plugin

So, I'd love to use this in a subtree, in a project, but the plugin includes the full addons tree, which means it needs to be added at the root of the project, which hasn't been something my git-fu has allowed me to do?

In the end I've cloned it to a separate directory and made a git out of the paulloz.ink directory, which I grab into my other project.

Is there a reason you have included the root of the tree?

[Godot 4] C# readonly properties inaccessible from GDScript

Describe the bug

Due to godotengine/godot#67167, cannot access any readonly properties of C# instances from GDScript, e.g. InkStory.CurrentText.

To Reproduce

@tool
extends EditorScript

# Called when the script is executed (using File -> Run in Script Editor).
func _run() -> void:
	var s := load("res://Examples/TeenyTiny/Assets/Example.ink")
	print(s.get_property_list())
	print(s.CurrentText)

Environment

  • OS:
  • Godot version: 4.beta.17-mono
  • godot-ink version:
  • ink version:

Additional context

Apparently it's not godot-ink's fault. I just want to inform GDScript people of this issue. If godotengine/godot#67304 gets merged, this will be fixed.

Link the documentation on the AssetLib page and in the asset itself

You shouldn't be expected to download the Asset from the AssetLib, then to find the repo, then go find the wiki, then go figure out how to get your project working.

The package downloaded from the AssetLib should include everything you need to get started, including any ReadMe.md for basic use and compiling instructions. Anything more can still be "hey, for more indepth tutorial, go to the wiki linked here!", but Minimum Viable Product, the asset should include instructions.

Can't find Load and Save state functions on 4.0 branch

Hello!

First of all, thanks your work with this addon, I've been using it for some time in a game I'm making in Godot 3.5 and I'm really happy with it!

The thing is, with the release of Godot 4.0 I'm trying to migrate the game to this version, so I've downloaded the addon from the 4.0 branch, but seems like it has changed quite a bit. My game relies on the LoadStateFromDisk and SaveStateOnDisk functions, but I can't find them in InkStory.cs like on the 3.x version.

Are this functions already implemented? If not, is there any way to get this functionality from elsewhere on the addon? I see on the readme of the branch that this version is still under development, so no pressure, just want to know the current state of the development.

Thanks for your time and keep up the good work!

System.NullReferenceException: Object reference not set to an instance of an object. when calling TagsForContentAtPath

Describe the bug
I'm trying to use the TagsForContentAtPath function to get the tags at a knot called "answer". But I'm getting an error which I can't make sense of.

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
  at InkStory.TagsForContentAtPath (System.String pathString) [0x00001] in C:\Users\Joel\Documents\Godot\cyoa-prototype-v2\addons\paulloz.ink\InkStory.cs:422

This is how my knot looks.

=== answer ===
  Man am I glad someone answered! # Man am I glad someone answered!
  I'm in real danger here. # I'm in real danger here.
  The whole city has been overrun with clam zombies. # The whole city has been overrun with clam zombies.
  Luckily, I managed to find an intact submarine where the coms still functioned. # Luckily, I managed to find an intact submarine where the coms still functioned.

To Reproduce
I have this code where I'm calling the function. I'm not doing anything special other than call the function.

func handle_current_game_state():
	var test = ink_story.TagsForContentAtPath("answer")
	print(test)
	var is_waiting = ink_story.GetVariable("is_waiting")
	if is_waiting and !is_waiting_active:
		show_is_waiting_text()
	elif !is_waiting and !is_waiting_active:
		progress_story()

Environment

  • OS: Windows 10
  • Godot version: 3.3 mono
  • godot-ink version: 0.8
  • ink version: 1.0

Included Ink files doesn't cause the Ink Story to be recompiled correctly

Describe the bug
Changing the content of an Ink file that is included in an Ink story does not cause the story to be recompiled correctly the next time the game is executed.

To Reproduce
Here's a repro of the problem:
https://github.com/klootas/GodotRepro.git

  1. Open repro project in the Godot editor
  2. Run the project using F5 and notice that the first Ink choice is called "Choice A1"
  3. Open Ink/Test.ink (a file that is "included" by Ink/Story.ink), in an external editor
  4. Change the first choice text to "Choice A2"
  5. Switch back to the Godot editor
  6. Press F5 and notice that the running game still says "Choice A1" (instead of the expected "Choice A2")

Environment

  • OS: Windows 11
  • Godot version: 4.1.1
  • godot-ink version: 1.1.0
  • ink version: 1.1

** Additional context **

My ink_cache.json in the user folder:
{"res://Ink/Story.ink":["res://Ink/Test.ink\r"]}

Do not use mono for inklecate on linux

Describe the bug
With ink 1.0, inklecate comes with separate binaries for windows and linux. Trying to either use windows or linux inklecate binaries gave me an error Error importing 'res://TheIntercept.ink'., similar to #25. However, applying the same fix as in #31 (removing the mono step), but for linux allowed me to compile the .ink file:

match OS.get_name():
	"OSX":
		_err = OS.execute(inklecate, arguments, true, _output)
	"X11":
		_err = OS.execute(inklecate, arguments, true, _output)
	"Windows":
		_err = OS.execute(inklecate, arguments, true, _output)
	_:
		ret

To Reproduce
Fresh project, try to compile the intercept with inklecate 1.0 for linux or windows and godot-ink 0.9

Environment

  • OS: Linux
  • Godot version: 3.3.4-mono
  • godot-ink version: 0.9
  • ink version: 1.0

The type or namespace name 'ErrorType' does not exist in the namespace 'Ink'

Hi!

I'm having some major problems installing this plugin. Currently when I try to build the project I get this error The type or namespace name 'ErrorType' does not exist in the namespace 'Ink'. I'm not really sure what to do here as I've followed the installation instructions to a T.

Here's the full log.

Project "build-test.sln" (Restore target(s)):
	Message: Building solution configuration "Debug|Any CPU".
	Project "build-test.csproj" (_IsProjectRestoreSupported target(s)):
	Done building project "build-test.csproj".
	NuGetMessageTask: Determining projects to restore...
	Project "build-test.csproj" (_GenerateRestoreProjectPathWalk target(s)):
	Done building project "build-test.csproj".
	Project "build-test.csproj" (_IsProjectRestoreSupported target(s)):
	Done building project "build-test.csproj".
	Project "build-test.csproj" (_GenerateRestoreGraphProjectEntry target(s)):
	Done building project "build-test.csproj".
	Project "build-test.csproj" (_GenerateProjectRestoreGraph target(s)):
	Done building project "build-test.csproj".
	RestoreTask: Committing restore...
	RestoreTask: Assets file has not changed. Skipping assets file writing. Path: C:\Users\Joel\Documents\Godot\build-test\.mono\temp\obj\project.assets.json
	RestoreTask: Restored C:\Users\Joel\Documents\Godot\build-test\build-test.csproj (in 70 ms).
	RestoreTask: 
	RestoreTask: NuGet Config files used:
	RestoreTask:     C:\Users\Joel\AppData\Roaming\NuGet\NuGet.Config
	RestoreTask: 
	RestoreTask: Feeds used:
	RestoreTask:     https://api.nuget.org/v3/index.json
	RestoreTask: All projects are up-to-date for restore.
Done building project "build-test.sln".
Project "build-test.sln" (Build target(s)):
	Message: Building solution configuration "Debug|Any CPU".
	Project "build-test.csproj" (default targets):
		Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
		Skipping target "CoreGenerateAssemblyInfo" because all output files are up-to-date with respect to the input files.
		Csc: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\Roslyn\csc.exe /noconfig /unsafe- /checked- /nowarn:1701,1702,1701,1702 /fullpaths /nostdlib+ /errorreport:prompt /warn:4 /define:GODOT;GODOT_WINDOWS;GODOT_PC;TRACE;TOOLS;DEBUG;NETFRAMEWORK;NET472;NET20_OR_GREATER;NET30_OR_GREATER;NET35_OR_GREATER;NET40_OR_GREATER;NET45_OR_GREATER;NET451_OR_GREATER;NET452_OR_GREATER;NET46_OR_GREATER;NET461_OR_GREATER;NET462_OR_GREATER;NET47_OR_GREATER;NET471_OR_GREATER;NET472_OR_GREATER /highentropyva+ /reference:C:\Users\Joel\Documents\Godot\build-test\.mono\assemblies\Debug\GodotSharp.dll /reference:C:\Users\Joel\Documents\Godot\build-test\.mono\assemblies\Debug\GodotSharpEditor.dll /reference:C:\Users\Joel\Documents\Godot\build-test\ink-engine-runtime.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Drawing.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.IO.Compression.FileSystem.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Numerics.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Runtime.Serialization.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Xml.Linq.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\Facades\netstandard.dll" /debug+ /debug:portable /filealign:512 /optimize- /out:C:\Users\Joel\Documents\Godot\build-test\.mono\temp\obj\Debug\build-test.dll /subsystemversion:6.00 /target:library /warnaserror- /utf8output /deterministic+ /langversion:7.3 addons\paulloz.ink\InkDock.cs addons\paulloz.ink\InkStory.cs addons\paulloz.ink\PaullozDotInk.cs Test.cs "C:\Users\Joel\Documents\Godot\build-test\.mono\temp\obj\Debug\.NETFramework,Version=v4.7.2.AssemblyAttributes.cs" C:\Users\Joel\Documents\Godot\build-test\.mono\temp\obj\Debug\build-test.AssemblyInfo.cs /warnaserror+:NU1605
		Csc: Using shared compilation with compiler from directory: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\Roslyn
		C:\Users\Joel\Documents\Godot\build-test\addons\paulloz.ink\InkStory.cs(427,48): error CS0234: The type or namespace name 'ErrorType' does not exist in the namespace 'Ink' (are you missing an assembly reference?) [C:\Users\Joel\Documents\Godot\build-test\build-test.csproj]
	Done building project "build-test.csproj" -- FAILED.
Done building project "build-test.sln" -- FAILED.

Error using LoadStory()

When I try to load an ink file through GDscript, I get an error.

Here's the offending line:

func _ready():
	story.LoadStory("res://data/ink/story1.ink")

And here's the error:

E 0:00:01:0281   System.String System.String.Substring(Int32 , Int32 ): System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.

Parameter name: length
  <C++ Error>    Unhandled exception
  <C++ Source>   :0 @ System.String System.String.Substring(Int32 , Int32 )()
  <Stack Trace>  :0 @ System.String System.String.Substring(Int32 , Int32 )()
                 :0 @ System.Object Ink.Runtime.SimpleJson+Reader.ReadObject()()
                 :0 @ Ink.Runtime.SimpleJson+Reader..ctor(System.String )()
                 :0 @ System.Collections.Generic.Dictionary`2[System.String,System.Object] Ink.Runtime.SimpleJson.TextToDictionary(System.String )()
                 :0 @ void Ink.Runtime.StoryState.LoadJson(System.String )()
                 InkStory.cs:255 @ void InkStory.SetState(System.String )()
                 InkStory.cs:77 @ Boolean InkStory.LoadStory(System.String )()

Any ideas? I have inklecate linked to properly, and if I set the story in the editor it loads fine.

Installation script is using outdated inklecate

Describe the bug
The installation script from the readme pulls in inklecate 0.9.0 , which is unsupported by godot-ink > 0.8

To Reproduce
Put the godot-ink > 0.8 addon in a project, use installation script to install inklecate

Environment

  • OS: Linux
  • Godot version: 3.3.4-mono
  • godot-ink version: 0.9
  • ink version: 0.9

Repo home page download link broken

Describe the bug

image

This download link is broken.

To Reproduce

Environment

  • OS:
  • Godot version:
  • godot-ink version:
  • ink version:

Additional context

Installation process should not force you to have a csproj file

Hi,
I am very interested by your project but i do not use the c# version of godot.
I do not have the option to create a csproj ( there is nothing in project/tools).
It would be nice if you can make a version that does not force users to have the c# version of godot.
Thanks a lot for your work !

LoadStateFromDisk doesn't update "current" values

CurrentText, CurrentTags, CurrentChoices - no data
and I don't think using Continue() from here makes sense, I think it skips the line I was loading

I'm having to just use ChoosePathString("known_safe_to_load_at") for now...

System.DllNotFoundException: fusion.dll when building the project in Godot

Hello! Thanks for great project, but unfortunately I cannot build it.
What I've done:

  1. git clone https://github.com/inkle/ink.git
  2. Opened Visual Studio & compiled the release version of ink-engine-runtime.dll, placed it into the directory of godot-ink project
  3. Opened godot-ink project in Godot and hit run
  4. Project cannot be compiled, the main reason is System.DllNotFoundException: fusion.dll

I've installed Mono SDK 5.12.0, also I have standard .NETFramework
I've tried to build ink via Visual Studio & via Mono x64 command prompt, ink-engine-runtime.dll build is successful for both situations, but project build in Godot fails.
Maybe I'm doing something wrong or there is some misconfiguration in my system?
Build log is attached, it has some parts in Russian, but maybe it can help anyway...
msbuild_log.txt

Support ink 1.0.0

ink v1.0.0 has been released and new features need to be integrated.

  • BindExternalFunction should accept a lookaheadSafe optional parameter (bool defaulting to false)
  • BindExternalFunction should now accept up to 4 parameters
  • SwitchFlow, SwitchToDefaultFlow, RemoveFlow should be implemented
  • onError should be exposed through a signal

Why the dll must place in root directory?

Describe the bug

I want to move the dll to addons to keep project clean, but plugin don't work.
I try to put the dll in addons/paulloz.ink or other directory. (and i make the dll path and csproj onsistent.)
there are no errors and warnings, but i can't call "Load a file" in Ink board.

To Reproduce

  1. drop the paulloz.ink/ folder in my project's addons/ folder
  2. drop ink-engine-runtime.dll and ink_compiler.dll in addons/paulloz.ink
  3. modify the csproj: write two dll's path to csproj
  4. open the project
  5. click Ink in the bottom bar
  6. click Load a file button

Load a file button does not respond.

Environment

  • OS: Windows 10
  • Godot version: 3.2.3-mono
  • godot-ink version: 0.7
  • ink version: 0.9.0

Additional context
forgive me, it doesn't look like a bug. but I don't know where to ask this question.

ink doesn't load in export

When I go to export my project, it no longer runs.

It does load the ink if you place it relative to the same location as it would be in the project structure.

Can't Get Variable?

They're null when GetVariable and nothing happens when I observe.

I tried moving the variables to the main instead of included ink, I tried using json vs ink in the "Ink Story" node. Nothing.

Loading Ink Story

Hi @paulloz ,

The documentation isn't quite clear on this and I would like to think i'm doing this correctly.
I have my ink story loaded into Godot, but i am not seeing any of the exported variables?

The docs mention this;

To load your story, you can:

Point the InkFile exported variable to your .json/.ink file and check the AutoLoadStory checkbox in the inspector.
Point the InkFile exported variable to your .json/.ink file (in the inspector or via a script) and call story.LoadStory().

But all i see in the inspector for my Ink file is below;
image

Any clarification as to what i am doing wrong would be appreciated :)!

For reference;
Using Godot_c#_v3.2.3

Make `ChoosePathString` accessible from GDScript

Describe the bug

var story = load("res://story.ink")
story.ChoosePathString("main",true)
story.ChoosePathString("main",true,[])

This function doesn't expose to GDScript.

To Reproduce
load a story in gdscript, try to access that function

Environment

  • OS: Windows
  • Godot version: 4.1.rc1.mono
  • godot-ink version: 1.0.0
  • ink version: any? I think?

Additional context

//in InkStory.cs, add this
	public void ChoosePathString(string path, bool resetCallstack)
	{
		runtimeStory.ChoosePathString(path, resetCallstack);
	}

	public void ChoosePathStringArgs(string path, bool resetCallstack, Variant[] arguments)
	{
		runtimeStory.ChoosePathString(path, resetCallstack,FromVariants(arguments));
	}

GDScript doesn't know how to bind against C# params, so that function isn't usable. Removing the params fixes it, but causes a collision and would break compatibility. I added this function and this new signature to retain compatibility and allow that functality to be accessible to GDScript.

The type name 'VariableObserver' does not exist in the type 'Story'

Describe the bug
I am getting this error after following the quick-start guide:
...\godot\addons\GodotInk\Src\InkStory.cs(254,19): The type name 'VariableObserver' does not exist in the type 'Story'

To Reproduce
Follow quick-start guide, added first C# script

using Godot;
using GodotInk;
using System;

public partial class Story : VBoxContainer
{
	[Export]
	private InkStory story;
}

Environment

  • OS: Windows
  • Godot version: 4.1-mono
  • godot-ink version: 1.0.0

Having trouble activating in 3.2.1

Hello, I'm really new to this. The trouble shooting mentions adding an ItemGroup to the .csproj file, but I really have no idea where in the file to add the ItemGroup. I still get errors in the places I have tried to put it. Please advise, thank you!

Error with InkDock.tscn

Describe the bug
No InkDoc Tab appears on the bottom. Error: scene/resources/packed_scene.cpp:92 - Condition "nc == 0" is true. Returning: nullptr

To Reproduce
Installing Addon on Godot 4. Trying to open InkDock.Tscn

Environment

Godot 4.1.1. Stable Mono, Windows

  • godot-ink version: 1.0

Should we be using master or .5 tag?

Hi! Trying with master, when I create my addons folder and try to load the plugin I get:

Unable to load addon script from path: 'res://addons/paulloz.ink/PaullozDotInk.cs'.

The file exists.

Any insight on next steps for troubleshooting?

InkStory.ChoosePath() inaccessible

In the Unity integration it is possible to access InkStory.ChoosePath(Ink.Runtime.Path) directly, but this is not possible in the Godot wrapper. To get a Path, you also need to collect it from a Choice (using choice.targetPath), which is not currently possible either.

The targetPath can be gained by adding the following to to InkChoice.cs:

public Ink.Runtime.Path TargetPath => inner.targetPath;

After that, ChoosePath can be accessed by adding the following to InkStory.cs:

public void ChoosePath(Ink.Runtime.Path path)
{
        runtimeStory.ChoosePath(path);
}

Reproduction
Simply try to access either the InkChoice.targetPath or InkStory.ChoosePath methods.

Environment

  • OS: Windows 10
  • Godot version: 4.1 NET
  • godot-ink version: 1.0.0
  • ink version: 1.1.1

Additional context

Syntax Error loading add-on in Godot 3.2.3

Installed the Add-On and immediately got an error.

Unable to load addon script from path: 'res://addons/paulloz.ink/PaullozDotInk.cs' There seems to be an error in the code, please check the syntax.

Invalid cast

Getting these errors when loading ink script in "ink preview", after installing and enabling:

modules/mono/glue/runtime_interop.cpp:1303 - System.InvalidCastException: Unable to cast object of type 'Godot.Resource' to type 'GodotInk.InkStory'.
     at Godot.ResourceLoader.Load[T](String path, String typeHint, CacheMode cacheMode) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/ResourceLoaderExtensions.cs:line 27
     at Godot.GD.Load[T](String path) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/GD.cs:line 128
     at GodotInk.InkDock.LoadStory(String path) in R:\--\addons\GodotInk\Src\InkDock.cs:line 88
     at Godot.EditorFileDialog.FileSelectedTrampoline(Object delegateObj, NativeVariantPtrArgs args, godot_variant& ret) in /root/godot/modules/mono/glue/GodotSharp/GodotSharpEditor/Generated/GodotObjects/EditorFileDialog.cs:line 431
     at Godot.DelegateUtils.InvokeWithVariantArgs(IntPtr delegateGCHandle, Void* trampoline, godot_variant** args, Int32 argc, godot_variant* outRet) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/DelegateUtils.cs:line 47

Btw, this download link isn't working anymore: https://codeload.github.com/paulloz/godot-ink/zip/refs/heads/godot-v4
So I just cloned the repo and copied the addons folder to my own project.

Environment

  • OS: Windows
  • Godot version: v4.0.2.stable.mono.official [7a0977ce2]
  • godot-ink version: godot-v4
  • ink version: latest?

Cannot enable plugin on mac m1

Describe the bug
Plugin can be installed from Assets Lib but cannot be enabled. When trying to enable it, this error occurs:
image

To Reproduce

  1. create a new project using graphics "Mobile" on an m1 mac
  2. install the plugin from the AssetLib
  3. try to enable plugin
  4. notice the error

Environment

  • OS: MacBook Air M1
  • Godot version: 4.1.1
  • godot-ink version: latest from the Assets Library:
image
  • ink version:

Additional context

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.