Chrono Compendium

Marbule Gallery - Completed Fan Creations => Crimson Echoes => Topic started by: ZeaLitY on April 17, 2006, 08:09:37 pm

Title: EDIT: Attempting GFX hack
Post by: ZeaLitY on April 17, 2006, 08:09:37 pm
We may make a 1999 A.D., since we have 3 overworlds with no purpose right now. I experimented with the Blackbird tileset to try and make something remotely "town" like.

(http://ce.herograw.org/Zeal/blackbird.png)

It still looks a little Spartan, and my tables and chairs are just inventive ways of using walls and ceilings. We'd have to rely on sprites to make things comfy like 1000 A.D., like cans, or the drinks on a serving tray sprite, etc. Another option is direct editing of the tileset. Perhaps if we could decompress it, we could change the vent / grate stuff we'll never use into chairs. They'd be blue chairs, but it's the future, so whatev.
Title: EDIT: Attempting GFX hack
Post by: GrayLensman on April 17, 2006, 08:59:24 pm
It is possible to insert a new tileset with a custom palette?
Title: EDIT: Attempting GFX hack
Post by: ZeaLitY on April 17, 2006, 10:38:03 pm
It's difficult. Right now, the only people here who can do graphic hacks are the real three rom hackers. I never got past the "Find the sprite in Geiger's Sprite Viewer" stage, and I don't believe anyone else has tried to become proficient in it. But all you have to do is find the relevant packet of data, decompress it, edit and reinsert. I'm sure there are some special stipulations, probably relating to the way CT handles the tiles.

At any rate, it may be some time before we get to 1999 A.D. (our amazing rate of progress notwithstanding), so we'll have time to plan.
Title: EDIT: Attempting GFX hack
Post by: Chrono'99 on April 18, 2006, 03:27:55 am
It's actually reminiscent of Solaris' upper-class houses from Xenogears (less evil and Big Brother-esque of course). The serving trays and soda cans will definitely make it more lively, I remember the serving tray sprite has vibrant colors. The Epoch seat sprite could even be used as a chair... facing down only though.
Title: EDIT: Attempting GFX hack
Post by: ZeaLitY on April 18, 2006, 03:12:36 pm
We can't exactly make beds yet. The real annoying thing with this tileset is that you can't achieve solid blue walls. Those annoying yellow pipes / ventilation tiles / whatever occupy half of every tile.
Title: EDIT: Attempting GFX hack
Post by: ZeaLitY on April 18, 2006, 03:41:17 pm
Things are held up right now while the plot's being made and we're waiting for someone to upload the ROM, so I'm going to try and edit the Blackbird tileset. Of course, finding it is the hard part.

252000   2CFEB1   GFX   Yes   No   Location Tiles   6/23/2003

So it's in there, starting on an unheadered rom at 251E00 (subtract $200 for the header)? Is there any way to use the data from Temporal Flux (e.g. the Blackbird's tileset is 1F) to locate exactly where it's stored? And one more question; are the location tiles stored as one, gigantic packet?

I tried decompressing 251E00, but got an empty file.
Title: EDIT: Attempting GFX hack
Post by: Chickenlump on April 19, 2006, 12:28:33 am
No, I think each tileset is split up into like, 4 different chunks each, but are usually right next to each other. I have the enemy graphics and most NPC locations noted, but tilesets I tried, but gave up (like over a year ago when I didn't try too hard :) ).
Title: Re: EDIT: Attempting GFX hack
Post by: JLukas on April 19, 2006, 08:11:05 pm
Geiger switched to non-header for the Offsets Guide a long time ago.

Anyway, I'll track down the blackbird tileset later tonight.
Title: Re: EDIT: Attempting GFX hack
Post by: JLukas on April 20, 2006, 09:14:11 am
Well, looking at the data it appears the Blackbird graphics packets are at these addresses (non-header, of course):

2C9C7F
2CA8B4
2FC1D3
259597

Hope that helps.
Title: Re: EDIT: Attempting GFX hack
Post by: Chrono'99 on May 20, 2006, 02:49:59 pm
Now that we did something successful with King Zeal, we might be able to do the same thing with tilesets...

For now I'll just enjoy the demo for a while though and see that later :)
Title: Re: EDIT: Attempting GFX hack
Post by: Chrono'99 on August 14, 2006, 10:29:32 am
Okay, there are about 50 free slots in the subtiles. We can definitely use them to have a less Spartan future. I tried to insert a bed from the 1,000 AD tileset and it works nicely. The palette will have to be tamed but the test is a success anyway (I feared the modification would glitch the whole tileset or something).

[attachment deleted by admin]
Title: Re: EDIT: Attempting GFX hack
Post by: Chrono'99 on August 14, 2006, 10:38:54 am
Here's a better palette:

[attachment deleted by admin]
Title: Re: EDIT: Attempting GFX hack
Post by: Agent 12 on August 14, 2006, 10:49:49 am
that looks GREAT

--jp
Title: Re: EDIT: Attempting GFX hack
Post by: ZeaLitY on August 14, 2006, 01:37:40 pm
Damn, there will be a whole lot of tutorializing going on. Perhaps we should discuss what anemities we can give the future. Are you just taking tiles from other sets within Temporal Flux, or do you actually decompress and edit something to do this? If it is the latter, I guess we can add some new stuff.
Title: Re: EDIT: Attempting GFX hack
Post by: Chrono'99 on August 14, 2006, 02:25:52 pm
I decompressed 2FC1D3, which is just a part of the picture I awkwardly named "2FC1D3.png", and edited it like with the sprite graphics. I used the free slots for easiness but really everything can be modified (like those yellow pipes). Then in TF to make the extra stuff appears you must change the tiles's subtiles, which is easy since there are a lot of empty tiles.
Title: Re: EDIT: Attempting GFX hack
Post by: Agent 12 on August 14, 2006, 02:36:03 pm
whoa wait so all these new sprites can be custom made?? Is that not going to take up extra space?

--jp
Title: Re: EDIT: Attempting GFX hack
Post by: Chrono'99 on August 14, 2006, 02:40:16 pm
Technically it's just replacing existent graphic space (even if some of this space is "blank"), so it's fine.
Title: Re: EDIT: Attempting GFX hack
Post by: ZeaLitY on August 14, 2006, 03:28:21 pm
Jeez, so we can edit tilesets this easily...

I guess we should figure out what we need with the Blackbird tileset and what we can do with it. We could spruce up the walls (right now its mandatory to have one of those vent things run down between each wall tile; no getting around it) and add some things reminiscent of a shopping mall. I wonder how much palette flexibility we have. Perhaps we could remove some of the Blackbird's yellow rust tinges for more white / other colors pertaining to new additions.
Title: Re: EDIT: Attempting GFX hack
Post by: Chrono'99 on September 16, 2006, 08:26:22 am
<_<

>_>

The board is awfully quiet since then end of August... Anyway, I'm back and am currently doing the tileset. I'm thinking about making the door and furnitures like the ones from "V" (http://en.wikipedia.org/wiki/V_%28TV_series%29 a famous series, at least for me).
Title: Re: EDIT: Attempting GFX hack
Post by: ZeaLitY on September 16, 2006, 10:20:40 am
Yeah, while Jsondag2 is away, mapping is probably the best thing we can work on. I should try to find some mappers.
Title: Re: EDIT: Attempting GFX hack
Post by: Chrono'99 on September 17, 2006, 09:11:23 pm
I'm going full speed again, it's nearly finished. The colors might be a bit bland currently and the floor should probably be changed but I think overall it looks neat (ehe, auto-congratulation).

[attachment deleted by admin]
Title: Re: EDIT: Attempting GFX hack
Post by: nightmare975 on September 17, 2006, 09:31:14 pm
That is sweet dude. Can't wait to use it.
Title: Re: EDIT: Attempting GFX hack
Post by: ZeaLitY on September 17, 2006, 11:05:46 pm
You're tellin' me...mapping with this will be a pleasure. I wish I could catch a break to get CE some momentum in other areas again.
Title: Re: EDIT: Attempting GFX hack
Post by: justin3009 on May 15, 2007, 08:01:16 pm
Sorry to revive an ancient thread, but how did you change the metal pillars (the ones surrounding the TV thing) without it corrupting the rom?  If I even change 1 pixel it corrupts, unless something I decompressed is really weird.
Title: Re: EDIT: Attempting GFX hack
Post by: Chickenlump on May 17, 2007, 07:49:20 pm
Just make sure that the new graphics file you are recompressing to the ROM is the same size or smaller than the original graphics file you decompressed. Once you decompress one of the graphics packets, copy it and make edits to the copy, then right click on the files and compare the sizes of the original file and the edited file.
If the edited packet is larger by even 1 byte, things go badly (you are overwriting something right after it).
Also, make sure you are recompressing it back to the exact same address you decompressed it from.
Or... Repoint that packet to some freespace if it has to be larger, though TF uses freespace... I forget if the graphics packets pointers are 2 or 3 byte pointers, if they are 3, then it's possible to make it larger, and put it in a bank way past what TF will ever reach. I think that made sense. Sort of.

>_>
Title: Re: EDIT: Attempting GFX hack
Post by: justin3009 on May 17, 2007, 09:03:50 pm
That's what I don't understand.  They're the same exact size yet it still corrupts the rom o.O..I'm pretty sure it's the right address as well , cause it worked fine when I reimported it with the pillar gone.
Title: Re: EDIT: Attempting GFX hack
Post by: Vehek on May 17, 2007, 09:59:09 pm
Check the re-compressed size when you import back into Temporal Flux.
The pointers are 3 bytes pointers, so you should be able to repoint them if it's necessary.
Title: Re: EDIT: Attempting GFX hack
Post by: Chickenlump on May 18, 2007, 07:45:20 pm
The pointers are 3 bytes pointers, so you should be able to repoint them if it's necessary.

Ah, thanks! I am currently without a computer, so could not look it up myself. Well then, that makes things infinitely easier when modifying tilesets, not having to worry about the packet sizes, and as an added bonus, it frees up the space that the original packet took up, meaning you can overwrite the original packet with your own data, code, etc.
Title: Re: EDIT: Attempting GFX hack
Post by: justin3009 on May 18, 2007, 08:04:32 pm
I'm probably going to have to do that.  I encountered a more funny error.  If you decompress the file, then recompress it without any changes, the rom corrupts itself xd!

PS: Um...Ya i'm retarded but where would the 3 byte pointers be?  Would you just type in that same address for the tilesets like 273D02(Manoria Cathedral) into snes9X debugger and add 3 bytes so its 273D05 so then you can change them?...or something.  >_>...
Title: Location Tiles Pointers
Post by: Vehek on May 18, 2007, 08:31:20 pm
362220   3624BF   PTR   No   No   "Pointers to Location Tiles (224 addresses, first at 252000)"   6/21/2004
Go look in there until you find the pointer you're looking for.
Title: Re: EDIT: Attempting GFX hack
Post by: justin3009 on May 19, 2007, 11:45:14 am
It's quite amazing.  I had the same corruption problem with Manoria Cathedral, but then there were 2 things that allowed it to not corrupt.

1) The one that was corrupting the rom, I changed and imported first and it worked.  I really have no clue why it worked but it did.

2) I can't import the image directly into Tile Molester and save.  I open up the one I want to edit and another for a place holder.  I import the image in the place holder one, and copy and paste the stuff bit by bit into the one I want to edit.

For some reason this worked...Kinda awkward o.O
Title: Re: EDIT: Attempting GFX hack
Post by: Agent 12 on August 10, 2008, 06:42:15 pm
OK,

So I have successfully done this myself, however the recompressed tileset after adding the bed is larger than when i decompressed it (which makes since cause it's harder to copress a bed then it was to compress blank tiles.   Here's what TF put in the status bar when i decompressed the data:

Compression-> 2FC1DF-> Decompress:  1000 compressed 633 offset range 2FC1D3 - 2FC805

I added the bed and then did this:

Compression 2FC1DF -> Recompress:  1000 compressed 74C Offset Range 2FC1D3 - 2FC91E

So i'm pretty sure it doesn't matter how large the file is before you spit it in the recompressor, what matter is what's put in the status bar....This could have led to the corruption from before.


If what i'm wrong let me know and I'll add the bed until then we'll have to wait till were done doing TF related stuff and then add the bed.  I dont want to put it in unused space because I dont want TF to overwrite it.

Anywhos for anyone interested here's a little how to:

1)   First figure out where the graphics are:

Easiest way...ask here and wait for someone who knows how to do it to tell you...
As Jlukas pointed out blackbird used

2C9C7F
2CA8B4
2FC1D3
259597

Note that these are graphics packets.  Don't expect to see what you see in the TF tile palette.  The tile editor will pull tiles from these 4 graphics packets to make the pretty pallete you see.

2)  Get the decompressed packets:

TF makes this easy.  File -> Compression.  Throw the address in and make your file name.  I suggest calling it <address>_<location>_original.gfx

3)   Open it up in Tile Molester for viewing.

Download Tile Molester.  File->Open.  Switch it to all file (*.*).  Double click your file.  Now for the tircky part.  CT uses a non default codec in tile molester (atleast for these graphic packets).
Click View -> Codec -> 4bpp Planar, composite.

Now you will see the graphics being used.  You can use the Zsnes save state trick to get the palette you want.  Open zsnes go to the location using the tiles, save state.  Go to Tile Molester.  Palette->Import From -> Another File-> go to the zsnes save state.  Then in the lower left click the arrows until the tiles are pretty.

4)  Edit the graphics:

I'm not a pixel artist but I can copy paste.  King Guardia's bed is located at address 25D3A8 (i found it by browsing randomly took forever...) Load it up as you did above and use the selection tool to copy over the graphics into the unused space that chrono'99 pointed out.  Save the file, i suggest <address>_<location>_edited.gfx

5)  Actually use it in TF.  Here's the part that was the wavy hands part of this thread until I tried it myself.  Here's a few basics about tile:

a) each tile is composed of 4 subtiles
b)  What you were editing before in Tile Molester was "subtiles"
c)  Each subtile can be turned vertically /horizontally

So if you open a blackbird location you'll see many garbage tiles being unused.  right click one of them and look at the tile section in the location bar.  You'll see that you can edit the 4 "quadrants" of that tile and for each quadrant load a subtile.  There's always a blank subtile...in this case it's 100 but you can look at other tiles to figure it out yourself.  So now...how do we find our bed?  Subtiles are all 3 hexadecimal numbers:

XYZ:

X = graphics packet  (starting at 0)
Y = row (starting at 0, max = F)
Z = column (starting at 0 max = 7)

JLuaks gave us 4 areas I haven't confirmed if they are the correct order but let's pretend:

2C9C7F (0)
2CA8B4 (1)
2FC1D3 (2)
259597 (3)

In this example we are editing 2FC1D3 (it really is graphic packet 2 by the way).  I put my bed in the lower right corner.

(http://jpsondag.com/CE/bedadded.JPG)

Starting from the top and counting from 0 the upper left of the bed (the little sphere thing) is in row 4.  Starting from the left and counting from 0 the upper left of the bed (the little sphere thing) is in column E.  It's in graphics packet 2 so that subtile is 24E.  Similarly the part below it is subtile 25E, below that is 26E. 

Now going back in TF it's time to make the bed.  I looked up how other beds were doing in TF and noticed that they usually use 3 tiles width (not sure why) that's 6 subtiles tiles, with the far left tiles and far right tiles being blank.  You don't HAVE to do it their way but we will.  A bed is 7 subtiles height and the top tile has blank subtiles on top.

Pick a an unused chunk of the blackbird and right click the upper right part of where you want to put your bed.   Go to the tile section and choose NW quadrant...it's blank (remember from above) so make it 100.  Same with NE, and SW quadrants.  However SE quadrant is where we put our little sphere thing.  So make it 24E.

Now choose the tile below, again the west quadrants are blank but make the NE quadrant the part below the sphere thing (25E) and the SE quadrant the part below that (26E).

Continue for the rest of the bed.  One thing to note is that the "East" part of the bed is just the west part mirrored to you'll have to choose flip horizontally.

Phew.....that's all.  Parts of this might just be plain wrong so please critique.  When I know i'm right i'll make a public post in kajar.  Also if someone could check the recompression thing for me that's be awesome.  I'm attaching the new subtiles with the bed added but i'm not adding it to CE because I'm 99% sure it runs over.

--JP






[attachment deleted by admin]
Title: Re: EDIT: Attempting GFX hack
Post by: Agent 12 on August 11, 2008, 02:08:46 am
Can someone point me to the a graphics packet that contains a table?  Or better yet a list of all the graphics packets?


--JP