• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • The Eevee Expo Game Jam has concluded! 🎉 Head on over to the game jam forum to play through the games.
    Don't forget to come back September 21st to vote for your favorites!
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
Delta Speed Up

Resource Delta Speed Up 1.2

Heyr - does anybody have instructions on how to edit the 'Main_Script' .txt file so that the player can only ever speed up battles? I don't want the player to ever have the ability to speed up the Overworld, not via key shortcut or the options mention. I can't figure it out. Thanks!
 
I have the same as the above. Toggling Delta Speed Up stops Lucidious89's Animated Pokemon System from working it seems. It's not only in battles, but also when looking at pokemon in party
Ruby:
Expand Collapse Copy
#===============================================================================#
# Handle incrementing speed stages if $CanToggle allows it
# (Modified so that we adjust the effective time when cycling speeds)
#===============================================================================#
module Input
  def self.update
    update_KGC_ScreenCapture
    pbScreenCapture if trigger?(Input::F8)
    if $CanToggle && trigger?(Input::AUX1)
      # Record the current multiplier
      old_multiplier = SPEEDUP_STAGES[$GameSpeed]
      $GameSpeed += 1
      $GameSpeed = 0 if $GameSpeed >= SPEEDUP_STAGES.size
      # Get the new multiplier
      new_multiplier = SPEEDUP_STAGES[$GameSpeed]
      # Adjust the effective uptime so that animations aren’t disrupted:
      System.adjust_multiplier(old_multiplier, new_multiplier)
      $PokemonSystem.battle_speed = $GameSpeed if $PokemonSystem && $PokemonSystem.only_speedup_battles == 1
      $RefreshEventsForTurbo  = true
    end
  end
end
#===============================================================================#
# Return System.Uptime with a multiplier to create an alternative timeline
# (Modified to be continuous across multiplier changes)
#===============================================================================#
module System
  class << self
    alias_method :unscaled_uptime, :uptime unless method_defined?(:unscaled_uptime)
  end

  # New: a time offset so that uptime remains continuous even if the multiplier changes
  @time_offset = 0

  def self.uptime
    current_unscaled = unscaled_uptime
    # Effective uptime = offset + (current multiplier × unscaled time)
    return @time_offset + SPEEDUP_STAGES[$GameSpeed] * current_unscaled
  end

  # New: When the multiplier changes, adjust @time_offset so that the effective uptime remains continuous.
  def self.adjust_multiplier(old_multiplier, new_multiplier)
    current_unscaled = unscaled_uptime
    # Effective time before the change:
    effective_time = @time_offset + old_multiplier * current_unscaled
    # Set new offset so that: new_offset + new_multiplier * current_unscaled == effective_time
    @time_offset = effective_time - new_multiplier * current_unscaled
  end
end
 
Back
Top