• 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.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
[v13+] Unreal Time System

Resource [v13+] Unreal Time System 1.2

-FL-

Pokémon Island Creator
Member
Joined
Aug 28, 2022
Posts
319
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

Fil

Novice
Member
Joined
Jul 11, 2024
Posts
12
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 🦄
 

-FL-

Pokémon Island Creator
Member
Joined
Aug 28, 2022
Posts
319
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

Hydreinite3

Rookie
Member
Joined
Aug 27, 2024
Posts
3
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
 

-FL-

Pokémon Island Creator
Member
Joined
Aug 28, 2022
Posts
319
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
 

Mr.Heathcliff

Ace Trainer
Member
Joined
Jul 12, 2019
Posts
24
[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.
 

-FL-

Pokémon Island Creator
Member
Joined
Aug 28, 2022
Posts
319
[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!
 

iugvhojdkpa

Rookie
Member
Joined
Feb 18, 2025
Posts
1
How do you actually make it into a plugin? doesn't seem to be doing anything when I paste the script.
 
Back
Top