I think Sponge needs a scripting language

Honestly, when I first looked into scripting tools for bukkit, the first I used was DenizenScript. It was ok and I used it for about 2 months on my server. Once I found out about Skript, I switched over to that and Im glad I did. I had server that only ran off of skript. The players were happy because I was getting more and better content on the server quicker. Denizenscipt is good, but when you compare it to Skript, it’s nowhere near that.

3 Likes

@pm_dragon When was this? Denizen was pretty weak for a while (it was originally just for NPCs), we only recently upgraded to a full scripting engine.

I really really doubt you’d make the same change if you were using modern Denizen at the time.

However I have never used Denizen I can say Skript is very easy to use. I personally use Skript because of the community behind it, It’s something everyone can understand even if they have no prior knowledge to programming. While I’ve never used Denizen I can say Skript is very good for beginners. It can suit a long time server owner needing to make a new gamemode for their server but it can also suit someone who’s brand new to running a server and need a simple message script. In the past I used Variable Triggers until it wasn’t updated for a new updated, after that I switched to Skript and have never looked back, it’s a really great tool that shouldn’t be underrated.

1 Like

EDIT: It quoted the wrong post -.-’

//Start Rant

I’m sorry, but I don’t believe a word you said. I’d say @pm_dragon would EASILY change over still. Denizen script has little to no Bukkit API support, let alone any proper syntaxs. Skript’s community is vast, with many people creating addons for it to add to the experience, I alone have created three different ones for it - My latest GattSk, giving users majority of complete control over Bukkit’s Scoreboards and World Manager. I’ve tried DenizenScript and it’s horrid compared to Skript. There’s little to no support, and when trying to find user-made content, the latest that I could find was from 7 - 10 months ago. Skript is easily one of the best user-friendly pseudo programming languages, I’d even go as far to say it’s a proper programming language, due to the amount of support for it. But your idea is yours, but saying you’d doubt that someone would make the same change isn’t true, especially if you haven’t tried Skript before, with all of it’s addons (which mind you, there’s a lot of).

//End Rant.

@mcmonkey I’ve been using Skript for 1-2 years now, never touched Denizen. That command in Denizen is so hard to look at and completely turns me off from ever using Denizen. It looks like a yml file. Skript has an awesome community and can do pretty much anything, and if there’s something that can’t be done, someone from the community just adds it to an addon.

@Funnygatt @Mitch
Sigh Denizen users love Denizen, Skript users love Skript. I’m not going to argue the point any longer.

But saying either language is bad is just false. Skript is powerful thanks to it’s strong userbase and addons, Denizen is powerful from its strong core functionality and active friendly core development team. Each has its strengths and weaknesses.

Saying Denizen doesn’t support most of the Bukkit API is just admitting you haven’t tried modern Denizen. We support 99% of the Bukkit API and tons of internal CB functionality, as well as all sorts of external things - from interacting with outside plugins directly to creating your own IRCBot, you can do just about whatever you need in Denizen - and if you can’t, just tell a developer, and it will be added very quickly.

The syntax is purely subjective. I along with all Denizen users find Denizen’s syntax clean and appealing, and Skript’s not so much. Skript users, obviously, feel different. There’s no factual basis for saying either syntax is superior.

Now let’s all shut up and be happy that everyone will be able to choose from a variety of languages when working in Sponge.

1 Like

I will happily agree with that.

1 Like

So if you say

How can you also say

?

2 Likes

That is the difference between stating an opinion and fact. The fact is that the difference is subjective, his opinion is obviously that Skript is not a very good language. Either way sponge is purely for the purpose of enabling developers to interact with the server itself, this server is coded in java. Lets face it, putting in a good scripting system into sponge will most definitely bloat it to some extent, it will also put the responsibility of updating this function upon the Sponge dev team, taking time away from other things. I really don’t care if one of the developers has “suggested” that this feature might eventually be implemented I will stand by my opinion that a scripting language is non-essential for sponge and thus should not be included.

Also, what scripting languages will be implemented? There will only be one language implemented into the final implementation. There will be countless arguments and debates over whether a brand new system be developed for sponge (reference http://xkcd.com/927/) or whether an existing system will be implemented which will undoubtedly piss off one side of the scripting community just stirring up dissent. An open source ideal is many specialized parts working together to do one big thing. All in all I think it is our best bet to keep scripting outsourced to 3rd party developers, this will keep everyone happy.

3 Likes

@MostFunGuy My opinion vs. cold fact. I originally stated my opinion, which is a negative view of Skript. I later stated the hard facts as a way to end the pointless argument. The facts are it’s not as bad as my opinion shows it to be. I realize this is self-inconsistent but it’s just how facts and opinions work.
EDIT: Didn’t see that Robodude explained it.

Lua would be a perfect choice. It’s clear and easy.

2 Likes

I do also think that a scripting language would be fun within Sponge.

Obviously, we wouldn’t embed it into Sponge as that would be a whole different element to it.

I took a look at Skript and Denizen… and in all honestly they don’t look like viable or easy to use scripting languages like Python, PHP, etc.

I’ve written scripting languages before, have done for about two years, as well as starting one at my workplace and generally I have a nice idea for a scripting language inside of Sponge.

It would be a plugin, there is no choice about it - IMO.

Off the top of my head, it would work and look a little something like this:

playerJoinEvent(Player) {
    Player.sendMessage("Welcome to the server.");
}
playerLeaveEvent(Player) {
   Server.broadcastMessage(Player.getName() + " has left the server").
}

I know of ways we could incorporate actual Player class (or Sponge’s equivalent) methods/functions into the language without much trouble… so other methods like setHealth, getHealth, etc would work within the language as well.

I might start working on this as a plugin for Sponge myself eventually, so it will be open source,

^ That looks more like Java than a scripting language…

Are you being serious or?..

Source can look like anything and be a scripting language.

The idea of a scripting language is for it to be interpreted, and not compiled… not matter what the source code looks like.

Are you being serious? Nobody ever implied that it should be compiled. And it does look a lot like Java. (Also, if you’re gonna do that, you might aswell just use the JavaScript engine and save yourself some time ;))

It was implied as the title says ‘scripting language’…

And I didn’t say that wasn’t the case.

Was your answer to this:

And what I wass saying is that the above didn’t state that it should be compiled, but merely made a comment about a similarity in source.

And what you just said, is in no way an answer to my statement from before. It just states some fact, that has barely anything to do with what I said.

Personally, I think they should include scripting support. Not only for coding simple/complex plugins, but to run simple task like what Cron does. There are some pretty low level scripting languages out there that are not too complicated to learn. My personal recommendation would be Perl. Here’s why:

  1. It’s based on a module system, and there’s endless modules you can use to achieve whatever you’re trying to do.
  2. If done correctly, it’s pretty lightweight like C & C++.
  3. The syntax is very close to Java, C, & C++.
  4. Perl is not hard to learn if you have a general understanding of programming/scripting. The learning curve is pretty steep at first, but that’s due to there being so many ways to accomplish one thing and there might not really be a “right” answer for which one to use.

Hope this helps! (:

I’m not gonna lie, I tuned out after Perl.

I’m most interested in using something that I already understand as a web developer, namely JavaScript, Python, or PHP.

That said, I did successfully write a script in straight Bash this last weekend, using screen to stuff commands.
The major caveat to this approach is that it depends on the presence of viable commands for every action you want to take on the server, and some way to listen to events in game.
If you’ve got access to enough functionality through the MC server terminal, as was my case, this is a very usable workaround.

My only contention about any of what you just said, is against any limiting verbiage regarding Sponge.

Yes, I’m running Spigot right now, because I was able to copy over all of my Bukkit setup, with relatively little conflict.
That’s a stopgap. I’ve already had to cut out plugins that I previously used, due to them being incompatible with 1.8, and not being updated by their developers.

Bukkit sank. I expect that any “massive” benefit to having native access to its plugin repository will be moot and null within the year. Sponge may still be the future, for the simple fact that most of my favorite developers are onboard already, and are more likely to go forward with a future proof option, than to keep mucking around in a broken project.

All that being said, I’m still very +1 for scripting.
I’m looking to learn C#/Java this year anyway, but I’ve spent 15 years as a functional programmer, writing procedural if-then flows. OOP is a totally new field for me, and until I’m able to dedicate some time to understanding its generic architectural conventions, I’d rather not have it be an obstacle to creating fun features for my friends and family.

Creating spells for example, really should be as simple as

if (player.sentCommand.name =  'fireball') {
   target = player.sentCommand.target;
   player.inventory.take('blaze_powder');
   fireball = new Particle( 'fireball', player.pos, target );
   fireball.animate();
   if ( typeof target == "player" ) {
     target.life = target.life - 5;
   }
}

Obviously that’s really rough js flavored pseudocode, but the point is being able to write functional statements that are able to interface with the Sponge API through some form of abstraction.

In all honesty though, I would really settle for the ability to have command blocks read from a file, or trigger a bash script that can perform logical operations, and further in-game commands through screen stuffing.

This could probably be hacked server-side by setting a cron to listen for MC console output, and stuff commands based on grep triggers, but that’s a lot of extra setup for what should be a baked-in feature, and isn’t at all user friendly if you’re not already familiar with unix administration (or, equally likely in the MC crowd, running on windows).