Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Enable Plugins #4

Open
That-Guy-UKnow opened this issue May 23, 2022 · 13 comments
Open

Unable to Enable Plugins #4

That-Guy-UKnow opened this issue May 23, 2022 · 13 comments

Comments

@That-Guy-UKnow
Copy link

As I extracted and added the addons to my Project folder, when I go to the Project Manager>Project settings> Plugins, as I click enable I see this statement

Unable to load addon script from path: 'res://addons/surfacer/src/plugin/surfacer_plugin.gd' There seems to be an error in the code, please check the syntax.

I'm sorry if this is a common issue but I've tried making a new project to see if it was my project's end but I still get this error

@levilindsey
Copy link
Member

Hi @That-Guy-UKnow, it's almost certainly my fault! I have a couple frameworks that need to bootstrap around each other, and getting things to initialize smoothly has always been a challenge for these frameworks. I'll take a look at the current state of affairs and let you know.

@levilindsey
Copy link
Member

levilindsey commented May 23, 2022

@That-Guy-UKnow Which version of Godot are you using? And which version of the framework are you using? Head? Or a tagged release version?

@That-Guy-UKnow
Copy link
Author

As for Godot I'm using v3.2.3.stable.official, and as for both Scaffolder & Surfacer I'm using v0.5, I appreciate you looking into this so soon :) thank you

@levilindsey
Copy link
Member

Ok, I think I have some setup steps that should work for you.

The easiest way to get this set up is probably to manually edit the project.godot file in a text editor outside of Godot. You need to add the autoloads for Sc and Su. Your project.godot file should look something like the following:

...
[application]

config/name="Foo"
config/icon="res://icon.png"

[autoload]

Sc="*res://addons/scaffolder/src/config/sc.gd"
Su="*res://addons/surfacer/src/config/su.gd"
...

Then make sure you have surfacer and scaffolder downloaded and in their own directories within addons/.

Then open up Godot! If there are any console errors, try restarting Godot.

Sorry about the hassle with this. The problem is that my frameworks use a lot of tool scripts and type references. And Godot's type-system does a bit of a cascading explosion when it can't resolve missing types (the autoloads in this case, when you're first trying to enable them). The type errors wouldn't normally be such a blocking problem for using the editor, except that they are in tool scripts.

My upcoming version of these frameworks should make this setup much less tedious!

@That-Guy-UKnow
Copy link
Author

That-Guy-UKnow commented May 24, 2022

I read the "Getting_set_up" tab and saw that it should be set up on the autoload, I already manually set up Sc.gd and Su.gd on the autoload and it still gives me this issue sadly, same goes for any new projects I make and set up Sc.gd and Su.gd accordingly

@levilindsey
Copy link
Member

Hmmm, interesting... The v0.5 versions of these frameworks weren't actually setup to be "plugins", and there shouldn't be any references to plugin directories within the frameworks. I only added proper plugin support a few months ago, and haven't included it in a formal release yet. Are you sure you have the v0.5 version of both frameworks?

@That-Guy-UKnow
Copy link
Author

As I look under the tab "Plugins" they both say it's version: v0.5, I downloaded them both from the github and made sure the follow the instructions accordingly. If it's possible, do you think you could help inspect my issue more directly? My team has been trying to find something like this for ages and we'd love to have it on our game

@levilindsey
Copy link
Member

Ohhhhh, I see. Yeah, I should probably update that number on head immediately after cutting a release. Also, my first debugging step should probably just be to ask how you've downloaded the code (AssetLib vs clone repo at head vs download a specific release zip). Sorry about the confusion!

Yeah, we could probably set up a video chat if you want.

But I'll take another look at setting this up in a new repo right now, now that I know the actual repro steps.

JFYI, I've seen a lot of folks star this repo, but I haven't heard from anyone for certain on whether they've had much success with this in their own projects yet. Since I've just been making this framework myself, I suspect there are quite a few rough edges, dependencies, and opinionated design quirks that I take for granted since I designed it all myself!

@That-Guy-UKnow
Copy link
Author

That-Guy-UKnow commented May 25, 2022

That's really fine, me and my teammates are all relatively new and this is our first game project anyway, but your squirrel demo seemed promising so that's why I still wanna see if we can make this functional

@levilindsey
Copy link
Member

Ok, cool!

I just made a simple repo with all the frameworks working:
https://github.com/levilindsey/foo

I had to fix a couple syntax things and remove some non-existent plugin UI APIs in order to support down to 3.2 (I've been updating things to the latest 3.x versions of Godot).

Unfortunately (again, because it's just me and my limited use-cases using these frameworks so far), there are some extra inter-framework dependencies I didn't know about and that really shouldn't be there but I don't have time to fix right now. So This also includes the surface_tiler addon. And this also includes the squirrel_away addon, which is a bit odd because it's actually a demo game I use to make sure things work. But I keep squirrel_away in my addon directories so it's easy to keep it up-to-date while I make framework edits from another game.

The editor should at least be happy now. But you might not be able to run things in the current state of this repo until you add a sample level to level_config.gd. I should have included that, but I'm out of time right now! I think you probably should be able to reference one of the test levels under squirrel_away.

If this is still not working for whatever reason, it might be easiest to clone my meteor_power repo, and pull stuff out of there until it looks more like what you need. meteor_power is the repo I'm actively working on now, so everything should work correctly there!

I'm UkuleleFury#1002 on Discord, but I'm not usually online there.

@levilindsey
Copy link
Member

Also, SnoringCatGames is my LLC, so the active meteor_power repo is under there: https://github.com/SnoringCatGames/meteor_power

@ChrisDoufu
Copy link

I am sorry to say this. But it doesn't work to clone your either foo or meteor_power repo.

I tried the latest commits of both repo (fff22cd of foo and 2bdf2b9 of meteor_power) and imported them to Godot v3.2.3. The Godot console then kept outputting error info. I have attached part of the error info below.

It would be really nice if you could look into it. I hope my feedback would be helpful and thanks in advance :)

@levilindsey
Copy link
Member

@ChrisDoufu

I'm sorry!

There's definitely a long list of problems with how I have these frameworks set up, and this makes it very difficult for anyone other than myself to use these right now--more difficult than I'd realized until recently!

Unfortunately, I don't have the time to refactor things right now! And I won't have more time for at least the next few months.

And I won't really have any more time to debug getting Surfacer integrated into another codebase.

I know this is disappointing. I'm disappointed too!

At the very least, I tried to document some explanation for how things are set up and why things are so fragile right now:
https://github.com/SnoringCatGames/scaffolder/blob/master/docs/getting_set_up.md#still-not-working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants