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

Implement better support for filterscripts #55

Open
Southclaws opened this issue Dec 11, 2017 · 14 comments
Open

Implement better support for filterscripts #55

Southclaws opened this issue Dec 11, 2017 · 14 comments
Milestone

Comments

@Southclaws
Copy link
Owner

Southclaws commented Dec 11, 2017

I'm thinking this can pull the FS as a normal dependency to <server root>/dependencies/ then build it as a package with the output being <server root>/filterscripts/<name>.amx while switching out the filterscripts entry in memory before generating the server.cfg (same as plugin binaries using depstrings).

I'd like some input from the community now that sampctl is spreading more. How would you prefer filterscripts are handled? What commands and functionality would you find useful?

@Southclaws Southclaws changed the title Filterscript support Implement support for ensuring filterscripts as part of a server configuration Dec 11, 2017
@Southclaws Southclaws added this to the 1.7 milestone Feb 4, 2018
@Southclaws Southclaws modified the milestones: 1.7, 1.8 Feb 6, 2018
@Southclaws Southclaws changed the title Implement support for ensuring filterscripts as part of a server configuration Implement better support for filterscripts Mar 26, 2018
@Southclaws
Copy link
Owner Author

Someone mentioned y_master and integration with this, that could be done too...

@Y-Less
Copy link
Contributor

Y-Less commented Mar 26, 2018

Someone

Who do you think that was? :D

@Southclaws
Copy link
Owner Author

Not sure, I think their name has a Y in it though...

@Southclaws
Copy link
Owner Author

Southclaws commented May 31, 2018

From some discussion today:

It would make sense to group Filterscripts into "dependencies" along with how plugins have been with #165. This would make Filterscripts into just another thing you depend on which would be downloaded to the dependencies directory along with all the Filterscript's dependencies.

The only question is, how to signal to sampctl that a specific dependency is a filterscript? I was thinking of an fs: prefix but that seems a bit too "special case" as it would be the only usage of that syntax currently.

Another issue is that there may be packages that are both Filterscripts and libraries - I want to do that with my object-loader project so people can use it as a filterscript or use the API in their gamemodes for more advanced use-cases. So this kind of rules out a true/false flag that authors can add to pawn.json.

Another possible way I've just thought of is introduce the idea of "flags" to dependency strings. Similar to the fs: prefix, but actually a space-delimited list of tokens after the dependency string:

"dependencies": [
  "Southclaws/samp-object-loader:^1.2.3 filterscript"
]

Spaces are invalid in the dependency string format anyway so splitting on them would be easy and not breaking in any way.

@Misiur
Copy link

Misiur commented Apr 9, 2020

Is this implemented yet?

@Misiur
Copy link

Misiur commented Apr 9, 2020

Also would this support local dependencies for dev build?

@Southclaws
Copy link
Owner Author

No this isn't implemented yet.

@n0bodysec
Copy link

Maybe sampctl p buildfs <fsname/all> with a custom pawn.json inside filterscripts folder.

It should be something like this:

"dependencies": {
	"fs-1": [
		"author/repository1",
		"author/repository2"
	],
	"fs-2": [
		"author2/repository1",
		"author2/repository2"
	],
}

Another way is supporting "custom crafted comments" inside filterscripts (something like clang-format comments), so you get rid of pawn.json file.

/* sampctl-dependencies:
	"author/repository1"
	"author/repository2"
*/

Currently I'm using a custom Python script to compile the filterscripts.
Here's the code if annyone is interested: https://gist.github.com/n0bodysec/30b1158b72f482ecbf087b19b29febb7

@ADRFranklin
Copy link
Collaborator

I already have a plan for how I am going to implement filterscripts and it's nothing like this. I am planning to add it to the build section of the pawn config file.

As for remote repositories, I also have a plan for that. I plan to start working on this over the next week or two.

@Y-Less
Copy link
Contributor

Y-Less commented Apr 12, 2020

I am going to implement filterscripts

I don't believe you.

But if you ever get to this and prove me wrong, could you look at #327 at the same time please?

@ADRFranklin
Copy link
Collaborator

ADRFranklin commented Apr 12, 2020

it's already part of the changes I planned to make.

@Southclaws
Copy link
Owner Author

The focus is essentially to drop the idea of "gamemodes" and "filterscripts" entirely and just have "scripts" - which can be in (and output to) any arbitrary directory.

@Misiur
Copy link

Misiur commented Apr 13, 2020

That's amazing, where I can read the discussion about it?

@Southclaws
Copy link
Owner Author

Unfortunately, it's buried in the Discord...

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

5 participants