bladecoder / bladecoder-adventure-engine

Classic point and click adventure game engine and editor
Apache License 2.0
595 stars 67 forks source link

ink files fail to compile (linux) #57

Closed blurymind closed 2 years ago

blurymind commented 2 years ago

Hi, I got so interested in using ink with bladecoder that I added support for editing ink files as well as compiling them to json files directly in yarn editor https://yarnspinnertool.github.io/YarnEditor/

I managed to get it there using the wasm port of inklecate.

Today I actually tried changing the example project's ink file, only to discover that when I playtest the game, nothing changes. I discovered that there is a "Compile ink script" command, which requires me to point it to inklecate's folder. Sure enough I did image then i get this image

There is no explanation why it failed. It doesnt fail when I do it with inky or yarn editor.

So I want to ask, can i bypass this altogether? The process of manually selecting and compiling them like that is just plain painful. I already have the means of compiling straight to json files, so can I just point bladecoder to the json files?

blurymind commented 2 years ago

Ok so, after compiling the file with yarn editor to json and dumping it in the modules folder, I was able to successfully load it in blade coder.

It looks like the wasm version of inklecate in yarn editor is doing a better job of creating a compatible file than inky, which is strange.

Anyways I simple suggestion to improve this is instead of having this dialog obscure what is going on (it doesnt tell you why it fails when it does, while even yarn editor can do that now) - I suggest replacing it with a simple command to open the modules folder. Or at least a button that in the dialog that opens the modules folder where the json files are to be found ro something like that.

bladecoder commented 2 years ago

Hi, there is a console in the editor that gives you more details about the errors that happens in the editor or while you are testing your game. Just press F1 to show the console dialog in the editor.

Hope it helps you in the future to obtain the cause of the errors.

blurymind commented 2 years ago

Hi, thank you for the hint. I eventually ended up directly exporting a compiled json file to the modules folder. Bladecoder's interpreter seems to be really good!

Apart of animations, what other things can I set up from with the ink file? Can I set state of actors too? It would be awesome if this was documented somewhere :)

bladecoder commented 2 years ago

Hi, you can call all actions that appear in the action dialog in the editor from Ink, even custom actions that you can create in Java for your project.

I attach a screenshot of one of my dialogs so you can have an idea of how it works.

image

blurymind commented 2 years ago

This is absolutely fantastic! :D Very nice work on the integration!

I am sort of wondering if I can make YarnEditor a bit nicer for working specifically with bladecoder targeted ink files

I improved support for the INCLUDE keyword now - when you export ink json files and playtesting, include should behave the same in yarn editor now as it does in inky

blurymind commented 2 years ago

@bladecoder is there a file somewhere in the project where I can find all of these commands in one place? I might be able to add them as autocompletion to yarn editor when in ink mode - If i have some place to extract them from.

My idea is to create a dialog with the parameters- similar to blade coder - or a simpler one to add code snippets to the context menu with them

blurymind commented 2 years ago

@bladecoder something like this can be made now bladeCoderSnippets

but for each one I have to manually code it like this image

If there was some sort of a file I could use to generate them all...

blurymind commented 2 years ago

how does one do Goto: pos x and y?

bladecoder commented 2 years ago

This is the correct syntax:

Goto: actor=Character, target=targetActor, pos=400_0

'pos' is relative to target if specified. It not specified it is an absolute position.

All position parameters works withe this syntax: param=xxxx_yyyy