• 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!
[v13+] Unreal Time System

Resource [v13+] Unreal Time System 2025-05-03

Hi, thanks for your reply 🍩
There is this:

Ruby:
Expand Collapse Copy
def getPreviousRefreshDate(date)
  pokeMartTracker = $ArckyGlobal.pokeMartTracker[@map_id][@event_id]
  return 0 if pokeMartTracker.empty?
  return (getDateFromString(date) - getDateFromString(pokeMartTracker[:date].to_s)) / (24 * 60 * 60)
end

def getDateFromString(date)
  dateArray = date.split('-')
  return Time.local(dateArray[0], dateArray[1], dateArray[2])
end

with one "return Time.local", could be it?
The script is here on this community, Arcky made a complete guide (a cool one), but the only way to see the entire script is download it.
I don't "return Time.local" is the issue. I don't know the issue looking at these codes, so I contacted Arcky and he gonna take a look. He also tell me to contact him directly for futher questions about this bug.
 
  • Like
Reactions: Fil
Thank you for doing that for me, i just hoping it was some single line changing that could fix that (‘cause i’m no expert)… of course I was ready to contact him too if it turned out a more complex problem of compatibility.
Thanks for your help and time 🦄
 
Thank you for doing that for me, i just hoping it was some single line changing that could fix that (‘cause i’m no expert)… of course I was ready to contact him too if it turned out a more complex problem of compatibility.
Thanks for your help and time 🦄
Arcky told me today that is an error at his script. He also told me that he might either release a small update later today or tomorrow that'll include the fix.
 
  • Like
Reactions: Fil
Hey! Nice work, I love using this script. For those interested, I recommend adding the Camping Gear Item as a way to advance the clock. I have it set to 8 hours.

#-------------------------------
[CAMPINGGEAR]
Name = Camping Gear
NamePlural = Camping Gears
Pocket = 8
Price = 0
FieldUse = Direct
Flags = KeyItem
Description = Everything you need to set up a tent and rest up for 8 hours.
#-------------------------------

Code for v21.1. Add to the bottom of the Unreal Time System script.
Camping Gear code:
Expand Collapse Copy
ItemHandlers::UseInField.add(:CAMPINGGEAR, proc { |item|
  UnrealTime.add_seconds(28800)
  pbMessage(_INTL("8 hours passed by..."))
  next true
})

Icon available at The Spriter's Resource: https://www.spriters-resource.com/nintendo_switch/pokemonswordshield/sheet/123706/
  • Resize with Nearest Neighbor
  • Give credit to RandomTalkingBush if used
 
To update saves with the old version (before 1.2), if your TIME_STOPS is false, no action is necessary. If it isn't, in scripts (StartGame script section in Essentials v21.1) after line 'SaveData.load_all_values(save_data)' add line '$PokemonGlobal.convert_old_unreal_time'. Add this code at the end of Unreal Time script:

Ruby:
Expand Collapse Copy
class PokemonGlobalMetadata
  def convert_old_unreal_time
    return if !@newFrameCount || @newFrameCount==0
    @newSecondCount = 0.0 if !@newSecondCount
    @newSecondCount+=@newFrameCount/40.0
    @newFrameCount = 0
  end
end
 
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Script error in event 5 (coords 21,5), map 3 (Red's house)
Exception: NoMethodError
Message: undefined method `newSecondsCount' for #<PokemonGlobalMetadata>

***Full script:
UnrealTime.advance_to(20,0,0)

Backtrace:
[Unreal Time System] Unreal Time System.rb:140:in `add_seconds'
[Unreal Time System] Unreal Time System.rb:123:in `advance_to'
(eval):1:in `execute_script'
Interpreter:138:in `eval'
Interpreter:138:in `execute_script'
Interpreter_Commands:1177:in `command_355'
Interpreter_Commands:116:in `execute_command'
Interpreter:130:in `block in update'
Interpreter:86:in `loop'
Interpreter:86:in `update'

Hello, I'm getting this error whenever I call "UnrealTime.advance_to". This wasn't happening before the update.
 
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Script error in event 5 (coords 21,5), map 3 (Red's house)
Exception: NoMethodError
Message: undefined method `newSecondsCount' for #<PokemonGlobalMetadata>

***Full script:
UnrealTime.advance_to(20,0,0)

Backtrace:
[Unreal Time System] Unreal Time System.rb:140:in `add_seconds'
[Unreal Time System] Unreal Time System.rb:123:in `advance_to'
(eval):1:in `execute_script'
Interpreter:138:in `eval'
Interpreter:138:in `execute_script'
Interpreter_Commands:1177:in `command_355'
Interpreter_Commands:116:in `execute_command'
Interpreter:130:in `block in update'
Interpreter:86:in `loop'
Interpreter:86:in `update'

Hello, I'm getting this error whenever I call "UnrealTime.advance_to". This wasn't happening before the update.
I put an extra "s" in the method call. Fixed!
 
How do you actually make it into a plugin? doesn't seem to be doing anything when I paste the script.
 
Is there a command to start the game with unreal but set the time to sync local time instead of the time in the script (jan 1, 2000, 12pm).
 
Hello!
I want to use this plugin with GSC Essentials which is for v18 of Pokemon Essentials. Is there an older verson that is compatible?
 
Hello!
I want to use this plugin with GSC Essentials which is for v18 of Pokemon Essentials. Is there an older verson that is compatible?
This script is already compatible, just only updates night/day when you exit places IIRC. You can test it using script event command:
Code:
Expand Collapse Copy
p pbGetTimeNow
 
Hi!
I love this plugin--it's probably my most favorite one. Thank you very much for creating it! I got a question. Is it possible to extend this script so it lets you play specific BGS during specific times? Like, BGS1 during the morning, BGS2 during the night, etc., so it updates the BGS without having to enter/exit places. I've tried playing around with it a little but it hasn't quite worked yet lol is that something that's possible in general?
 
Hi!
I love this plugin--it's probably my most favorite one. Thank you very much for creating it! I got a question. Is it possible to extend this script so it lets you play specific BGS during specific times? Like, BGS1 during the morning, BGS2 during the night, etc., so it updates the BGS without having to enter/exit places. I've tried playing around with it a little but it hasn't quite worked yet lol is that something that's possible in general?
You can do this, but wasn't directly related to this script.

I suggest using this script. Change to work with morning (look at the comments) then change to play BGS when this script shows it's image (or message).
 
Back
Top