Yanfly core + System options issue.

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:

Spoiler
2016-05-30.png



Common Event:

Spoiler
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!
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. 
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?
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. 

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-core-system-options-issue.62622/