Telefang 1 Denjuu Sprite Exporter & Importer

Discuss anything related to hacking ROMs of the Telefang games here.
Post Reply
Blaziken257
Posts: 983
Joined: Fri Dec 22, 2006 11:52 am

Re: Telefang 1 Denjuu Sprite Exporter & Importer

Post by Blaziken257 »

Ever wanted to edit Denjuu sprites, but found it to be tedious? Well, I hope this Python tool will come in handy. It exports Denjuu sprites from the ROM into a PNG image, and also does the reverse -- it can import PNG images back into the ROM. The idea is that you export it, edit it with any image editor, and import it back into the ROM.

As with some of my other tools, you need Python 2 for it to work, so go here to install it:
http://python.org/download/releases/2.7.3/

For exporting, double-click on export.py. You just need the filename for the ROM, the Denjuu number, and it exports the PNG image. Pretty simple.

For importing, double-click on import.py. You must enter the filename for the ROM, the Denjuu number, the filename for the PNG image, and if everything's good, it will edit the ROM with your new Denjuu image. It even edits the color palette! It also sorts the brightness of the colors so that it looks good in Game Boy mode too.

Also, for importing, just be sure to use a maximum of four colors, 64x56 size, and you're good to go. For more details, just read the README. It also lets you use images smaller than 64x56, and it lets you use Denjuu with non-white backgrounds, but it will warn you about this in case you didn't mean to do this. Finally, make sure the Denjuu faces LEFT like it is stored in the ROM so that it doesn't face the wrong direction in-game.

Without further ado, here is the sprite importer/exporter!

http://www.mediafire.com/download.php?tz1acaci6vci7b4
RacieB
Posts: 871
Joined: Thu Dec 28, 2006 4:27 am

Re: Telefang 1 Denjuu Sprite Exporter & Importer

Post by RacieB »

This is making me want to continue the sprite revamp... xD
I tested with my Bashou sprite, since the colors are somewhat unusual. I let it pad the sprite out as well.

Image Image

Looks good! Both in color and greyscale =)

I did think of one thing you could add - while the technical size of the sprites is 64x56, it's actually a bad idea to draw them larger than 55px in height. When the Denjuu sprite moves on the battle screen due to attack animations, any lines drawn on row 56 (the bottom one, that is) sort of "stick" and look awkward. Maybe you could have it look at row 56 to see if any pixels there are nonwhite, and advise against if so?
Blaziken257
Posts: 983
Joined: Fri Dec 22, 2006 11:52 am

Re: Telefang 1 Denjuu Sprite Exporter & Importer

Post by Blaziken257 »

Thanks for the feedback! I'm glad you're enjoying the Denjuu sprite exporter/importer tools. I wasn't even aware that the 56th row was glitchy during attack animations, so I'll look at this for myself and include a warning if any non-white pixels are in this row when I get around to updating this.

Also, I forgot to mention before, but you can use transparent pixels when importing PNG images. They will become opaque, and the brightest color (hopefully white). You can also use translucent pixels, where they will also become opaque, and retain their color (not that this is really necessary in any situation that I can think of, but it's still possible to do).
RacieB
Posts: 871
Joined: Thu Dec 28, 2006 4:27 am

Re: Telefang 1 Denjuu Sprite Exporter & Importer

Post by RacieB »

Oh cool beans, I usually save the sprites as PNGs with transparent backgrounds first so it's nice that I won't have to edit them to add the white =)

Another thought - it could be adapted to edit T-Fanger sprites too, couldn't it? Not that I foresee a whole lot of demand for that feature, but it's still a possibility.
Demonlemon(imported)
Posts: 58
Joined: Sat Dec 05, 2009 4:35 am

Re: Telefang 1 Denjuu Sprite Exporter & Importer

Post by Demonlemon(imported) »

awesome utility!
Blaziken257
Posts: 983
Joined: Fri Dec 22, 2006 11:52 am

Re: Telefang 1 Denjuu Sprite Exporter & Importer

Post by Blaziken257 »

I decided to put add this program in my GitHub repository. You can see it here:

https://github.com/Blaziken257/romhacking/tree/master/Telefang/T1DenjuuSprites

Currently, nothing has changed, but as I update the program, you will see the changes here. (Don't expect this to happen in a day, though.)
RacieB wrote:Oh cool beans, I usually save the sprites as PNGs with transparent backgrounds first so it's nice that I won't have to edit them to add the white =)

Another thought - it could be adapted to edit T-Fanger sprites too, couldn't it? Not that I foresee a whole lot of demand for that feature, but it's still a possibility.
Yeah, I figured it would be better that it supports transparency. Makes things easier and quicker. :D

And I could make it support T-Fangers too, I think I would simply have to change the ROM addresses and create an additional prompt. Exporting them, in particular, would be helpful for this page.
Demonlemon wrote:awesome utility!
Thank you!
Superjustinbros(imported)
Posts: 17
Joined: Mon Dec 16, 2013 8:21 am

Re: Telefang 1 Denjuu Sprite Exporter & Importer

Post by Superjustinbros(imported) »

Sorry for the bump, but I downloaded this just recently. However the exported PNG's do not appear in the folder where I initially extracted the files of the ZIP in the OP. I tried extracting Crypto and Monstera's sprites and they simply weren't there.

I made sure Python was installed.
Blaziken257
Posts: 983
Joined: Fri Dec 22, 2006 11:52 am

Re: Telefang 1 Denjuu Sprite Exporter & Importer

Post by Blaziken257 »

This is strange... so you're not seeing them anywhere? When you extract the ZIP file, there should be a TF1DenjuuSprites folder, which is where all the .py files are. And when you run export.py, any extracted PNGs should normally show up in this same folder. Do you not see them in this folder? And if you don't see them there, do you not see them at all, in any folder?

Also, are you using Python 2 or Python 3? It's meant to work on Python 2.

If you do not see them anywhere, then I will definitely need to look into this...
Sir Allan Newlight(imported)
Posts: 166
Joined: Wed Dec 24, 2008 7:57 pm

Re: Telefang 1 Denjuu Sprite Exporter & Importer

Post by Sir Allan Newlight(imported) »

What if this Editor also with using SWAMPERT TOOLS DENJUU EDITOR use for make own custom Denjuu or change some T1 Denjuu with T2 Denjuu? Going with your Diablos near you.
Superjustinbros(imported)
Posts: 17
Joined: Mon Dec 16, 2013 8:21 am

Re: Telefang 1 Denjuu Sprite Exporter & Importer

Post by Superjustinbros(imported) »

Blaziken257 wrote:This is strange... so you're not seeing them anywhere? When you extract the ZIP file, there should be a TF1DenjuuSprites folder, which is where all the .py files are. And when you run export.py, any extracted PNGs should normally show up in this same folder. Do you not see them in this folder? And if you don't see them there, do you not see them at all, in any folder?

Also, are you using Python 2 or Python 3? It's meant to work on Python 2.

If you do not see them anywhere, then I will definitely need to look into this...
I'm certain I'm using the version of Python you linked in the OP. I renamed the folder all the files are in "TF1DenjuuSprites" just like the main ZIP. And even after fooling around a bit trying to extract the images again, it's still not showing the .PNG's in the folder.
Post Reply