Skip to content

Commit

Permalink
Basic 💀 for Godot v4
Browse files Browse the repository at this point in the history
  • Loading branch information
paulloz committed Jan 15, 2023
1 parent b2f9f34 commit 9694a8f
Show file tree
Hide file tree
Showing 31 changed files with 865 additions and 1,432 deletions.
64 changes: 32 additions & 32 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -68,35 +68,35 @@ dotnet_diagnostic.IDE0001.severity = suggestion
dotnet_diagnostic.IDE0002.severity = suggestion
dotnet_diagnostic.IDE0004.severity = warning
dotnet_diagnostic.IDE0005.severity = error
dotnet_diagnostoc.IDE0035.severity = error
dotnet_diagnostoc.IDE0051.severity = warning
dotnet_diagnostoc.IDE0052.severity = warning
dotnet_diagnostoc.IDE0058.severity = warning
dotnet_diagnostoc.IDE0059.severity = error
dotnet_diagnostoc.IDE0060.severity = suggestion
dotnet_diagnostoc.IDE0079.severity = suggestion
dotnet_diagnostoc.IDE0080.severity = error
dotnet_diagnostoc.IDE0100.severity = error
dotnet_diagnostoc.IDE0110.severity = error
dotnet_diagnostoc.IDE0110.severity = error

dotnet_diagnostoc.CA1802.severity = error
dotnet_diagnostoc.CA1805.severity = warning
dotnet_diagnostoc.CA1806.severity = warning
dotnet_diagnostoc.CA1810.severity = warning
dotnet_diagnostoc.CA1815.severity = suggestion
dotnet_diagnostoc.CA1819.severity = error
dotnet_diagnostoc.CA1820.severity = suggestion
dotnet_diagnostoc.CA1822.severity = suggestion
dotnet_diagnostoc.CA1823.severity = warning
dotnet_diagnostoc.CA1825.severity = warning
dotnet_diagnostoc.CA1826.severity = warning
dotnet_diagnostoc.CA1827.severity = warning
dotnet_diagnostoc.CA1828.severity = warning
dotnet_diagnostoc.CA1829.severity = warning
dotnet_diagnostoc.CA1836.severity = warning
dotnet_diagnostoc.CA1841.severity = warning

dotnet_diagnostoc.CA2207.severity = warning
dotnet_diagnostoc.CA2211.severity = warning
dotnet_diagnostoc.CA2227.severity = error
dotnet_diagnostic.IDE0035.severity = error
dotnet_diagnostic.IDE0051.severity = warning
dotnet_diagnostic.IDE0052.severity = warning
dotnet_diagnostic.IDE0058.severity = warning
dotnet_diagnostic.IDE0059.severity = error
dotnet_diagnostic.IDE0060.severity = suggestion
dotnet_diagnostic.IDE0079.severity = suggestion
dotnet_diagnostic.IDE0080.severity = error
dotnet_diagnostic.IDE0100.severity = error
dotnet_diagnostic.IDE0110.severity = error
dotnet_diagnostic.IDE0110.severity = error

dotnet_diagnostic.CA1802.severity = error
dotnet_diagnostic.CA1805.severity = warning
dotnet_diagnostic.CA1806.severity = warning
dotnet_diagnostic.CA1810.severity = warning
dotnet_diagnostic.CA1815.severity = suggestion
dotnet_diagnostic.CA1819.severity = error
dotnet_diagnostic.CA1820.severity = suggestion
dotnet_diagnostic.CA1822.severity = suggestion
dotnet_diagnostic.CA1823.severity = warning
dotnet_diagnostic.CA1825.severity = warning
dotnet_diagnostic.CA1826.severity = warning
dotnet_diagnostic.CA1827.severity = warning
dotnet_diagnostic.CA1828.severity = warning
dotnet_diagnostic.CA1829.severity = warning
dotnet_diagnostic.CA1836.severity = warning
dotnet_diagnostic.CA1841.severity = warning

dotnet_diagnostic.CA2207.severity = warning
dotnet_diagnostic.CA2211.severity = warning
dotnet_diagnostic.CA2227.severity = error
3 changes: 0 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/.config/ export-ignore
/.github/ export-ignore
/examples/ export-ignore
/screenshots/ export-ignore

/.editorconfig export-ignore
/.gitattributes export-ignore
Expand All @@ -15,5 +14,3 @@

/icon.png export-ignore
/project.godot export-ignore

/addons/paulloz.ink/override.cfg
16 changes: 3 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
.vscode/
*.code-workspace

.import/
.mono/
Properties/
*.sln
*.csproj
.godot/

export_presets.cfg
project.godot
*.import

inklecate.exe
ink_compiler.dll
ink-engine-runtime.dll
*.csproj.user

addons/paulloz.ink/override.cfg
export_presets.cfg
8 changes: 8 additions & 0 deletions GodotInk.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Godot.NET.Sdk/4.0.0-beta">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading>
<RootNamespace>GodotInk</RootNamespace>
</PropertyGroup>
<Import Project="addons\GodotInk\GodotInk.props" />
</Project>
19 changes: 19 additions & 0 deletions GodotInk.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GodotInk", "GodotInk.csproj", "{91EB0550-2844-4783-9D25-95DF670BBE88}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
ExportDebug|Any CPU = ExportDebug|Any CPU
ExportRelease|Any CPU = ExportRelease|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{91EB0550-2844-4783-9D25-95DF670BBE88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{91EB0550-2844-4783-9D25-95DF670BBE88}.Debug|Any CPU.Build.0 = Debug|Any CPU
{91EB0550-2844-4783-9D25-95DF670BBE88}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
{91EB0550-2844-4783-9D25-95DF670BBE88}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
{91EB0550-2844-4783-9D25-95DF670BBE88}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
{91EB0550-2844-4783-9D25-95DF670BBE88}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
EndGlobalSection
EndGlobal
68 changes: 2 additions & 66 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,73 +2,9 @@

An [ink](https://github.com/inkle/ink) integration for [Godot Engine](https://github.com/godotengine/godot).

## Requirements
## Notice

* Godot (Mono version) 3.3+
* ink 1.0.0+

The following export platforms have been tested with Godot 3.3.2:
* Windows 🗸
* Linux 🗸
* WebAssembly 🗸
* iOS 🗸

I'm pretty sure this will also run fine on MacOS and Android but haven't witnessed it myself yet. If you end up testing an unlisted platform, please create an issue to tell me whether everything works or not.

## Contributing

### Bug reports, feature/improvement requests

If you're experiencing difficulties with *godot-ink*, feel free to open an issue on this repo. For bug reports, please use the provided template.

### Contributing

Contributions are, of course, welcome. Be sure to read the [contributing guide](CONTRIBUTING.md) beforehand, and to add yourself to the [AUTHORS](AUTHORS.md) file.

### Support the development

If you like *godot-ink*, please consider buying me a coffee.

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/E1E53SKZF)

## Installation

The installation process is a bit brittle at the moment, but as long as you're doing everything in order, everything should be alright.

1. Install *godot-ink* either through the Asset Library or by dropping the `addons/paulloz.ink/` folder in your project's `addons/` folder.
1. Check your project contains a `.csproj` file.
* If not, there's a menu for that in Godot:
`Project → Tools → Mono → Create C# Solution`
1. Download the last [ink release](https://github.com/inkle/ink/releases).
1. Drop the `ink-engine-runtime.dll` at the root of your project.
1. Reference said file in your `.csproj` file.
```xml
<ItemGroup>
<Reference Include="Ink">
<HintPath>$(ProjectDir)/ink-engine-runtime.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
```
1. Build your project.
1. Enable *godot-ink* in the plugins tab of the project settings window.

When the plugin is properly loaded, you should be able to use the new ink preview panel to inspect your story.

![](screenshots/inspector_screenshot.png)

### Optional: configure to compile ink files

If you want to compile ink files directly from Godot, there are a few additional configuration steps.

1. Extract the entier [ink release](https://github.com/inkle/ink/releases) you downloaded earlier somewhere on your computer.
* It should contain an executable file named `inklecate`.
1. In the project settings window, scroll down to the ink section and point the "Inklecate Path" field to the said executable file.

If you need to, this "Inklecate Path" can be overriden by setting a `override.cfg` file in the addon folder. This allows different developers on a team to have their version of the ink compiler wherever they want (if so, do not forget to ignore the `override.cfg` file in your VCS).
```ini
inklecate_path = "C:/Path/To/Your/inklecate.exe"
```
This branch contains the new version of **godot-ink** for Godot 4. It is under heavy development.

## License

Expand Down
6 changes: 6 additions & 0 deletions addons/GodotInk/GodotInk.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ProjectReference Condition="$(DefineConstants.Contains('TOOLS'))" Include="$(InkProjectFolder)\compiler\ink_compiler.csproj" />
<ProjectReference Condition="!$(DefineConstants.Contains('TOOLS'))" Include="$(InkProjectFolder)\ink-engine-runtime\ink-engine-runtime.csproj" />
</ItemGroup>
</Project>
Loading

0 comments on commit 9694a8f

Please sign in to comment.