News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Does anyone know how to change Sprite attributes to an EarthBound Zero ROM?  (Read 3076 times)

Noan1999

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Good morning, my username is Noan1999.
I'm new in this forum.
This time, I'm working on an EarthBound Beginnings Hack ROM.
I want to change the attributes of a sprite so that it uses another palette. But I do not know how to do it.
I also asked this question on the Starman.net forum, so far no one has answered.
I'm trying to get the Ninten sprites to use Lloyd's palette.


I have tried looking for tutorials on the internet but I get little information. I'm frustrated. I need help.  :banghead:  :-\
Please, if anyone knows how to change sprite attributes, please reply to this post.
We will thank you very much.

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 504
  • I am the baldest romhacker
    • View Profile
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

Noan1999

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
http://www.romhacking.net/forum/index.php?topic=31209.msg398901#msg398901

I used the Code / Data Logger function of the FCEUX emulator and I was able to modify the Ninten attributes to modify its palette, through the bytes in blue (I had to change one by one to see what changes were shown on screen).
I could modify the attributes, in a part of the EarthBound Zero ROM called "Sprite Data", which starts from address 2A010 to 2C00F (based on the game ROM map).
Here: https://datacrystal.romhacking.net/wiki/EarthBound_Zero:ROM_map

But there was another problem ...
Now I want to modify the attributes of an enemy, but its tiles do not appear in the PPU Viewer and the Data / Code Logger function does not help in this (I tried but could not).


I don't know what to do now!  :banghead:
« Last Edit: August 27, 2020, 01:42:09 pm by Noan1999 »

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 504
  • I am the baldest romhacker
    • View Profile
Try changing "display on scanline value" in ppu viewer, range 0-239. 20+ should probably work.
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

Noan1999

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Does anyone know how to change Sprite attributes to an EarthBound Zero ROM?
« Reply #4 on: September 09, 2020, 12:11:04 pm »
Try changing "display on scanline value" in ppu viewer, range 0-239. 20+ should probably work.

I have already managed to make the enemy's tiles appear, but I still have not managed to modify their attributes.

I have already used the Code / Data Logger and I can't get data related to the enemy's tiles, within the game ROM.

I have already made several attempts and nothing. :banghead: :banghead: :banghead:

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 504
  • I am the baldest romhacker
    • View Profile
Re: Does anyone know how to change Sprite attributes to an EarthBound Zero ROM?
« Reply #5 on: September 13, 2020, 10:43:42 am »
I see why this doesn't work. It's because this enemy is drawn on the screen using background tiles, not sprites. Which means that it gets drawn when the whole screen gets drawn, and its data is not updated every frame like sprites. So you need to start logging before entering a screen with the enemy, like when the screen almost goes black.

For example tiles numbers of this lamp are located here. Other enemies data should be nearby.
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

Noan1999

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Does anyone know how to change Sprite attributes to an EarthBound Zero ROM?
« Reply #6 on: September 14, 2020, 01:02:24 pm »
I see why this doesn't work. It's because this enemy is drawn on the screen using background tiles, not sprites. Which means that it gets drawn when the whole screen gets drawn, and its data is not updated every frame like sprites. So you need to start logging before entering a screen with the enemy, like when the screen almost goes black.

For example tiles numbers of this lamp are located here. Other enemies data should be nearby.


OK ... I already found a way to change the attribute of an enemy's tokens; But now I have a question.

What can be done in case one wants to change the palette of some tiles for another that is inside the ROM, but that at that moment is not shown in the PPU Viewer?

For example:

I want the a Centipede tiles to use a Snake's palette, but it doesn't appear in the PPU Viewer.



What can be done in this case?  :-\ :-\ :-\

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 504
  • I am the baldest romhacker
    • View Profile
Re: Does anyone know how to change Sprite attributes to an EarthBound Zero ROM?
« Reply #7 on: September 15, 2020, 03:24:03 am »
Let me guess, the next time you read this you're gonna say that you have figure this out already?  ;D

I've found these 2 values, the first one if for "doll" enemy, the second is for "lamp" enemy at the house where you start the game.
They indicate what palette loads for the current screen depending on the enemy type.


Find out which byte your "snake" uses, and write the same for "centipede".

PS: the game doesn't need to load palettes for all existing enemies at once. Games usually load only those which they are currently using.
Also you can right click on left/right window of the ppu viewer to change displaying palette for tiles.
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

Noan1999

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Does anyone know how to change Sprite attributes to an EarthBound Zero ROM?
« Reply #8 on: September 16, 2020, 11:34:34 pm »
Let me guess, the next time you read this you're gonna say that you have figure this out already?  ;D

I've found these 2 values, the first one if for "doll" enemy, the second is for "lamp" enemy at the house where you start the game.
They indicate what palette loads for the current screen depending on the enemy type.


Find out which byte your "snake" uses, and write the same for "centipede".

PS: the game doesn't need to load palettes for all existing enemies at once. Games usually load only those which they are currently using.
Also you can right click on left/right window of the ppu viewer to change displaying palette for tiles.

If I already understood, I managed to get the bytes of 2 enemies (An "Eagle" and a "Gabilan").

In this case I want the "Gabilan" to use the Eagle's palette. But when I change the byte, if the enemy is alone if the palette is changed, but when it is together with another "Gabilan" (Sometimes 2 appear on the screen), for some strange reason it is not changed.

So...What could be done?  :-\ :-\ :-\ :banghead: :banghead: :banghead:
« Last Edit: September 16, 2020, 11:39:43 pm by Noan1999 »

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 504
  • I am the baldest romhacker
    • View Profile
Re: Does anyone know how to change Sprite attributes to an EarthBound Zero ROM?
« Reply #9 on: September 17, 2020, 03:42:10 am »
Find another byte probably
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

Noan1999

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Does anyone know how to change Sprite attributes to an EarthBound Zero ROM?
« Reply #10 on: September 20, 2020, 03:22:28 pm »
I have another problem. Use a program called PK Hack Zero which uses it to change the HP.

But at the time of testing the game, the enemy tiles were not displaying correctly and some rare tiles were also displayed around the others of the enemy.

I managed to get the enemy tiles to display correctly, but the other rare tiles follow.



How could this be fixed? I think the program damaged my ROM.  :'( :'( :'( :banghead: :banghead: :banghead:

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 504
  • I am the baldest romhacker
    • View Profile
Re: Does anyone know how to change Sprite attributes to an EarthBound Zero ROM?
« Reply #11 on: September 20, 2020, 03:37:11 pm »
Try a clean original rom, try another rom. Make 1 change at a time and check after each one. Read manual.
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

Noan1999

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Does anyone know how to change Sprite attributes to an EarthBound Zero ROM?
« Reply #12 on: September 20, 2020, 09:31:27 pm »
Try a clean original rom, try another rom. Make 1 change at a time and check after each one. Read manual.
I already did the test ... If i can see that the enemy tiles are not displayed correctly (can be fixed with hex editor), but the other rare tiles are not displayed. :-\ :-\ :-\ :huh: :huh: :huh:

September 20, 2020, 11:22:59 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I already did the test ... If i can see that the enemy tiles are not displayed correctly (can be fixed with hex editor), but the other rare tiles are not displayed. :-\ :-\ :-\ :huh: :huh: :huh:
I don't know what happened this time ... But I think the problem is solved.

I made some changes in the hex editor, which made the error be fixed.

I used PK Hack Zero, because when modifying the attributes, their bytes are linked to the enemy's HP (Sometimes when modifying the Attributes the enemy's HP was very high).

According to the ROM map of the game. From address 2C010 to 2CF4F, it is a part related to various data of any enemy (Initial status, Flags, HP, Sub-palette, Tiles, PP, etc).
Each enemy has 31 bytes of data (According to This ROM Map Subpage https://datacrystal.romhacking.net/wiki/EarthBound_Zero:Enemy_data).

The 3rd and 4th bytes are linked to the HP, Sub-Palette and Graphic tile arrangement.
Changing the two bytes would modify the HP, Sub-Palette or Tiles of an enemy. For example, if 08 B0 bytes are changed to 0F B4, it will be possible to change the Sub-Palette but the enemy's HP would be very high. But if 08 B0 is changed to 18 C1, it could cause the tiles to not display correctly.

In the case of the PK Hack Zero program, it is a discontinued project like BBHack (Look at this Post that I made related to this project http://www.romhacking.net/forum/index.php?topic=31308.0), for to hack EarthBound Zero. It is very old, incomplete and has errors.
For now with this program you can only modify enemy and object data (This last option, for some strange reason does not work in my ROM, but in others it does).


September 21, 2020, 02:25:16 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I have a question.

How can oneself change the sub-palette to the tiles of a sprite?

I want to change the same to the tiles of the character Pippi.
« Last Edit: September 21, 2020, 02:25:16 pm by Noan1999 »

Noan1999

  • Jr. Member
  • **
  • Posts: 11
    • View Profile

How do I change the sub-palette of a sprite?

I want to change the sub-palette to Pippi (Game character).