Custom Enchants

Discussion in 'Plugin Requests' started by lockdow529, Jun 22, 2019.

Thread Status:
Not open for further replies.
  1. Offline

    lockdow529

    Plugin category: Mechanics

    Minecraft version: Spigot 1.13.2, but always be able to update :)

    Suggested name: Custom Magic

    What I want: Custom enchants! I'm going to try and make a list of what id like to see below. Some enchants would be only level I, others II, III and up to V. V would be highest. I would also like to see a gui that allows for upgrading enchants just like vanilla enchants, but not in an anvil. I would also like the enchants to be in book forum, with success/destroy rates, but have all at 100% success. There will also be 3 "rarities" Bold Blue, Bold Purple, Bold Gold. Most powerful will be in the Gold category.

    Some enchants below!
    - Glowing I - I is the only level, it would give permanent night vision. - only for helmets
    - juggernaut I-II - Gives the player 2 extra hearts at level I, and 4 extra at level II. - only for chest plates
    - Springs I-III - Permanent Jump boost - for boots only
    - Smite I - Upon hitting a mob/player, with the weapon its enchanted on, a bolt of lightning will hit the player/mob. - only for swords
    - Withering I-V - Gives the player/mob hit the withering effect. Higher the level the longer it lasts. - only for bows
    - Auto Smelt I - Upon breaking a block ie iron, iron ingots will drop. Gives the player the smelted item. - pickaxe only
    - Auto Heal I-V - Passively heals the player.

    Enchants like these, but who ever makes the plugin can give me ideas and ill okay them. The ones above are some of the essential enchants. Lets get together an make some crazy enchants!

    Ideas for commands:
    /enchantment [name of enchant] - this will show what the enchantment does.
    /enchant - will open a gui for upgrading books.
    Maybe an admin command to get books?

    Ideas for permissions:
    All players can use the 2 above commands.

    When I'd like it by: 2 or so weeks, not on a deadline.

    There are a lot of plugins like this, I know, but I do want certain things the other do not provide.
    I know this is pretty messy im just spilling my mind out on here. I'm sure I missed a lot on here too, just wanted to get this on paper.

    Thanks!
     
    Last edited: Jun 24, 2019
  2. Offline

    TheEctoplasm

    That sounds like lots of fun! However I will be able to get to coding next week, so if anyone else wants to do it feel free to.

    Additional questions:
    - how does one obtain an enchantment book?
    - should these enchantments appear in vanilla enchantment table?
    - can you combine them with vanilla enchantments?
    - how to use a book (Crafting/Anvil/GUI)?
     
    lockdow529 likes this.
  3. Offline

    lockdow529

    Thank you, i'm excited!
    This will be done only through crates, that's why all books will have a 100% chance of success.
    No.
    On the gear yes, but not in books.
    To use a book the player will drag and drop it on the piece of gear they want to enchant. Upgrading books will be just like how upgrading books at an anvil works, but through the gui. Ie. I+I=II, II+II=III etc... The books being combined have to be the same book, and level.
    Rough idea of the GUI below.
    [​IMG]
     
    Last edited by a moderator: Jun 24, 2019
  4. Offline

    vk2gpz

    are you aware that those things are already implemented by many custom enchant plugins?
     
  5. Offline

    lockdow529

    Yes, many of them have the exact same enchants I listed above. However I am currently thinking of my own enchants that I would like to have on my future server. I have my reasons why I want a custom plugin rather than whats already out.
     
  6. Offline

    wand555

    Hey, this looks interesting.
    Just a little question: Should the combinding of two books cost level, and if so, how much?
     
    lockdow529 likes this.
  7. Offline

    lockdow529

    Thats a great idea!
    Maybe xp cost should go up with level, with a max cost of like 15 levels?
     
  8. Offline

    wand555

    @lockdow529 Hey, right now everything except for AutoSmelt and AutoHeal are implemented. I'm going to add them as soon as possible. Also I made some changes to the GUI (you have to click on the right to confirm it; see attachment). Oh and would you be interested in a config where you can set the max level of each enchantment (remember everything more will take a bit longer to be finished).
    Screenshot_1.png
     
  9. Offline

    lockdow529

    That works! I think a config would be great so I can edit them, and take some work away from you. Would it be possable to add enchants from the list @Jelles provided?
     
  10. Offline

    wand555

    Actually I think you're misunderstanding, adding a config makes it a bit more complicated. Also for now I'm aiming to get the 7 enchantments done you listed above. I think at the point where I'm at right now, it's not worth changing everything to make it configurable. Possibly I'll give it another (more sorted and thought through) try once I'm done.
     
  11. Offline

    lockdow529

    Oh well I didnt know that! What ever makes it easy on you!
     
  12. Offline

    wand555

    Alright...
    So all the enchantments are now working and I'm going to explain them later. However I'm still struggling with the GUI a bit, because I have a problem with getting the cursor. Besides that everything is working now.

    Commands I added:

    /enchant -> Opens up the GUI.
    /enchant list -> Shows a list with all enchants, their max level and what they do.
    /enchant <Enchantment Name> <LVL> -> Gives the player an enchanted book with the applied values into the main hand. (Need OP for that)


    Enchantments:

    Glowing:
    I: Gives the player night vision.

    Juggernaut:
    I: Gives the player 2 extra hearts.
    II: Gives the player 4 extra hearts.

    Springs:
    I: Gives the player Jump Boost I.
    II: Gives the player Jump Boost II.
    III: Gives the player Jump Boost III.

    Smite:
    Lightning will strike upon hitting at the entity's position. The lightning is only visual and isn't actually a lightning due to the fact that you would harm yourself when hitting entities nearby. Instead the damage is calculated through a multiplier.
    Multiplier: 15 / GENERIC_ARMOR_TOUGHNESS
    I and target has no armor: 3 hearts (set value, because otherwise 0).
    I and target has full leather: 2.14 hearts
    I and target has full iron: 1 heart
    I and target has full diamond: 0.75 hearts

    Withering:

    Gives the entity a wither effect (LVL 2).
    Multiplier: LVL of Enchantment * 20 * 1.5 (20 is only to convert ticks into seconds, so if the LVL is 1, the multiplier would be 1.5 seconds [actually 2 seconds because it's only integer]).
    I: 2 seconds Wither II.
    II: 3 seconds Wither II.
    III: 5 seconds Wither II.
    IV: 6 seconds Wither II.
    V: 8 seconds Wither II.

    AutoSmelt:
    I: Upon breaking iron ore or gold ore, the ingots will drop. For iron ore will drop 2 "experience" and for gold ore will drop 3 "experience".

    AutoHeal:
    Passively heals the player over time. Now this time the multiplier is a bit more confusing, because the player can wear armor with different enchantment lvl's at the same time.
    Multiplier: (LVL on helmet +LVL on chestplate + LVL on leggings + LVL on boots) * 0,1 hearts / 0.5 seconds
    Since it would be stupid to list up all the possible combinations, I'm going to list a few.
    I only one piece: 0.05 hearts/s
    I all four pieces: 0.2 hearts/s
    II all four pieces: 0.4 hearts/s
    III all four pieces: 0.6 hearts/s
    IV all four pieces: 0.8 hearts/s
    V only one piece: 0.25 hearts/s
    V all four pieces: 1 heart/s



    Level Cost:

    Haven't thought about it much, but maybe something like (LVL of enchantment)^3 /4 +1 could work.
    Graph (open)
    Screenshot_1.png

    Later EDIT: 0.2 * (LVL of enchantment)^3 + 1 with a different factor for blue (*1), purple (*1.25) and orange(*1.5) seems to be a bit more reasonable.


    I'm really sorry about the GUI but it's just not working how I want it to be and it's my first time working with custom inventories so I can't do anything but wait until someone replies in the thread I linked above. I'm going on vacation soon so I can't work on it for the next couple days (until like tuesday).

    EDIT: Changed Smite section
     
    Last edited: Jul 2, 2019
Thread Status:
Not open for further replies.

Share This Page