Sponge Scripting Language Syntax?

Continuing the discussion from I think Sponge needs a scripting language:

If Sponge will have an innate scripting language or a plugin that implements something of the type, what should the syntax be like? I am interested to see if the newly formed Sponge community, along with former members of the Denizen and Skript communities, can come up with a solution that is unanimously accepted by a majority of the three. This might be impossible to achieve, but I believe that it will at least help scripting languages for Sponge advance in the right direction.

EDIT: Be sure to include examples of syntax so there is some evidence to support your opinion.

I think you’re going to get a lot of different answers because there is no single one. That should be clear from the whole Skript v. Denizen thing.

For me, I think mostly any usual language would be great as long as it’s not Lisp and it doesn’t simply just give you low-level access and send you on your way (e.g. just lets you register events equivalent to the server API’s). The big appealing thing from Skript (to me) is that it lets you filter events based on the event e.g. when you walk on X block or when you place X block.

Scripting isn’t just about not having to compile. Being able to listen for events without having to run in circles (check if it’s X player, check if they’re an admin, check if they’re using X block…) is one of the most important things IMO. If the script engine allows that it’s likely great in my books :smiley:

1 Like

Good points, I agree with you 100% :smile:.

The first point caught me off guard a little bit because I hadn’t noticed that it actually saves you time. I am perplexed at how I missed that.

along with former members of the Denizen and Skript communities current members*, Denizen is still running strong.

And the general agreement from the other thread was that no, Sponge has no need for a built-in language, so this thread…???

1 Like

I planned for this comment :smile:.

Oh. In that case. DENIZEN SYNTAX MASTER SYNTAX

flips a variety of tables and runs away

I mean, uhm.

Both Denizen and Skript will be ported to Sponge, and that’s an awesome thing: Users will get to pick which scripting language they like better on an individual basis and use their favorite : D

I don’t see a need for a whole new scripting language project.

1 Like

Agreed. The biggest thing a scripting API needs, is user-friendly event-based hooks and triggers.
If someone looking to use a scripting plugin was interested in using a low level API, wouldn’t they just use the actual Sponge API?

I think the end goal should be the creation of a system analogous to IFTTT. The server owner has an expressed interest in being able to implement and respond to various event triggers on their server, and what they’re really interested in is being able to plug input into output.

I’m in the “syntax isn’t important” camp. You could probably go farther to say, I’m in the “you should be able to write scripts for your server in whatever language you want” camp.

I’m most interested in seeing a plugin that can compile SpongeAPI Java using a different input language, like (Java|Coffee)Script, Python, PHP, or any other language a Minecraft enthusiast might already be familiar and or comfortable with, or even possibly a graphic command stack builder (think Tynker, LabVIEW, or Lego Mindstorms).

1 Like

Haha :laughing:.

I see your point.

So, what you’re suggesting could be considered a visual programming language that requires no syntax whatsoever?

That is a very interesting idea…

It could be an application in which the user is prompted to sort of “connect the dots” in order to produce a plugin that serves their purpose.

I like it :wink:.

I used Lego Mindstorms robots in university. We used the visual IDE not python for what we were doing. The visual IDE was kinda fun… until one of my programs got way too big and the IDE became nearly unusable. I think they replaced those robots with ones that use Lua, but I haven’t checked them out yet.

It’d be pretty interesting to see a visual IDE for MC scripts that spits out runtime code for an already existing plugin, e.g. Skript.

2 Likes

Excuse me for being, what’s the word I’m looking for, new (?) to this idea but what’s the purpose of a Scripting language? Why not just make a plugin? Can someone please elaborate on what separates the two.

1 Like

A script is quick and easy to write compared to Java, a script can be loaded and unloaded without so much as a /reload slowing the server down, generally scripts have things like delays (EG, Denizen’s WAIT command) which are very difficult to accomplish in Java but made super simple in the script (again going back to quick and easy). A script is also generally understandable by anyone who reads it over, whereas Java takes some experience in the language before you can so much as read it. Thus, anyone can understand and modify the code running their server, which isn’t so easy with plugins. (Which, among other limitations, are often closed source and when not tend to have over complicated compile methods, while scripts are just blocks of code you drop as a text document in a folder).

4 Likes

I have to say, that quite possibly the biggest thing vanilla is missing right now, is the ability to set a single command block to execute a multi-line script (a chain of commands), whether typed into the CB interface, or loaded from a file.
Some of the new block and entity references, title commands, scoreboard commands, and pseudo-world-edit functionality that came out in 1.8 would allow for pretty damn extensive feature building, without any mods or plugins. All it needs is the ability to load those scripts.

The server that I run for my family, actually includes basic land claim, public banking, warp gates, and mob protection, all in vanilla.

2 Likes

As someone who has been involved with the Garry’s mod community for 4-5 years. I can speak to the benefits of scripting. With LUA I can make changes to a scripted plugin on the fly and see the results right away without any restarts.

Granted LUA isn’t the easiest script in the world but it’s functionality is astounding. I would love to see a shift from mods coded natively in java to pure scripting. I simply can’t ever find a plugin that works exactly how I want in MC.

1 Like

@kuro_chou Interesting. Another good idea :smile:.

@singularity I see where your coming from. Live results would be a great feature in a scripting plugin/language.

It looks like there’s actually already a gui-based mod program: http://www.learntomod.com/

1 Like

Very interesting, I wonder if this is purely for their specific servers or if it can compile into a standalone mod.

EDIT:
From the looks of things, it probably isn’t able to compile but rather is solely a tool for learning.

I would suggest that they turn it into a tool to possibly gain more support for the project.

Still, very cool. :smile:

From the site:

Private Server
Test your mods on a private server. Invite friends to play too. You control everything about your server: The weather, the time of day, who’s banned and who’s not. You can install texture packs. And, of course, you can mod it with mods you’ve written

It sounds like rather than compiling mods compatible with any particular API or implementation, they’ve written their own API and implementation that the IDE is compatible with.

I see. I read that as well but didn’t take it in the same way as you did.

Once again, thanks for the thoughtful feedback :wink:.

What about Java? Also, #necro…