1) First off, you'll obviously need to have this script installed first. You may find it here:
Unreal Time System
Make sure to credit to FL if using this script.
2) Once installed, you'll have to make several adjustments to his script. First, use CTRL+F to locate every instance of
and change it to
This will allow the "Reset" function to work, allowing you to revert the time back to normal whenever you desire.
3) Now find the line:
And change it to:
This will make it so that time moves forward at the normal rate. This isnt required if you prefer time to advance at a quicker rate (at which case set this to whatever number you want. Read FL's notes for more details).
4) Next, find this line:
And change the "-1" into whatever variable number you have available to use. I used 97.
5) Next, find this section:
Code:
# Initial values
NTN_INITIALYEAR=2000 # Can ONLY holds around range 1970-2038
NTN_INITIALMONTH=1
NTN_INITIALDAY=1
NTN_INITIALHOUR=12
NTN_INITIALMINUTE=0
And replace it with this:
Code:
# Initial values
NTN_INITIALYEAR=pbGetTimeNow.year # Can ONLY holds around range 1970-2038
NTN_INITIALMONTH=pbGetTimeNow.mon
NTN_INITIALDAY=pbGetTimeNow.day
NTN_INITIALHOUR=pbGetTimeNow.hour
NTN_INITIALMINUTE=pbGetTimeNow.min
This will make it so that the base time that the Unreal Time system uses is whatever the current date and time is, instead of the default FL uses (January 1st, 2000).
6) Finally, paste all of the following somewhere in your project. Right below the Unreal Time script is a good spot.
Code:
#===============================================================================
# Month Reset
# Allows you to reset the current month to a different one.
# Requires FL's Unreal Time System script, found here:
#===============================================================================
# https://www.pokecommunity.com/showthread.php?p=7283916#7283916
#===============================================================================
# Use pbTimeCheck in an event to check the current date and time.
# Use pbResetDay in an event to change the day to the first of the month.
# Use pbSetMonth in an event to select a new month to set the time to.
# Use so you may check the current date and time.
# Useful way to check if the time has been properly set.
def pbTimeCheck
curmon=pbGetAbbrevMonthName(pbGetTimeNow.mon)
curday=pbGetTimeNow.day
curyear=pbGetTimeNow.year
curhour=pbGetTimeNow.hour
curmin=pbGetTimeNow.min
Kernel.pbMessage(_INTL("Date: {1} {2}, {3}\nTime: {4}:{5}",
curmon,curday,curyear,curhour,curmin))
end
# Used to reset the current day to the first of the month.
# Months may be off by a few days otherwise.
def pbResetDay
curDay = pbGetTimeNow.day
timeDifference = (1-curDay)
setToFirst = timeDifference
$game_variables[NTN_EXTRADAYS]+=setToFirst
Kernel.pbMessage(_INTL("The current day has been reset to the first of the month."))
end
# Allows you to choose the desired month to switch to. The day is reset to
# the first day of the newly selected month.
# Use the "Reset" option at the bottom of the list to revert the month and
# day to its natural time.
def pbSetMonth
curMonth = pbGetTimeNow.mon*30
curDay = pbGetTimeNow.day
timeNow = curMonth+curDay
command=0
loop do
command=Kernel.pbShowCommands(nil,[
_INTL("January"),
_INTL("February"),
_INTL("March"),
_INTL("April"),
_INTL("May"),
_INTL("June"),
_INTL("July"),
_INTL("August"),
_INTL("September"),
_INTL("October"),
_INTL("November"),
_INTL("December"),
_INTL("Reset"),
_INTL("Cancel")
],-1)
case command
### Cancel ###
when -1, 13
Kernel.pbMessage(_INTL("The current date was not changed."))
break
### Jan ###
when 0
month = 1
timeWished = month*30
timeDifference = timeWished-timeNow
monthSet = timeDifference
$game_variables[NTN_EXTRADAYS]+=monthSet
Kernel.pbMessage(_INTL("The month has been set to January."))
pbResetDay
break
### Feb ###
when 1
month = 2
timeWished = month*31
timeDifference = timeWished-timeNow
monthSet = timeDifference
$game_variables[NTN_EXTRADAYS]+=monthSet
Kernel.pbMessage(_INTL("The month has been set to February."))
pbResetDay
break
### Mar ###
when 2
month = 3
timeWished = month*31
timeDifference = timeWished-timeNow
monthSet = timeDifference
$game_variables[NTN_EXTRADAYS]+=monthSet
Kernel.pbMessage(_INTL("The month has been set to March."))
pbResetDay
break
### Apr ###
when 3
month = 4
timeWished = month*31
timeDifference = timeWished-timeNow
monthSet = timeDifference
$game_variables[NTN_EXTRADAYS]+=monthSet
Kernel.pbMessage(_INTL("The month has been set to April."))
pbResetDay
break
### May ###
when 4
month = 5
timeWished = month*31
timeDifference = timeWished-timeNow
monthSet = timeDifference
$game_variables[NTN_EXTRADAYS]+=monthSet
Kernel.pbMessage(_INTL("The month has been set to May."))
pbResetDay
break
### Jun ###
when 5
month = 6
timeWished = month*31
timeDifference = timeWished-timeNow
monthSet = timeDifference
$game_variables[NTN_EXTRADAYS]+=monthSet
Kernel.pbMessage(_INTL("The month has been set to June."))
pbResetDay
break
### Jul ###
when 6
month = 7
timeWished = month*31
timeDifference = timeWished-timeNow
monthSet = timeDifference
$game_variables[NTN_EXTRADAYS]+=monthSet
Kernel.pbMessage(_INTL("The month has been set to July."))
pbResetDay
break
### Aug ###
when 7
month = 8
timeWished = month*31
timeDifference = timeWished-timeNow
monthSet = timeDifference
$game_variables[NTN_EXTRADAYS]+=monthSet
Kernel.pbMessage(_INTL("The month has been set to August."))
pbResetDay
break
### Sep ###
when 8
month = 9
timeWished = month*31
timeDifference = timeWished-timeNow
monthSet = timeDifference
$game_variables[NTN_EXTRADAYS]+=monthSet
Kernel.pbMessage(_INTL("The month has been set to September."))
pbResetDay
break
### Oct ###
when 9
month = 10
timeWished = month*31
timeDifference = timeWished-timeNow
monthSet = timeDifference
$game_variables[NTN_EXTRADAYS]+=monthSet
Kernel.pbMessage(_INTL("The month has been set to October."))
pbResetDay
break
### Nov ###
when 10
month = 11
timeWished = month*31
timeDifference = timeWished-timeNow
monthSet = timeDifference
$game_variables[NTN_EXTRADAYS]+=monthSet
Kernel.pbMessage(_INTL("The month has been set to November."))
pbResetDay
break
### Dec ###
when 11
month = 12
timeWished = month*31
timeDifference = timeWished-timeNow
monthSet = timeDifference
$game_variables[NTN_EXTRADAYS]+=monthSet
Kernel.pbMessage(_INTL("The month has been set to December."))
pbResetDay
break
### Reset ###
when 12
$game_variables[NTN_EXTRADAYS] = 0
$PokemonGlobal.newFrameCount=0
Kernel.pbMessage(_INTL("The time has been reset to the current date."))
break
end
end
end
~