Golden Sun Hacking Community

Golden Sun Resources => Misc. GS Hacking => Topic started by: MattCustovGaming on 11, April, 2015, 08:08:15 PM

Title: Weapon Icon Editing
Post by: MattCustovGaming on 11, April, 2015, 08:08:15 PM
Alright, I'd like to start by admitting that I'm horrible at Hex editing and the like. But what I was thinking is (I starting rom modding in the Fire Emblem Forums) what if there was a way to customize the icons. Naturally, I knew if there was, but didn't know if someone had found the offsets of the portraits and Weapon Icons. If so, could someone tell me? xD
Title: Re: Weapon Icon Editing
Post by: MaxiPower on 11, April, 2015, 08:21:37 PM
Im pretty sure this can be done in the current editor as long as the icons inserted are compatible using correct pallette colours etc . Role has made quite a few of them. Welcome btw.
Title: Re: Weapon Icon Editing
Post by: MattCustovGaming on 11, April, 2015, 08:24:53 PM
Thank you, I'll check it out
Title: Re: Weapon Icon Editing
Post by: Daddy Poi's Oily Gorillas on 11, April, 2015, 08:36:56 PM
I thought the only sprites that were editable were in the Sprite Editor?

And I thought people were making icons early so they could insert them after the editor supported icon editing? Hm...

Icons are compressed with.... see my Icon Decompresser section here: http://forum.goldensunhacking.net/index.php?topic=2624.0 (Sorry it's not fully user-friendly... as you can see by the replies further down.)

The addresses should be here:
0804EB58 = Item icon graphic table (Pointer list)
0804F124 = Item icons
08054A14 = Ability icon graphic table
08058FF4 = Status icon graphic table

Remove 08 prefix if editing in a hext editor.
Title: Re: Weapon Icon Editing
Post by: MattCustovGaming on 11, April, 2015, 09:26:55 PM
Lucky me xD I was about to look through the data browser and probably screw something up
Title: Re: Weapon Icon Editing
Post by: Daddy Poi's Oily Gorillas on 11, April, 2015, 10:33:18 PM
Lucky you! Yes! :)

The Data Browser is mainly for the stuff appearing 08680000 and later, so you won't find these icons there.
The character portaits should be in the 08680000+ section, though. HOWEVER! They're not viewable in Atrius's editor because some error pops up.

For the pointers pointing earlier than 08680000 in that Data Browser Table... (And even the one pointing to 08680000) are most likely unused, I think. (But they do point to the start of the sections that are used. I kind of wonder if those pointers are there for development purposes, though?)
Title: Re: Weapon Icon Editing
Post by: Rolina on 11, April, 2015, 11:53:55 PM
Editing is one thing - are we able to add, though?  If we could add a bunch of icons, then an expanding item/ability icon patch would probably be really welcomed for those putting hacks out.
Title: Re: Weapon Icon Editing
Post by: Salanewt on 12, April, 2015, 12:24:31 AM
From what I have seen, these icons are basically organized in three pointer lists. All you would have to do to add icons would be to add and/or change pointers, but adding them would probably require moving the pointer list first. Definitely easier than manually editing individual icons.

Patch, hm... Might be open to making one that combines the three icon tables, but I have no idea if the editor would be able to read them all or not. Could be the same issue as with the formula patch(es).
Title: Re: Weapon Icon Editing
Post by: Rolina on 12, April, 2015, 12:28:02 AM
Well, better to try and find out than to do nothing and wonder.  With any luck, the editor can make use of it.  If not... the editor is open source now.  It's about time we patch it with some of the stuff we've come up with, don't you think?
Title: Re: Weapon Icon Editing
Post by: MaxiPower on 12, April, 2015, 04:16:01 AM
Ah shiz, we can insert sprites. I assumed that icons would have been possible too as it seems easier.
Title: Re: Weapon Icon Editing
Post by: Salanewt on 12, April, 2015, 07:41:56 PM
So I did a quick test, and the editor is only incompatible because it has a hard limit of how far it can read the two lists (and doesn't seem to know of the third). Relocating and combining the pointer tables would literally be as easy as copy+pasting though, so all that would need to be done is a simple editor version that either lets the user tell the program how much to read or just removes some of these limit somehow (maybe being set to the maximum cap, etc.). I remember doing something like that for ability formulas once, but that was a while ago and the [bootleg] software I had installed stopped working for some reason...

If I do end up making a patch for this (and I probably will), then it will likely go: Status -> Ability -> Item, with about 50 dummy pointers or so between the latter two sections of the table.
Title: Re: Weapon Icon Editing
Post by: Rolina on 22, April, 2015, 09:14:03 PM
Awesome.  I'd love to be able to insert a lot more icons into the game.  I know the Balanced Age series would benefit from with quite a bit.
Title: Re: Weapon Icon Editing
Post by: Salanewt on 23, April, 2015, 01:19:31 AM
Oh yeah, it would be great. I would have to double check, but I think both items and abilities can have icon IDs of up to 65535 each, if ignoring the fact that the ROM probably lacks the space for this many. Can't remember if the space where they are assigned is shared with other data or not. Also, the icon lists are pointer based, meaning that all you would have to do is paste an icon's data somewhere and then add a pointer that matches the icon's location in the ROM (roughly, and also assuming the list has room for the pointer without replacing another; something which this kind of patch probably would have with 99.99% certainty).

Although, while we're on the subject of making icon use/editing/whatever more efficient, I had an idea some time ago as a method to bypass the palette restriction. Basically, in the part of the icon decompression code that uses the sprite palette, I imagine it would be possible to add a check that reads an individual value from a table and adds it to the palette address. Instead of reading the first 16 colours (first always being transparent), it would read the 16 from the new address that results from the sum of the old address and the table value. For example, adding +x18 would lock you out of the standard icon palette, but would make the burgundy (below red) the new transparent colour and open up those multiple shades of green. Leaving it at 0 would simply mean that the icon's palette remains the standard. One could actually have purple without either faking it or changing the base palette.

(http://img.photobucket.com/albums/v698/AtriusV/Games/Golden%20Sun%20Project/SpritePalette.gif)
Thanks to Atrius for this familiar image.

If I eventually do this, I'll see about adding this sort of table feature as well. Fairly limited use until icon editing becomes much more accessible, but it would be better to have this available ahead of time. Whatever use it could have now may still be nice if users are lucky anyway. Oh, and another nice point is that it would also allow one to use duplicate pointers but set them up in a way where they can have a wider degree of pseudo variety.

Now this gets me thinking if icon rotations are also possible through a similar/joint system... Aah, I better stop rambling on about this I suppose. Need sleep.
Title: Re: Weapon Icon Editing
Post by: MattCustovGaming on 26, April, 2015, 07:22:15 PM
Quote from: Rolina on 12, April, 2015, 12:28:02 AM
With any luck, the editor can make use of it.
If not, GBAGE is still an option xD
Title: Re: Weapon Icon Editing
Post by: javi3 on 02, June, 2015, 11:43:21 AM
something new? I need to find the palette icons for passing them to gs 1