[FUN] Magic v2.0.8- Spells and Wands [1317]

Discussion in 'Plugin Releases' started by NathanWolf, Jan 15, 2011.

     
  1. Offline

    NathanWolf

    Spells / Wand / Magic!



    Magic is a Work-In-Progress system, the end goal of which is to bring an RPG-like experience, focused on magic spells, items and abilities, to Minecraft.

    Downloads
    Magic.jar on MediaFire

    Source Code / Contributor Group (want to join?)
    elBukkit on github

    Currently Implemented:

    Magic is a configurable system, set up to let admins create their own experience on their servers. It will create a default configuration (spells.yml) with a variety of spells- but you are free to edit, add, remove spells at will.

    Take a look at the spells.yml file that Magic generates at first run. Documentation coming soon!

    Spells
    • cooldown - spells can only be cast so often
    • range - How far a spell can target
    • target_through - What a spell can target through (e.g. glass, water)
    • name, description, wand icon, etc - All editable in spells.yml
    Magic is currently more appropriate for a creative-type server than a serious RPG server, however you can use the Permissions plugin to lock down spell and wand use. I would like to tie into (or create) a leveling system eventually, but for now you can create classes and such using Permissions and various other plugins.


    Planned:
    Most of Magic's systems are not yet functional. Before I can call this ready-for-RPG, I will want to have working:

    Spells
    • Reagents - spells consume items when cast
    • MP - A system to use a pool of "magic points" to cast spells.
    • Automatic regenerative MP, other ways to gain MP (temples, actions, etc)
    • Health-for-MP, Eragon-style life-force casting
    • Permissions-driven per-player statistics, so players can have different casting costs / MP pool sizes, et
    Wand

    • Data-driven wands, using different items (or no item, for "abilities")
    • Dynamic wand action system, for alt-fire and context-sensitive actions
    • Better spell inventory system- I have a few ideas, I'll be playing around with this eventually
    Plugin devs: do you want to help? PM me! All of my code is community-sourced on github, you can contribute hassle-free, if you want to.


    Permissions

    By default, all players have access to the wand and all spells. If you use the Permissions plugin, you can set up individual permissions using the following pNodes:

    Code:
    Magic.wand.use : Player can use a wand
    Magic.commands.spells : Player can use /spells
    Magic.commands.wand : Player can use /wand
    Magic.commands.cast : Player can use /cast
    Magic.cast.<spellname> : Player can cast a specific spell
    Admin commands:
    Code:
    Magic.commands.magic.reload : Reload spells.yml
    Magic.commands.magic.reset : Delete spells.yml and re-create it from defaults
    
    Default Spells
    Exploration spells

    • blink: Teleports you to, or through, your target location.
    • peek: Temporarily turn the target surface to glass.
    • elevate: Teleport up or down to the nearest standing place
    • recall: Set a marker and teleport to it later (aim up to return), or to spawn
    • torch: Place a torch at your target location
    • goto: Go to the farthest away player- can target other players
    • fling: Fling yourself in the target direction. (Also, fly)
    • levitate : Fly with controlled thrust, Iron Man style. WIP!
    • portal : Create two connected portals (WIP)
    Construction spells

    • bridge: Extend the ground under your feet.
    • construct: A powerful spell for constructing, filling, or erasing
    Alchemy spells

    • rewind: Undo your previous spells, one at a time.
    • alter: Alter certain blocks (stairs, logs, leaves, wool).
    • transmute: Modify the material used in your last construction.
    • absorb: Give yourself some of whatever you're pointing at.
    • recurse: Recursively replace the target material.
    Mining spells

    • mine: Mines out the targeted ore vein, and drops the ore blocks. Not rewindable.
    Help spells

    • heal: Heals you to full health.
    • time: Adjust the time of day
    • cushion: Creates a (Final Fantasy-inspired) temporary water bubble, meant for landing on.
    • manifest: Give yourself some material by name. Only gives building material blocks.
    • invincible: Makes you impervious to damage of various types.
    • sign : Give yourself some signs.
    • pull : Pull items (or creatures!) towards you. Aim down for a super-powered version!
    Combat spells

    • fireball: Cause an instant explosion at your target location
    • arrow: Fire a magical arrow.
    • fire: Start small or large fires. Great for lighting portals from a distance!
    • lava: Fire a very destructive, not-yet-temporary, stream of lava- CAREFUL!
    • wolf: Summon and tame wolves
    • grenade : Toss out a live TNT block
    Farming spells

    • tree: Grows a tree magically.
    • familiar: Spawn an animal familiar to keep you company.
    • farm : Create a random herd of friendly animals
    Nature spells

    • frost: Freezes water and snows up other blocks.
    • weather : Summon or dismiss storms
    • lightning : Strike down your foes with lightning
    Builtin Variants

    Several variants of the above builtin spells are also builtin:
    • blast, superblast : Destroy large chunks of common materials
    • fill : Click twice to fill a volume
    • monster, mob : Summon monsters
    • ender : Summon an enderman
    • blob, superblob : Create large blobs of any material
    • inferno : Create a large fire
    • tnt, kaboom, nuke : Progressively more powerful and dangerous versions of fireball
    • gills : Stay alive in water, but only while moving around
    • ascend, descend : Take you up or down one level, through solid ground/ceiling
    • spawn : Return you directly to spawn
    • pillar : stalactite : Extend the ground or ceiling up or down
    • paint : Fill a single block
    • shell : Create a hollow sphere around your target
    • box : Create a hollow box around your target
    • sandblast : Create a large blob of sand (aim in the sky!)
    • arrowrain : Create a "splitter" arrow
    • mob : Summon an insane mob of enemies
    • push : The opposite of the default "force", pushes objects instead of pulling them
    Default Material Icons
    • absorb : bucket
    • ascend : red mushroom
    • alter : redstone torch (lit)
    • arrow : arrow
    • blast : gunpowder
    • blink : feather
    • bridge : gold hoe
    • blob : clay ball
    • boom : red rose
    • box : wooden door
    • cushion : slowsand
    • day : flint
    • descend : brown mushroom
    • disintegrate : bone
    • ender : ender pearl
    • familiar : egg
    • farm : wheat
    • fireball : find and steel
    • fling : iron boots
    • frost : snow ball
    • gills : raw fish
    • goto : glowstone dust
    • grenade : TNT block
    • heal : bread
    • inferno : fire
    • invincible : gold apple
    • kaboom : redstone wire
    • lava : lava
    • levitate : gold boots
    • lightning : cooked fish
    • mob : jack-o-lantern
    • monster : pumpkin
    • night : coal
    • nuke : bed
    • paint : painting
    • peek : sugar cane
    • pillar : gold axe
    • pull : fishing rod
    • push : minecart rails
    • recall : compass
    • shell : bowl
    • sign : sign post (not the item)
    • stalactite : wood axe
    • spawn : wood door (the item?)
    • storm : grilled pork
    • torch : torch
    • tower : ladder
    • transmute : gold ingot
    • tree : sapling
    • tunnel : stone pickaxe
    • recurse : wood spade
    • rewind : gold watch
    • sandblast : sandstone
    • superblast : slime ball
    • superblob : clay brick
    • weather : water
    • wolf : pork
    Tip Jar
    If you really love this stuff, and you're feeling generous, I'd more than appreciate a donation. Go here if you're interested!

    Changelog

    2.0.8 - 1.8 Update. (Added ender spell, new buildable materials, fixes) - wand doesn't auto-swing :(
    2.0.7 - First release with casting costs. (See grenade and heal for examples)
    2.0.6 - First release with configurable spells (via spells.yml). A little experimental still.
    2.0.5 - Some experimental changes (including an awesome perf hack) to fling and levitate, drop leap variant.
    2.0.4 - Major refactor (prepping for spells.yml), add force, some fixes/tweaks, fix shell.
    2.0.3 - Add cloak and decoy (wip), and fix arrow and arrowrain arrows.
    2.0.2 - fling auto-protects you from fall damage, wolf, frost and disintegrate balanced.
    2.0.1 - Added kamikazee
    2.0 - Removed Persistence, collapsed into a single jar, added Permissions support.
    1.18 - 1.7 support (RB953)
    1.17 - Add necromancer class, improve monster, magic arrows can't be picked up, portal now works like Portal (!), and improvements to the CTF bases (signs!)
    1.16 - leap and tesseract added, low-power variants of fling and blink. Cooldowns added on some spells. CTF support!
    1.15 - erase added, targeted version of rewind (ops can use it on other players), tweak levitate and blob
    1.14 - tag added, leaves a sign with a timestamp and your name at target
    1.13 - levitate improvements, rename goto to gather, change the way it works.
    1.12 - levitate, ironskin, leatherskin, map (WIP!)
    1.11 - fling, force/push, lots of fixes/improvements (wolf, tree, gills, blink)
    1.10 - goto, arrowrain (paging in /spells list)

    View full changelog on github

    This post has been edited 5 times. It was last edited by NathanWolf Dec 12, 2011.
  2.  
  3. Offline

    NathanWolf

    I'm considering a pretty massive re-working of the Wand, I'd like the thoughts of any interested parties.

    My goal with Wand and Spells, ultimately, would be to have a seamless game experience, without console commands and ideally without any console messages, either. Something that would be intuitive enough to use right out of the box.

    Right now, many of the spells in the Spells plugin are getting close- they are pretty intuitive, and in "quiet" mode they only display messages in exceptional cases.

    The wand, however, is very noisy! It spams up the console constantly, and requires a lot of command use to get working.

    Here's my proposal:
    Every command (I'm just going to refer to them as spells from here out...) that is bindable to your wand is associated with a unique item. So, for example, blink would be a feather, torch a torch, fireball gunpowder, etc.

    When you put your wand in your active inventory, you switch to wand mode.

    In wand mode, your inventory is saved off (and managed by the Wand plugin). It is replaced with a representation of all of the spells you know.

    The left-most active inventory slot that's not your wand is your active spell, left click your wand to use it. Right-clicking your wand cycles your active inventory (every item but the wand moves one slot to the left). If possible, I'd make it so you can't switch items away from your wand.

    Putting the wand back into your inventory leaves wand mode and restores your normal inventory.

    I think this could be a really elegant way to represent and use the wand.

    It would be complicated to implement- the current wand plugin is really very simple- but I think it would be doable, and really worth it.

    On the technical side, I would probably be doing a major reorganization, integrating with the Permissions plugin and directly integrating with the Spells plugin.

    Anyone have any thoughts?
  4. Offline

    fuzzyhunter0608

    I like the new ideas! It seems like a sophisticated way to handle having too many wands or too many commands bound to a wand. This way, you can have a dynamic set of commands so that you don't have to set specific commands together for organization purposes. It seems like it would be better because sometimes it feels easier to cast from the console now instead of switching to the wand and spell you want to use.
    NathanWolf likes this.
  5. Offline

    Wungdam

    One, I do not speak English well. Please understand that point of writing a translator,
    Currently I open the server. Many of the plug in the server for development use.
    Then (bukkit) wand, spell occurred while trying to use. spell will work well, and if you right-click to use the wand to change the spell, but the use of spell by left-clicking does not. Just attack is possible. How do these cases?
  6. Offline

    NathanWolf

    I know! I hate that! When I want to do a one-off thing, like /cast time or /cast rewind I often still drop to the console, which really breaks the immersion... but it really can be easier. Especially when your wands start getting full... that "construction" wand is really getting busy!

    This is exactly the problem I'm trying to solve here.

    So, it occurs to me that I don't have all that much, if any, control over the player's active inventory- I think that's client-side. I still think using the inventory somehow is the right way to go- I just need to play with it a bit, and think about it a lot.

    Thanks for your feedback- feel free to leave any additional ideas, etc!
    --- merged: Jan 23, 2011 2:34 AM ---
    It sounds like the Wands plugin is working, but Spells is not.

    You have to open spell-classes.txt and add your username (Wungdam) to the file, where it says PlayerName.

    If you've done that and it's still not working, check your server logs for SpellsPlugin to make sure it's starting up properly.
  7. Offline

    fuzzyhunter0608

    What about giving access to the spells for all of the items in the player's entire inventory for spells they have learned? Still involves some cycling, and maybe should be limited to an extent, but seems like a way to avoid the problems with active inventory.
  8. Offline

    NathanWolf

    Doable- I was also thinking that you could use the columns somehow- so each column lines up to spells for a wand in the active inventory slot below that column, if that makes sense.

    You could then have more than one wand in your active inventory, and switch between them to change your spell set.

    There's still no good way to show the active spell, though, without some text- which is really what I'm trying to get around.
  9. Offline

    fuzzyhunter0608

    I don't know if it's possible to create a new HUD for wand mode? That seems like it might be the best choice, so that it isn't limited by the standard HUD and could be optimized for the plugin.
  10. Offline

    Liouen

    nathanwolf, can you make this and spell plugins into SSP v1.2_01 mod? I need mod like this plugin but I've never find mod like this one[IMG]
  11. Offline

    NathanWolf

    Sadly, no- at present, modding is only limited to server-side stuff. As far as I know presently, the only HUD stuff I can do is send console messages, and perhaps mess with the inventory.
    --- merged: Jan 23, 2011 5:45 AM ---
    I'm sorry, I don't know what SSP is?
  12. Offline

    Liouen

    SSP is minecraft singleplayer[IMG]
  13. Offline

    NathanWolf

    Ahh.... right! Duh :)

    Unfortunately, no. I don't have time nor really interest in developing SSP mods. However, my source code will always be available on github, so if you can just find an enterprising SSP plugin dev who wants to fork it..
    --- merged: Jan 23, 2011 6:02 AM ---
    Or, just set up a Bukkit server on your local computer and play "multiplayer" by yourself :) It's really not a bad option...
  14. Offline

    Wungdam

    NathanWolf likes this.
  15. Offline

    NathanWolf

    Hm- thanks for the video! I wonder if it's general arm_swing event notification that's missing? It was only recently added to Bukkit... normally (I think) it would crash your server, or at least the plugin would be broken, if that were missing.

    Here's a way to test, if you can:
    - /cast construct : This should create a blob of whatever you're pointing at
    - /cast transmute

    Select an item in your inventory, like glass
    Swing that item

    If you transmute works, and your blob turns to glass, then it's a problem specific to the wand plugin. Otherwise, I'm guessing that hook is missing and you may need an updated Craftbukkit!

    Please let me know if you get a chance to try this out.
  16. Offline

    Wungdam

    Thank you very much
    'bukkit' was the problem.
    / cast construct is works, but / cast transmute did not work.
    You create one in the future I hope a good plug-in
    I will forward to make a good server
    Thank you for reading poor English!
  17. Offline

    Shadus

    This doesn't seem to work with the simple home plugin's home command, most every other plugin I try it with it works great though!
  18. Offline

    Hguin

    I've got the spell plugin and i want it to work with the wand plugin. I can create a wand but i cant blind a spell to it?
    All it dose when i try to blind a spell it comes up with this error.

    23-Jan-2011 13:13:05 org.bukkit.plugin.SimplePluginManager callEvent
    SEVERE: Could not pass event PLAYER_ITEM to WandPlugin
    java.lang.NullPointerException
    at com.elmakers.mine.bukkit.plugins.wand.WandPlayerListener.onPlayerItem
    (WandPlayerListener.java:72)
    at org.bukkit.plugin.java.JavaPluginLoader.callEvent(JavaPluginLoader.ja
    va:147)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:199)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:417)
    at net.minecraft.server.Packet15Place.a(SourceFile:57)
    at net.minecraft.server.NetworkManager.a(SourceFile:232)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:64)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:104)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:261)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:197)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)

    Can some one help me? [IMG]
    NathanWolf likes this.
  19. Offline

    NathanWolf

    No problem!

    Feel free to use my CraftBukkit.jar if you want- not sure if you're using a modded server there or what?

    And where do you get all those wonderful toys? What plugin is that mini-map??
    --- merged: Jan 23, 2011 1:41 PM ---
    That seems really odd! But /home works when you use it from the console?

    All the wand does is player.sendMessage("/" + wandCommand), basically- so in theory it's just as if you typed it yourself (in theory).
    --- merged: Jan 23, 2011 1:43 PM ---
    Eek!

    Could you try a couple of things for me, please? What is the output of /wand wands and /wand spells?

    I'm a little stumped on this one... NPE's are bad! :(
  20. Offline

    NathanWolf

    Yeah, I'm quoting myself. Is that weird?

    So, I got a chance to play with this a bit, and I was (happily!) mistaken! It does look like I have full access to the inventory, so I'm quite optimistic now! I'm about to try modifying it, swapping it in and out, cycling items, etc. If that works, I should be set to proceed with Wand 0.50!
  21. Offline

    Hguin

    when i type in /wand wands it comes up with the wand I created (I called it move) then when i type /wand spells it comes up with

    you have 0 spells on your move wand:
    move

    Dose this help?
    I hope it dose. [IMG]
  22. Offline

    NathanWolf

    It does, thank you! That looks like a bug- if you try to change wand commands without any bound to your wand. It should be benign, for the most part- just bind a command:

    /wand bind cast blink

    It should go away once you've got something bound to your wand. Let me know if not, please!

    This will definitely be fixed in the next version- but the next version may end up looking totally different :)
  23. Offline

    Hguin

    what do you mean bound sometning to my wand?
    do you mean blind a spell in wand command if yes how?
  24. Offline

    Miome

    I like the inventory idea, although I don't know if that's do-able in the current version of bukkit. From the Mojang/Bukkit meeting notes, it sounds like they're interested in exploring mod HUD options, so that could be a huge step forward.

    Would it make sense to split out the tasks, and tackle Permissions integrations + Spells merger first? It seems like you have a clear technical path forward on those two, and it would give you time for new developments on the UI front.

    For a short term fix, maybe you could have Wand ship with some pre-configured wands that map to the categories of spells - construct, mine, farm, nature, etc. Those break down naturally enough that I suspect most people won't feel the need for a custom wand.
  25. Offline

    Shadus

    Yeap, absolutely...

    /wand wands lists--
    *Primary

    /wand spells lists--
    Primary
    time day
    cast fireball
    cast frost
    cast blast
    cast blink
    cast arrow
    cast torch
    cast tunnel
    *home
    spawn
    sethome

    I can left click all day and neither sethome or home will take effect when I have them selected as the primary spell on the wand. Spawn works fine though (from N's General), if i type them in chat /home or /sethome they work perfectly.

    http://forums.bukkit.org/threads/simplehome.854/ is the mod itself if that's any help, if there was any useful console output I'd pass that along.

    Edit: Hey there's a useful spell for Spells.jar!

    "Memorize" {Default}
    /cast memorize (memorizes a loc named Default where you're at if no args are specified)
    /cast memorize {location name} (memorizes the loc with name given)

    "Relocate" {Default}
    /cast relocate (teleports you to the Default location if no args are specified.)
    /cast relocate {location name} (teleports you to the named location)
  26. Offline

    NathanWolf

    Type:
    /wand bind cast blink
    --- merged: Jan 23, 2011 5:35 PM ---
    Bummer! :( I wonder if it's a listener priority thing, or something weird- like that plugin is higher priority, so it doesn't get my messages? Well, I'm just thinking out loud. I'll install the plugin and see what's up- I miss having homes on my server anyway :)

    I like it, I think MagicSpells had something like that- "mark" and "recall", I think. Great for exploring, you could mark the entrance to the cave and then get hopelessly lost without fear.

    Eventually, I want to port all of the good spells from MagicTricks and MagicSpells- so it's effectively on the list :)
    --- merged: Jan 23, 2011 5:38 PM ---
    Yeah! A real HUD API would invalidate all of this, but for now... it does actually seem doable! I had to do some reverse-engineering to get the UI to actually update when I modify the player's inventory, but I got it working- it's awesome.

    Right now, I'm trying to get the cycling working in a way that makes me happy, where it skips over any wand objects in your active inventory.

    Once I have this little proof-of-concept working, I'll upload a video and see what you think.

    Possibly... but, quite honestly, the new Wand has me much more excited than doing some gruntwork refactoring :) I know people want Permissions integration, and it'll be a good thing, but ... I'd rather have an insanely more awesome and useable wand, myself!
  27. Offline

    Hguin

    now when i type in /wand bind cast blink it says
    Bound wand 'test2' to 'cast blink'
    (test2 is the name of my wand)
    When I right click it says
    test2 : cast blink
    and when I left click it dose nothing?
    how do I make my wand cast my spell I bounded to it?:confused:
    edit: Its not just blink that dosen't work. All spells don't work.
  28. Offline

    NathanWolf

    And they work if you just use "/cast blink"?

    Did I have you do the transmute test? I can't keep track of all these bug reports... if not, please read back and then use the transmute spell and let me know if it works. You may have an out of day CraftBukkit.jar.
    --- merged: Jan 23, 2011 6:34 PM ---
    Tech Demo!!!

    Here's a little preview of what I think is the future of Wand:



    Basically, this demo only shows off the inventory cycling. Hopefully, the next demo will be fully functional, and casting spells!
  29. Offline

    Hguin

    yes it works with every spell if I just type /cast [spell name]
    I tryed the Transmute test but I just said
    'Transmute cancelled'
    I will try up dating craftbukkit now.
    I hope this works[IMG]
  30. Offline

    NathanWolf

    I hope it does, too! It should, I think, it you can't transmute, either.
  31. Offline

    fuzzyhunter0608

    The demo looks great! What are you doing with items that don't have spells to go with them?
    NathanWolf likes this.
  32. Offline

    Shadus

    That is pretty slick, what would be even cooler than that would be is if the inventory cycling only happened when you were holding the ctrl or alt key or something similar... so functionally 'wand' would act as a separate 'inventory' of commands/spells/shortcuts that could scroll through.
    NathanWolf likes this.

Share This Page