Welcome to the Soartex forums!

  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Welcome to the Soartex Forums! Consider signing up to get involved!
  3. Registration has been temporarily disabled until we sort out the issue regarding spam on the forums. Sorry about this!

Tutorial MCPatcher Animation Tutorial!

Discussion in 'Tutorials' started by Disaster86, Apr 24, 2012.

  1. Disaster86

    Disaster86 Minecraft Modder

    MCPatcher Animation Tutorial
    I thought I'd make it less quiet here and teach some people how to make any texture animated in anyway.
    There are 3 methods you can us to make your animation.

    • Soartex Fanver DEFAULT .zip archive
    • At least 2GB RAM recommended
    • Windows Explorer and/or WinRAR
    • Image Manipulation Software (see below)
    • Ability to count approximately in multiples of 64 or read the reference images below
    • Any text-based file editor (Notepad ;P) - For Advanced Methods
    Acceptable Image Manipulation Software:
    • Photoshop (CS3 or Higher Recommended)
    • Paint.net
    • GIMP
    Tell me if there are any good ones I haven't mentioned!
    Understanding Reference Numbers!
    Reference numbers are the number of each block as you count 64 pixels from the upper left to the lower right of the image. Numbers are from 0-255 (256 numbers). Here is an image numbering the appropriate blocks if you can't count. They will be helpful to you to name your image correctly if your using method 1 only.
    It's the same with items. I don'y have a separate one yet but you can tell whats what from here.

    Method 1
    Difficuly: 3/10 - Simple Method (Blocks & Items only! Optifine Compatible!)

    Create a canvas in your Image Manipulation software, Width - 64 pixels, Length - multiple of 64 pixels.

    The canvas length determines the amount of frames in your animation.
    I usually work with 40 frames which is 2560 pixels in length.
    I recommend you start at a reasonable height value like 640 pixels (10 frames) as it gets tough and sometimes boring and you'll often find that you made a mistake early on and have to go back 30 odd frames and/or start over.

    The first 64x64 image is the block or item you wish to animate, if your animation is part of the image you will only need one layer to work on. However, if you are overlaying the animation you will need to create an animation layer above the default image. e.g. 'Glowing Blocks' animations only require 1 layer. Magic Wand tools and TINY transitions are the way forward. For my animations if I'm applying a filter or effect or just plainly changing the brightness levels I will only progress by 1 or 2 (being the highest) values per frame.

    Save the file as a standard .png format and put it in the .zip/anim folder.

    Name the finished image custom_item_<Ref Number>.png if it is an item.
    Name the finished image custom_terrain_<Ref Number>.png if it is a block.
    Name the finished image custom_portal.png if it is a portal animation.
    Name the finished image custom_fire<n_s or e_w>.png if it is either side of the flame texture.
    Name the finished image custom_water_<still or flowing>.png if it is either still or flowing water.
    Name the finished image custom_lava_<still or flowing>.png if it is either still or flowing lava.
    Remember: the <>'s must be removed and the possible words specified.

    Method 2
    Difficulty 5/10 - Advanced Method (Any Image & Texture Mapping! MCPatcher Only!)
    It's getting tricky now! Your going to have the freedom to name your image whatever you want this time.
    Although now you can start making .properties files.
    Anyone who knows a fair bit about computers can tell you that .properties files are ingenious little things, simple to make and use and can be written in anything from MS Notepad to some futuristic nerd-device named the 'coding machine 3000' and cost 100k to make only to find that the developer had 1 sale since it was released back in 2003.

    First create your texture! Name it whatever you want! (Something normal preferably).

    Open up notepad and type this to begin with, do not include <>'s or #...'s in your file..

    from=/anim/<name of image>.png
    to=/<sub-folder of original image>/<original image>.png
    #This is the x value where the portion of the image you made begins!
    #This is the y value where the portion begins!
    #This is the size in width of your image!
    #This is the size in length!

    e.g. This is for the eyes ONLY of the default char.png

    blinkingchar.png - Image is 4 frames as determined by is 4x length.

    the eye texture starts at x-64 & y-95 of the original char texture in the mob folder and the image size of one frame (tile) is 64x10 so the code is like this:
    Save both the animation .png file and the properties file to /Anim in the texture pack .zip.

    Method 3
    Difficulty 7/10 - Insane Method (Post-Production Fixes, Delays & Custom Frame Order! MCPatcher Only!)

    This is basically an extension to Method 2 so read that one first!
    Oh wow! You picked the hardest one! After making a file point in a custom location to a small part of one file e.g. the blinking eyes you realise that the animation keeps repeating non-stop.

    You need to set up a series of code chains like these:

    This means the first frame (tile) to be played is frame 0 - Default. Default lasts for 120 somethings... that's only a few short seconds. the second tile is then tile 1, follwed by 2 and then 3 which stays there on pause for 6 somethings. Here's how Kahr explains it:
    Show Spoiler
    X starts at 0 and represents the order you want frames to display in. Y in the tile number in the animation .png file. The first tile is 0, the second is 1, etc. Z is the duration you want that frame displayed, in game ticks (if omitted, duration is assumed to be 1 for that frame). For example, to make an animation with 3 tiles, run on a 5-frame animation with a pause in the middle, the .properties file might look like this:
    There you have it, send these straight to the /Anim folder to test and post them here when finished!
    Ninten_Droid and Shoeboxam like this.
  2. Floppygunk

    Floppygunk Cereal Killer

    Tip: By default, each frame lasts for one tick, which is 1/20 of a second. This means that the animation runs at 20 frames per second. When you set the duration of a frame, you are specifying the number of ticks that the frame lasts for. So the code:
    means that the second frame pauses for twenty ticks, or one second.
  3. Alex

    Alex New Member

    Pixelmator is a great one for mac and it wont kill your wallet, too, like photoshop
  4. Jiraiyah

    Jiraiyah New Member

    if i got it right, the only way for optifine is method one right?
  5. Shoeboxam

    Shoeboxam Administrator/ Invictus Staff Member

    Nope, Optifine has custom animations. ;)
    Optifine has caught up since this post was made.
    Ninten_Droid likes this.
  6. Jiraiyah

    Jiraiyah New Member

    so we can use all three methods and all those stuff said about ctm in other posts with optifine too?
    Shoeboxam likes this.
  7. Disaster86

    Disaster86 Minecraft Modder

    Feel free to update the post, Shoe,
    I'm pressed for time as you know :p
  8. Floppygunk

    Floppygunk Cereal Killer

Share This Page