Yanfly core + System options issue.

Discussion in 'RPG Maker VX Ace' started by Dark_Metamorphosis, May 30, 2016.

  1. Dark_Metamorphosis

    Dark_Metamorphosis What a horrible night to have a curse. Veteran

    Messages:
    2,194
    Likes Received:
    382
    Location:
    Sweden
    First Language:
    Swedish
    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: May 30, 2016
    #1
  2. Zalerinian

    Zalerinian Jack of all Errors Veteran

    Messages:
    4,695
    Likes Received:
    922
    Location:
    The Internet.
    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. 
     
    #2
  3. Dark_Metamorphosis

    Dark_Metamorphosis What a horrible night to have a curse. Veteran

    Messages:
    2,194
    Likes Received:
    382
    Location:
    Sweden
    First Language:
    Swedish


    So It's not possible to change it with a ordinary script call then?
     
    #3
  4. Zalerinian

    Zalerinian Jack of all Errors Veteran

    Messages:
    4,695
    Likes Received:
    922
    Location:
    The Internet.
    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. 
     
    #4

Share This Page