Skript - or something extremely similar to it


#1

I’d like to speak with highly motivated plugin developers about having a replacement for Bukkit’s Skript made for Sponge.

I know scripting plugins already exist for Sponge, in the forms of Denzien2Sponge, DirectScript, SimpleScript, etc etc, and I have explored the use of all those plugins and would still prefer a Skript over them.

The plugin would have to be able to read Skript’s .sk files, in the same syntax (negotiable).

I understand a plugin of this magnitude would not exactly be what I would call cheap, but I also would like to put a $1,000 USD max price on it.

The plugin would need to be able to function just like Skript, in the sense that everything Skript can do (without it’s add-ons), this plugin will have to be able to do as well.

Also, because of the max price I’m putting for the plugin, I would like the project to be a private project. It’s been like three years and no one has made or been paid to make a Skript on Sponge yet, so sorry for that, but I’m not paying out $1,000 for other people’s convenience.

I may have other potential server owners interested in splitting the cost of the phone with me, so pay would be determined once I get a definite answer from them. It would either be half upfront, half before sending (if it’s just me paying for it), or split into 1/3s, or 1/4s…it really just depends on how many people I can have jump on board for this project.

Also, if I get a lot of people willing to split the price of the plugin with me, the max price limit is subject to increase, just due to sheer demand of the plugin.

All in all, this plugin would be a great investment for me and other server owners who used Skript, as well as a great way for a developer (or a team of developers) to make some decent cash.


#2

Please use this forum for commissioning work. This one is more for non-paid requests.

https://forums.spongepowered.org/c/server-discussion/devs-wanted

Be sure to read the pinned post.


#3

Ah, my apologies. Is there a way to “hot potato” it over there or would I have to retype my book? XD


#4

It is easy to move a topic to a new category! Just edit your main topic post with the pencil icon, then right next to where you can change the title is a dropdown menu that lets you change your category.


#5

I moved it.

Carry on.

:slight_smile:


#6

Thanks! Sorry again about that. XD


#7

So just as an FYI, I believe Skript is under GPL License, which (I think) means that any forks of it must be made open source (under the same license), upon redistribution. I don’t know if what you want is a fork of the existing Skript, or a whole different system, that just supports Skript files, but it may be something to research.
I also believe that you can’t even use their file format with the GPL License, because it falls under copyright law (it’s considered an API, google the Oracle <-> Google lawsuit).

https://tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3)

If you don’t mind using a totally different system, including no support for old files, it would be fairly trivial to make something that has similar functionality to Skript, except with a new codebase. If this is the case, I might be interested in working with you to create this plugin.


#8

Would you be able to make it work in the same way? As in:

on walking on green stained clay:
message "You walked on green clay!"
stop

On right click on an iron door:
If player is holding an arrow:
Execute console command "/op %player%"
Stop

Command /customcommand:
Trigger:
If player is op:
Teleport the player to location (1, 2, 3)
Stop
Else:
Message "You’re not an opped player!"
Stop

(These three example basically show the three main key parts of Skript we actually used, in terms of the ‘on walking on’ trigger, the ‘on right click’ trigger, and being able to make custom commands. It can get more complicated when working with variables and all that stuff)

Basically, I’m looking for a replacement for Skript that will keep the same format (shown above) so we don’t have to rewrite all 63 of our Skript files. If I have to do something as minor as changing the extension from .sk to something else so it doesn’t fall under the copyright, I’m perfectly fine with that.


#9

(Disclaimer: I am not a lawyer, just a developer with limited legal knowledge and a generous amount of caution)

Unfortunately changing the file extension is probably not enough.

API copyright, and most copyright, as i understand it, can be gauged as such:

“Is the material in question clearly recognizable and attributable to its creator?”

It appears to me that you can look at the contents of a skript file and clearly see that it is a skript file and not a file for any other scripting engine. I believe this is sufficient to make the file format copyrightable, which means, unless the skript project explicitly says so, the file format also falls under the GPL license.

Of course, I am not a lawyer, and I might be completely off base, but this is sufficiently complicated that i think most developers should tread carefully.


#10

Now… A way around this would potentially to make a converter that converts the GPL licensed format to a new format, which is use by a new plug-in. This converter could be released under GPL too. This would prevent you from having to rewrite all your script files… Maybe just a few if it fails to convert some. I am not saying this is a GOOD option, just that it exists.


#11

After much thought, I would be more willing for a rewrite of the syntax, to get around any and all legal issues. I’ll draw up a rough draft of the syntax when I get home later.


#12

Hi, I’m also not a lawyer.

However, I don’t think the GPL forces you to make all modifications public. If someone chooses to distribute GPL software, they’re required to provide the source code if it’s asked for. Whoever it was distributed to is free to further distribute the software to anyone they please. If you pay someone to port Skript to Sponge and they give you a plugin jar, they would also have to give you the source code if you ask for it. However, neither of you would be forced to share the modified plugin with anyone else.

However, I think you should at least consider making it public. As you may have noticed, Skript itself is public. You don’t want to pay $1,000 for “other people’s convenience”? Well, by that logic, the Skript developers shouldn’t have released their plugin for your convenience. Without a community effort, there wouldn’t be such a great mod ecosystem. Can you imagine if you had to pay to create Sponge, every plugin, and every mod you use from scratch?


#13

Skript developers made Skript to make Skript. I need Skript to continue using Skript, so I would be willing to pay for it. :stuck_out_tongue:


#14

I would be looking for something like this. Its different then Skript’s syntax just enough to be able to be declared a different plugin, while still staying simple enough to be as user-friendly as I want it.

(EDIT: I also put in all the examples of what I would actually be using this plugin - as well as what I used to be using Skript for, as I was only using these like three things in the plugin - so whoever might be interested in creating this for me can see exactly what all I need the plugin to be able to do)


#15

Well if my schedule (and life) clears up, I’d be willing to work on it. I have some other projects that take priority right now though.


#16

Looking at that, I’m wondering whether there’s really any benefit to a custom language.

I’m thinking a DSL (Domain Specific Language) may be a more versatile approach.

The example you posted looks similar to Python, also Scala is quite nice for DSLs

e.g.

intname = 0

class Triggers:

    def on_player_walk(player):

        if player.standing_on == green_stained_clay:

            if player.location == (1, 2, 3):
                run_as(console)("/gamemode creative " + player.name)
                player.send_message("Your gamemode was changed to creative mode!")

            elif player.location.distanceTo(4, 5, 6) <= 5:
                intname = 3

            else:
                server.broadcast(player.name + " stepped on a block")
                

or in Scala


var intname = 0
var randNum = 0

Triggers.playerWalk { player =>

    if (player.standingOn == green_stained_clay) {

        if (player.location == (1, 2, 3)) {
            (run as console)(s"/gamemode creative ${player.name}")
            player.sendMessage("Your gamemode was changed to creative mode!")
        } else if (player.location.distanceTo (4, 5, 6) <= 5) {
            intname = 3
        } else {
            server.broadcast(s"${player.name} stepped on a block!")
        }
    
    } else if (player.standingOn == stone) {
    
        if (intname == 3) {
            (run as privileged(player) )("/custom-command-name")
        }

    }

}

Triggers.playerInteract { (player, thing) =>

    thing match {
    
        case Block(type, location) =>
            if (type == iron_door) {
                randNum = random(0 to 5)
                
                if (randNum == 1) {
                    player.sendMessage("Random number = 1!")
                } else if (randNum == 2) {
                    player.sendMessage("Random number = 2!")
                } else {
                    player.sendMessage("Randon number is neither 1 nor 2!")
                }
                
            }
    }

}

Commands.define("custom-command-name")
        .permission("custom.command")
        .run { source =>
            source match {
                case player: Player =>
                    player.location = (7, 8, 9)
            }
        }

There’s plenty of other languages too (e.g. lua). It seems to me a waste of effort designing a language (note: language design is hard) when there’s many good ones available.


#17

Both of those examples seem rather simple. There’s always one or two things I forget to mention when talking about what I used to use Skript for, so hopefully those two languages you provided have their versions of them as well.

I need to be able to:
Define variables

Set values to those variables at any time in the file

Use a variable defined in File A in a line of code in File B

Use those variables to auto-import their values into either commands or messages

Be able to make and use list variables (in Skript, this would be written as “add player to {player.list::*}”)

Set locations to variables (set {home.location} to the player’s location)

Have server-wide variables (set {server.variable} to false) as well as player-specific variables (set {player.variable::%player%} to false)

Use RNGs to determine different outcomes of an event being triggered

Cancel events (which was one of those things I forgot to mention in the previous example) such as cancelling a wooden door from opening when a player right clicks on it

Make custom commands

Execute commands (both pre-existing and custom made) in the coding

Have conditions (such as ‘if player has permission’, 'if player is holding a|an ’

Loops (can be an icky Java do-while loop if it has to be)

Be able to check for players in a specified radius of a specified location ("loop all entities in radius 5 around location (1, 2, 3): if loop-entity is a player: …)

Be able to rename existing items, cancel their action if they have one when left or right clicked while the player is holding them (cancel placing a torch, for example) and give them a new function (such as using this torch specifically for only as a single-use item that would “light the fuse on a cannon”) and have the server know the difference between a normal torch and this new, renamed torch based on the name (for a better example: on right click: if player is holding a torch named “cannon lighter”: cancel event, remove 1 torch named “cannon lighter” from the player, else: stop)

Teleport the player, or other entities, to either a specified location or a variable being used to hold the place of a location (teleport the player to location (1, 2, 3)) and (teleport the player to {home.location})

Be able to set a delay (in ticks or seconds) between multiple messages being sent to the player (message “Hi!” to the player, wait 30 ticks, message “How are you?” to the player)

Spawn entities, sometimes with custom names, as well as setting that spawned entity to a variable (spawn a villager at location (1, 2, 3), set {villager.spawned} to the last spawned entity, set the last spawned entity’s display name to “Custom Name”)

Be able to kill spawned entities by specifying the variable name set with the entity when it is spawned (kill {villager.spawned})

Be able to add, remove, disable, enable, and reload scripting files while the server is online, without requiring a server restart for changes to take effect, that would be awesome

I believe this is everything I used to use Skript for. Let it go on record now that should I forget to mention anything that is not included in this reply, then it is my own fault. Anyhoo, if there’s an existing language (not Java, I hate Java) that can do all these things inside of a scripting plugin so I can use it to replace Skript, that would be pretty sweet.

Sorry for the 2,500 character reply. XD I am known for long replies.


#18

^ I can provide an example of any of those things above privately, upon request, if necessary. I would protect my server’s old Skript files with my life, so posting screenshots of them here certainly isn’t gonna happen. XD


#19

You might want to take a look at Kotlin, Scala, or Groovy. They all run on the JVM, which makes them work really well with Minecraft, and Kotlin & Groovy at the least have very simple syntaxs (maybe Scala too, haven’t used it much).

I happen to love making my own programming languages so my opinion might be a little biased.


#20

Your use-cases seem to be rather complex for a simple script. You might be better of really making a plugin(and choosing you favorite JVM language).