Skip to content

Revert Brendan May Sprites to Ruby Sapphire

Gnome67 edited this page Feb 6, 2024 · 5 revisions

This tutorial will show you how to change the sprites of Brendan and May so that they match their Ruby and Sapphire sprites (I refer to this as de-greening the sprites)

1. Obtaining the necessary sprites

Head over to the pret/pokeruby repository and navigate to the graphics folder. We need to extract graphics from two different folders, the intro folder and the object_events/pic/people folder.

From the intro folder, grab intro2_brendan.png and intro2_may.png.

From the object_events/pic/people folder, download all the files in the brendan and may folders except for the normal.png in either folder. In pokeemerald, walking and running animation graphics are separated, and the ruby/sapphire equivalent is already included in the repository.

2. Hot-swapping the sprites

The pokeemerald repository is ever so slightly organized differently from pokeruby. We are also going to replace two files for Brendan and two for May. Navigate to graphics/intro/scene_2 and replace both brendan.png AND brendan_credits.png with the file intro2_brendan.png you got from pokeruby (Personally, I made 2 copies of intro2_brendan.png, renamed it to brendan.png and brendan_credits.png respectively, and replaced the pokeemerald versions when prompted)

For the files we got from the object_events/pic/people folder in pokeruby, we are going to drop those into graphics/object_events/pics/people/ruby_sapphire_brendan and graphics/object_events/pics/people/ruby_sapphire_may respectively. If you did this correctly, you should have 8 new files:

The above is for the brendan files, but may will have the same amount and with the same names.

3. Editing the code

Almost done. There are two files we need to actually edit in: src/data/graphics/trainers.h and src/data/object_events/object_event_graphics.h

In trainers.h, replace the following lines of code:

- const u32 gTrainerFrontPic_Brendan[] = INCBIN_U32("graphics/trainers/front_pics/brendan.4bpp.lz");
- const u32 gTrainerPalette_Brendan[] = INCBIN_U32("graphics/trainers/palettes/brendan.gbapal.lz");

- const u32 gTrainerFrontPic_May[] = INCBIN_U32("graphics/trainers/front_pics/may.4bpp.lz");
- const u32 gTrainerPalette_May[] = INCBIN_U32("graphics/trainers/palettes/may.gbapal.lz");

with:

+ const u32 gTrainerFrontPic_Brendan[] = INCBIN_U32("graphics/trainers/front_pics/brendan_rs.4bpp.lz");
+ const u32 gTrainerPalette_Brendan[] = INCBIN_U32("graphics/trainers/palettes/brendan_rs.gbapal.lz");

+ const u32 gTrainerFrontPic_May[] = INCBIN_U32("graphics/trainers/front_pics/may_rs.4bpp.lz");
+ const u32 gTrainerPalette_May[] = INCBIN_U32("graphics/trainers/palettes/may_rs.gbapal.lz");

In object_event_graphics.h, replace the following lines of code:

- const u32 gObjectEventPic_BrendanFieldMove[] = INCBIN_U32("graphics/object_events/pics/people/brendan/field_move.4bpp");
- const u32 gObjectEventPic_BrendanSurfing[] = INCBIN_U32("graphics/object_events/pics/people/brendan/surfing.4bpp");
- const u32 gObjectEventPic_BrendanMachBike[] = INCBIN_U32("graphics/object_events/pics/people/brendan/mach_bike.4bpp");
- const u32 gObjectEventPic_BrendanAcroBike[] = INCBIN_U32("graphics/object_events/pics/people/brendan/acro_bike.4bpp");
- const u32 gObjectEventPic_BrendanFishing[] = INCBIN_U32("graphics/object_events/pics/people/brendan/fishing.4bpp");
- const u32 gObjectEventPic_BrendanWatering[] = INCBIN_U32("graphics/object_events/pics/people/brendan/watering.4bpp");
- const u32 gObjectEventPic_BrendanDecorating[] = INCBIN_U32("graphics/object_events/pics/people/brendan/decorating.4bpp");
- const u32 gObjectEventPic_MayDecorating[] = INCBIN_U32("graphics/object_events/pics/people/may/decorating.4bpp");
- const u32 gObjectEventPic_BrendanUnderwater[] = INCBIN_U32("graphics/object_events/pics/people/brendan/underwater.4bpp");
- const u32 gObjectEventPic_MayUnderwater[] = INCBIN_U32("graphics/object_events/pics/people/may/underwater.4bpp");
- const u16 gObjectEventPal_PlayerUnderwater[] = INCBIN_U16("graphics/object_events/palettes/player_underwater.gbapal");
- const u32 gObjectEventPic_MayNormal[] = INCBIN_U32("graphics/object_events/pics/people/may/walking.4bpp");
- const u32 gObjectEventPic_MayRunning[] = INCBIN_U32("graphics/object_events/pics/people/may/running.4bpp");

with:

+ const u32 gObjectEventPic_BrendanFieldMove[] = INCBIN_U32("graphics/object_events/pics/people/ruby_sapphire_brendan/field_move.4bpp");
+ const u32 gObjectEventPic_BrendanSurfing[] = INCBIN_U32("graphics/object_events/pics/people/ruby_sapphire_brendan/surfing.4bpp");
+ const u32 gObjectEventPic_BrendanMachBike[] = INCBIN_U32("graphics/object_events/pics/people/ruby_sapphire_brendan/mach_bike.4bpp");
+ const u32 gObjectEventPic_BrendanAcroBike[] = INCBIN_U32("graphics/object_events/pics/people/ruby_sapphire_brendan/acro_bike.4bpp");
+ const u32 gObjectEventPic_BrendanFishing[] = INCBIN_U32("graphics/object_events/pics/people/ruby_sapphire_brendan/fishing.4bpp");
+ const u32 gObjectEventPic_BrendanWatering[] = INCBIN_U32("graphics/object_events/pics/people/ruby_sapphire_brendan/watering.4bpp");
+ const u32 gObjectEventPic_BrendanDecorating[] = INCBIN_U32("graphics/object_events/pics/people/ruby_sapphire_brendan/decorating.4bpp");
+ const u32 gObjectEventPic_MayDecorating[] = INCBIN_U32("graphics/object_events/pics/people/ruby_sapphire_may/decorating.4bpp");
+ const u32 gObjectEventPic_BrendanUnderwater[] = INCBIN_U32("graphics/object_events/pics/people/ruby_sapphire_brendan/underwater.4bpp");
+ const u32 gObjectEventPic_MayUnderwater[] = INCBIN_U32("graphics/object_events/pics/people/ruby_sapphire_may/underwater.4bpp");
+ const u16 gObjectEventPal_PlayerUnderwater[] = INCBIN_U16("graphics/object_events/palettes/player_underwater.gbapal");
+ const u32 gObjectEventPic_MayNormal[] = INCBIN_U32("graphics/object_events/pics/people/ruby_sapphire_may/walking.4bpp");
+ const u32 gObjectEventPic_MayRunning[] = INCBIN_U32("graphics/object_events/pics/people/ruby_sapphire_may/running.4bpp");

Make sure to build and compile to test in game.

Clone this wiki locally