Jump to content
  • 0

Changing enemy cues/time of day


!Tommy
 Share

Question

Okay, I have a question and I'm assuming maybe an assembly hack would be needed here but I would have no idea how to even begin going about one since I'm not a programmer, but here it goes.

 

What I want is two different enemy themes, the normal one to play during the daytime and one to play during the night time. It's almost like the same concept if anyone is familiar with Pokemon Gold and Silver, you'd have a different theme play depending on the time of day. I want the same to happen here. Would this be probable or would it be something that probably wouldn't work out? I'm trying to give me ROM hack a much darker feeling to it, especially at night.

 

And yes, this is for Ocarina of Time debug. lol

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

Oh yes, very possible, but a definite assembly hack is required. Not a bad idea, since you can check for the value that checks for day or night (which is listed on some sites for where it's stored... mainly the wiki), and you can make it play a music index on that choice for 2 themes.

 

I'm pretty sure the theme is in code somewhere.

 

You could use the debug printf function space for your code, should be short enough to fit it right in there.

Link to comment
Share on other sites

  • 0

Well, from what I can understand, 8015FA7A in RAM is the time of day but since I know nothing about assembly or moreso how to use C, I don't really know what to exactly do with it. My initial thinking is this would have to follow a sort of format similar to the Gold Skulltulas since they only appear at night. I'd be more than happy to attempt this if someone with a bit more knowledge could help point me in the right direction. Breakpointing it in Nemu does cause the game to stop which is probably a good thing which means I might be on the right track.

 

Edit: I have tried reading Jason's assembly hack instructions but as he said, it helps big time to have background knowledge in C, which I really do not have, but I'm fast to pick up on stuff like that.

Edited by !Tommy
Link to comment
Share on other sites

  • 0

Lies. I only started learning C# this year, so yeah. I mean I learned JAVA, but I had a sense for programming for a long time. It does help to understand the game logic, or have an idea of it, along with some programming knowledge. Learning MIPS is a bigger step, but worth it to learn.

 

(Too bad I feel like crap lately, I ran into class out of breath and coughing since then)

  • Like 1
Link to comment
Share on other sites

  • 0

Lies. I only started learning C# this year, so yeah. I mean I learned JAVA, but I had a sense for programming for a long time. It does help to understand the game logic, or have an idea of it, along with some programming knowledge. Learning MIPS is a bigger step, but worth it to learn.

 

(Too bad I feel like crap lately, I ran into class out of breath and coughing since then)

Well, you've done some damn good things to OoT so far and as I said in a private message to CloudMax on an unrelated subject, I mentioned how impressed I was with your skills as a hacker. I would like to learn some of this stuff though as I really hate asking for help. Feel better!

Link to comment
Share on other sites

  • 0

Almost Nmoyd. Hyrule Field as mzxrules pointed out definitely follows the OoT format but the difference between enemy themes occurred during twilight and then the regular part of the game. So when you were in the twilight or in twilight palace, it played the horns enemy theme that's similar to the shadow beasts theme but if the area wasn't covered in twilight, then it played the normal enemy theme. The spoiler is I'm using the horns enemy theme as a night time theme once I figure out how to actually do this. It's all ported over, it just needs to know to play the track at night instead of the normal enemy theme.

Link to comment
Share on other sites

  • 0

If someone could figure out how to allow a song to play at night (like the Twilight Princess night field theme) and for the enemy themes to be different, I would happily finish up some themes I was working on for that purpose ad release them for the community. It sounds like it would take some messing with the scene table. Not to mention figuring out how to add new sequences and sets without overwriting existing ones for those who want to keep the rest intact. This could be a very interesting project and I'd be glad to contribute in any way I can.

Link to comment
Share on other sites

  • 0

If someone could figure out how to allow a song to play at night (like the Twilight Princess night field theme) and for the enemy themes to be different, I would happily finish up some themes I was working on for that purpose ad release them for the community. It sounds like it would take some messing with the scene table. Not to mention figuring out how to add new sequences and sets without overwriting existing ones for those who want to keep the rest intact. This could be a very interesting project and I'd be glad to contribute in any way I can.

I've actually already asked this question but it was never really answered with the correct answer: https://www.the-gcn.com/topic/2775-background-music-in-ocarina-of-time/ (I have that very theme ported overmyself lol)

 

I'm still trying to figure out how to do some of this stuff but since right now reading assembly code is like reading Greek to me, I guess I'm just stuck. Arcaith had a great idea about changing the night time sound effects but I believe it's really just random sound effects placed together as i couldn't figure out what bank is being pulled from. I dunno, the music itself is a strong point for me but when it comes to actually coding, I almost know nothing about it. Slightly offtopic but I was playing around with the music sequence headers and produced some very interesting effects, especially since I was trying to figure out how to change the actual looping information stored in the track itself.

Link to comment
Share on other sites

  • 0

My guess would be looking at how the sequences or sounds are loaded on the change from day to night (or night to day) and forcing both to act (almost) the same way. iirc the sound effects set for night is part of the scene header so that part could likely be replaced with another sequence number that would be played during night if you wanted to do it that way.

To add more sequences and instrument sets than the game usually defines, you can rewrite the tables to have more entries, store them in another area of the ROM and use a piece of code to load the new tables into unused RAM at some point before they're needed. You would then have to update anything that needs to read the tables to use the new RAM addresses of course.

 

Unfortunately just saying what I'd do doesn't really help anyone out...

Link to comment
Share on other sites

  • 0

https://sites.google.com/site/deathbasketslair/zelda/ocarina-of-time/sequenced-music-format

 

That *might* start helping out out some, there are a few links around there as well that I won't post just because they're easy to find but I've been playing around with that and a few other things listed on there as well. See what you can figure out because I want this too and even though it's slightly different that what this topic is about, it's still somewhat the same as well so anything you find out, please report back here. I will do the same as well if I find anything.

 

DeathBasket, Arcaith also mentioned somewhat what you said and I do think there's a possiblity that that method may work, but my fear is will it break the nighttime sound effects all together or can we make it so just one scene will play music and it won't ruin the other areas as I basically just want this for Hyrule Field. Although night music in other areas might be neat so either which way, I'm curious about this. I just wish I knew what some of these variables did. Such as this

 

"

Sequence Pointer Table
The sequence pointer table starts at 0xBCC6A0 in the OoT Debug ROM and follows this format:
 
xxxx 0000 0000 0000 0000 0000 0000 0000
 
xxxx = number of sequences
 
The rest of the table looks like:
 
xxxxxxxx yyyyyyyy zzzz 0000 00000000
 
xxxxxxxx = Pointer to the start of the sequence in the sequenced music file (Audioseq)
yyyyyyyy = Length in bytes of the sequence
zzzz = Sequence type"
 
This has me a bit intriqued but there's not a lot to mention about the zzzz variable. It seems a lot has 0202 but I've seen 0201 and a few others as well, which I'm not sure what it does. I also wonder if the sequences are in order or if they're mixed up such as adding new sequences, even if it replaces say 02 which is Hyrule Field, would it be at the bottom of the list or in 02's place?
Link to comment
Share on other sites

  • 0

The sequences are all in order. There's no free space after that table which is why a hack would be required to allow more sequences in the game. iirc that z variable had something to do with how the sequence plays like not allowing other sequences to play over the top of it (unless that was something unrelated I did, this was all so long ago now). Yes, you can make a hack that plays different music at night only in certain areas. It's really just a case of how much time you want to put in and how complex you want a hack to be.

 

 

Hmm, I'll start trying to tear apart the audio sequence table. Mind taking me under your wing and showing me what you know, DeathBasket? I'd love to learn as much as I can.

 

I can't really help out with anything right now. Real life is kinda hard for me to deal with at the moment and I don't want to spend time on things like this in my free time. Sorry.

Link to comment
Share on other sites

  • 0

 

https://sites.google.com/site/deathbasketslair/zelda/ocarina-of-time/sequenced-music-format

 

That *might* start helping out out some, there are a few links around there as well that I won't post just because they're easy to find but I've been playing around with that and a few other things listed on there as well. See what you can figure out because I want this too and even though it's slightly different that what this topic is about, it's still somewhat the same as well so anything you find out, please report back here. I will do the same as well if I find anything.

 

DeathBasket, Arcaith also mentioned somewhat what you said and I do think there's a possiblity that that method may work, but my fear is will it break the nighttime sound effects all together or can we make it so just one scene will play music and it won't ruin the other areas as I basically just want this for Hyrule Field. Although night music in other areas might be neat so either which way, I'm curious about this. I just wish I knew what some of these variables did. Such as this

 

"

Sequence Pointer Table
The sequence pointer table starts at 0xBCC6A0 in the OoT Debug ROM and follows this format:
 
xxxx 0000 0000 0000 0000 0000 0000 0000
 
xxxx = number of sequences
 
The rest of the table looks like:
 
xxxxxxxx yyyyyyyy zzzz 0000 00000000
 
xxxxxxxx = Pointer to the start of the sequence in the sequenced music file (Audioseq)
yyyyyyyy = Length in bytes of the sequence
zzzz = Sequence type"
 
This has me a bit intriqued but there's not a lot to mention about the zzzz variable. It seems a lot has 0202 but I've seen 0201 and a few others as well, which I'm not sure what it does. I also wonder if the sequences are in order or if they're mixed up such as adding new sequences, even if it replaces say 02 which is Hyrule Field, would it be at the bottom of the list or in 02's place?

 

I replied to your PM regarding the matter. I will report anything I find. :)

 

I can't really help out with anything right now. Real life is kinda hard for me to deal with at the moment and I don't want to spend time on things like this in my free time. Sorry.

No problem. :) Life comes before stuff like this. :D Thank you for the time and info you have given us so far though. :)

Link to comment
Share on other sites

  • 0

 

It is possible to make music play at night, the thing is at this current point in time, this will play everywhere at night. It turns out that the nighttime sound effects is indeed a sequence file. The animals like birds, ducks, frogs, and even stuff like wind and rain are instruments located in instrument bank 2. InstEd will not allow you to change this by default but of course you can get around this by hex editing the instrument list to something else and then upload the music you want to play on sequence number 1, then you'll get your nighttime music. So of course this is still a major in progress deal but at least we're starting to figure out how it all works.

  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.