Yanfly core + System options issue.

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,696
Reaction score
935
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,696
Reaction score
935
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. 
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,981
Members
137,563
Latest member
cexojow
Top