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
939
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
939
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 Profile Posts

Revamped the crew for my VN about thirty times. Only character that's stayed constant has been the fungus character. Guess it really grew on me...
I want to work on my reboot, but I don't have time to do it. ;_;
4y195n.png
big image so i posted it as a spoiler
Just a reminder to back your projects up. Do it now! :yamero:
If there was an award for best game dev procrastination, I'd say 'meh, I'll pick it up tomorrow' >_>
Honestly though, I've been staring at the same half-made map for a while now haha! Ahhh, I'm so tired of mapping!

Forum statistics

Threads
111,270
Messages
1,059,785
Members
144,567
Latest member
Sysce
Top