Dark_Metamorphosis

What a horrible night to have a curse.
Veteran
Joined
Nov 23, 2012
Messages
2,192
Reaction score
382
First Language
Swedish
Primarily Uses
So I'm using the Yanfly System options script where I have made my own switches and variables for certain things, but there's a particular one I can't get running and I need some help. 


Inside the core script of Yanfly's there's a possibility to change the animation speed from default:15 to max 60 fps (I use 30 fps as the default animation speed here).


Now what I want to do is to make a custom variable that will let the player change the animation speed from the options menu, here's my complete setup of this:


Variable setup:

2016-05-30.png



Common Event:

2016-05-30 (1).png



Now, I think I might use the wrong script call for changing the speed module for yanfly's core script. But I can't seem to figure it out when looking inside his script.


These are the lines I found about the animation rate:


  #--------------------------------------------------------------------------
  # overwrite method: set_animation_rate
  #--------------------------------------------------------------------------
  def set_animation_rate
    @ani_rate = YEA::CORE::ANIMATION_RATE 




If anyone can find the proper script call, or if I have set this up in the wrong way I would be very thankful!


The scripts can be found here for reference:


Ace core: (For animation script call).


Ace System Options:  (For the varaible setup in System options menu).


Hope someone can aid me with this, thanks for your time!
 
Last edited by a moderator:

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,699
Reaction score
945
First Language
English
Primarily Uses
N/A
Just taking a quick look at it, the main problem is it looks like you're trying to modify a constant value, which really should crash with an error. 


The reason you're not seeing a change is because the animation speed doesn't constantly look at that constant value, it copies it into a variable inside the instance of that class. Each animation has a copy of the speed. You'd have to update every animations @ani_speed variable to change their animation speed.


I haven't used ace in a while, and rarely dabbled when Yanfly scripts, so figuring that it is up to you. 
 

Dark_Metamorphosis

What a horrible night to have a curse.
Veteran
Joined
Nov 23, 2012
Messages
2,192
Reaction score
382
First Language
Swedish
Primarily Uses
Just taking a quick look at it, the main problem is it looks like you're trying to modify a constant value, which really should crash with an error. 


The reason you're not seeing a change is because the animation speed doesn't constantly look at that constant value, it copies it into a variable inside the instance of that class. Each animation has a copy of the speed. You'd have to update every animations @ani_speed variable to change their animation speed.


I haven't used ace in a while, and rarely dabbled when Yanfly scripts, so figuring that it is up to you. 



So It's not possible to change it with a ordinary script call then?
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,699
Reaction score
945
First Language
English
Primarily Uses
N/A
You'd have to write a function that updates all sprites, but that may not be perfectly easy to do. My first guess would be to look into the sprite set classes to update some sprites. 
 

Latest Threads

Latest Posts

Latest Profile Posts

You know.. I... I kinda lost my interest in living a long time ago. What sustains me is a lack of interest in dying.
Like a star that is balanced between the forces of gravity and outward pressure, I feel like the energy to produce that outward pressure is weakening. I feel like I should pull a Stardew Valley and revert to a more primitive lifestyle, away from others. :(
made more sprite for the Time passing game that I may or may not actually make. At least now I have a better idea how to make Rtp Walk sprites actually look wrinkly and old, since the Generator doesn't do that.
Well, now all of my Refreshable Events scripts also feature some brand new demos to let people see how easy it is to let the script handle the refreshing of a given set of events. All of this with just one specific script call per event!
Sorry Kitty...I'm practicing my harmonics. RIP your ears.
I noticed they now have a Gremlins cartoon. Nothing like striking when the iron is hot then trying to make a reboot from a movie made 34 years ago.

Forum statistics

Threads
131,585
Messages
1,221,264
Members
173,284
Latest member
untamedeventuality
Top