[DEAD] Spells v0.996

Discussion in 'Inactive/Unsupported Plugins' started by NathanWolf, Jan 16, 2011.

  1. Offline

    Bl4ck5tar836

    Im getting the error: player blackstar836 unknown
    yes blackstar836 is my minecraft account name
    EDIT: I removed the wizard class... So i can cast all spells....
    can i just edit my character name into this file to become admin?

    edit: code removed
     
  2. Offline

    NathanWolf

    Ok- I re-encoded permissions.yml to ASCII, and re-uploaded it. I also gave many more spells to "default", but left in "wizard" for the dangerous stuff.

    Also, this: elBukkitPerm.zip

    Is all my plugins, without Permissions or Permissions support, and with the default configuration given here. I ran it straight from the zip, worked for me- I could login and cast all the spells given to the "default" group, as well as use the wand.

    Hope some of that helps! :D

    No, unfortunately- I'm going to add YML support users/groups down the road, but I don't have it yet. Strange that it says you're unknown- mabye case-sensitive? I'll change that if so, it shouldn't be.

    If you want, you can use the Permissions/PermissionsSupport solution, since that has YML-based user/group management.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jan 8, 2016
  3. Offline

    Bl4ck5tar836

    the code when downloaded is in a straight line (like %ENTER% was never used... But if you copy the code into microsoft word and then copy it from there back to permissions.yml it gets pasted properly.

    code: removed
     
  4. Offline

    mikeysed

    Hey my spells are not working im trying to set them up but when i am in game and do /wand blink or /cast blink its saying blink is not a cammand and it says that for every spell i try to put in. so if you could help me that would be great?
     
  5. Offline

    NathanWolf

    Is that with the newest file? I thought I'd fixed it...

    Bah- the joys of Windows :)

    Sorry- hrm. Well, I guess I'll "fix that" next time I'm on my work PC :p

    That's probably a permissions issue- there is lots of info about this in recent posts, what I'm discussing right now with blackstar, for instance- and also in the original post. Better docs are coming.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jan 8, 2016
  6. Offline

    mikeysed

    well i mean i cant even do anything with it prolly cuz im a mac and i fail with mods
     
  7. Offline

    Codex Arcanum

    Hey, me again. I was browsing obscure plugins and noticed the Voidmage plugin has a rain of arrows spell, and if I remember correctly, that was something you said you might want to implement.
     
  8. Offline

    NathanWolf

    Nah, I'm on a Mac, you're actually better off with my stuff apparently. The permissions.yml file I've got, for instance, will work for you but not for Windows users. Mac OSX is BSD- it's made to run server software :)

    Anyway, I can't help much there beyond that zip file I provided- unzip that, go to that folder in terminal (Apple+Space, then type "Terminal" and hit enter..... hope you know how to command-line....)

    Then, type: "java -Xmx1024M -Xms1024M -jar CraftBukkit.jar nohud". It should just work...

    Hey, Codex!

    Coolio! If I end up having trouble when I get to it, I may look at his code- but I've realized lately that that's rarely helpful to me. When I do something, it always ends up being this jekyl/hyde thing where half the code lives in an API library (Persistence) and half of it lives in the actual plugin (Spells), and then it's all abstracted...

    Anyway, point being, I don't exactly copy+paste :)

    Once Magic is released, I'm definitely excited about getting back to making spells. You guys are going to be swimming in spells if I can ever stop working on API's (and NetherGate....)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jan 8, 2016
  9. Offline

    sheepyowl

    hey, i need some help with this plugin, if you could assist.

    the first thing is that even tho i set up 'permissions.yml' in the persistence folder, everyone were able to use any spell. did i set it wrong? could it be an issue with GroupManager?

    second thing is that this plugin does not work with GroupManager, is there a way to make it work?(groupmanager uses FakePermissions to be compatible with permissions, but the PermissionsSupport plugin you made wont let it work, as it might be looking for the real permissions or something)

    also... the permissions.yml example you created really confuses me. why are there two "spells:" after the default setting?
    how do i tell it who to make admin/wizard?
    how do i prevent a certain group from casting ANY spell?

    btw, you got really great plugins.
     
  10. Offline

    NathanWolf

    Ha! LOL.... can't please everyone all the time!

    I just updated the permissions.yml file last night to give all spells to the "default" group. It seems to be working for you, is the good news- no one has spell rights by default anymore, without permissions configured and working!

    So, just edit permissions.yml - the easiest thing to do is to move any spells you don't want to give out from 'default' to 'wizard', and then do "grant player sheepyowl wizard" in the server console to give you or anyone spell rights.

    I'm planning on making "op" another default permission profile (like "default") that would automatically be assigned to ops- I think this could avoid having to use the "grant" command for most setups (e.g. you only need ops vs normal players).

    I believe PermissionSupport works with GM, but you need to remove permissions.yml, because the two should actually work together (well, to an extent- denying a permission in GM will not "deny" it if they have the permission in permission.yml, if that makes sense...) Anyway, if you have not tried PermissionsSupport.jar/Permissions.jar without the permission.yml - then do that and let me know :)

    Right! Sorry, it's all a little light on docs at the moment. This is actually the official bukkit permissions file format, which is not really released yet, so not really well documented. I'm going to get my own docs together soon, since I'm using the system already.

    Ok- so:


    Code:
    default:
      Spells:
        commands:
          spells: true
        cast:
          - blink
          - torch
    The first "Spells" says that this is the section for the Spells plugin (NetherGate, Wand and CrowdControl permissions can go in here, too).

    The second "spells" is the pnode for the actual "/spells" command (it's under "commands"). So, this means that anyone can use "/spells" to see what spells they know.

    Now, you'll note I don't give out "/cast". This is set up for Wand use- command-line spell casting is much more powerful and dangerous, it'll be locked down with additional pnodes in the future.

    Ok, next is a new section, "cast". These are not commands, so it's not under the "commands" section. This section is also a list, so its sub-items look a little different (" - blahblah").

    Each item under that list is a spell, and having it there means that group/profile can cast that spell.

    Again, I need better docs- though the user/group manager is my own code, so this time I've no excuse :)

    Use the "grant" and "deny" commands to set up permissions, and the "group" command to create groups (not really necessary, as it turns out...)

    E.g:
    Code:
    grant player NathanWolf wizard
    grant player sheepyowl admin
    deny player badguy allspells
    
    You can use these from the server console, or in-game ... but in game you need permission to use them, so it's a bit "chicken and egg" :) You at least need to make yourself an admin on the server console.

    Once you're an admin, use "/su" in-game to bypass permission checks.

    Ah- see above. If using internal permissions, set up a "profile" in permmissoins.yml called allspells, put all the spells in there (yeah, I don't know/think this supports wildcards... I know... lame...).

    Then use "deny" as above.

    Thank you very much!

    Permissions is such a messy situation right now, it's probably set my actual plugin development back by months. I'm really hoping to get this all straightened out so I can move on with making good spells and a magic system to use them! :D
     
  11. Offline

    sheepyowl

    thanks for the help!
    you answered each question and im pretty sure you didnt connect it to the question before it, and gave me many solutions to my 1 problem lol :p (or so it seems.)

    anyways.
    you mentioned something about the permissions for your other plugins there, wasnt the commands for nethergate limited to ops only? i could use the permissions for nethergate if you dont mind giving them here aswell...

    about the permissions: so to set myself admin, i will use console to say "grant sheepyowl admin", and say if i want to demote myself ill go "grant sheepyowl default"? in that case, i dont understand where the "deny" command comes in?
    also, isnt there a faster way to add all the spells? wasnt there a "su:" command that could do that?

    about adding the OPs to another setting automaticly - would be cool and save me from learning your permissions xD

    edit: also, in your permissions, you put torch and blink twice in the default settings. [edit2] i also cant find superblast anywhere. [edit3] after looking at the spells, i see that many of the spells are actually not there(phase, sandblast ETC.)... also, why does the Torch spell makes it daytime? i would guess it just places a torch in target area? :eek:

    edit4: OH, in order to use the permissions.yml i HAVE to have permissionssupport? that would explain some things...

    edit5: alright, i have no idea whats causing this, but permissions_support plugin says its null and doesnt want to work. it shows this:
    Code:
    17:56:45 [SEVERE] Could not load plugins\PermissionsSupport.jar in plugins: null
    
    org.bukkit.plugin.InvalidPluginException
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:80)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:129)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:94)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:59)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NoClassDefFoundError: com/elmakers/mine/bukkit/permission/P
    ermissionHandler
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Unknown Source)
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:72)
            ... 8 more
     
  12. Offline

    NathanWolf

    Sure! Here's the file: NG permissions.yml

    Just merge that in, but it's pretty easy- NG's important pnodes are all commands, so it's just NetherGate->commands->nether->create->world (for instance).

    Heh... well... no...

    Hrm, I need to check the syntax, but it's very possible that I need some sort of "ungrant" and "undeny" command. Maybe just a command that resets a player to no privs.... eek!

    Ok, so that not-so-minor detail aside, there are a few key points:
    • A player (or group) may be granted any number of profiles- so "grant sheepyowl default" does not remove your admin rights, it just gives you the default rights as well. (Which you already have, since they're the default)
    • The bukkit permissions format does not support profile inheritance (inheritance is done at the group level)- so the "admin" profile does not have all the "wizard" stuff, for instance! (Though you can use "/su" to cast any "missing" spells)
    • A player or group may also be denyed any number of profiles. This is not the same as being "not granted" that profile, and really you want to use completely different profiles for deny privs, probably
    • A "denied" permission profile works opposite from a "grant", and takes precedence over any grants. In other words, any permissions assigned to that profile will be denied to that player/group, regardless of if another profile has granted that player/group the permission.
    Hope that makes sense! :)

    What do you mean? Definitely only set up one profile with all the spells! You shouldn't be typing all the spells in on the console, or anything crazy like that.... :)

    Yeah, exactly... i think the op/player distinction is fine for most people- you start talking about classes and other advanced things when you move beyond that. I'm definitely going to have op (and I guess "ungrant"!) support in the next release.

    Oops! They originally only had torch+blink, so that's prolly why. Doesn't seem to hurt anything, but certainly worth cleaning up :)

    Heh, lots o questions :)

    Some of the spells have alt-fire functions- this stuff is moving to Wand eventually. Torch, for instance, changes the time to day or night if you point straight up or down when casting.

    The more advanced/powerful spells are reserved for the wizard class- if you're an admin, use "/su", or "grant player sheepyowl wizard".

    No, other way around! So confusing, I know.

    Spells supports two permissions systems:
    • Permissions - get Permissions.jar from wherever you get that these days, then download PermissionsSupport.jar and configure Permissions
    • "internal" or "bukkit preview" permissions, plus a simple/janky group manager. You want permissions.yml for this
    You probably do not want to use both at the same time (ymmv) :)

     
  13. Offline

    sheepyowl

    from what i have understood of your "deny and grant" explanation, deny IS the ungrant. (grant allows you to use a group of spells that belong to a certain group like default or admins, while deny prevents you from doing so. so to prevent all spells from a player i need to tell console 'deny badguy default')

    about the permissions: i get it now, thanks. permissions_support is if im using the .YML, but GroupManager should work fine.
    thanks again!

    edit: alright, its working right before i need to go! thanks!
    im off to a party, GL with teh cool plugins!
     
  14. Offline

    NathanWolf

    Well, it can be used for that, but from a data perspective it's certainly different :) Let me think of a use-case where it's different...

    Ok, let's say I made myself a wizard, then I realized I needed to be an admin. I may do this:

    Code:
    grant player NathanWolf wizard
    grant player NathanWolf admin
    ungrant player NathanWolf wizard
    Thinking that admins have anything a wizard would have (bad assumption!), I'd also remove myself from "wizard".

    Let's assume I've set it up so that this was the right thing to do- the "admin" profile has all of the spells, and "wizard" maybe just has most of them.

    The end result would be that I'd be an admin, but not a wizard- which is what you'd expect.

    However, consider this instead:
    Code:
    grant player NathanWolf wizard
    grant player NathanWolf admin
    deny player NathanWolf wizard
    This is totally different, in this case- and you'd end up very confused, I think :)

    What would happen is you'd be an admin that was denied anything a wizard can do. Now, as an admin, you could still use "/su" (unless something has denied it explicitly...), so you could bypass these other deny's and use spells in a super-user state. But, you're not meant to run around and play the game in that state!

    So, by default, you'd have just the super-powerful spells that you gave to admins but not wizards. You would not be able to use any spells that a wizard can use.

    Kind of confusing, but very powerful once you get the hang of it.

    Let me know if that does not address your questions! Thanks for your interest.


    Awesome! Good to know :)

    Enjoy your party :D
     
  15. Offline

    mikeysed

    can you show me how ur permissions are set up because thats my main problem i dont have real clue on how they work
     
  16. Offline

    Dev909

    Whats the Magic plugin going to be? Is it going to be a updated version of Spells?
     
  17. Offline

    NathanWolf

    Yes! Data-driven, with Wand bundled (but off by default, I think).
     
  18. Offline

    Dev909

    Ok@ Hopefully Magic will work for me! lol
     
  19. Offline

    Codex Arcanum

    Oh, OK. Just so you know, I wasn't suggesting you would copy/paste it straight from the plugin, I just thought it might be helpful figuring out how to go about it. Also, as a server admin, I want to let everyone use this plugin, becuase it's amazing. The problem is, I'm concerned about magic-powered griefers blowing up the world. I was wondering whether you could maybe add an auto-rewind feature.

    EX:
    Set blastrewind = 60 in the configuration file.
    This means that any blast spells are automatically rewinded after 60 seconds. This means that you can grief, but changes will be gone in 60 seconds.

    and/or could you let you create anti-spell areas that spells don't function in?

    If either of those are too crazy difficult, could you add a log of every spell cast with a player name, location, and time stamp?

    P.S. ...and on a final note, I remember hearing something about reagents and spells, how will/does that work?
     
  20. Offline

    NathanWolf

    I do have a feature planned for admins to be able to rewind other users' spells. Auto-undo is a cool idea, too- I could have that be permissions-based, and let you configure the timeout. (Anything less than a few hours seems a little pointless, though...)

    Heh- I should've kept reading... Yes, definitely- I want to do this :D

    Though, as I said- 60 seconds seems pointless.... hmm, maybe not, I guess you could use blast to tunnel around... but you have to keep casting, and keep moving, and if you run out of reagents you're probably toast after 60 seconds!

    You should be able to do this with WorldProtect. If Spells/Magic does not get along with plugins like WP, it's my goal that it does.

    Hmmm.... I love this idea. I'd look into hooking into BB first, but failing that I could log spell use to the db.

    In Magic, spells will be data-driven. They'll have a bunch of properties that you can set, and you can create new ones. So, for instance, something like this:

    Code:
    Spell
    {
      name
      spellType (name of the "base" spell)
      cooldown (in ms, 0 for none)
      parameters[]
      requirements[]
    }
    
    Requirement
    {
      destroy (if this requirement is destroyed on use)
      material (the material required)
      health (amount of health consumed)
      amount (floating-point count)
    }
    This will be configurable via YML files eventually, but require some DB know-how to configure in the meantime. I'll be providing at least one sample configuration to get people going, and I'll make sure it's drop-in.

    Anyway, so you'd have a handful of base spells- things like construct, fill, blink, etc- and then all the obscure stuff, too, that may or may not be configurable at all, like torch.

    The data ("spell variants") would define the actual spells that players use. So, there would be no "construct" spell, exactly- there would be shell, blast, sphere, box, etc- all data-driven variants using the base "construct" spell functionality.

    So, each variant can have its own casting cost, etc.

    Wand will have a separate data-driven system where you can create "slots". Each slot gets a material assigned to it and any number of "actions". Each action has one or more criteria (e.g. "swung wand", or "sneaking") for use- allowing for alt-fire, or maybe eventually gesture-based spells.

    This system will also allow for context-sensitivity, eventually- for instance different wand behavior when pointed at a sign versus chest.

    Missed this, I think- An internal error is a bummer, can you go to pastebin.com and paste the issue here, if you're still having it?

    Unfortunately, I can't do any debugging at this point until after Magic is released- at which point it'll probably be moot :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jan 8, 2016
  21. Offline

    Codex Arcanum

    Auto-Rewind- Well, yes, less than 2 hours WOULD be rather pointless, I just couldn't be bothered multiplying 60 and 120.
    WorldProtect- Do you mean WorldGuard? If so, I thought that only worked for vanilla block destruction. I'll do some testing though.
    Log- Yes! Thank You!
    Data-Driven-Whoa. That sounds ridiculously useful.

    Disclaimer: Keep in mind that I'm just throwing out random feature ideas, with very little knowledge of how difficult/impossible they are to implement.

    You know mcmmo? I use that plugin, mainly because I'm an RPG fan, and I like giving out powerful tools to players. I was thinking that it would be cool of there were some sort of optional leveling system for magic. So for example, a new player on a server with Magic installed could start out by using /cast fire. After an hour of monster hunting he'd be able to use /cast fire 2 after gaining a level in Destruction or he could use a wholly new spell, fireball. Anyway, there could be several different categories of magic (exploration, building, combat, to quote the title), and maybe a mana pool or something similar. I'd think that that would make magic a more fulfilling experience, since that spell isn't just some command you found, it's the product of hours of effort. Also would cut down on mage griefers, since everything that would do serious damage would be accessible only to long time members.
     
  22. Offline

    Alpha

    Persistance failed to load? What happend?
     
  23. Offline

    SunShe

    @NathanWolf, at when the v0.999? Strike!
    Lol ok, i exit ---->.
     
  24. Offline

    NathanWolf

    Those are the best kind! Be creative, let me worry about the details... I'll certainly tell you if it's too hard :)

    That is "plugin next" for me :D

    I'm going to call it Experience, but I haven't really started it yet.

    The ultimate goal for me, as a server admin, is for there to be an xp-based leveling system in place for users to automatically acquire new spells, ideally based on how they actually play the game.

    Well, I guess I'm not sure :)

    Do you have Persistence.jar? Did it spew any errors in your server log? If so, can you go to pastebin.com and put them there, please?

    I feeeeeelllll you're being snarky here, but I'll answer nonetheless :D

    Never!

    Nor will there ever be a Spells 1.0.

    0.991 is the last version you'll see of Spells, I think.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jan 8, 2016
  25. Offline

    Bl4ck5tar836

    ...some spells listed but dont work
    -shell
    -monster
    -sandblast
    to name a few...
     
  26. Offline

    Untouchablekill

    00:25:27 [INFO] Persistence: Create a plugins/Persistence/permissions.yml to use
    internal permissions

    I have the .yml in the folder but it fails to load? Any idea on how to fix this?

    Edit: Fixed the problem, but having problems casting spells.
     
  27. Offline

    NathanWolf

    Those are all spells not given to the default group by permissions.yml- just open it up and add them :)

    There is no wildcard permissions that I have found in the bukkit permissions system, so I basically just typed a bunch out by hand off the top of my head.

    Hm- does it now say "Persistence: Loaded 3 profiles" in your log?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jan 8, 2016
  28. Offline

    kuja130

    I can't seem to even get the spells to work for me... :/
     
  29. Offline

    sheepyowl

    hey again!
    ive been using GroupManager to control the spells, but it seems that everyone can do everything. i have allowed everyone to use a few spells(cushion, peek, rewind, etc) but they can use every spell.
    do i need to set something like this:
    Code:
        - 'Spells.cast.cushion'
        - 'Spells.cast.frost'
        - 'Spells.cast.[spell_that_we_want]'
        - '-Spells.cast.[spell that we dont want]'
    for every spell that i want/dont want? (i mean, it doesnt do automatic blocking, so do i have to manually block everything?)
     
  30. Offline

    NathanWolf

    No- all spells are off by default (@kuja130, this is likely your problem- please read back a page or two for now for details, better doc are coming).

    If you're using permissions.yml, don't use that with Permissions. That are two separate permissions systems here- and permissions.yml gives out all spells to all players by default.
     

Share This Page