ephread / inkgd

Implementation of inkle's Ink in pure GDScript for Godot, with editor support.
MIT License
300 stars 33 forks source link

godot4: Inkgd seems to try and load any json file in the project #78

Open asciifaceman opened 7 months ago

asciifaceman commented 7 months ago

Describe the bug We are using Panku and Inkgd. Panku has some json files in its addon directory, and it appears once inkgd is added it starts trying to load the panku json files

  Error importing 'res://addons/panku_console/modules/interactive_shell/side_menu_config.json'.
  Error importing 'res://addons/panku_console/modules/interactive_shell/side_menu_config.json'.
  Error importing 'res://addons/panku_console/modules/interactive_shell/side_menu_config.json'.
  Error importing 'res://addons/panku_console/modules/interactive_shell/side_menu_config.json'.
  Error importing 'res://addons/panku_console/modules/interactive_shell/side_menu_config.json'.
  Error importing 'res://addons/panku_console/modules/interactive_shell/side_menu_config.json'.
  Error importing 'res://addons/panku_console/modules/interactive_shell/side_menu_config.json'.
  Error importing 'res://addons/panku_console/modules/interactive_shell/side_menu_config.json'.

To Reproduce Install Panku and Inkgd at the same time

I am curious if it would be worth having a setting that would limit inkgd to only a directory. We, for example, always keep our ink files within one directory structure dedicated to ink stories - it could absolutely recursively load from there while avoiding the rest of the project.

I may make this change to my local copy myself just to stop these errors, but wanted to suggest it for the repo as well

asciifaceman commented 7 months ago

It seems the default behavior of the json importer plugin is to fail on any json file in the entire project that isn't an ink json. This feels really bad given how much json is used (for game data or other addons like the gut addon used by inkgd itself)

 Error importing 'res://.gutconfig.json'.
 Error importing 'res://.gut_editor_config.json'.
asciifaceman commented 7 months ago

Ah, I realize now that you can toggle import settings per file to not be an ink story.

I wonder if there is any way for this to not be universally applied to all json files, it could be very cumbersome to turn that off on many json files (say content files, item defs etc)