edbeeching / godot_rl_agents

An Open Source package that allows video game creators, AI researchers and hobbyists the opportunity to learn complex behaviors for their Non Player Characters or agents
MIT License
942 stars 69 forks source link

Unable to load addon script from path #55

Closed jruots closed 1 year ago

jruots commented 1 year ago

Hi,

I'm trying to set up my custom environment after having successfully followed the instructions to train ball chase. First issue that I encountered was that I was not sure what this part of the text in the instructions was referring to "we have implemented a small plugin which is located in the plugin/addons/godot_rl_agents directory. Copy the plugin directory to your addons directory", meaning where is that directory from where I should copy the addon? I tried to workaround this by copying the godot_rl_agents folder from the ball chase example to the addons/ folder in my project.

Godot now recognized the addon, but when trying to enable it, I got the following error message: "Unable to load addon script from path: 'res://addons/godot_rl_agents/godot_rl_agents.gd'. This might be due to a code error in that script. Disabling the addon at 'res://addons/godot_rl_agents/plugin.cfg' to prevent further errors."

So I guess two questions: 1) Where is the original directory where the addon should be? 2) What's behind the error and how do I solve the problem?

Details

jruots commented 1 year ago

Ok so I figured out that the plugin is here: https://github.com/edbeeching/godot_rl_agents_plugin I downloaded it from there, but still the same error message.

edbeeching commented 1 year ago

The addon should be in addons/godot_rl_agents.

The library has now been updated to support Godot 4. This may be the cause of the errors. I am in the process of moving the plugin to a separate repo and I still need to update the docs. Note that there is a 3.5 branch, so you may wish to work with that version of the library, although it has less features and support.

Let me know if you need further assitance.

jruots commented 1 year ago

Thanks for the quick reply!

With the directory, I was looking for it in site packages in the python virtual env, which I then couldn't find. But I found the other github repo and downloaded the addon from there.

I downloaded Godot 4.10 now, but now my game of pong is very broken 😅 will need to try and fix that first before I can try whether the original issue went away with upgrading from 3.5.1 --> 4.10

jruots commented 1 year ago

So managed to verify that indeed activating the plugin works now after going to Godot 4.10. Will close this and open up any new issues as necessary. Cheers!