Scripts

From MINR.ORG WIKI

Scripts are an in-house server plugin used to run code handling tasks remotely or that would be too complex to efficiently do with command blocks. It is developped, maintained, and updated by Server Admins.

History of Scripts[edit]

Much of the information in this section is credited to a forum post written by Alphaesia, which without would be much shorter and more error-prone. Props go to him for much of the information in this section.

Falsebook and Scriptblock[edit]

Early in the server's life, a plugin called Falsebook was used to run code and handle semi-complicated tasks via signs. This could handle many specific tasks, such as substituting for mob spawners in Hell Parkour, many of the slots-related signs that were in places like Fortuna, and buying/selling goods for money in places like the fish lounge in Aquarium. At some point (but definitely by the time Minecraft updated to 1.9), Falsebook discontinued, forcing a new plugin to be created to handle the signs used for server maps.

MSC 1.0[edit]

MSC (Minr SCripts) began use during Minecraft version 1.9, and were used all the way to version 1.12. During this time, scripts received constant and iterative development, though actual use of scripts was extremely scarce. The main issue was accessibility: only admins could realistically learn and use the script system. Maps with any sort of script use were extremely minimal unless headed by an admin for this specific reason.

MSC 2.0[edit]

In conjunction with Minecraft 1.13, admin Rickyboy320, who was the main maintainer of the plugin, rewrote the entire script system. Alongside this, a new testing server was created for Greenies so that they could develop their own scripts to then be transferred to the main server. The combination of both of these features had a massive impact on the power of scripts and their accessibility that cannot be understated. One visible impact this had was on the Puzzles section of the server, where a major explosion in the number of maps occurred in the subsequent years of this change. Nearly every puzzle map in FFA before mid-2018 (the release of Minecraft 1.13) was either redstone operated or created by an Admin, and only until these changes did more variety and complex puzzles get added to FFA.

MSC 2.0 is the current base for scripts in use today.

Getting Started[edit]

While scripts are more accessible than ever, the process of learning them is still a challenge. A few resources for learning them are listed below.

Applications of Scripts[edit]

This section is mainly here to give an idea as to how scripts are used and their versatility.

NPC Dialogue[edit]

The most common implementation of scripts by a large margin is to send chat messages to the player for reasons such as giving NPCs dialogue. Most story-focused maps, like Tales of Shihon and Chaoskampf, use scripts for dialogue.

Scripting collectibles[edit]

For maps that require collecting a set number of items, such as Polar Station and Zeitpfalz, scripts are used to track what collectibles the player has collected.

Chat Prompts[edit]

Chat prompts refer to what Obfusco has, where the player can type in chat and the script can read it. This allows for maps that ask for passwords without needing to rely on a hopper setup that maps like Detention 2 have. This is commonly used for riddle based maps like Sphinx and Riddler as well.

The most common pitfall that maps with chat prompts have is inexperienced players leaking map solutions, as the method for answering a chat prompt is the same as chatting normally (and most maps with chat prompts do not prevent regular chat messages near the prompt script). This is most common in lower difficulty maps like Coral and Catacombs.

Progress Savers[edit]

One of the most common uses of Scripts is for creating progress savers in long maps. While this is typically in hard or above difficulty puzzle maps (e.g. Nonograms and Blight), other genres of maps have benefitted from progress savers, such as parkours, mazes, and searches (like Gearburn: Alone at Night, Fractal Maze, and Egghunt 3). This is a common enough application of scripting that a Progress Saver Scripting Template guide was made for it.

One common pitfall that many progress savers make is in how they save progress. Many maps have scripts on checkpoint signs that are used to track progress. While this works, checkpoint signs are not meant to have scripts applied to them. These scripts might be unintentionally broken by updates in the future due to plugin changes.

Another is in how they react to challenges. One recent instance of this was with Jump Jumble, where two players doing a Soul-Link challenge had their times invalidated by using the progress saver. Often, the best method to resolving the problem is to disallow players in challenges from using progress savers at all.

Chat Scripts[edit]

Chat scripts function similarly to chat prompts, but the player clicks a message in chat (similar to /tellraw click events) instead of typing an answer. Because not many maps need this functionality, its use is rare. The first map to use chat scripts extensively is The Novice.

Trivia[edit]

  • Scripts function similarly to Java based programming, set up like an OOP language with custom variable types.
  • Maps with the most complicated scripts typically are puzzle maps where the mechanics of the puzzle are coded in the scripts, such as for Bomb Squad and Skullerful.
  • One of the most common issues related to scripts is the use of @bypass. This is because Minecraft updates routinely change the command structure of commands that are used for @bypass, and scripts do not automatically update to the correct syntax.
  • A Visual Studio Code extension, made by Lightwood13, exists for scripts and can be found in the pinned scripts threads on the forums.