Jump to content

Photo

How do you set boss music?


  • Please log in to reply
9 replies to this topic

#1 DrewZG

DrewZG

    It's ya boi

  • Members
  • Real Name:Drew
  • Location:Australia

Posted 25 March 2019 - 12:18 AM

So I know you can give individual screens music that is different from the dmap music, but the real thing I'm wondering is how to make the boss music stop playing when the boss is defeated.
I want bosses to have their own individual music, but it's kind of awkward when theyre dead and it's still playing, or you walk back into the boss room and the music starts again.


  • Lightwulf likes this

#2 klop422

klop422

    Guess I'm full of monsters and treasure

  • Members
  • Real Name:Not George
  • Location:Planet Earth

Posted 25 March 2019 - 07:30 AM

It's impossible without scripting.

With scripts, though, you can use part of music.zh, which is a really good header for controlling the music. If using MIDIs, it's simpler, but it also works for other music file formats.

Takes a little to work out, though. I think there's instructions in the file, but if you have specific questions feel free to ask. Here's a tutorial on how to add scripts.


  • Lightwulf likes this

#3 Jamian

Jamian

    ZC enthusiast

  • Members

Posted 25 March 2019 - 07:40 AM

One really janky way to do this is to have a secret that triggers and does an insta-warp to another room once the boss is dead. It really is janky and old-fashioned, so I don't recommend it. It's much better to use a small script. This is a question that pops up regularly and I see that, surprisingly, there isn't a script for that in the database yet, so I'll just quickly write one and submit it.

 


  • Lightwulf likes this

#4 P-Tux7

P-Tux7

    💛

  • Members

Posted 25 March 2019 - 09:36 AM

There should be a script that you can set up to do this included in the classic module (aka the default blank quest in 2.50) for 2.53.

https://www.purezc.n...showtopic=74864



#5 DigitalDetective47

DigitalDetective47

    Quest Maker

  • Members

Posted 01 April 2019 - 09:36 PM

You could also try making the boss enemy's roar be the boss music. You'd have to make the music into a sound effect, though.

 



#6 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 02 April 2019 - 12:32 AM

You could also try making the boss enemy's roar be the boss music. You'd have to make the music into a sound effect, though.



Please, please, never do this. It makes the size of your quest file enormous, all to shove bin one WAV file.

One really janky way to do this is to have a secret that triggers and does an insta-warp to another room once the boss is dead. It really is janky and old-fashioned, so I don't recommend it. It's much better to use a small script. This is a question that pops up regularly and I see that, surprisingly, there isn't a script for that in the database yet, so I'll just quickly write one and submit it.


Music.zh should be there, and classic.zh could as well be added.


This is what the included script looks like, but note that in the revised classic tileset, it needs no configuration.

 
ffc script BossMusic
{
	void run(int reg, int origtile, int mid, int trk)
	{
		this->Data = CMB_INVISIBLE;
		if ( Screen->D[reg] >= _classic_zh__REG_BOSS_DEAD ) Quit(); //Don't play victory music if we return to the screen.
		if ( origtile < 1 ) origtile = _classic_zh__TILE_FIREWORK;
		if ( trk < 1 ) trk = _classic_zh__TRK_BOSS;
		if ( mid < 1 ) mid = _classic_zh__MIDI_VICTORY;
		int filenm[]="Classic.nsf";
		Waitframes(5);
		Game->PlayEnhancedMusic(filenm,trk);
		while(EnemiesAlive()) Waitframe();
		//for ( int q = Screen->NumLWeapons(); q > 0; --q ) //the number changes, so we need to refresh...
		for ( int q = 1; q < Screen->NumLWeapons(); ++q ) 
		{
			lweapon isFirework = Screen->LoadLWeapon(q);
			if ( isFirework->OriginalTile == origtile ) 
			{
				while(isFirework->isValid()) Waitframe();
				
			}
		}
		Game->PlayMIDI(mid);
		for ( int q = 0; q < 601; ++q ) Waitframe();
		Game->PlayMIDI(Game->DMapMIDI[Game->GetCurDMap()]);	
		Screen->D[reg] = _classic_zh__REG_BOSS_DEAD;
	}
}


#7 DigitalDetective47

DigitalDetective47

    Quest Maker

  • Members

Posted 02 April 2019 - 06:07 AM

Please, please, never do this. It makes the size of your quest file enormous, all to shove bin one WAV file.

Oh…

*Facepalm*



#8 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 02 April 2019 - 08:34 AM

Oh…

*Facepalm*

 

 

I can name one quest offhand that is 120MB in size just because of one WAV file used for this kind of thing. So aye, just don't. :D


  • Lightwulf likes this

#9 Old-Skool

Old-Skool

    Hero of Time

  • Members
  • Location:Missouri

Posted 03 April 2019 - 07:53 PM

It's impossible without scripting.

With scripts, though, you can use part of music.zh, which is a really good header for controlling the music. If using MIDIs, it's simpler, but it also works for other music file formats.

Takes a little to work out, though. I think there's instructions in the file, but if you have specific questions feel free to ask. Here's a tutorial on how to add scripts.

Incorrect, it can be done without scripting. 

ZC now features something called "Screen state carryovers". 

You can have an empty "defeated" room on a map warp you to a boss room. Upon defeating that boss, the boss room's secret can be triggered. Screen State Carryovers can be applied from that room to the original empty one to permanently remove warp tiles/cancel the timed warp, allowing you to pass through freely from then on. I used this a bit in my scrapped Metroid projects. 


  • Lightwulf likes this

#10 klop422

klop422

    Guess I'm full of monsters and treasure

  • Members
  • Real Name:Not George
  • Location:Planet Earth

Posted 04 April 2019 - 04:08 AM

Oh, right, the 2.10 approach. I came here shortly before 2.50, so I forgot about that.

Even so, it's a little awkward, and messes with dungeon map appearances (at least during the fight), and is all in all much less elegant than music.zh.


  • Lightwulf likes this


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users