Posts: 372
Threads: 29
Joined: Mar 2011
Thanks: 1
Given 21 thank(s) in 18 post(s)
Hey Guys,
I downloaded the hungry game package,
Just to see how it works,
But i noticed, its hard to figure out what each plugin exactly does,
Without reading the forum, and i should even hope the plugin is on the forum.
Would it be possible to get a info file in place ?
Like info.json where you can set name,description,version,author,website
It should not be forced cause of backwards compatibility.
If i download a plugin i can just read the info.json.
The plugin itself should also get access to the information.
To be able to print the name . version in console etc.
For version just string btw, so people can apply b/beta a/alpha etc.
Hope its possible.
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
I've long been trying to coax plugin writers to include a more detailed description for each plugin - not only a list of commands with brief (read: "cryptic") descriptions.
I like the idea of having a description file, but personally would prefer a Lua format - we write plugins in Lua, so why not put the description to Lua, too, so that it can be somehow processed by the plugin itself. For example if the description contained detailed descriptions of the implemented commands, the plugin could then generate its own info page (just like STR's WorldEdit does using an external script)
Posts: 372
Threads: 29
Joined: Mar 2011
Thanks: 1
Given 21 thank(s) in 18 post(s)
Hey,
Even if its in lua i think that's just fine, see no problem with it.
And yeah even the commands do need a proper information.
But if we could have a lua file that contains or a file that gets generated, that contains a proper description of the plugin in general, not just the commands that would be awesome.
Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
12-29-2013, 07:00 AM
(This post was last modified: 12-29-2013, 07:01 AM by NiLSPACE.)
The plugin I use for WorldEdit generates both the Github README.md and the forum main post. I did upload the plugin if others want to see how I did it. http://puu.sh/60Dbg.zip
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
12-29-2013, 07:53 AM
(This post was last modified: 12-29-2013, 07:56 AM by xoft.)
STR, you could actually make it a part of WE, why not? Let it document itself; then you could include the detailed command descriptions or even as an in-game help for those commands (See how my Gallery plugin does just that for its subcommands: https://github.com/madmaxoft/Gallery/blo...s.lua#L593 )
I was pondering about having a repository for plugins - a web page that would store plugins with their descriptions, perhaps even comments from the users, and possibly even its own plugin that would allow MCS to check that webpage for updates. Somewhat like an "app store" for MCS plugins. But I'm no web developer, so it's out of my reach to make such a web; I could provide the hosting for the service, just like the windows nightbuilds.
Posts: 254
Threads: 16
Joined: Oct 2013
Thanks: 3
Given 20 thank(s) in 18 post(s)
Well, after the Component rewrite is complete, I'll be able to work on that website like you asked, Xoft, and we could just make that a part of it.
Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
12-29-2013, 08:44 AM
(This post was last modified: 12-29-2013, 08:45 AM by NiLSPACE.)
(12-29-2013, 07:53 AM)xoft Wrote: STR, you could actually make it a part of WE, why not? Let it document itself; then you could include the detailed command descriptions or even as an in-game help for those commands (See how my Gallery plugin does just that for its subcommands: https://github.com/madmaxoft/Gallery/blo...s.lua#L593 ) Intigrating into WE should be pretty easy.
About the command descriptions. Hmmm, I don't know.. My plugin works completely different then yours (or the APIDump). I use the cPluginManager::ForEachCommand function to document all the commands, and a table with some special cases (like commands without a permission string) that the plugin should edit. And I don't want to edit the command descriptions because I want to try to keep everything the same as the bukkit version.
As I asked here Could you make a list of commands where you think they need a better description? I could put them in the SpecialCases table. All the commands in there will override the default HelpString, Category, Permission.
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
I think it's easier to actually do things like I do - put all the commands in a table, with their handlers, permissions, help and anything else needed, and then use a simple for-loop to register the commands, another for-loop for printing the detailed help... Add another table around it, wrapping this into its Commands member, and adding a PluginDescription member, PluginName and PluginVersion, and you have exactly the info file that ThuGie wants:
g_PluginInfo =
{
Name = "MySuperPlugin",
Version = "0.1a",
Date = "2013_12_29",
Description = [[
This plugin is super, because it has a proper info file and everything!
]]
Commands =
{
Command1 = { ... },
Command2 = { ... },
},
}
Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
So something like this?
g_PluginInfo =
{
Name = "WorldEdit",
Version = "0.1",
Date = "29-12-2013",
Description = [[]],
Commands =
{
Descend = {Command = "/descend", Permission = "worldedit.navigation.descend", Handler = HandleDescendCommand, HelpString = " go down a floor", Alias = "/desc" },
Ascend = {Command = "/ascend", Permission = "worldedit.navigation.ascend", Handler = HandleAscendCommand, HelpString = " go down a floor", Alias = "/asc"}
},
}
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
Yes. However, I think we should use the YYYY_MM_DD format for date so that it sorts naturally as a string. Also the command definitions are quite long, they should be split onto separate lines, and a detailed help for each command should be provided. On the other hand, you don't need the "Command = "/descend" part, because that is already contained in the dictionary key ("descend =")
|