News:

As a consequence of the forum being updated and repaired, the chatbox has been lost.
However, you can still come say hi on our Discord server!

Main Menu

Creating new boss fights?

Started by Mion Sonozaki, 17, August, 2013, 04:14:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mion Sonozaki

Archiving this question in hopes it will someday be answered:

QuoteLishy: I only wish we had a means to implement more boss fights. Any ideas? I'm thinking the best way possible is simply to move the Djinn in levels like Magma Rock to block the Tablet at the end, but then how to trigger boss music?

Let's say I wanted a new boss fight at the end of Magma Rock. I'm presuming the way this can be done is somehow moving the Fire Djinn into the final room and having it block the patch.

But how would I trigger boss fight music?

Daddy Poi's Oily Gorillas

QuoteBut how would I trigger boss fight music?
Quote from: From my un-released documentation
080EFD1C = Assigns music to battles.
82F2 = Music?
0673 = Battle?
You can either assign another song be prefixing with 8***, assign this song with another battle as well (without the 8 flag), or end the list with 00008000(?).
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! :)

Mion Sonozaki

#2
Quote from: Teawater on 17, August, 2013, 05:06:48 PM
QuoteBut how would I trigger boss fight music?
Quote from: From my un-released documentation
080EFD1C = Assigns music to battles.
82F2 = Music?
0673 = Battle?
You can either assign another song be prefixing with 8***, assign this song with another battle as well (without the 8 flag), or end the list with 00008000(?).
Could you please show an example?

VanishMantle

I was thinking would it be possible to force the music to change in battle for specific areas? Similar to how the music changes when you are on the boat versus the land. I managed to finish editing the randoms for some end game dungeons and I would like to be able to have these fights have the boss music.

Daddy Poi's Oily Gorillas

#4
Well, the music setting function for battles is here: 080CA5D8 (Thumb assembly.)

It doesn't have any connection to areas. It only checks for matching encounter.... if you are on the ship (And if I remember correctly, without wings),... and whether Felix, Isaac, or Jenna are in battle respectively.

If you wanted, though, you could modify the function to include maps as well. (Both regular bosses and djinn use this function. Regular bosses have the encounter as the args, but djinn have 0 as the args, which is why custom music for djinn required a code mod, I think.)



QuoteCould you please show an example?
Not sure...
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! :)

Misery

Ok, I'll be asking a bunch of questions... not sure if I'm going to have any use of this myself, but the right questions might help clear things up.

Quote from: Teawater on 19, August, 2013, 09:03:12 PM
It doesn't have any connection to areas. It only checks for matching encounter.... if you are on the ship (And if I remember correctly, without wings),... and whether Felix, Isaac, or Jenna are in battle respectively.
By "matching encounter", do you mean it checks the actual encounter ID? I'm guessing not, because in that case it would be very easy to assign any music to any battle...

Quote from: Teawater on 19, August, 2013, 09:03:12 PM
Regular bosses have the encounter as the args, but djinn have 0 as the args, which is why custom music for djinn required a code mod, I think.
Are you referring to the djinn event (on the map), the djinn enemy (in the enemy list), or the djinn encounters (in the encounter list)?

Quote from: Teawater on 19, August, 2013, 09:03:12 PM
QuoteCould you please show an example?
Not sure...
An example might not be necessary, but some context would be nice. Is 080EFD1C the address of a function? Or is it a list of assignments? Or something else entirely? 82F2 and 0673, are they arguments? When and how are they used?

Not expecting any in-depth explanation - if there are no simple answers to this, just say so. It's just that these values/addresses aren't very helpful for anyone who isn't familiar with how music assignment actually works.

Rolina

Huh... that sucks.  So to get it to check for area, we'd have to write the code ourselves and patch it in?

Daddy Poi's Oily Gorillas

#7
Quote from: Misery on 20, August, 2013, 06:44:47 AM
Quote from: Teawater on 19, August, 2013, 09:03:12 PM
It doesn't have any connection to areas. It only checks for matching encounter.... if you are on the ship (And if I remember correctly, without wings),... and whether Felix, Isaac, or Jenna are in battle respectively.
By "matching encounter", do you mean it checks the actual encounter ID? I'm guessing not, because in that case it would be very easy to assign any music to any battle...
I'm saying that the arguments for this thumb function (at 080CA5D8) when it is called are the encounter values. r0=Encounters index, r1=0-7 for the battle of the encounters. And that they are matched up with the data at 080EFD1C. (For 16-bits without the 8*** flag: AAAB ; AAA is the encounter, B is the battle, if B has a value of F, it should apply to all 8 battles, if I remember correctly?)

Quote
Quote from: Teawater on 19, August, 2013, 09:03:12 PM
Regular bosses have the encounter as the args, but djinn have 0 as the args, which is why custom music for djinn required a code mod, I think.
Are you referring to the djinn event (on the map), the djinn enemy (in the enemy list), or the djinn encounters (in the encounter list)?
When I say args, I mean what is in r0 and r1 when the function is called. So nothing about data lists.

If you want to know what I'm talking about, please, by all means take a look at these two thumb functions that execute a battle. (These are functions that are called from map code, if I remember from yesterday.)
080D2B0C = Execute battle? (encounters,0-7) (Seen used by Star Magician and Dullahan.)
080D2B4C = Djinni battle? ?(obj,djinni?)

The functions are next to each other in the code, however, both of them have calls to this music function.
080D2B40 = As you can see here with the first function, the values taken from the args of this function...
080D2BEC = However, with the djinni function, they are 0'ed. See what I mean?

Quote
Quote from: Teawater on 19, August, 2013, 09:03:12 PM
QuoteCould you please show an example?
Not sure...
An example might not be necessary, but some context would be nice. Is 080EFD1C the address of a function? Or is it a list of assignments? Or something else entirely? 82F2 and 0673, are they arguments? When and how are they used?
They are assignments. ; The ones beginning with "8" are music values, and the ones without 8, are the encounters that are assigned the music value. (AAAB, AAA is the encounters index, and B is the battle in the encounters.)


QuoteHuh... that sucks.  So to get it to check for area, we'd have to write the code ourselves and patch it in?
Correct. I don't imagine it to be that difficult. But at the same time, I don't even see why you need it. The stuff is linked to encounters, which I don't believe takes up much space.... even for cut-scene battles, it seems.
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! :)

Misery

Alright, thanks for the replies, very informative. There's one thing I'm very confused about however, and that is the "battle of the encounter", i.e. the value held in r1. Where does this come from? From what you're writing, it looks like every encounter has 8 different battles. Just to make sure we're talking about the same thing, when I say "encounter", that's an entry in the list labeled as Groups in the editor (in the enemies section). It feels like I'm missing something here.

So...
Random encounter battles, boss battles and djinni battles all have their own unique function calls for initialization? Not sure why they would do that, but... okay?

Anyway, if I understand this correctly (which I think I do), 82F2 0673 would be used to assign song 0x02F2 (which I recognize as one of the boss songs) to battle 0x0067 (103 in decimal, the Serpent battle). For the... fourth(the 3 in 0x0673) battle of the encounter(?).

Daddy Poi's Oily Gorillas

#9
Umm.. The Encounters database is NOT in the editor, BUT the 8 "battles" in each encounters entry, is an index to the Enemy Group that is in the editor.

http://forum.goldensunhacking.net/index.php?topic=2024.0 = In my first reply of this topic, I talk about them. The second memory viewer would be the Encounters stuff.

Coming up with proper terminology for this has been a bit difficult, so if you have any suggestions, I'm all ears. (Ex: Like whether to call them Encounters or Battle Collections, etc.) Otherwise, I could end up with multiple different words to describe the same thing. Or maybe even one word to describe several different things, and that would get rather confusing.
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! :)

Misery

Oh, that explains it... I remember that one.
I don't think I have any other questions then. I might try to write a short explanation on how to assign music to specific battles if I can get this to work.

Rolina

Quote from: Teawater on 20, August, 2013, 01:36:27 PM
QuoteHuh... that sucks.  So to get it to check for area, we'd have to write the code ourselves and patch it in?
Correct. I don't imagine it to be that difficult. But at the same time, I don't even see why you need it. The stuff is linked to encounters, which I don't believe takes up much space.... even for cut-scene battles, it seems.
It'd be nice to make each area have its own feel, or to have different battle music for the world map (ex:  The game takes place across three continents, each continent has its own overworld, battle, and boss themes) vs caves and stuff.

Misery

You can totally do that, Role. Since battle music can be assigned to individual battles, you just have to make sure all the battles in any given area have the music you want.

Daddy Poi's Oily Gorillas

Yeah, I believe Misery is correct.

Remember that the bank for setting battle music is not the same one as the bank for setting map music.

@OVERWORLD music: The table used for determining music for maps also include door number and flag checks... Don't think that needs a code mod.

@BATTLE music: Still, if you are going to have different encounters for each area anyway (especially for reasons of difficulty), I would think that setting music to encounters would still work...
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

Oh, then I guess I misunderstood what was said earlier then.  I guess all we'd need is editor functionality to make it user-friendly.

Mion Sonozaki

#15
Which is harder? Forcing unique music to play for a djinn fight, or creating entirely new boss battles out of unrelated events? (Such as the end of Air's Rock?)

Both seem like they may require script modifications, but is either one simple?

Misery

I expect you'd do exactly the same thing in both cases - call a function that starts a battle and uses the battle number to determine which song to play.

Mion Sonozaki

Quote from: Misery on 23, August, 2013, 05:24:19 AM
I expect you'd do exactly the same thing in both cases - call a function that starts a battle and uses the battle number to determine which song to play.
Except how do we know what calls a battle?

I'm assuming it takes Code Hex, but trying to copy his exact script by hand to another object will be looooong. Do we know what exactly in its Script triggers the boss fight, so that we may inject it into unrelated scripted events?

Rolina

I wish we could determine how rare certain battles are.  If we could, I give certain battles different music and essentially have them be "area bosses" akin to what you'd see in Suikoden games.

Misery

Quote from: Lishy on 23, August, 2013, 12:29:51 PM
Quote from: Misery on 23, August, 2013, 05:24:19 AM
I expect you'd do exactly the same thing in both cases - call a function that starts a battle and uses the battle number to determine which song to play.
Except how do we know what calls a battle?
You'd have to take a look at the code, but I'm afraid I don't know how exactly to find it in the editor.

Quote from: Rolina on 23, August, 2013, 01:31:26 PM
I wish we could determine how rare certain battles are.  If we could, I give certain battles different music and essentially have them be "area bosses" akin to what you'd see in Suikoden games.
You can.

Aile~♥

Quote from: Misery on 23, August, 2013, 01:36:54 PM
Quote from: Rolina on 23, August, 2013, 01:31:26 PM
I wish we could determine how rare certain battles are.  If we could, I give certain battles different music and essentially have them be "area bosses" akin to what you'd see in Suikoden games.
You can.
Using a hex editor, I presume?
[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]

Misery

Quote from: JamietheFlameUser on 23, August, 2013, 04:00:06 PM
Quote from: Misery on 23, August, 2013, 01:36:54 PM
Quote from: Rolina on 23, August, 2013, 01:31:26 PM
I wish we could determine how rare certain battles are.  If we could, I give certain battles different music and essentially have them be "area bosses" akin to what you'd see in Suikoden games.
You can.
Using a hex editor, I presume?
Yes. I didn't link because Role usually doesn't seem to be too keen on hex editing stuff, but in this thread you can find the details of how to do it (Teawater also linked it earlier in this thread).
Below is a quote from it:

Quote from: Teawater on 30, July, 2012, 10:53:40 PM
These are the battle collections, as I call them, you can assign 8 groups to each map. Not to mention that in this data, you would be able to edit the likelihood a battle would occur, (You could even disable battles in a map.) As well as changing which of the battle groups are more likely to be encountered than the others.