• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best places on the 'net to talk Pokémon and more! Community members will not see the bottom screen advertisements.
  • Want to share your adventures playing Pokémon?
    Check out our new Travel Journals forum for sharing playthroughs of ROM Hacks, Fan Games, and other Pokémon content!
  • IMPORTANT: Following a takedown request, the following hacks have been delisted from PokéCommunity:

    • Pokémon Glazed
    • Pokémon: Giratina Strikes Back
    • Pokémon Flora Sky
    • Pokémon Stranded
    The downloads and discussion threads for these hacks will no longer be accessible, and staff will be unable to return questions regarding accessing this content.

Development: Day/Night Switching of Wild Pokémon

Jambo51

Glory To Arstotzka
736
Posts
14
Years
  • Seen Jan 28, 2018
Jambo you have to do make a patch with your asm already inserted in the pokemon firered for me to test the tool's shiny Quagsire? If you can do it I would greatly appreciate it. Thank you for your attention!

Sorry, but a straight up patch is a VERY bad idea because it might overwrite another hacker's hard worked on data. If I had the know how, I'd write a tool which inserts the routines in a sensible location for you, but I don't. Shiny Quagsire's tool is outdated and was designed for a much older version of the routine. AFAIK, he's working on updating it, and is trying to build the routine insertion into it.

EDIT: I patched the time update routine onto the main loop on Emerald by using this routine:

Code:
.text
.align 2
.thumb
.thumb_func
.global timeupdatemainloop
 
main:
 push {r0-r3}
 bl timeupdate
 pop {r0-r3}
 pop {r0}
 lsl r0, r0, #0x18
 cmp r0, #0x0
 bne there
 bl thatplace
 pop {r0}
 bx r0
there: ldr r0, place
 bx r0
thatplace: ldr r0, thatplace2
 bx r0
timeupdate: ldr r1, timeupdt
 bx r1
.align
place: .word 0x080004D5
thatplace2: .word 0x0800051D
timeupdt: .word 0x0802F589

In order for this to work, go to 0x080004CA, and stick the following code in instead:
Code:
01 B4 00 48 00 47 XX XX XX 08

What this does is makes the time update routine be called once a frame no matter where in the game you are or what you are doing.
 
Last edited:

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
Jambo51 said:
Shiny Quagsire's tool is outdated and was designed for a much older version of the routine. AFAIK, he's working on updating it, and is trying to build the routine insertion into it.

I actually had a version that worked, but when I tried to wipe my computer, the flash drive that had our backed up info died. Luckily I had the old source code lying around in my own flash drive, which had my hacking stuff, so I'm trying to back that up to the newer version.
 
25
Posts
13
Years
  • Seen Aug 29, 2013
This is just a suggestion that may make things more complicated than they may need to be, but here it is: Variable length of the days by season.

I'm suggesting it because I've lived in areas where daylight will last for about twenty hours during summer(Prince George, British Columbia, Canada), and it always felt like the cold would set in earlier and longer, with the nights lasting just as long during winter. I've also known people who've lived close enough to the equator that for most of their lives, they've only known one type of season, despite the calendar saying that its winter or spring. One thing that I've seen in the section "What makes a good ROM" is how realistic it is, and it would add a very realistic element to the game if it changed the length of the days for each season and changed the weather in the battle with each season (ex: if the climate was tropical, it would either be raining or sunny, likely with little to no variation on the length of days).

Granted, it may be a little to hard to do the coding for, so I can understand if this suggestion is overlooked for now.

Suggestion for how it could work if the idea is taken seriously: using something similar to the Header section of Advance Map, with the added option of Climate.

I'm not very good at coding, but I am good at testing. I'll take a look at the most recent version of the D/N program and test it on a spare ROM if somebody can send me the link for it.

Edit: Also posting the idea of length of days being able to change by season in the section entitled "Research: Seasons in Fire Red" started by Shiny Quagsire. This idea may also be more appropriate there.
 
Last edited:

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
This is just a suggestion that may make things more complicated than they may need to be, but here it is: Variable length of the days by season.

I'm suggesting it because I've lived in areas where daylight will last for about twenty hours during summer(Prince George, British Columbia, Canada), and it always felt like the cold would set in earlier and longer, with the nights lasting just as long during winter. I've also known people who've lived close enough to the equator that for most of their lives, they've only known one type of season, despite the calendar saying that its winter or spring. One thing that I've seen in the section "What makes a good ROM" is how realistic it is, and it would add a very realistic element to the game if it changed the length of the days for each season and changed the weather in the battle with each season (ex: if the climate was tropical, it would either be raining or sunny, likely with little to no variation on the length of days).

Granted, it may be a little to hard to do the coding for, so I can understand if this suggestion is overlooked for now.

Suggestion for how it could work if the idea is taken seriously: using something similar to the Header section of Advance Map, with the added option of Climate.

I'm not very good at coding, but I am good at testing. I'll take a look at the most recent version of the D/N program and test it on a spare ROM if somebody can send me the link for it.

Edit: Also posting the idea of length of days being able to change by season in the section entitled "Research: Seasons in Fire Red" started by Shiny Quagsire. This idea may also be more appropriate there.

Actually, that'd have to be done in the D/N system itself. This just makes pokemo vary from day to night.
 

Jambo51

Glory To Arstotzka
736
Posts
14
Years
  • Seen Jan 28, 2018
I could however, slightly rewrite the coding to support differing Pokémon by season, but it just makes the already massive tables needed for just the day to night transition even bigger.

As for the actual on screen seasonal transition...? Not even my ASM, so wrong thread my friend.

On topic - Have you finished rewriting the tool shiny quagsire?
 
3
Posts
13
Years
  • Seen Jun 16, 2011
This seems awesome! :D
Well, with a tool it would make this function very common, although without a tool i wouldnt be able to use it (as of right now.. xD).

Good luck, I'll be following this thread! :3
 

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
What's the purpose of the variable in the level loading routine?
 

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
Awesome, thanks. I was looking, and thought "..."

Sorry about double posting, but where are the wild data pointers located? The example was about route 1, yet I have no idea where the other pointers are.

Sorry for TRIPLE posting, but I have yet to find out how this table is stored. I found a pointer to the wild data in route 1, yet the table it's aligned in seems awkward. Anyone have an explanation?
 
Last edited:
8
Posts
14
Years
  • Seen Nov 14, 2014
Hey,

I used the routine for my german emerald rom.
I works. The wild Pokémon change during night but sometimes the game freezes when the player walks through the grass (day and night time).
I have no idea why. I only changed the offsets in the routine to make it fit. I'm sure that they are correct because I found them by searching the bytes from the englisch version in the german version.
Can anyone help me please?

Furthermore I can say with the help of the disassembler of the VBA that the code loops endless between that part:

.check:
ldrb r3, [r1, #0x3]
cmp r3, #0xFF
beq .nodata
cmp r3, #0x8
bne .nextnormal
ldr r0, [r1, #0x0]

Maybe your code has a bug.
I don't know if it works perfectly for other ones in emerald?
 
Last edited:
4
Posts
10
Years
Hi, I wanted to know if I can use it on a French ROM, or if i can't, did you know how I can make it ?


( Sorry if I do not write correctly English, I'm French, and I just learnd English on School =X )


PS: It's really a good job, hope its work on French ROM
 

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
Hi, I wanted to know if I can use it on a French ROM, or if i can't, did you know how I can make it ?


( Sorry if I do not write correctly English, I'm French, and I just learnd English on School =X )


PS: It's really a good job, hope its work on French ROM

To do it, you'd need to find the offsets in the French version then change them in the routine.
 
22
Posts
10
Years
Hi, I wanted to know if I can use it on a French ROM, or if i can't, did you know how I can make it ?


( Sorry if I do not write correctly English, I'm French, and I just learnd English on School =X )

You're everywhere decidedly ^^ !
Otherwise, as I told you that I will look for French Version.
 

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
You're everywhere decidedly ^^ !
Otherwise, as I told you that I will look for French Version.

Just as a rule of thumb in the hacking scene we prefer to work with one version to make things easier offset-wise, so if you're going to be doing a lot of ASM additions, small patches to the ROM at specific offsets, and maybe even graphics hacking it's generally best to work with the standard ROM, or in this case BPRE v1.0. You'll find a lot more support there, especially once I roll out built-in Day/Night pokemon into MEH.
 
29
Posts
10
Years
  • Age 31
  • no
  • Seen Apr 20, 2020
if i try to use this with prime-dialga's DNS, what offsets would be replaced in the ASM code given?
 
29
Posts
10
Years
  • Age 31
  • no
  • Seen Apr 20, 2020
The only offsets that will change are the RAM offsets for the time, I believe.
thanks for answering me! :D

you mean this: "...hour: .word 0x03005542..."

using prime's DNS, thats the ram offset for the time... or am i into something else with this?
 
Back
Top