Extension Chain Error [help]

my only issue now is some of (and for some reason not all) of the sound effects i included in actions yesterday are now not playing but im sure thats just me making some sort of silly error perhaps

1 Like

for example at this point there is supposed to be a noise for picking up the scroll but it has stopped playing as of including music by daniel stelzer


where as this function still plays the sound

((they use the exact same method to play the sound))
upload-audio "SCROLL" with internal name sound of takescroll;
upload-audio "RAMLIG" with internal name sound of ramligcast;
Sound of takescroll is the file "SCROLL.ogg".
Sound of ramligcast is the file "RAMLIG.ogg".
in the non functioning if condition:
play the sound of takescroll on foreground;
in the functioning if condition:
play the sound of ramligcast on foreground;

Are you playing the music on a different channel than foreground? Just want to check before trying other things.

my background music plays on the background and allows me to hear the casting of RAMLIG over the top when playing in the foreground

but for some reason a few other sound effects wont play

1 Like

I am unsure of what could be causing this. I’ll try creating a similar game to yours and messing around with it to see what happens.

A few things you can try:
-try swapping which sound gets played when, so you can see if it’s an issue with the sound file or the code
-try repeatedly doing the action that makes the sound happen to see if it doesn’t work every time or just once. if possible, try doing it in other rooms
-try releasing the game and opening up the webpage it creates (using the ‘Bisquixe interpreter’) and trying the same actions. If there is an error it will print it on the top of the screen.

In the meantime, if I figure anything out, I’ll let you know!

thank you! i believe its something silly to do with my newbie scripting as i have just made this test game

"Sound testing" by Liam Joshua Lunt - Illiaminati
Release along with an interpreter.
Release along with the "Bisquixe" interpreter.
Release along with a website.

include Simple Multimedia Effects for v10 by Mathbrush.
Include Music by Daniel Stelzer.

When play begins:
	upload-audio "KEYDRAMA"  with internal name sound of dramaticaction;
	upload-audio "RAMLIG"  with internal name sound of ramligcast;
	upload-audio "ETAMOZ"  with internal name sound of etamozcast;
	upload-audio "REZROV"  with internal name sound of rezrovcast;
	upload-audio "ETAMIZ"  with internal name sound of etamizcast;
	upload-audio "AETHEROST" with internal name sound of aethertheme; [*TESTING]
	upload-audio "DEATHSOUND" with internal name sound of playerdeath;
	upload-audio "BOOK" with internal name sound of bookcheck;
	upload-audio "SCROLL" with internal name sound of takescroll;
	upload-audio "ADDSPELL" with internal name sound of addspellscroll;
	upload-audio "SPECTRALGRAB" with internal name sound of spectralmisgrab;
	upload-audio "UNDERGROUND" with internal name sound of undergroundost1;
	
Sound of spectralmisgrab is the file "SPECTRALGRAB.ogg".
Sound of bookcheck is the file "BOOK.ogg".
Sound of takescroll is the file "SCROLL.ogg".
Sound of addspellscroll is the file "ADDSPELL.ogg".	
Sound of aethertheme is the file "AETHEROST.ogg".
Sound of playerdeath is the file "DEATHSOUND.ogg".
Sound of undergroundost1 is the file "UNDERGROUND.ogg".
Sound of dramaticaction is the file "KEYDRAMA.ogg".
Sound of ramligcast is the file "RAMLIG.ogg".
Sound of Etamozcast is the file "ETAMOZ.ogg".
Sound of Rezrovcast is the file "REZROV.ogg".
Sound of Etamizcast is the file "ETAMIZ.ogg".

Testingfloor is a room. "to the south is the next room which triggers a foreground and background noise.".
Testingfloor2 is a room south of Testingfloor.

After going to The Testingfloor2:
	loop the sound of undergroundost1 on the background;
	play the sound of takescroll on the foreground;
	

and it does indeed do as i ask

1 Like

i will try remove all sound scripting and rewrite them accordingly to my real project

1 Like

Sounds good! There may be some weird music error lurking around somewhere, so if you run into any other similar bugs, just let me know. Only 2 projects have been officially released using Bisquixe sound so far, so there’s bound to be problems of some kind or another. Thanks for posting about your process here, as I’m sure it will help others!

1 Like

so i’ve just cleaned up categorized and rewritten the sound parts of my script from scratch

and I’m so confused as the sound files 100% were functioning before
and the activation of casting RAMLIG and the activation of taking a scroll is 100% the same concept

but the scroll does not play a sound on taking

and the sound files are definately compatible as the scroll sound will play in the test game

totally lost !! haha

1 Like

The ‘taking’ action has a lot of additional rules attached to it that a new action you make up wouldn’t have. It’s possible that some of those rules are in conflict with each other.

Do you have any other rules that are about taking?

Are you playing music with a ‘before’ rule, and ‘after’ rule, an ‘instead’ rule, etc?

You can name your rule that plays music like this:

Before taking a scroll (this is the hopefully play music rule):
   blah blah blah

Then, when trying out your game, type RULES ON and see if that rule runs or not. If you don’t see it pop up, it means some other rule is interfering.

In particular, if you have an ‘after taking’ or ‘instead of taking’ rule, it can block a ‘report’ rule or another ‘after’ rule from taking effect.

Another way to narrow down the problem is to put a ‘say’ statement on the line right before the statement that plays your music. If the ‘say’ statement gets printed, but not the sound, it’s probably a bug I need to fix. If the ‘say’ statement doesn’t get printed, you likely have a logic error. (I know you probably know a lot of this stuff, I’m just spitballing here).

I see, thank you. allow me to investigate

the condition of most of the sounds that aren’t playing are

instead of taking (some object):
	if (something):
		play the sound of (something) on (some layer)
	otherwise:
		play the sound of (something else) on (some layer)
1 Like

where as

instead of Jumping in the Clearing:
	if The Hole is nowhere:
		say "You jump into the air and land safely on your feet.";
	otherwise:
		say "[italic type]You leap into the air aimlessly, landing on your ankle badly and falling directly into the hole. You quickly realise this could have been a terrible mistake. You fall and fall for a while before descending into the jaws of a grue lurking within the depths below.[roman type]";
		play the sound of playerdeath on foreground;
		end the story.

works just fine

1 Like

i have removed the sound from Instead of taking and replaced it with

[*-THE RAMLIG SCROLL AUDIO-]
Before taking the RAMLIG scroll:
	if the player has Spellbook:
		play the sound of addspellscroll on foreground;
	otherwise:
		play the sound of takescroll on foreground;

to no result still

it seems the keyword to malfunction here is certainly “Taking / Take”

adding the debug line to the logic:

[-THE RAMLIG SCROLL AUDIO-]
Before taking the RAMLIG scroll:
	if the player has Spellbook:
		play the sound of addspellscroll on foreground;
		say "Sound 1 should have certainly played";
	otherwise:
		play the sound of takescroll on foreground;
		say "Sound 2 should have certainly played".

i can achieve both “say” commands running but alas no sound.

I made a test game where there is some looping music in the background and an if statement for taking something:

Summary
"Kitchen"

Include Simple Multimedia Effects For V10 by Mathbrush.
Release along with a "Bisquixe" interpreter.

Include Music by Daniel Stelzer.

Room A is a room.

Sound of bells is the file "Bells1.ogg".

When play begins:
	upload-audio "Bells1"  with internal name sound of bells;

Sound of spies is the file "Spies.ogg".

When play begins:
	upload-audio "weirds"  with internal name sound of weirds;

Sound of weirds is the file "weirds.ogg".


When play begins:
	upload-audio "Spies"  with internal name sound of spies;

When play begins:
	play sound of spies on background;
	
The pizza is in room a.

Instead of taking the pizza:
	if the pizza is held by the player:
		play sound of bells on foreground;
	otherwise:
		now the pizza is held by the player;
		play sound of weirds on foreground;

This behaves exactly as expected; taking the pizza the first time plays the ‘sound of weirds’, while taking it the second time plays the bells.

So you must have the worst of all possible bugs, the ‘it works on the developers computer but not on yours bug’.

My only possible hope is that the sound files themselves are bad. What happens if you play the sounds in other contexts? Like,

Instead of jumping:
    play the sound of takescroll on foreground;

Does that sound play then?

Because if so, it seems like things are completely helpless. Maybe you’re on Mac or Linux and the interpreter behaves differently than mine. You can try ‘Release’ to see if the web version that bisquixe makes fixes the sound. But if that doesn’t work, I’m just out of luck.

Technically, if you’re using just the IDE interpreter to play sound, it’s not actually using my extension at all, because my extension only affects online sound. @Draconis might know more how to fix the problem if it’s a Music extension problem.

Oh no! that certainly is not what we wanted haha!

I am on windows and doing every test with the “Release” method using bisquixe
keeping in mind the sounds played prior to the addition of the music addon
and the takescroll sound certainly does play replacing the death sound so these conditions are V E R Y strange as I havent changed much about the rules of Inform in my story

maybe i could send you a packaged version of the game just to see if the sound runs in your browser / on your pc?

1 Like

Yeah, feel free to send it to me. If you feel comfortable doing it, you could also zip up the source code and sound files (like, the whole .inform and .materials folder) and email them to me at brushton84@gmail.com. You don’t have to if you don’t want to, of course, but I enjoy working on this extension so it would be enjoyable for me to track down the problem.

ill send it through now!
ill also include the two copies of the extensions (i7x) i am using to make sure i haven’t messed that up

1 Like

Okay, I can confirm several things:
1-This bug does happen on my computer
2-It happens even in the Windows IDE, so it is something weird about Inform and the Music extension, and not just my janky bisquixe stuff
3-For some reason, everything seems to work perfectly if you replace ‘foreground’ with ‘midground’. I have no idea why at all.

This is some pretty weird stuff. Your sound effects are really cool by the way!

1 Like

Okay, I’ve figure it out. What a nasty little bug!

The music extension has a ‘stop’ command. You are using it to stop the music of a room when you’re not in the room, just like I (naively, it seems) described to you earlier.

When it runs this command, the Music extension searches for the channel of that sound and stops playing that channel.

All of your sound effects are on foreground and all your music is on background, so there should be no issue, right?

Well, one of the sounds you stop every turn hasn’t actually played yet so the game doesn’t know which channel it should be associated to. So it stops the default channel, which is ‘foreground’. Since this rule runs every turn, it stops every foreground sound (every turn rules don’t run with ‘instead’, which is why you could play some other sounds).

You can get around this by just saying:
stop the (blah blah blah sound) on background;

that way it will only stop the background channel.

So, just replace your current ‘every turn’ code with this:

Every turn:
	if the player is not in The Clearing:
		stop Sound of undergroundost1 on background;
		if the player is not in The Aether Clearing:
			stop Sound of aethertheme on background.
2 Likes