Item Lore Animation

Discussion in 'Archived: Plugin Requests' started by Maeyrl, Jun 1, 2014.

  1. Offline

    Maeyrl

    It would be highly appreciated if you could make a animation for the following games. [​IMG]

    For Civ, a kind of civilization being built theme.
    For Epidemic, a zombie being killed by a human with a gun.
    For Control, a capture the point kind of look.
    For Data Runner, a protect the core kind of look.
    For Grid Games, a Survival Games kind of look.
    For Creative, a building kind of look.
    It is very highly appreciated.
     
  2. Offline

    timtower Administrator Administrator Moderator

    Maeyrl You know that those things require a long time to make?
     
  3. Offline

    Maeyrl

    I understand. Possibly make it to where you can create your own in a .txt file?
    Layout could be:

    Layout.txt
    - Epidemic
    ### ASCII ###
    Item: Zombie Skull

    - Data Runner
    ### ASCII ###
    Item: Bedrock

    Is this possible? I will wait as long as it may be needed but I think this should be made for public networks to be able to use.
     
  4. Offline

    timtower Administrator Administrator Moderator

    Maeyrl Can't input items in there, just ascii characters
     
  5. timtower I think the item was the item he wanted the law attached to. Although he never says what he wants to happen to those items so could be wrong. But probably just wants it copied from inspired by the other servers that have it.
     
  6. Offline

    timtower Administrator Administrator Moderator

    AdamQpzm likes this.
  7. Offline

    whitehooder

    my idea was to have separate text files containing the frames for the animations. The text files would be named for instance apple.txt or bedrock.txt. Within those you could create your own ascii art and have the plugin load the animations.

    Something like this:
    Code:
    §c█ §6█ §a█ §e█ §9█
    §c█ §6█ §a█ §e█ §9█
    §c█ §6█ §a█ §e█ §9█
    §c█ §6█ §a█ §e█ §9█
    §c█ §6█ §a█ §e█ §9█
    §c█ §6█ §a█ §e█ §9█
    ==FRAME==
    §6█ §a█ §e█ §9█ §d█
    §6█ §a█ §e█ §9█ §d█
    §6█ §a█ §e█ §9█ §d█
    §6█ §a█ §e█ §9█ §d█
    §6█ §a█ §e█ §9█ §d█
    §6█ §a█ §e█ §9█ §d█
    ==FRAME==
    §a█ §e█ §9█ §d█ §c█
    §a█ §e█ §9█ §d█ §c█
    §a█ §e█ §9█ §d█ §c█
    §a█ §e█ §9█ §d█ §c█
    §a█ §e█ §9█ §d█ §c█
    §a█ §e█ §9█ §d█ §c█
    ==FRAME==
    §e█ §9█ §d█ §c█ §6█
    §e█ §9█ §d█ §c█ §6█
    §e█ §9█ §d█ §c█ §6█
    §e█ §9█ §d█ §c█ §6█
    §e█ §9█ §d█ §c█ §6█
    §e█ §9█ §d█ §c█ §6█
    ==FRAME==
    §9█ §d█ §c█ §6█ §a█
    §9█ §d█ §c█ §6█ §a█
    §9█ §d█ §c█ §6█ §a█
    §9█ §d█ §c█ §6█ §a█
    §9█ §d█ §c█ §6█ §a█
    §9█ §d█ §c█ §6█ §a█
    ==FRAME==
    §d█ §c█ §6█ §a█ §e█
    §d█ §c█ §6█ §a█ §e█
    §d█ §c█ §6█ §a█ §e█
    §d█ §c█ §6█ §a█ §e█
    §d█ §c█ §6█ §a█ §e█
    §d█ §c█ §6█ §a█ §e█
    ==FRAME==
    I'll show you how that would look when I'm done with the load-from-text-file thing.
     
  8. Offline

    Maeyrl

    Thanks. That is exactly what I wanted.
     
  9. Offline

    whitehooder

    Ok, so I've got something working now. Had to mess about with encoding and such. The txt files have to be encoded with UTF-8 without BOM (use Notepad++ for instance).

    Here's the config file - as of now it's named apple and is hard coded to work for apples. I'd probably have the plugin use item ID's instead. Place the file in a directory named "LoreAnimations" in your plugins directory. (Right click -> Save As to download the text file rather than view it)

    Here's the updated jar file
     
  10. Offline

    Maeyrl

  11. Offline

    whitehooder

    Maeyrl
    Yeah, for now. Didn't mind coding anything else for the moment as it's not that important.
     
  12. Offline

    Maeyrl

    Can I give you a list of blocks / items to add to it also?
     
  13. Offline

    billytheDOLPHIN

    Why doesn't he just add all the items rather than the ones that apply to you. Remember this is a public plugin.
     
  14. Offline

    whitehooder

    I'll focus on getting some animations done. Maybe I'll make a program for creating animations or loading GIFs. I don't know yet.
     
  15. Offline

    zackpollard

    Stick this code on github and I may make some pull requests.
     
    CeramicTitan likes this.
  16. Offline

    sam2828

    I would use this! Please someone make it!
     
  17. Offline

    whitehooder

  18. Offline

    zackpollard

    Pull request done. ;) Got bored at 5:30 AM
    This code is far from satisfactory though imo, I may go over it again and re-write it more efficiently at some point in the future, but for now I just stuck with what you had and edited it for multiple items. :p Also, if you stick this on BukkitDev, please add me to the project ;)
     
    CeramicTitan likes this.
  19. Offline

    whitehooder

    Thanks for contributing!

    There's only one thing I think might not work. The InventoryOpenEvent doesn't fire when a player opens his own inventory, but works for chests. So what I had in mind was to leave the old way still there and add the InventoryEvents to make it work with chests and custom shop inventories created by other plugins etc. Otherwise, I chose to put the FPS at 10 just because 20FPS seemed too fast with that little test animation of mine ;) Had planned doubling it, so thanks for that as well.

    So for now I'll accept your pull req and re-add the lines from 46 to 50 so that the animations will work for player inventories even after reloads ;)

    Thanks again ;)
    -White
     
  20. Offline

    zackpollard

    If you reuse that old piece of code for adding player invents to the invents list, then it won't work for new players, only for current players on the server as it runs on enable. You could put it inside the runnable? Also, probably best to stick it on BukkitDev now and we can make changes there and post the link here :p
     
  21. Offline

    whitehooder

    I implemented the PlayerJoinEvent and PlayerQuitEvent too so that it will in fact work for players joining after a reload. It's just that I need to add invents for the currently logged in players in the onEnable method for when a server admin decides to reload the server plugins. ;)
     
  22. Offline

    zackpollard

    Ah yes, completely missed that, it was 5AM when I did this, probably needed some sleep xD
    I do believe putting this on BukkitDev would be a good idea though, I can create a page later if you'd like?
     
  23. whitehooder Animated GIFs are generally an easiesr & superior method of animation than text-based. ;)
     
  24. Offline

    zackpollard

    Although very hard to implement in this situation. They would need to be converted into a text based form to work.
     
    MrAnanasik likes this.
  25. Offline

    zackpollard

    The method uses lore, this accepts a text input. Gifs are based on changing pixels, which are far smaller than the ASCII based squares that this uses. A converter could be made, but the results would not be desirable.

    I edited the plugin last night to be customisable for all items, it's on github currently on the link above if you want to compile it, a downloadable .jar will be available later and you can create those animations yourself.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 30, 2016
  26. Offline

    whitehooder

    If you wondered what a converter would be, bubba1234119 posted "a head start" earlier.
    https://forums.bukkit.org/threads/lib-imagemessage-v2-1-send-images-to-players-via-the-chat.204902/

    Hooking into this and doing some magical stuff could probably work, but it's better to create our own GIF to ASCII converter. The only problem is that it would take quite a while :/

    Would a GUI for creating the ASCII animations be of any help? Maybe I could even implement GIF to Minecraft ASCII into the program at a later date.

    If a GUI would be desirable I had a little thing in mind. The program would have a row of frames to "draw" to and a bunch of squares you would click with the desired color. I'll have a sample up sooner or later.

    And zackpollard, I'll fix a BukkitDev page today. I'll add you as some higher rank, can't remember the rank names. At least you'll be allowed full control and all ;)
     
  27. Offline

    zackpollard

    I think a GUI setup would be the best option really, so they can select frame height and width, change colours, and then advance to the next frame.
    Thanks of setting up a BukkitDev page when you do ;)
     
  28. zackpollard whitehooder As a simple proof of concept for that idea, see this https://github.com/AdamQpzm/MagicGifThingy

    At the moment it assumes 8x8 for the size, but I'm sure that's easy to change to make it based on however large the gif is. It also currently outputs as a broadcast message, but it does it from a String[] so that part at least shouldn't be difficult to convert to lore.

    Of course, making your own thing is also an option. As said, this was intended as a simple proof of concept to show that reading from gif wasn't really all that problematic given the resources available. :)

    Also, I think my graphic design skills could use some work!
     
    CeramicTitan likes this.
  29. Offline

    zackpollard

    We will definitely look into that, i'll read over your code later, but I understand what you're saying. Thanks :)
     
    AdamQpzm likes this.

Share This Page