• 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?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Graphic✓] Are Day & Night Graphics Possible in PokeEmerald?

7
Posts
4
Years
    • Seen Apr 7, 2024
    I'm relatively new to decomp ROM hacking and wanted to add a visible change between day & night in PokeEmerald. I figured since it's present in Gen 2 games, it must be possible for Gen 3, even though it wasn't implemented in the official games. I can't seem to find any resources or information on how to implement it though. I thought perhaps I could create a second "night" version of each map and set the warps to be time dependent, but then I'd need to create "night" versions of each sprite as well and make sure the correct one shows at the correct time. I imagine there must be a better solution where the graphics somehow change the colour value of each pixel on the screen at night, making them more blueish-black, or maybe the solution would be to create an overworld effect, like fog, but just call it a "night tint" so it changes everything a bit darker. Or maybe the solution would be a time dependent weather effect. Thunderstorms darken the world so perhaps it would be possible to create a "night" weather effect like thunderstorms without the rain or lightning. Has anyone successfully implemented day/night graphics, and if so, how?

    Thanks in advance.
     
    Last edited:
    34
    Posts
    2
    Years
    • Seen Aug 13, 2023
    There are a few different public repos for Day/Night cycles, that are in various stages of recency/development.

    I've managed to merge one in that has dynamic palettes for handling the day/night cycle, and it works great! The only "bummer" is that the Day/Night cycle branch is tied to a few other changes, like following pokemon, so you can't just have the day/night changes.
     
    7
    Posts
    4
    Years
    • Seen Apr 7, 2024
    I haven't quite gotten the hang of merging public repos from github yet. I tried to follow Luno's instructions for merging Dizzy Egg's battle engine, pokemon expansion, and item expansion but ran into errors that weren't covered in the tutorial. I did happen across Pokemon Crystal Dust last night though which has a working day/night system and downloaded the source code for that. I haven't figured out where in the code they've implemented it though. My hope is to figure out how someone has done it so that I can replicate at the source level and not have to worry about merging someone else work and also getting the extras, like following pokemon. Which one did you merge with the dynamic palette system?
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • I tried to follow Luno's instructions for merging Dizzy Egg's battle engine, pokemon expansion, and item expansion but ran into errors that weren't covered in the tutorial.
    It would have been nice if you mentioned this in the thread.
    I'll look into it later and update the main post if needed.
    I did happen across Pokemon Crystal Dust last night though which has a working day/night system and downloaded the source code for that. I haven't figured out where in the code they've implemented it though.
    You don't really need to. Sierra has a branch with only the system so anyone can implement it into their project.
    https://github.com/Sierraffinity/pokeemerald/tree/daynight

    Bonus: you can check all the changes that are original to that branch using GitHub's Compare feature.
    https://github.com/pret/pokeemerald/compare/master...Sierraffinity:daynight
     
    7
    Posts
    4
    Years
    • Seen Apr 7, 2024
    Thanks for the reply Lunos. In general, your tutorial covered pretty much everything. The issue I ran into was that a couple of the merge conflicts that popped up weren't listed in the tutorial. I tried to resolve them myself, but in the end, the rom wouldn't compile (I must've deleted the wrong stuff while trying to resolve the conflicts). That was just to get the updated battle engine, pokemon, and items though. I didn't think it was relevant to the day/night issue so I didn't mention it initially.

    Thanks for pointing out Sierra's branch as well. I don't know why my google searches weren't coming up with anything. Github's compare feature looks like a really handy tool. I didn't know it had that. Clearly, I've still got a fair bit to learn. I'm a few weeks into an introductory C programming course on edX and I thought I finally had the tools to tackle rom hacking. I was pretty proud of myself when I figured out how to stop berry trees from disappearing after 10 re-grows, but there's still a lot more about C, Github, and rom hacking in general that I don't know enough about. I like learning about it though and am thankful there's supportive people in pokecommunity that were able to answer my question.
     
    7
    Posts
    4
    Years
    • Seen Apr 7, 2024
    Thanks retrogba. I'll take a look at Aarant's system and maybe use Github's compare tool to see the differences between that one, Sierra's, and Crystal Dust. Seeing how each one has done it might be a good learning experience.
     
    207
    Posts
    8
    Years
    • Seen today
    It would have been nice if you mentioned this in the thread.
    I'll look into it later and update the main post if needed.

    You don't really need to. Sierra has a branch with only the system so anyone can implement it into their project.
    https://github.com/Sierraffinity/pokeemerald/tree/daynight

    Bonus: you can check all the changes that are original to that branch using GitHub's Compare feature.
    https://github.com/pret/pokeemerald/compare/master...Sierraffinity:daynight

    Sadly this doesn't work as easily as it did before. An update to the now non-existent tileset.s made that branch... very difficult and time-consuming to apply.
    Is there any other day/night system out there?
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • Is there any other day/night system out there?
    Yeah, there's Xhyzi's/Samu's.
    https://github.com/pret/pokeemerald/compare/master...Xhyzi:pokeemerald:day-and-night

    There's also Merp's, but it's a bit more troublesome to merge as it contains a lot of other systems and not just a day/night one.
    lighting branch:

    Everything from the followers branch.
    Day/night shading compatible with weather.
    GSC-style window lights.
    WIP interframe-blended lamp lights at night, i.e in Rustboro.
    HGSS-style alpha-blended shadows for object events.
    https://github.com/pret/pokeemerald/compare/master...aarant:pokeemerald:lighting
     
    207
    Posts
    8
    Years
    • Seen today
    3
    Posts
    3
    Years
    • Seen Feb 17, 2023
    Sadly this doesn't work as easily as it did before. An update to the now non-existent tileset.s made that branch... very difficult and time-consuming to apply.
    Is there any other day/night system out there?

    👋 Hi! I updated Sierra's Crystal Dust port to use the upstream tilset C implementation. You can find that code here. That feature branch is otherwise in sync with pret's pokeemerald. Though the readme reflects my hobby work 😅 sorry about that! (I want to open a PR on Sierra's port but I've borked by current fork of the decompilation project and its not in a state where I want to delete it yet, either). It's probably worth mentioning that this port is slightly different from Sierra's in that I changed how time of day encounters are implemented. I found the out of the box implementation didn't play nice with Porymap for me. So I opted to use map groups, kind of like the altering cave, instead. I also added time of day affects the lighting of the battle scenes, not just the overworld.

    If your looking for the closest to Sierra's but with the updated tileset implementation, that first commit is what you'll want to grab. Plus, I'd suggest the compiler fixes here and here. Otherwise, pulling the entire branch should be safe except for the README.md changes that I'd suggest throwing away 😆

    In case this part wasn't obvious, to grab the changes from just the commit (or commits) and not the entire branch, assuming you've added https://github.com/Michelleeby/pokemodemerald.git as a remote named michelleeby ...

    Code:
    git fetch michelleeby

    Code:
    git cherry-pick <commit-sha-to-grab> <another-commit-sha-to-grab> ...

    The command to grab the first commit and compiler fixes, for example, would look something like:

    Code:
    git cherry-pick 7f87ac595508b92d5a284583d39df0cc5fb9374f a70c35b3437bf51f7c2e1fc116aac4ae065d37dd f0158ac234b81276749c0e1c589e7f88ad6dac6e

    And if your new to cherry-pick, https://git-scm.com/docs/git-cherry-pick.

    I hope this helps!
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • Last edited:
    Back
    Top