News:

The forum has been updated to SMF (2.1.3)!
Please be patient as we work to polish up the place and update features as we can.

Main Menu

Battle background editing!

Started by Daddy Poi's Oily Gorillas, 03, July, 2012, 05:28:14 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Daddy Poi's Oily Gorillas

Well, another one of my guides has just arrived. This is a simple one: Battle Background editing!

GS2:

080EF984 = This is the database that assign battle backgrounds to maps! Yes? Did you hear that right? Maps!

Please hit the 32-bit mode.

The "8" flag you see at the left most bit basically sets the background number to this 32-bit value (But without the bit intacted.), any 32-bit following this that does not have an 8 flag are map numbers, and they will get this battle background number. Otherwise, it selects another background to start assigning to rooms.

The background numbers here are actually just indexes to the pointers in the file table, So you'll need to start with x27.

0802F004 = World Map Battle Background Editing! (This one is very limited, though.)


Edit: Grammar fail. - Not song number, background number.

Any questions, comments, etc?
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Rolina

The tricky part is changing them.  It has little to do with coding, though... have you seen how high quality those are?  Getting an artist to pull that off in the right style... sheesh.  I'm getting headaches just thinking about it.

Salanewt

#2
The easiest way that I can think of by pulling that off would be to take a real-life picture of something, reduce its palette to GBA colours, and then fix all of the errors and polish it off.

Anyway, nice guide Teawater! I think I'll take a look at a part of this in a minute.

Edit: There ARE GS1 backgrounds in GS2. One of the Crossbone Isle backgrounds is x2A, and I'm pretty sure that I found a GS1 beach and cave too. x27 seems to be a background with a giant moon in it though. I don't recognize it at all...

x27 - Moon in sky/space
x28 - Suhalla Range
x29 - Deadbeard's ship
x2A - Crossbone Isle (staircases)
x2B - Colosso
x2C - Venus Aerie (after beacon is lit)
x2D - Venus Aerie (unlit)
x2E - Venus Interior
x2F - Lamakan Desert
x30 - GS1 Cave
x31 - Venus Underground (I think)
x32 - Babi Lighthouse
x33 - Suhalla Desert
x34 - Mogall Forest
x35 - Mercury Aerie
x36 - Karagol Ship
x37 - GS1 Cave (with water)
x38 - Kolima Forest
x39 - Inside Tret
x3A - Inside House (like a Vault house)
x3B - Alpin Mine
x3C - Karagol Ship Deck
x3D - Mercury Interior
x3E - Past Vale
x3F - Tret's Branches
x40 - GS1 Beach
x41 - GS1 Arctic
x42 - GS1 Field
x43 - Sol Sanctum
x44 - GS1 Forest
x45 - Purple Summon Sky
x46 - GS2 Field
x47 - GS2 Beach
x48 - GS2 Forest
x49 - Suhalla Cave
x4A - Suhalla Range
x4B - Kandorean Caves
x4C - Dekhan Plateau
x4D - Air's Rock Outskirts
x4E - Air's Rock Exterior
x4F - Air's Rock Interior
x50 - Kibombo Mountains
x51 - Great Gabomba
x52 - Ship Interior
x53 - Ship Deck
x54 - Gaia Rock Exterior
x55 - Gaia Rock Interior
x56 - Ankhol Ruins
x57 - GS2 Desert
x58 - Taopo Swamp (lava)
x59 - Aqua Rock Exterior
x5A - GS2 Cave
x5B - Aqua Rock Interior
x5C - Madra Catacombs Interior
x5D - Magma Rock Exterior
x5E - Magma Rock Interior
x5F - Trial Road Arena
x60 - Sea of Time
x61 - Jupiter Interior
x62 - Jupiter Arms
x63 - Mars Arms
x64 - Mars Aerie 1
x65 - Tundaria Tower Basement
x66 - Jupiter Aerie (lit)
x67 - Jupiter Caves
x68 - Mars Interior 1 (frozen)
x69 - Mars Interior 2 (thawed)
x6A - Mars Interior 2 (frozen)
x6B - Shaman Village (pool area)
x6C - Anemos Inner Sanctum
x6D - GS2 Arctic
x6E - Northern Reaches
x6F - GS1 Arctic with Japanese Kanji
x70 - Mars Aerie 2
x71 - Cruel Ruin landscape
x72 - Dark Red Fog (Catastrophe)
x73 - Ramses Desert
x74 - Thor Sky
x75 - Top-Down Summon View
x76 - Sun Background
x77 - Iris Space
x78 - Atmosphere Background
...
x7F - GS2 Mt. Aleph Credits
...

[spoiler=Picture List]
x27:

x28:

x29:

x2A:

x2B:

x2C:

x2D:

x2E:

x2F:

x30:

x31:

x32:

x33:

x34:

x35:

x36:

x37:

x38:

x39:

x3A:

x3B:

x3C:

x3D:

x3E:

x3F:

x40:

x41:

x42:

x43:

x44:

x45:

x46:

x47:

x48:

x49:

x4A:

x4B:

x4C:

x4D:

x4E:

x4F:

x50:

x51:

x52:

x53:

x54:

x55:

x56:

x57:

x58:

x59:

x5A:

x5B:

x5C:

x5D:

x5E:

x5F:

x60:

x61:

x62:

x63:

x64:

x65:

x66:

x67:

x68:

x69:

x6A:

x6B:

x6C:

x6D:

x6E:

x6F:

x70:

x71:

x72:

x73:

x74:

x75:

x76:

x77:

x78:

x79:

x7A:

x7B:

x7C:

x7D:

x7E:

x7F:

x80:
[/spoiler]

As the list goes on, we get various cutscene and summon backgrounds (like for Judgment, Mt. Aleph, etc.). I'm not sure if there are very many other battle backgrounds if excluding the ones that remain unlisted on this list.
Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?

Misery

#3
I wouldn't exactly call it a guide, but still a nice find.
It would be nice if you could list which value corresponds to which map, but I guess it would be easy enough for anyone to find out by looking at existing maps and which value they use for their battle background. Just saying, it's not like I'm going to make use of this for a while.
I'm a little curious about how this works for the world map though, as the backgrounds there seems to depend on where on the map you are. I'm also wondering which compression format is used for the backgrounds.

Edit: nevermind about background values, looks like Sala is doing it for you...

Quote from: Rolina on 03, July, 2012, 06:59:02 AM
The tricky part is changing them.  It has little to do with coding, though... have you seen how high quality those are?  Getting an artist to pull that off in the right style... sheesh.  I'm getting headaches just thinking about it.
And here I was thinking the game already has a good number of backgrounds with great variety... anyway, looking at walls and floors on most backgrounds suggests they're pre-rendered 3D environments, although certain backgrounds in TLA look like some details may have been pixeled in afterwards.

Daddy Poi's Oily Gorillas

#4
As far as the data viewer in the editor shows. The backgrounds should end at x80. So you're close to the end Salanewt.

You wouldn't call this a guide? The fact that it gave information on how to edit them should have been enough to call it a guide. Though, quite a short one, I must admit.


Edit: By the way, the file table is at x08680000.
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Rolina

@Misery:  Which works only if you're making a game without any new areas.  But the second you introduce a new iconic area, welcome to artist searching hell.  There's plenty of generic ones that'll work well, but specifics, like the Rocks, Lighthouses, and places like the Gomboba Statue can't really be reused unless they're either revisited or an area is made that's annoyingly close.  Since most of the new places are gonna literally be designed to be new, they'll need new tilesets, new backgrounds, and some of them maybe even new enemies.

Aile~♥

I think making actual 3-D models using Blender or somesuch and basing the backgrounds off that would be the best solution, similar to making PC sprites.
[sprite=16, 6, 0]:P[/sprite]

Lloyd: Easy as pie.
Genis: Sweet!
Presea: ...Sweetie pie...
Zelos: Let's not start on this again...

[spoiler=epic mindscrew][/spoiler]

Salanewt

#7
From the way things look, either model renders or painting would probably work out quite nicely. There also happens to be a noticeable difference between the two games sometimes... It is hard to explain, but it almost looks like the game's art style changed a bit when compared to the first.


Oh yeah, a question! Do you know if this section deals with the backgrounds used on the world map? I'm interested in playing around with this a bit, since I would like Disco Sun to have a bit more of a variety than GS2 does, and incorporating GS1 backgrounds with GS2 ones would be immensely useful to me.

Whoops, never mind, just re-read your post. My question has already been answered.
Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?

Rolina

Actually, you know what would probably help us out a lot?  We need a reference post that has all the backgrounds in it.  I know you can probably just go to a sprite rip site to find them - sprites.inc has DD's done, for example.  To have the backgrounds from all three games on site would help tremendously when it comes to referencing and comparing them.

Salanewt

Most likely. An easy way to do a comparison would be to just swap a value repeatedly in VBA's memory viewer, using the list that is in an earlier post. It should have about 99% of the backgrounds available in the first two games, if we exclude one or two unlisted cutscene backgrounds. But alas, I'm really not sure if I have the time to do that right now.
Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?

Rolina

An easier way would be to not even need to load it into the game, and just look at it compared to a list. :3

Salanewt

#11
True, although I'm more or less hinting that one could do this to rip all of the backgrounds using VBA and save them as .pngs or something, so that we can have the list that you are talking about. The obvious alternative would be to find a website that has already ripped them, but I don't know if there are many...

So I guess I can try ripping a few of them right now. I'm a bit bored as it stands, so it will give me something to do now that I have free time.

Edit: I have started adding them to the original list, should you want to see them. They are in the spoiler near the bottom... I think, pretty much every background from x27 to x45 are on that list right now, as well as a few other ones here and there. I don't know if I will be able to continue this list tomorrow, but I will if I have time.
Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?

Rolina

#12
I'm fairly certain sprites inc has, as I just mentioned...  The ones you've uploaded look pretty good so far, though.  I know for certain a full list of the DD ones are on sprites inc, though, so they should be rather easy to get a hold of.

Atrius (He/Him)

I need to crack the compression format on these...
[sprite=220,4,0]I'm shaking my head in general disapproval of everything[/sprite]

Daddy Poi's Oily Gorillas

#14
Hmm.. turns out the GS2 Battle BG's decompression routine is a simple one...

Given the formatting of the compressed data/decompression routine, it looks like these will only ever be used for Battle Backgrounds. It's designed specifically for 32 by 15 (in tiles) images. (x20 by xF)

I also managed to find out how the compressed data itself is non-tiled, seeing as to how they are decompressed into their proper tiles.

All notes below that say how r5 is altered actually say how r5's 7 MSBs are affected. (the 7 bits furthest to the left.) This is the um, color index in the palette.

030014A4 = r5 does not change. (Command 00 and 04; Since these are the same, this is an exception where the command has been made 2-bit instead of 3-bit.) (2 bits)
030014C0 = Add 1 or 2 to r5 (Command 01) (3+1=4 bits)
030014E8 = Subtract 1 or 2 to r5 (Command 05) (3+1=4 bits)
03001510 = Add 3-10 to r5. (Command 03) (3+3=6 bits)
03001538 = Subtract  3-10 to r5. (Command 07) (3+3=6 bits)
03001590 = r5 = value (Command 06) (3+7=10 bits)
03001560 = Add/Subtract 11-26  (x1A in hex) (Command 02) (3+5=8 bits)

r10 is x60606060 because the x60th color is where the background's palette starts.


Background data:
+x0 = Palette (128 colors) (x80 in hex.)
+x100 = Compressed pixel data




Edit: Oh, I almost forgot, ... I have a folder with all the backgrounds in it from which I downloaded long ago. (2 and 1/2 years ago?)...
http://www.goldensun-syndicate.net/sprites/
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Salanewt

#15
Role: This is a good point, and thanks! While there are ripped backgrounds floating around though, I'm going to do what I can to continue with the numbered list, seeing as that also happens to be how the game orders them. That, and I've got some time to burn.

Teawater: Sweet! That doesn't seem so hard, and I look forward to the day when we can start seeing new backgrounds.

As for that download... It looks pretty nice, but the GS2 folder seems to be missing some backgrounds (frozen Mars Lighthouse ones, one or two Jupiter Lighthouse ones, etc.). Otherwise, it looks pretty useful.


Edit: I have added urls for every background up to x80 (which I think is the highest), but I haven't uploaded uploading all of the images yet. This is so I don't have to keep editing the post whenever I upload another background.
Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?

Rolina

Aye, good idea.  I don't know how DD orders them, so you might as well wing it there - but it's probably a very good idea to keep them ordered based on how they are in the code when you can.  So, if we ever do crack DD to look in it, changing them to be in code order would probably be a good idea, if nothing else than for the sake of consistency.

Salanewt

Unless I'm mistaken, The Spriters Resource seems to have all of Dark Dawn's backgrounds ripped, and it orders them by their file names (which is an accurate way to do it). In regards to how they are numbered when picking one for a battle, I don't think I can answer that right now.
Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?

Daddy Poi's Oily Gorillas

#18
Hmm... Hehe.. So Dark Dawn has separate files for their backgrounds too?

I have a feeling that it works the same way.

Hmm.. They are suffixed with .cbin, so they are likely compressed binary files.

As for some of the numbering in the filenames... (A1 for the first background.) Do you think that is associated with the position in the filesystem? Or well, some custom method of linking. Well, it is only the first few that are like that, probably because they were never titled anything. Some of those may actually be duplicates of the world backgrounds. Though, I don't think they are identical, though.
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Atrius (He/Him)

Great job Teawater, looks like it should be simple enough now that you've done the hard part.
[sprite=220,4,0]I'm shaking my head in general disapproval of everything[/sprite]