Scripts, Tutorials & Tools This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.

Ad Content
Reply
 
Thread Tools
  #51   Link to this post, but load the entire thread.  
Old February 16th, 2017 (4:49 PM). Edited February 16th, 2017 by Raizu.
Raizu's Avatar
Raizu Raizu is offline
The Horizon
     
    Join Date: Feb 2017
    Location: Stafford, Virginia
    Gender: Male
    Nature: Modest
    Posts: 2
    This script was really awesome the only problem I have now is that I tried to put it in another project and when I go to the pause menu it won't display in the pause menu. Do I have to do something to make the time display in the pause menu?
    Reply With Quote
      #52   Link to this post, but load the entire thread.  
    Old February 24th, 2017 (4:00 PM).
    FL's Avatar
    FL FL is offline
    Pokémon Island Creator
       
      Join Date: Sep 2010
      Gender: Male
      Posts: 1,774
      Quote:
      Originally Posted by Raizu View Post
      This script was really awesome the only problem I have now is that I tried to put it in another project and when I go to the pause menu it won't display in the pause menu. Do I have to do something to make the time display in the pause menu?
      Just follow the examples about how to get a date string.

      By the way, what you done?
      __________________
      Reply With Quote
        #53   Link to this post, but load the entire thread.  
      Old February 25th, 2017 (8:11 PM). Edited February 25th, 2017 by Raizu.
      Raizu's Avatar
      Raizu Raizu is offline
      The Horizon
         
        Join Date: Feb 2017
        Location: Stafford, Virginia
        Gender: Male
        Nature: Modest
        Posts: 2
        ASo do I take this
        pbGetTimeNow.strftime("%I:%M %p")
        and place it below the #= line?
        I don't quite understand scripting but I'm learning with it.

        For the second question I'm working on a game where the player has psychic powers who is destined to become a watcher (another group similar to rangers but have the capabilities to their powers to help people) along with your mentor Zoroark to guide you to your goal. I haven't been working on it for the past 3 years because my computer was broken so I had to get a new one.
        Reply With Quote
          #54   Link to this post, but load the entire thread.  
        Old October 19th, 2017 (1:08 AM).
        Soccersam's Avatar
        Soccersam Soccersam is offline
        #Hilbert is Badass
           
          Join Date: Oct 2016
          Gender: Male
          Nature: Hasty
          Posts: 101
          I'm sorry if this question is already answered, but I just can't seem to find it in the other comments-
          I want to make it like when the player heals his pokemon, time will advance by three hours.
          I saw the first few comments, but since it was mainly for when the player sleeps, I didn't try it out...
          __________________
          Whatever you do in this life, it's not legendary unless your friends are there to see it. -Barney Stinson
          Reply With Quote
            #55   Link to this post, but load the entire thread.  
          Old October 19th, 2017 (7:59 AM).
          HarmonyConcept HarmonyConcept is offline
             
            Join Date: Sep 2015
            Gender: Female
            Posts: 207
            Quote:
            Originally Posted by Soccersam View Post
            I want to make it like when the player heals his pokemon, time will advance by three hours.
            I saw the first few comments, but since it was mainly for when the player sleeps, I didn't try it out...
            It works exactly the same way as when the player sleeps.

            In the Unreal Time Script, you have to define the variable "NTN_EXTRASECONDS", that affects the current time.

            You can then do this in an event (for example in each nurse event):
            Set Variable {Your NTN_EXTRASECONDS Variable} to +10.800 (there are 10.800 seconds in 3 hours);

            Note: If you freeze the time using the NTN_SWITCHSTOPS switch, you need to be sure that the switch is OFF before attempting to change the time (otherwise it won't work)
            Reply With Quote
              #56   Link to this post, but load the entire thread.  
            Old October 19th, 2017 (10:46 PM).
            Soccersam's Avatar
            Soccersam Soccersam is offline
            #Hilbert is Badass
               
              Join Date: Oct 2016
              Gender: Male
              Nature: Hasty
              Posts: 101
              Quote:
              Originally Posted by HarmonyConcept View Post
              It works exactly the same way as when the player sleeps.

              In the Unreal Time Script, you have to define the variable "NTN_EXTRASECONDS", that affects the current time.

              You can then do this in an event (for example in each nurse event):
              Set Variable {Your NTN_EXTRASECONDS Variable} to +10.800 (there are 10.800 seconds in 3 hours);

              Note: If you freeze the time using the NTN_SWITCHSTOPS switch, you need to be sure that the switch is OFF before attempting to change the time (otherwise it won't work)
              Thanks, I'm trying it right now!

              And also, thanks to FL who made this amazing script!
              __________________
              Whatever you do in this life, it's not legendary unless your friends are there to see it. -Barney Stinson
              Reply With Quote
                #57   Link to this post, but load the entire thread.  
              Old July 27th, 2018 (9:37 PM). Edited July 28th, 2018 by Marin.
              Feark's Avatar
              Feark Feark is offline
                 
                Join Date: Nov 2017
                Posts: 5
                Quote:
                Originally Posted by FL View Post
                At my script.
                Do you mean here?

                Code:
                def pbGraphicsUpdate
                          $PokemonGlobal.addNewFrameCount 
                          pbGraphicsUpdateold
                        end
                      end
                    end
                  end
                end
                If so. It should be like this?


                Code:
                def pbGraphicsUpdate
                          $PokemonGlobal.addNewFrameCount 
                          pbGraphicsUpdateold
                        end
                
                    if !@lastHour || @lastHour != pbGetTimeNow.hour
                          @lastHour = pbGetTimeNow.hour
                          $game_map.need_refresh = true
                        end
                      end
                    end
                  end
                end
                Reply With Quote
                  #58   Link to this post, but load the entire thread.  
                Old August 1st, 2018 (4:55 PM).
                FL's Avatar
                FL FL is offline
                Pokémon Island Creator
                   
                  Join Date: Sep 2010
                  Gender: Male
                  Posts: 1,774
                  Quote:
                  Originally Posted by Feark View Post
                  Do you mean here?

                  Code:
                  def pbGraphicsUpdate
                            $PokemonGlobal.addNewFrameCount 
                            pbGraphicsUpdateold
                          end
                        end
                      end
                    end
                  end
                  If so. It should be like this?


                  Code:
                  def pbGraphicsUpdate
                            $PokemonGlobal.addNewFrameCount 
                            pbGraphicsUpdateold
                          end
                  
                      if !@lastHour || @lastHour != pbGetTimeNow.hour
                            @lastHour = pbGetTimeNow.hour
                            $game_map.need_refresh = true
                          end
                        end
                      end
                    end
                  end
                  No. I meant between 'updateold' and 'end' here:
                  Code:
                        def update
                          $PokemonGlobal.addNewFrameCount
                          updateold
                        end
                  So the code should be:
                  Code:
                        def update
                          $PokemonGlobal.addNewFrameCount
                          updateold
                      	if !@lastHour || @lastHour != pbGetTimeNow.hour
                            @lastHour = pbGetTimeNow.hour
                            $game_map.need_refresh = true
                          end
                        end
                  __________________
                  Reply With Quote
                    #59   Link to this post, but load the entire thread.  
                  Old August 1st, 2018 (6:59 PM).
                  Feark's Avatar
                  Feark Feark is offline
                     
                    Join Date: Nov 2017
                    Posts: 5
                    Quote:
                    Originally Posted by FL View Post
                    No. I meant between 'updateold' and 'end' here:
                    Code:
                          def update
                            $PokemonGlobal.addNewFrameCount
                            updateold
                          end
                    So the code should be:
                    Code:
                          def update
                            $PokemonGlobal.addNewFrameCount
                            updateold
                        	if !@lastHour || @lastHour != pbGetTimeNow.hour
                              @lastHour = pbGetTimeNow.hour
                              $game_map.need_refresh = true
                            end
                          end
                    Thanks for the answer brother xD But I already managed to find it I was missing something on your explanation before, btw quick question: are you brazilian?
                    Reply With Quote
                      #60   Link to this post, but load the entire thread.  
                    Old August 19th, 2018 (2:55 AM).
                    FL's Avatar
                    FL FL is offline
                    Pokémon Island Creator
                       
                      Join Date: Sep 2010
                      Gender: Male
                      Posts: 1,774
                      Quote:
                      Originally Posted by Feark View Post
                      Thanks for the answer brother xD But I already managed to find it I was missing something on your explanation before, btw quick question: are you brazilian?
                      Yep. The main language of my game is the proof.
                      __________________
                      Reply With Quote
                        #61   Link to this post, but load the entire thread.  
                      Old 1 Week Ago (11:39 PM). Edited 5 Days Ago by Callmefreak.
                      Callmefreak's Avatar
                      Callmefreak Callmefreak is offline
                         
                        Join Date: Mar 2013
                        Location: Hope Peak's Academy
                        Gender: Female
                        Nature: Quiet
                        Posts: 85
                        How do I "sleep?" I read every comment on this thread and read the script pretty thoroughly but I still have no idea what event the game's looking for when the player "sleeps."

                        I basically want to advance time by 24 hours so planted berries grow whenever the player talks to a bed, but all I could find (unless I misunderstood) is that I need to change something in the pbGetTimeNow so the game advances 86400 seconds whenever the player "sleeps..." And no clear script to get the player to sleep.

                        Edit: By the way, this isn't what I mean. Berries don't seem to care if I can control the rotation of the earth. They only seem to care when the clock is actually moving.
                        Code:
                        $PokemonGlobal.newFrameCount=25745
                        __________________
                        Reply With Quote
                          #62   Link to this post, but load the entire thread.  
                        Old 5 Days Ago (11:52 AM).
                        FL's Avatar
                        FL FL is offline
                        Pokémon Island Creator
                           
                          Join Date: Sep 2010
                          Gender: Male
                          Posts: 1,774
                          Quote:
                          Originally Posted by Callmefreak View Post
                          How do I "sleep?" I read every comment on this thread and read the script pretty thoroughly but I still have no idea what event the game's looking for when the player "sleeps."

                          I basically want to advance time by 24 hours so planted berries grow whenever the player talks to a bed, but all I could find (unless I misunderstood) is that I need to change something in the pbGetTimeNow so the game advances 86400 seconds whenever the player "sleeps..." And no clear script to get the player to sleep.

                          Edit: By the way, this isn't what I mean. Berries don't seem to care if I can control the rotation of the earth. They only seem to care when the clock is actually moving.
                          Code:
                          $PokemonGlobal.newFrameCount=25745
                          Quote:
                          Originally Posted by FL View Post
                          Quote:
                          Originally Posted by Qwertyis666 View Post
                          Hi, I just found this awesome script and he work fine but I have a little question:
                          how exaclty can you pass time with a event? I want the time to pass went you go to bed(the player will choose between morning or night) and when you heal your pokemon in a Pokecenter(pass 6h).

                          Thanks in advance and sorry for my bad english.
                          Quote:
                          Originally Posted by FL View Post
                          When the player sleeps you wish to the time in game advance
                          # 8 hours, so put in NTN_EXTRASECONDS a game variable number and sum
                          # 28800 (60*60*8) in this variable every time that the players sleeps.
                          NTN_EXTRASECONDS=-1
                          NTN_EXTRADAYS=-1
                          So, if you make NTN_EXTRASECONDS=87 and sum 21600 into variable 87, the time will pass six hours.
                          86400 at your case. I tested and this is working with berries, but you must refresh the map (manually call the refresh method IF the berries and sleep event are in the same map).
                          __________________
                          Reply With Quote
                            #63   Link to this post, but load the entire thread.  
                          Old 5 Days Ago (11:09 PM).
                          Callmefreak's Avatar
                          Callmefreak Callmefreak is offline
                             
                            Join Date: Mar 2013
                            Location: Hope Peak's Academy
                            Gender: Female
                            Nature: Quiet
                            Posts: 85
                            Quote:
                            Originally Posted by FL View Post
                            86400 at your case. I tested and this is working with berries, but you must refresh the map (manually call the refresh method IF the berries and sleep event are in the same map).
                            So I thought I got it but it turns out that I don't.

                            I don't know how to "Sleep." I found out that the 23rd switch changed to 's:cooledDown?(86400)' but it doesn't seem to do anything so I'm clearly not using it right. And the map I want to go forward in time on is separate from the map with the berries.
                            I just need to know how to "sleep,"
                            __________________
                            Reply With Quote
                              #64   Link to this post, but load the entire thread.  
                            Old 4 Days Ago (6:44 AM). Edited 4 Days Ago by komaoto.
                            komaoto's Avatar
                            komaoto komaoto is offline
                               
                              Join Date: Mar 2014
                              Location: Brazil
                              Gender: Male
                              Posts: 140
                              Quote:
                              Originally Posted by Callmefreak View Post
                              I found out that the 23rd switch changed to 's:cooledDown?(86400)' "
                              It shouldn't be doing that. It could be something else that you added to the event.

                              To make hours pass (Sleep in your case) just use
                              Code:
                              @>Control Variables: [XX: Add sleep time] += 86400
                              XX = NTN_EXTRASECONDS variable you set in the script (it is -1 by default)

                              The 86400 is the in-game seconds sleep time. (if I'm not mistaken)

                              To test if this is working make another event right beside the sleep one with

                              Code:
                              @Script: $game_variables[99] = pbGetTimeNow
                              @Text: \v[99]

                              Change the 99 if you are using it for something else
                              Reply With Quote
                                #65   Link to this post, but load the entire thread.  
                              Old 4 Days Ago (9:14 PM). Edited 4 Days Ago by Callmefreak.
                              Callmefreak's Avatar
                              Callmefreak Callmefreak is offline
                                 
                                Join Date: Mar 2013
                                Location: Hope Peak's Academy
                                Gender: Female
                                Nature: Quiet
                                Posts: 85
                                Quote:
                                Originally Posted by komaoto View Post
                                It shouldn't be doing that. It could be something else that you added to the event.

                                To make hours pass (Sleep in your case) just use
                                Code:
                                @>Control Variables: [XX: Add sleep time] += 86400
                                XX = NTN_EXTRASECONDS variable you set in the script (it is -1 by default)

                                The 86400 is the in-game seconds sleep time. (if I'm not mistaken)

                                To test if this is working make another event right beside the sleep one with

                                Code:
                                @Script: $game_variables[99] = pbGetTimeNow
                                @Text: \v[99]

                                Change the 99 if you are using it for something else
                                ...Oh. I was trying so much crap that I thought was supposed to be the solution when the answer was "just use variables."
                                I was confused and now I feel dumb. Thank you so, so much!

                                Edit: Sooo this is annoying and shouldn't be a problem. Even if I already have the time go forward, if I also have
                                Code:
                                $PokemonGlobal.newFrameCount=25748
                                be turned on before I enter the map with the berries, no matter how much they've grown, it resets them to their "just planted" state. (This includes Parallel events on the same map as the berries) I know that the variable is working, but as soon as I set the clock to a certain time the variables that were already added just... Stops working?

                                The same thing happens if I set the clock to a certain time before having the game go forward 24 hours.
                                And I tried this while having them in both the same and separate events.
                                __________________
                                Reply With Quote
                                  #66   Link to this post, but load the entire thread.  
                                Old 3 Days Ago (7:56 AM).
                                komaoto's Avatar
                                komaoto komaoto is offline
                                   
                                  Join Date: Mar 2014
                                  Location: Brazil
                                  Gender: Male
                                  Posts: 140
                                  Quote:
                                  Originally Posted by Callmefreak View Post
                                  Sooo this is annoying and shouldn't be a problem. Even if I already have the time go forward, if I also have
                                  Code:
                                  $PokemonGlobal.newFrameCount=25748
                                  be turned on before I enter the map with the berries, no matter how much they've grown, it resets them to their "just planted" state. (This includes Parallel events on the same map as the berries) I know that the variable is working, but as soon as I set the clock to a certain time the variables that were already added just... Stops working?

                                  The same thing happens if I set the clock to a certain time before having the game go forward 24 hours.
                                  And I tried this while having them in both the same and separate events.
                                  I have zero experience in editing scripts, but did you tried using the default values? If this didn't work, you are better off making a topic in the pokémon essentials section of the forum. I sadly can't really help you more with it. But I hope everything works fine in your game!
                                  Reply With Quote
                                    #67   Link to this post, but load the entire thread.  
                                  Old 2 Days Ago (4:59 PM). Edited 2 Days Ago by FL.
                                  FL's Avatar
                                  FL FL is offline
                                  Pokémon Island Creator
                                     
                                    Join Date: Sep 2010
                                    Gender: Male
                                    Posts: 1,774
                                    Quote:
                                    Originally Posted by Callmefreak View Post
                                    Edit: Sooo this is annoying and shouldn't be a problem. Even if I already have the time go forward, if I also have
                                    Code:
                                    $PokemonGlobal.newFrameCount=25748
                                    be turned on before I enter the map with the berries, no matter how much they've grown, it resets them to their "just planted" state. (This includes Parallel events on the same map as the berries) I know that the variable is working, but as soon as I set the clock to a certain time the variables that were already added just... Stops working?

                                    The same thing happens if I set the clock to a certain time before having the game go forward 24 hours.
                                    And I tried this while having them in both the same and separate events.
                                    This code resets time into 12:10 (25748 frames means almost 11 minutes) and maybe mess into other things. Don't use newFrameCount. Use the variables.

                                    If you want to test this script with berries, change 'NTS_TIMEPROPORTION=60' into 'NTS_TIMEPROPORTION=3600' (1 second = 1 hour) and enter/exit a berry map (connections won't refresh map) after a day starts.

                                    OR

                                    Change 'NTN_EXTRADAYS=-1' into 'NTN_EXTRADAYS = 98' and add 1 on variable 98 and enter/exit a berry map.


                                    Connections won't refresh map, so enter/exit a house or call the debug for refreshing a berry map.
                                    __________________
                                    Reply With Quote
                                    Reply

                                    Quick Reply

                                    Join the conversation!

                                    Create an account to post a reply in this thread, participate in other discussions, and more!

                                    Create a PokéCommunity Account
                                    Ad Content
                                    Thread Tools

                                    Posting Rules
                                    You may not post new threads
                                    You may not post replies
                                    You may not post attachments
                                    You may not edit your posts

                                    BB code is On
                                    Smilies are On
                                    [IMG] code is On
                                    HTML code is Off

                                    Forum Jump


                                    All times are GMT -8. The time now is 5:03 AM.