Description
Allows the usage of animated images (like Gifs), which are present in form of an image strip.
Author
Iavra
Parameters
@param File Name Format
@desc Used as an identifier for animated images. We capture the number of frames and the update rate of the animation.
@default _animated_(\d+)_(\d+)
How to Use
Allows the usage of animated images in RMMV. They have to be converted to image strips beforehand, which is an image with the dimensions [(frame width * number of frames) x (frame height)] (width x height). So, if you have an image with dimensions of [50x60] and 4 animation frames, the resulting strip will be [200x60] and consist of all 4 frames in a row.
The image has to be named in a certain way, so the plugin knows which images it needs to animate. When using the default value for the parameter "File Name Format", the strip above could be named "myImage_animated_4_100.png". The last number tells the plugin, how fast the animation should be played. In this case, we change the displayed image every 100 frames.
The plugin has been tested for simple pictures, characters and battle background and works even when tinting them.
Terms of Use
Free to use for both commercial and non-commercial games. Please give credit.
Download
http://pastebin.com/rh2zk46V
Iavra Gif
● ARCHIVED · READ-ONLY
-
-
Yes Thank You! Now I can finally use my "Larva GIF" (seriously at first glance I though it was larva instead of lavra).
Anyway thanks for the script! I'll be using this!! -super excited!Spoiler
-
Well, actually it's an uppercase i, but somehow most people get it wrong ^^
-
@Chester
That gif. Why? ;_; -
Many fonts, including RM's show l and I almost exactly the same. Can you tell the difference just by looking at the two? No? Didn't really think so :3 (L is on the left, i is on the right).Well, actually it's an uppercase i, but somehow most people get it wrong ^^
-
:D Yeah, i know, that's what i get for picking such a name. I take no offense at it, though ^^
-
This does not work with TDDP bind picture to map script. :')
EDIT: Just a note that it works really great on its own!! -
I see, that plugin grabs the loaded Bitmap directly, which means he'll get my wrapper. Mine currently only works, when the bitmap is accessed from a sprite. I can see, if i can fix this, but that would mean:
- My container extends from Bitmap and overwrites all methods, redirecting to the current frame.
- The container itself (or the ImageManager) manages the animation, since there isn't guarenteed to be a Sprite around, which means all instances from a given image will ALWAYS run synchronized.
- Images will (probably) even update when then they're not currently in use, increasing performance cost.
Actually, i'm sure it's possible to write a parallax script that works directly with the sprites, since this was already done in Ace.
/edit: I created a simple plugin that will bind pictures to the current map, if the plugin command "Parallax" is called before showing the picture. It doesn't dupport multiple layers, like Galenmereth's plugin does, but it's something:
SpoilerCode:/*: * @plugindesc Allows to bind pictures to the map, instead of the camera. * <Iavra Parallax Picture> * @author Iavra */var Imported = Imported || {};Imported.iavra_parallax_picture = true;//=============================================================================// namespace IAVRA//=============================================================================var IAVRA = IAVRA || {};(function() { "use strict"; /** * If set to true, the next picture will be bound to the map, instead of the camera. */ var _makeParallax = false; //============================================================================= // class Game_Picture //============================================================================= (function($) { var _alias_show = $.prototype.show; $.prototype.show = function(name, origin, x, y, scaleX, scaleY, opacity, blendMode) { _alias_show.apply(this, arguments); this._iavra_parallax_picture = _makeParallax; _makeParallax = false; }; })(Game_Picture); //============================================================================= // class Sprite_Picture //============================================================================= (function($) { var _alias_updatePosition = $.prototype.updatePosition; $.prototype.updatePosition = function() { _alias_updatePosition.call(this); var picture = this.picture(); if(this.picture()._iavra_parallax_picture) { this.x -= $gameMap.displayX() * $gameMap.tileWidth(); this.y -= $gameMap.displayY() * $gameMap.tileHeight(); } }; })(Sprite_Picture); //============================================================================= // class Game_Interpreter //============================================================================= (function($) { var _alias_pluginCommand = $.prototype.pluginCommand; $.prototype.pluginCommand = function(command, args) { if(command === 'Parallax') { _makeParallax = true; } }; })(Game_Interpreter); })(); -
Plug-ins, thank you.
Please tell me how plug-in off in Game playing. -
Interestingly, my Anti-Virus detects this script as a virus... Which is a tag worrying. As I know nothing about Java and couldn't say if it holds potentially dangerous code I will not be using it, which is a shame as I would like to have had animated face images. Still i'm sure I can find one elsewhere.
-
Antivirus usually detects all .js files as viruses. If you worry so much, you can copy the raw code into a new .js file and use that. The code is right there, so you can ask any scripter on these forums to verify, that it doesn't do anything harmful.
@sayllsayll I don't really get your question. The plugin will automatically activate for all images named in a certain way, so you don't need to toggle it on or off. Also, displaying image strips as-is doesn't make much sense for me. -
Antivirus usually detects all .js files as viruses. If you worry so much, you can copy the raw code into a new .js file and use that. The code is right there, so you can ask any scripter on these forums to verify, that it doesn't do anything harmful.
@sayllsayll I don't really get your question. The plugin will automatically activate for all images named in a certain way, so you don't need to toggle it on or off. Also, displaying image strips as-is doesn't make much sense for me.
Thanks for the reassurance. This is the first time i have had a virus warning on a Script and I've currently got around 59 of them, which is why it worried me slightly. I obviously tried to copy/paste raw file and save it but my virus scanner won't allow me to do that either, which obviously made me think "ok something isn't right here."
I'll try and over ride my anti-virus. -
Ok i've tried this. Sadly it doesn't seem to work with message window faces (which is what I needed it for). Is this my error or is it not intended to work this way?
-
Not your error, the plugin can't work with it. It works directly on sprites by switching out the underlying bitmap, but the message window directly grabs the bitmap and draws it onto the window, so it won't work.
-
Iavra you think can i use this plugin to modify the Loading Screen?
I mean, i would like to have an animation instead the static ”now loading" image.
Best -
No, that's not possible. The "Now Loading" image is drawn onto a canvas, similar to the message face. Though, you could use my Splash Video plugin to display some videos (company logo, etc), while the game is loading.
-
Not your error, the plugin can't work with it. It works directly on sprites by switching out the underlying bitmap, but the message window directly grabs the bitmap and draws it onto the window, so it won't work.
In theory you Could make it work but placing a blank 144*144px face image on each of the message windows and then setting up your script to run a series of blinking/talking images and just reposition it over the chat window spot. Which could be made a little simpler by setting it up as a common event for each character. True it's a bit of a messy system, but hey it would get the results! -
ano...
excuse me @Iavra
may i know about this script?
can all image be "Gif"?
or just use for show picture? -
I haven't tested all possibilities, but i know of:
- Pictures
- Title backgrounds
- Parallaxes
- Battle backgrounds
Those can be animated, at least. -
how about game over's image? o_O
is it possible to be 'gif' too? o_O