Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.

TrollandToad.com
Reply
 
Thread Tools
  #1    
Old August 16th, 2011 (10:29 AM). Edited August 17th, 2011 by Wesley FG.
Wesley FG's Avatar
Wesley FG Wesley FG is offline
Pokémon Kalos Advance !! Gba Hack
     
    Join Date: Oct 2008
    Location: Brazil
    Gender: Male
    Nature: Modest
    Posts: 338
    TUTORIAL TO DIFFERENTIATE THE DAYS OF NIGHT

    ==================================================
    Things Necessary:
    ==================================================
    Rom Pokémon (Fr/Lg/R/S/E)
    DNS
    Advance Map
    Scripter Editor ( I use XSE)


    ==================================================
    Tutorial
    ==================================================

    This tutorial is very simple, it will read just give a script ready to modify as you please, and do unimaginable things with your good imagination and celebrate.

    The first thing to do is enter the routine of DNS in your rom and observe the following information:



    In my case I will create the windows and street lights at night, note the byte 0x0300553C, this is where the byte RTC was installed in ROM and the information is in the following order as shown: year (2bytes), 00 month (1byte), day (1 byte), 00 hour (1byte), minute (1byte), second (1byte). With this information we can do unimaginable things, such as scripts that occur only on certain days of the week, among other things.
    Now open your emulator to verify this information, and go to the Memory Viewr and opened this tab:



    With this we can see that the information in the order described in 300553C start, but for use in a script and know whether it is day or night you must use the information of time, which is in the blue square, and will be 6 bytes in front of 300553C, using the scientific calculator (scientific mode) windows and adding 300553C +6 = 3005542, ie the direction that we will use to compare the hours will be 3005542!

    Ready now define the hours that will be in my case at night from 19:00 PM the night (hex 13) to 4:00 am (4 hexadecimal) now that we have all this information we will make the script!

    And looks like this: (XSE)

    Quote:
    #dynamic 0x900000
    copybyte 0x202E8DC 0x3005542
    compare LASTRESULT 0x13
    if 0x4 goto @night
    compare LASTRESULT 0x4
    if 0x3 goto @night
    goto @day
    end




    #org @night
    Setmaptile
    ……
    End

    #org @day
    Nop
    End
    Now we analyze, with the direction used copybyte found 0x3005542, which is where the information of the hour, and then made whether the hours are in the range between 19 and 4 hours, so the script that will occur and the @ night if the time is not in this range, it drop to @ day.
    Now use imagination to create a tile with a lamp pole with lights, or lights in the window, make a script to change the tiles setmaptile overnight and ready.
    Also you can compare and know which day of week, etc..
    In my case I used a rom Ruby, FireRed also in use in the same way will only offset the seedlings in the RTC memory viewer just look in DNS, the same way I did mine in Ruby.

    I use the translator, bye.

    =============================================================================
    CREDITS
    ==============================================================================

    Dark Rayquaza, Derlo, Dante, ZodiacDagreath (for help-me with dudes)
    PrimerDialkga (DNS Creator)


    __________________
    Kalos Demake Soon!!
    Reply With Quote

    Relevant Advertising!

      #2    
    Old August 19th, 2011 (3:52 AM).
    Jambo51's Avatar
    Jambo51 Jambo51 is offline
    Glory To Arstotzka
       
      Join Date: Jun 2009
      Gender: Male
      Nature: Quiet
      Posts: 732
      This is a good tutorial, and is quite easily read considering that English isn't your natural language, and you translated it.

      However, the offset you showed for LASTRESULT is only applicable for either Ruby or for your language of Ruby (one or the other, I forget exactly which).

      For BPRE, it's at 0x020370D0, for example.

      It's better to use comparefarbytetobyte 0x3005542 [Time] as this doesn't require a copy to a RAM address which will be different between versions.

      Hope this helps.
      __________________
      Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!
      Reply With Quote
        #3    
      Old April 22nd, 2012 (6:12 AM).
      Smoley' Smoley' is offline
         
        Join Date: Apr 2012
        Gender: Male
        Posts: 13
        Thanks You ! It'll be veryuseful for my hack,
        Reply With Quote
          #4    
        Old April 22nd, 2012 (6:45 PM).
        DarkFlameSquirrel's Avatar
        DarkFlameSquirrel DarkFlameSquirrel is offline
        Music Freak
           
          Join Date: Apr 2012
          Location: Texas, USA
          Gender: Male
          Nature: Gentle
          Posts: 7
          When I load Pokemon Emerald with DNS, I get an option to insert RTC. Doesn't Emerald Version already have Real Time Clock or some kind of time feature?
          And I seriously hope this is a DNS tutorial and not a wrong thread D:
          Reply With Quote
            #5    
          Old September 7th, 2016 (1:07 AM).
          Froosty's Avatar
          Froosty Froosty is offline
          The_Learner
             
            Join Date: Sep 2014
            Location: Somewhere in this world.
            Age: 19
            Gender: Male
            Nature: Brave
            Posts: 542
            Finally got a thing That I was madly searching for,
            Thanks for it :D
            __________________
            Want to talk with me regarding Rom-hacking ??? Want to get access to my works exclusive than anywhere else ???
            Click here to get in the discord server here where rom-hacking is a everyday talk and task.

            Want to showcase your hack on discord server ??? Click here to get the dask done.

            My works:
            TOOL: TL's Quick Enhancer
            TUTORIAL: Fire red habitat editing
            TUTORIAL: Fire red Transparent text-box


            | |
            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

            Sponsored Links
            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 7:53 PM.