Code Monkey home page Code Monkey logo

scrollsplugin's Introduction

ScrollsPlugin

(in the process of revamping the entire plugin) (too messy and just bad) A plugin that adds scrolls to the game spigot/bukkit

Current Scrolls:

Basic Scroll

  • The basic scroll will have an enchantment and level that can be applied to an item.

Dark Scroll

  • The Dark Scroll will add an enchantment to the item twice as strong as the basic scroll - It is intended to have the high chance of destroying the item if the scroll fails.

Clean Slate Scroll

  • The Clean Slate Scroll will return one scroll slot to the item if the scroll is success full. (obviously will not use a scroll slot)
  • It is intended to have the off chance of destroying the item.

Chaos Scroll

  • Will grab each of the enchantments and change them at random.
  • It is intended to have a decent chance of destroying the item if failed, but a high chance of success.

The first thing to note in the config is the EnchantmentWorth category, this establishes how valued each enchantment is, giving the option to make enchantments more rare than others.

flip_rate&enchantment : this is not implemented yet

Basic "rarity" algorithm:

to determine how rare each item is in comparison to the other I use a simple algorithm. The server generates two numbers each between 1 and 0. one of those numbers is multiplied to the power of a DETERMINANT value in the config. The larger to the DETERMINANT value is, the more exponential the "rarity" of each item is.(this algorithm is also used in the chaos scroll when changing items enchantments)

Here's a diagram to demonstrate how it effects the plugin.

https://www.spigotmc.org/attachments/determinant-png.285791/

expo_successrate_determinant: used for the rate of success for each scroll

expo_enchantment_determinant: used the enchantment rarity

expo_enchantment_level_determinant: used for the enchantment level rarity

default_scroll_slots: sets the amount of slots each item has by default

all of the success and destroy rates are by percent. So if success_rate_maximum was 10, the max success rate that type of scroll has is 10%. The round attribute determines the rate of the percents a scroll goes up by. for example,the default round is set to 10 so the percentages possible for the basic scroll type are 10,20,30,40,50,60,70,80,90,100

scrollsplugin's People

Contributors

knaxel avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.