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

Modifying Godots Plugin system #1124

Closed
IoneGod opened this issue Jun 26, 2020 · 16 comments
Closed

Modifying Godots Plugin system #1124

IoneGod opened this issue Jun 26, 2020 · 16 comments

Comments

@IoneGod
Copy link

IoneGod commented Jun 26, 2020

Describe the project you are working on:
Plugin system

Describe the problem or limitation you are having in your project:
Trying to configure a plugin for Godot.
Currently I want the plugin to be downloadable directly inside Godot without having to go to a browser and also I want plugins to have an ability to specify where they want their different files to be in the project

Describe the feature / enhancement and how it helps to overcome the problem or limitation:

  1. First I suggest creating a new Godot plugins repository like in flutter where users just go and pick a plugin they need. As of now the plugin tab in the project settings is somewhat dry it should have the ability to download plugins from that repository like as the Godot asset store and configure it to your project as needed. To that I suggest upgrading the plugin system

  2. The configuration should be made possible by the cfg file in the .cfg file , the plugin maker should specify things like where they want there files to be to be not just author , name etc. Take for example the godot-admob-plugin
    Something like:

Example

author_name script_name e.t.c 
place_folder: 'admob_plugin' : 'res://android/'
place_folder : 'admob_lib' : 'res://'
'''

So the above snippet just tells Godot to place the folder admob_lib in the res// folder of the current project and place the other folder in the android directory

  1. Gdscript should have access to modify edit plugins using %[tag =x ] symbols. This symbol should be placed for easy modification

Example

Still using the android admob plugin as an example:
In the Android manifest.conf file there is a space that you have Edit outside Godot which is kinda going out of the Godot opening the android file entering the plugin and then changing the value but we could make It editable from inside gdscript like
In the AndroidManifest.conf we could add a %[tag = 'App_iD'] in the given space to edit

edit_file(file_dir: "androidmanifest.conf' , tag_name: 'App_id' , replace_with: 'ca-app-pub abc' )
'''

So that on compile it changes the tag values to the given values

  1. The plugin directory:

In real sense Godot users should not have to download plugins they used over and over again if the Plugin is not updated so making a folder in Godots mains like the temp folder for Windows to save plugins in should be good

Ending Note:

To capture all I have said there will be a new plugin format

The Plugin will have a new format:

Plugin↓

→plugin.cfg
→src↓
        →the addon itself

### I will be giving my full support to Godot on this

Anyway all these is just to make the Plugin system more flexible and easy to use

If you have reasons why you think this should not be implemented in Godot let's discuss @Calinou

Note : Ideas have been generated from flutter

I am totally open for suggestions and comments

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
All information above

If this enhancement will not be used often, can it be worked around with a few lines of script?:
No

Is there a reason why this should be core and not an add-on in the asset library?:

We are talking about modifications to plugins so it has to be core

@I7SOD
Copy link

I7SOD commented Jun 26, 2020

I am a noob coming from unity so I obviously love this idea @AndroidGod101 except the part of the edit_file I don't think it's necessary and it also has a hard work around . Your idea is poorly laid out also because there is still much to expect from this enhancement

@IoneGod
Copy link
Author

IoneGod commented Jun 26, 2020

I am a noob coming from unity so I obviously love this idea @AndroidGod101 except the part of the edit_file I don't think it's necessary and it also has a hard work around . Your idea is poorly laid out also because there is still much to expect from this enhancement

What else to expect @I7SOD

@I7SOD
Copy link

I7SOD commented Jun 26, 2020

@AndroidGod101 you haven't fully explained how the proposal will work at least it makes some sense up till now and also flutter has a pubsec.yaml file that makes the whole work flow easy and a packages directory at the end to add all plugins

@Calinou
Copy link
Member

Calinou commented Jun 26, 2020

First I suggest creating a new Godot plugins repository like in flutter where users just go and pick a plugin they need.

It already exists 🙂

PS: Please don't mention me in issues or comments when it doesn't require immediate attention. (Feature proposals can wait, by design. 😛)

@IoneGod
Copy link
Author

IoneGod commented Jun 26, 2020

Oh sorry

@IoneGod
Copy link
Author

IoneGod commented Jun 26, 2020

Yeah I mentioned the asset store yeah that's actually good enough for this proposal. So I was thinking of downloading plugins directly from there and in Godot 4.0 configuring it to game and being able to edit plugin files like the android manifest file from inside Godot itself

@IoneGod
Copy link
Author

IoneGod commented Jun 26, 2020

I have been seeing a lot of confusion emojis please what should I clear out

@Jummit
Copy link

Jummit commented Jun 27, 2020

First I suggest creating a new Godot plugins repository like in flutter where users just go and pick a plugin they need.

I'm against creating a new repo, I think the asset library should be improved instead of creating a new solution.

The configuration should be made possible by the cfg file in the .cfg file

That already exists.

the plugin maker should specify things like where they want there files to be to be not just author , name etc.

I think there is nothing wrong with putting all plugins in the /addons folder. It's consistent. If plugins can be installed at arbitrary locations, the user that installs the plugin should choose that.

Gdscript should have access to modify edit plugins using %[tag =x ] symbols. This symbol should be placed for easy modification

I think that is already possible, using ConfigFile

In the end, your problem

... I want the plugin to be downloadable directly inside Godot ... and I want plugins to have an ability to specify where they want their different files to be

could be easily solved by making the download folder configurable when downloading from the asset library.

@I7SOD
Copy link

I7SOD commented Jun 27, 2020

I am a beginner and I also find it that the plugin system is not as user friendly as that in unity using a plugin in unity is easier you just had to download it and it would be configured to your project

@YuriSizov
Copy link
Contributor

I have been seeing a lot of confusion emojis please what should I clear out

I am still not sure if you are talking about Godot plugin system or Android-specific plugin system within Godot. Because there is the asset library that covers parts of your proposal if we are talking about Godot plugins (listing, downloading from within the editor; choosing how to install, if not where to install files). And you are aware of that. But then you talk about editing some Android specific files.

So I think everyone is confused about what this proposal actually touches on, maybe including yourself 🙂

@IoneGod
Copy link
Author

IoneGod commented Jun 27, 2020

I think I found a way to fix some problems

@IoneGod IoneGod closed this as completed Jun 27, 2020
@bojidar-bg
Copy link

(started writing this comment earlier, going to post it regardless of the fact that the issue is closed, in case it clears up stuff)

Actually, things downloaded from the asset library are .zip files which are extracted at the root of the project. This means that they do not have to be scoped to the addons folder only, they are fully free to add files in other locations as well.

It might still be a nice addition to allow moving the files/folders in the dialog which pops up after downloading the asset, in addition to the existing ability to remove some of them.

In real sense Godot users should not have to download plugins they used over and over again if the Plugin is not updated so making a folder in Godots mains like the temp folder for Windows to save plugins in should be good

This is indeed not implemented yet. Caching of images is implement though, and I suppose that caching .zip files would not be much different.

Plugin↓
        →plugin.cfg
        →src↓
                →the addon itself

Well, due to the way we are using .zip files for plugins, the plugin structure is currently like this:

  • Repository/archive root
    • addons
      • «my addon name»
        • plugin.cfg
        • «other plugin files…»
    • «other folders and files, potentially including examples…»

That way, there is no need for the plugin.cfg file to explain what folder goes where; it mostly exists to describe an EditorPlugin-derived script for the engine to run.

edit_file(file_dir: "androidmanifest.conf' , tag_name: 'App_id' , replace_with: 'ca-app-pub abc' )
'''

Something related to this was implemented as part of godotengine/godot#18865, but I cannot remember what it was exactly. In any case, Godot projects rarely have files in set locations that have to be edited by a plugin, and even when there are, those can be edited by a script (either as part of a custom import workflow, as startup work done by an editor plugin, or a custom export script). Also, note that the project.godot file can already be merged from installed assets.

@IoneGod IoneGod reopened this Jun 27, 2020
@IoneGod
Copy link
Author

IoneGod commented Jun 27, 2020

Reopened on the note of @bojidar-bg

@IoneGod
Copy link
Author

IoneGod commented Jun 27, 2020

I think I understand your point @bojidar-bg

@bojidar-bg
Copy link

I'm not sure if I was making a point, I just tried to link previous discussions and explain what is already working as part of the asset library, in order to bring this proposal closer to what Godot currently is.

Would be nice if you can summarize what changes should be done so that the existing asset library can function the way you need, in order to make the proposal more concrete. 😃

@aaronfranke
Copy link
Member

Duplicate of #554

@aaronfranke aaronfranke marked this as a duplicate of #554 Jun 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants