SkyBlock Minecraft Addon #17 - Added parkour add-onsteemCreated with Sketch.

in #utopian-io6 years ago (edited)
@jongartv helped me with debugging the new parkour add-on and also tested things out, thank you for helping me. =)

Hello everyone,

This time, I can show you guys another new add-on, which I added to SKYBLOCK.SK. Parkour maps give the players variety to the everyday life of SkyBlock. Instead of farming and building some big fancy farms and other things for the islands, players can now also build custom parkour maps for other players.

Players could also speed run some parkour maps because the time is displayed. Currently, the times aren't stored but once I found a nice way of storing and displaying the top list of the parkour, it is going to be added too.

1. Repository

https://github.com/Abwasserrohr/SKYBLOCK.SK

2. Index

  1. Repository
  2. Index
  3. New Features
    3.1. Added getlangcode function
    3.1. Added parkour add-on
  4. Pull requests
  5. GitHub Account
  6. How to contribute

3. New Features

3.1. Added getlangcode function

Only a very small new feature, but sometimes very helpful. The new getlangcode returns the language code of the player. It can be called with the player as a parameter.

This can be helpful if there is no need to know the UUID of the player besides getting the language code. With this function, it is 1 fewer line every time it gets used. This new function is used in the new parkour add-on frequently.

It is also very nice to remember, instead of the language variable which is a little bit more tricky to remember:

# > Without getlangcode:
set {_uuid} to uuid of player
set {_lang} to {SK::lang::%{_uuid}%}
# > With getlangcode:
getlangcode(player)

Commit: https://github.com/Abwasserrohr/SKYBLOCK.SK/commit/70348bc992f9dba0842f4d17bfeab591288e1a5a

3.2. Added parkour add-on

These new parkours give the player some extra stuff to do if they're bored of the normal SkyBlock.

A parkour can be a jump and runs or another kind of obstacle parkour which is made by the player. There are many possible things there could be done. Here is a video to show off an example of a Minecraft parkour.

While it is true that not everybody can do these parkour things or likes to do them, there seems to be a good portion of players who want to have some kind of fun exercise in the game. That's why this has been added. Of course, it is possible to create a separate server where the players could do some parkour maps. But the work the server operator has to do to make good parkour maps isn't that easy in the first place.

Because this isn't in everybody's favor and it is also nice to give the players the opportunity to enhance their island furthermore, this could be a game changer for some server operators. Once there are enough good parkour maps created by the players on the islands, the server operator could advertise these parkour maps to get more players.

Now, enough reasons, why I decided to add this to SKYBLOCK.SK, here are some interesting parts of the new parkour add-on.

The addon is named after the French word "parcours". I rename it soon to parkour.sk. I'm not very good with English grammar and I thought "parcours" is the right word for it in English. As I wanted to be sure about that here in the post I researched more and found out that I was wrong. =D

Once a player wants to play parkour and steps on a parkour start block, it would be nice to have a separate inventory which has special parkour items, like a checkpoint, restart, and exit item, which can be used to do these tasks as a shortcut.

To make this possible, the current inventory has to be removed, while that is easy to say, people on a SkyBlock server wouldn't be that delighted to see their stuff vanished into nothing. To prevent that, I created two new functions which take care of this: saveinventory(player) and restoreinventory(player).

Here is how they look:


Because it is known how many slots the inventory of the player has, it is no problem to just loop through them until we have every slot saved. To save it, I use Skript variables. They're not only very easy to use but also save everything of the item in the slot, including nbt data and custom enchantments. This is very important because people wouldn't trust the system if there are major faults like removing enchantments from tools.

As an alternative to the variables, I also tested out to use metadata values. While they worked fine, they aren't persistent. The risk of losing all the items in case of a server crash is too high to use this. It would have been a nice option to have, if there wasn't this problem, sadly.

Now back to the option I have chosen. Everything in the inventory of the player is stored into variables. Also, the hunger- and health bars are stored to prevent any free heal & feed stations. Now, we have everything and we can clear the inventory of the player to start with our new parkour inventory.


Now, the player is done with the parkour and wants to do some other SkyBlock things. To give the player his inventory back, the restoreinventory function is going to loop again through all the variables and sets every slot of the player to the saved item like before the parkour saved with the saveinventory function.

As some people don't know, the offhand isn't counted as inventory slot but as a separate part in Skript. To prevent the loss of any tools that might be in that offhand slot, we have to save and also restore it separately like the armor, health- or hunger bar of the player.

Once that's done, there are many events which can happen while the player is in the parkour. There are some events which shouldn't happen, some of them are the on pickup and on drop events.

While they're very small and it is not that much to show, I want to explain how I can detect if a player is within the parkour or not. For example, this is optimal, since there aren't any other confusing parts... =)


As seen above, there are two checks for this kind of events. First of all, it is known that parkour players are in the adventure game mode. In some cases there could also be players who are in the adventure game mode and not within the parkour, for this reason, there are two checks.
The second check is working with metadata. Metadata is non-persistent and perfect for this kind of check. With metadata, we can set to any tag a variable value as we want. This value could be an Item Stack, a location or like, in this case, a string.

A big advantage of non-persistent data is that it doesn't get stored on disk, which is always good for us. While this doesn't make a big impact as a single variable here, using it at many places might increase the lifetime of the disks. To be fair, Minecraft itself is writing and reading enormous amounts of data and our impact on it is only very low.

Another part that has been done with the metadata is the "cheat prevention". To prevent any further confusion, I'm not talking about preventing any client mods, but this scenario:

If there are two parkour maps near to each other and there is one parkour map which is very big and takes a long time and another one which can be solved faster, people could start with the longer parkour map and then do the shorter one. If there is no check involved which makes sure that the player is on the right parkour, people are going to abuse it for sure to get better times.

To prevent this from happening, every parkour item gets a unique id assigned to it directly. The item will keep the unique id forever and will never change. That way, we can check the current parkour id the player is playing and the parkour id of all parkour blocks. If they don't match, they won't do anything to prevent such abuse as explained above.

As explaining this may not be that good to understand, I decided to create a video where I show what I'm talking about.

That's all I have for this new add-on. There is more, but I don't want to bore you guys with all the details... :3

Pull request: https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/140


4. Pull requests

https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/140


5. GitHub Account

https://github.com/Abwasserrohr


6. How to contribute

There is still much to do, SKYBLOCK.SK has still no release and I want to release it soon. If you're interested, there are still issues open and I also have a list of feedback from people. Join the Discord server below to get more information on how to join as a contributor. I'm Abwasserrohr, the sewage pipe on GitHub and Discord. I'm also trying to answer comments here fast. =)

Discord: https://discord.gg/FRuK5BC


Thank you for reading my contribution post. SKYBLOCK.SK is getting more and more features which have to get better over time. I'm still open for any feedback regarding already existing features like challenges, biome changing or other features that have been added a while ago. Feel free to tell me if you're thinking that there is something not balanced in the default configuration which should be changed or anything else.

Again, thank you for helping me out, @jongartv! I've also seen your feedback and included it into the default configuration of SKYBLOCK.SK.

Adding new features like a parkour add-on is always fun, I not only have to create these but also have to test things out for myself, which is always a fun addition. =) I also researched if there is already a SkyBlock parkour plugin existing similar to what I have done here. While I searched some time, I unfortunately only found proprietary plugins which are outdated.

If you have any feedback on this contribution post, SKYBLOCK.SK or something else, feel free to share your opinion with me. =)

Have a great weekend

@immanuel94

Sort:  
  • A whole new way to play the game, that's big. Congrats!
  • The article is great with all the images, videos and code samples.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thank you for reviewing my contribution post.^^

Thank you for your review, @helo! Keep up the good work!

Is it just me, or has the space on Sky Block gotten smaller?

Hello @pompe72! =)
It is now possible to upgrade the island using /island upgrade. I've sent you 20000 Taler to upgrade it to max size.^^

Der packour ist mega gut geskriptet worden, wie bekommt man den eigentlich?

Hallo @jongartv! =)

Freut mich, dass dir der Parkour gefällt. Leider kann man den noch nicht bekommen, bei uns auf dem Testserver. Aber ich plane, diese Parkour Items in die Lootboxen mit einzubauen. ;)

ich brauche bei SB kein Jnr hat ja sonst schon einen auf dem server

Hallo Sausemaus! =)

Ja, aber im SkyBlock kann man eigene Jump and Runs bauen, so braucht der Serverbetreiber keinen speziellen Parkour Server aufsetzen.^^

Hoert sich interessant an. Werde ich bei Gelegenheit mal testen.

Ok, freue mich schon ein paar Parkoure durchzuspielen. ;)

Ich finde den Parkour sehr gut gemacht und freue mich schon, wenn ich in naher Zukunft ein Parkour auf meiner Insel bauen kann :D

Freut mich, wenn es ein paar Parkours zum ausprobieren gibt. =)

ich brauche bei SB kein Jnr hat ja sonst schon einen auf dem server

Hi @immanuel94!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @immanuel94!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!