Aramis-IX

Villager
Member
Joined
Sep 23, 2014
Messages
15
Reaction score
25
First Language
English
Primarily Uses
Sprite Zoom Version 1.0.0
by
Aramis-IX
 ​
Sprite Zooming.png

Introduction
Zoom events, the player and follower sprites! An adaption of Tsukihime's “Character Sprite Zooming” script for Ace.


Features

Zoom or shrink a sprite's width and height independently (or uniformly). Zoom animation(s) over time (or instantly).


How to Use
Execute the following SCRIPT calls from any event or moveroute (Sprite Zoom does not support plugin commands):

SpriteZoom.zoom(ID, zoom);
SpriteZoom.zoom(ID, zoom, duration);
SpriteZoom.zoom(Id, zoom, duration, zoom_y);
SpriteZoom.zoom(ID, zoom, duration, zoom_y, duration_y);


**ID is the ID of the event in question**

     1-9999    =         Event number on map

     0              =         Your player

    -1              =         Follower 1

    -2              =         Follower 2

    -3              =         Follower 3

**ZOOM is a percentage**

    1 equates to 100%

  0.5 to 50% (half the size)

    2 to 200% (double the size)

The duration value allows you to create a zoom animation over-time (in frames). It can be an integer that is 0 or higher.

NOTE: For more detailed information and examples please view the plugin's "help" section in RPGMaker MV.


Script
SpriteZoom

Right-click link and select "Save Link As"

Dependencies

None

FAQ

Q: Will Plugin Commands be supported eventually?
A: Perhaps later... I was unable to get Plugin Commands to operate as effectively as Script Calls, so they were removed from the initial release.

Credit and Thanks
- Aramis-IX
- Tsukihime (Hime from HimeWorks.com)


- Nelderson

Terms & Conditions

Free for non-commercial and commercial use.

Author's Notes
Unfortunately, I can only provide a limited amount of technical support for this plugin. I'm fairly new to JavaScript and the amount of time I have on hand is fairly restrictive. 
 
Last edited by a moderator:

Shiroi Akuma

Shut up and take my Monet    ( ͡° ͜ʖ ͡°)
Veteran
Joined
May 11, 2015
Messages
350
Reaction score
286
First Language
German
Primarily Uses
N/A
Very good script so far. :) So I don't need to scale graphics manually.
 

Ghost of Christmas Kloe

The Icecream Princess
Veteran
Joined
Nov 15, 2015
Messages
1,548
Reaction score
967
First Language
English
Primarily Uses
RMMZ
This is probably the most fun plugin I've played with for ages! I can make giant people to crush the nation!! MWHAHAHAHAHAHA!!!
 
I love it so much I made a funny screenshot!

Yeah, I'm pretty sure she can... she's like 3 times as big as them!!  BD Dragonspear 10_12_2015 18_46_21.png
 
Last edited by a moderator:

Drake Aran

Veteran
Veteran
Joined
Sep 14, 2014
Messages
10
Reaction score
1
First Language
Italian
Just what I needed! Works perfectly! Thank you very much!
 

ZcheK

ZcheK
Veteran
Joined
Feb 22, 2016
Messages
96
Reaction score
24
First Language
English
Primarily Uses
I also want to say I'm grateful for this as I'm making a point and click adventure game where character scaling is essential.


Thanks a lot!
 

ZcheK

ZcheK
Veteran
Joined
Feb 22, 2016
Messages
96
Reaction score
24
First Language
English
Primarily Uses
I have a request:


I would like it if there was a script command to zoom the event that the script runs from.


e.g.                      -4     =     Current Event


The reason I need this is I'm using an event copy plugin, so my events have varying ID's across maps.
 

Diatonis

Villager
Member
Joined
Apr 23, 2016
Messages
24
Reaction score
10
First Language
english
Primarily Uses
Really cool plug-in that works beautifully, and with no lag or glitchy behavior. Thanks!
 

Aramis-IX

Villager
Member
Joined
Sep 23, 2014
Messages
15
Reaction score
25
First Language
English
Primarily Uses
ZcheK, you can reference the current event's ID using a bit of code (its pretty simple though). Use this._eventId or this.eventId() in place of the eventId number in the script call. For Example: SpriteZoom.zoom(this._eventIdzoom, duration, zoom_y, duration_y);
 

Aramis-IX

Villager
Member
Joined
Sep 23, 2014
Messages
15
Reaction score
25
First Language
English
Primarily Uses
I have a request:


I would like it if there was a script command to zoom the event that the script runs from.


e.g.                      -4     =     Current Event


The reason I need this is I'm using an event copy plugin, so my events have varying ID's across maps.



Let me know if you encounter any problems. 
 

ZcheK

ZcheK
Veteran
Joined
Feb 22, 2016
Messages
96
Reaction score
24
First Language
English
Primarily Uses
ZcheK, you can reference the current event's ID using a bit of code (its pretty simple though). Use this._eventId or this.eventId() in place of the eventId number in the script call. For Example: SpriteZoom.zoom(this._eventIdzoom, duration, zoom_y, duration_y);

 Both work great, thanks Aramis-IX
 

IAmVianca

Veteran
Veteran
Joined
Nov 4, 2015
Messages
99
Reaction score
4
First Language
English
I can't seem to get this to work.


I've tried putting it on the event itself, then on a custom move route, then on a event that controls the cutscene and I can't get the sprite I want to shrink.


I'm using the code: SpriteZoom.zoom(6, 0.5);


6 is the event ID I want to shrink the sprite of.


I am also using the script that zooms in on the characters (which this event is a part of), which is:


var xPos = $gameMap.event(6).screenX();


var yPos = $gameMap.event(6).screenY();


$gameScreen.startZoom(xPos, yPos, 1.5, 20);


Can someone help me get this working, please?
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,641
Reaction score
1,475
First Language
French
Primarily Uses
RMMV
hey thanks, very nice for xyZ mapping
 

ZcheK

ZcheK
Veteran
Joined
Feb 22, 2016
Messages
96
Reaction score
24
First Language
English
Primarily Uses
This doesn't seem to be compatible with Quxios QPathfind plugin, it's an extension of his pixel based movement plugin to calculate move to mouse routes better, any idea how I could get them working together?

EDIT: NVM he's fixed it in the latest update.
 
Last edited:

Jonath4nC

Kiwi
Veteran
Joined
Aug 13, 2013
Messages
54
Reaction score
45
First Language
English
Primarily Uses
Thanks Aramis for this script, its awesome!

So I'm thinking of using this as a way to give my game depth. Could there be a way to alter the actor's scale depending on his/her y axis along individual pixels (not by grid)? So the further up the actor is on the map, the smaller he/she gets and the lower the actor is, the larger he/she gets.

I was also thinking that the speed of the actor would appear slower the further away he/she is (take longer to get from one side to the other on the x axis), so I'm wondering if there is also a way to change the actor's speed according to their y axis as well? (I did notice though, when you did this through events, the animation is slower which is not what I want haha. So if the actor could be slower, but keep the same frame-rate?)

...but of course I understand if you are unable to help out with that. Perhaps there's someone else who might see this and be able to help?
Anyway, thanks regardless!

EDIT: That last request is quite different to this script. Perhaps I'll put this as an actual request on the request topic in a few days...
 

Psycha

Warper
Member
Joined
Dec 16, 2018
Messages
1
Reaction score
0
First Language
English
Primarily Uses
RMVX
How do I install/Use it? Sorry I am a noob.
 

Gabezin

Veteran
Veteran
Joined
Sep 27, 2016
Messages
43
Reaction score
13
First Language
Spanish
Primarily Uses
It's possible to zoom a map and characters without zooming the parallax background?
 

mauigamestudio

Creator of Familia
Veteran
Joined
Jan 21, 2020
Messages
79
Reaction score
64
First Language
English
Primarily Uses
RMMZ
I used this plugin on an RPG Maker MZ project. It works. I made a video about it as well.
 

cellicom

Uncle celli
Veteran
Joined
Mar 13, 2014
Messages
57
Reaction score
43
First Language
Italian
Primarily Uses
RMMV
For seme reason, if you load a savegame without this plugin before, the actors will be transparent.
To avoid this issue and let the plugin works with old load playtest, you need to change 2 rows

Line 88 and Line 89
JavaScript:
this.scale.x = this._character._zoom_x || 1;
this.scale.y = this._character._zoom_y || 1;

And, tadam! It's works!
Hope It's help! :)
 

PvtRyan96

Villager
Member
Joined
Nov 11, 2022
Messages
6
Reaction score
1
First Language
English
Primarily Uses
RMMV
Hello. I have two specific questions:
1. I'd like to know if it's possible to enter a given actor/event's current zoom level, plus or minus a certain amount, in as the input of the zoom script itself.
2. I'd like to know if it's possible to tie that same actor/event's zoom level to a variable.

To crystalize what I'm trying to do, I'll give an example. Say I wanted to make an escape room in my game where the player has a curse inflicted upon them where they shrink a small amount every certain number of seconds and must escape before becoming too small. Instead of simply making a new zoom level for every possible size they could have, it would be better to make it so that I can run one event for every "pulse" of the change that looks at the player's current size and shaves off a small amount of it every time it's run.
As for the second question, having it tied to a variable would allow me to easily define what the player is and isn't able to do at a given size using switches.

I don't particularly know any javascript, but I'm willing to learn some to make it work how I envision it.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
7,510
Reaction score
3,021
First Language
Dutch
Primarily Uses
RMMV
@PvtRyan96 it might be possible to do what you want if you call it before.

best it to use a common even and a wait frame during the parallel process.
in a scriptcall, you can try (as this is for player only, so repeat for party members
and or followers.
define a variable x for shrinking and a variable for duration.
than in a conditional branch, check the zoom part.

so if you want to shink it every 5 seconds over 60 frames, you event look around

wait 60 (wait 60 frames (1 second)
if variable z <= 0 // check if variable z (timer) is lower than equal or lower than 0
JavaScript:
SpriteZoom.zoom(0,  $gameVariables.value(x),  60);
shrink level of variable x over duration of y (you can use flat numbers.
variable x -= 0.1
variable z = 5
else
variable z -= 1
end

as this keep looping, every 5 seconds, the player shringk by 0.1.
so from 1 to 0.9, 0.8, 0.7, 0.6 etc (which you can make the attack weaker.

it might not work in battle as there as nothing there, but I'm planning to
make the plugin to do so, as adding plugin commands to it is already done.
 

Latest Threads

Latest Profile Posts

Creating the mood, coloring, and lighting for this gonna need a big brain moment.1685936069202.png
Someone in a facebook group just corrected something I said, by saying exactly what I said. The mind boggles.
Less than 20 tiles remain in Inside_B that I need some kind of analogue of in my in custom Inside_B, and a whole 39 tiles that I didn't use and can thus make my own custom tiles or my own flavors of from other tile sheets.


Chapters advancing demonstration.
Main character roey will be revived after chapter 7, so the animations will be different after it
The title of the main characters will be ascended to celestial as well as wings and rings.

Forum statistics

Threads
131,651
Messages
1,221,871
Members
173,389
Latest member
louiebouiebrian
Top