- Joined
- Oct 2, 2022
- Posts
- 85
You can do it.Hello, can you add an option in the option menu to be able to deactivate this system if the player wish to? When trun off, the game should use the player's pc time instead.
Paste it at the bottom of the script:
class PokemonSystem
attr_accessor :unreal_time_usage
alias org_init initialize
def initialize
org_init
@unreal_time_usage = 0
end
end
MenuHandlers.add(:options_menu, :unreal_time_usage, {
"name" => _INTL("Use Unreal Time"),
"order" => 85,
"type" => EnumOption,
"parameters" => [_INTL("In-Game Time"), _INTL("Real Time")],
"description" => _INTL("Choose which aspect is sped up."),
"get_proc" => proc { next $PokemonSystem.unreal_time_usage },
"set_proc" => proc { |value, scene| $PokemonSystem.unreal_time_usage = value }
})
On pbGetTimeNow, on the first line that should look like that:
return Time.now if !$PokemonGlobal || !UnrealTime::ENABLED
Replace
!UnrealTime::ENABLED
with $PokemonSystem.unreal_time_usage == 1
Now it keeps counting the in-game (unreal) time, so you can switch back without losing time.
If you want it to stop counting, replace
if UnrealTime::ENABLED
with $PokemonSystem.unreal_time_usage == 0