Jump to content

Photo

Wallet Fill SFX?


  • Please log in to reply
26 replies to this topic

#16 Saffith

Saffith

    IPv7 user

  • Members

Posted 28 July 2016 - 11:07 PM

Ah. I see the problem.

I was under the impression that the Wallet Fill SFX and the Rupee Collect SFX used the same sound, and the Wallet Fill simply played the Rupee collect sound a whole bunch of times until the counter reached its new number.

They're not the same. The wallet fill sound is hard-coded as #18.
You'll probably need a script for that, then, but it's pretty simple. If you want to match the built-in behavior, just play a sound every other frame as long as Game->DCounter[CR_RUPEES]!=0.

Partial script


#17 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 28 July 2016 - 11:49 PM

Aha thanks for that info! I had loaded a silent wav into #18.

 

   I tried loading the rupee collect into 18 and I had the same issue that I had with the flamethrower (only hearing the sound once when the counter reached it's new number), so I went in and trimmed some of the silence off the start of the .wav file and it's working as expected.

   The place I trimmed it at was less than ideal, so I'll try and fiddle with editing the .wav file a bit before doing anything else.

 

EDIT: Oh, SFX #18 is not only the Wallet fill SFX, but the Magic Meter fill SFX too

 

guess i'll give that script a whirl


Edited by Cukeman, 29 July 2016 - 07:16 AM.


#18 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 03 August 2016 - 03:11 PM

Ah. I see the problem.
They're not the same. The wallet fill sound is hard-coded as #18.
You'll probably need a script for that, then, but it's pretty simple. If you want to match the built-in behavior, just play a sound every other frame as long as Game->DCounter[CR_RUPEES]!=0.

Partial script

 

 

That script plays the Wallet Fill SFX constantly unless the Wallet counter is moving.



#19 Saffith

Saffith

    IPv7 user

  • Members

Posted 03 August 2016 - 03:57 PM

Yep, I'm sure good at doing things. Slight change:

void UpdateRupeeSFX()
{
    if(Game->DCounter[CR_RUPEES]==0)
        return;
    RupeeSFX=!RupeeSFX;
    if(RupeeSFX)
        Game->PlaySound(SFX_WALLETFILL);
}

  • Cukeman likes this

#20 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 03 August 2016 - 04:30 PM

That's excellent! Thank you!

 

I noticed that sometimes there's no wallet fill SFX if Link only collects a single rupee (and sometimes there is). But I solved that by also placing the single rupee collect SFX in the item pickup sound slot.



#21 Saffith

Saffith

    IPv7 user

  • Members

Posted 03 August 2016 - 06:06 PM

Ah, yeah, didn't think of that. If you'd rather have the script handle it properly, here's another try.
void UpdateRupeeSFX()
{
    if(Game->DCounter[CR_RUPEES]==0)
    {
        if(RupeeSFX)
            RupeeSFX=false;
        return;
    }
    
    RupeeSFX=!RupeeSFX;
    if(RupeeSFX)
        Game->PlaySound(SFX_WALLETFILL);
}


#22 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 03 August 2016 - 08:04 PM

That didn't seem to have any effect, but don't sweat it, I have a working solution.
 
I'm going to try doing the same thing for the Magic Meter:

const int SFX_MAGICFILL = 82; // Or whatever
bool MagicSFX;

void UpdateMagicSFX()
{
    if(Game->DCounter[CR_MAGIC]==0)
        return;
    MagicSFX=!MagicSFX;
    if(MagicSFX)
        Game->PlaySound(SFX_MAGICFILL);
}

UpdateMagicSFX();

EDIT: Nice, it's working :)


Edited by Cukeman, 03 August 2016 - 09:07 PM.


#23 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 07 August 2016 - 03:59 AM

That's excellent! Thank you!

 

I noticed that sometimes there's no wallet fill SFX if Link only collects a single rupee (and sometimes there is). But I solved that by also placing the single rupee collect SFX in the item pickup sound slot.

 

I don't know if this matters or not, but I noticed that with Like Likes that drain your Rupees, sometimes you hear the wallet drain SFX, sometimes you don't.



#24 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 07 August 2016 - 05:16 AM

I don't know if this matters or not, but I noticed that with Like Likes that drain your Rupees, sometimes you hear the wallet drain SFX, sometimes you don't.

Do you have any quests that exhibit this, or is it entirely random? Do you know if any other sounds were playing when the enemy sound to eat money didn't play?

IIRC, eating money just sets Game->DCounter[CR_RUPEES], so if something else was playinbg, it may have caused a conflict. If you have any quests that exhibit this bug, please send one across, or post it.

Sound 18 (hardcoded to Game->DCounter[CR_RUPEES]) shouldn't play for single rupee collection: The item pickup sound, should. If that is also set to sound 18, of course, it'll play that.

Edited by ZoriaRPG, 07 August 2016 - 05:19 AM.


#25 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 07 August 2016 - 02:44 PM

Do you have any quests that exhibit this, or is it entirely random? Do you know if any other sounds were playing when the enemy sound to eat money didn't play?

IIRC, eating money just sets Game->DCounter[CR_RUPEES], so if something else was playinbg, it may have caused a conflict. If you have any quests that exhibit this bug, please send one across, or post it.

Sound 18 (hardcoded to Game->DCounter[CR_RUPEES]) shouldn't play for single rupee collection: The item pickup sound, should. If that is also set to sound 18, of course, it'll play that.

 
The only other sound onscreen would be Link's hurt SFX when he's engulfed, and (maybe?) a SFX I replaced with a silent .wav, but the only silent .wavs I have are SFX 18 and 25. 
 
Here is the .qst file, it opens with Link on the screen with the Rupee Likes. Sometimes the draining sounds play correctly, sometimes they don't play at all:
 
https://drive.google...eTc4ekJoZ3gtaXM
 
The Wallet Fill/Drain SFX are set to 67 using Saffith's script (his last try didn't seem to have any effect when I tested it, so I've just been using his next to last script):
 

const int SFX_WALLETFILL = 67;
bool RupeeSFX;

//in global, before waitdraw
            UpdateRupeeSFX();
//end global

void UpdateRupeeSFX()
{
    if(Game->DCounter[CR_RUPEES]==0)
        return;
    RupeeSFX=!RupeeSFX;
    if(RupeeSFX)
        Game->PlaySound(SFX_WALLETFILL);
}

 
 
The Rupee Pickup SFX is set to 67 in the Item Editor, and SFX 18 used to be a silent .wav that popped, but I replaced that with a silent .wav which doesn't pop.
 
I somehow suspect it's connected to this:
 

I noticed that sometimes there's no wallet fill SFX if Link only collects a single rupee (and sometimes there is). But I solved that by also placing the single rupee collect SFX in the item pickup sound slot.


EDIT: The Rupee Likes not playing the wallet drain SFX seems to happen most often if I'm engulfed by the red one first, and less often if I'm engulfed by the green one first.

 

EDIT2: Also, while nothing to really complain about, the Magic Meter Fill SFX is sometimes played when I collect a magic jar, even though the meter is filled (and there's no sound in the Pickup slot).

const int SFX_MAGICFILL = 82; // Or whatever
bool MagicSFX;

void UpdateMagicSFX()
{
    if(Game->DCounter[CR_MAGIC]==0)
        return;
    MagicSFX=!MagicSFX;
    if(MagicSFX)
        Game->PlaySound(SFX_MAGICFILL);
}

UpdateMagicSFX();

Edited by Cukeman, 07 August 2016 - 05:03 PM.


#26 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 07 August 2016 - 06:03 PM

 

 
The only other sound onscreen would be Link's hurt SFX when he's engulfed, and (maybe?) a SFX I replaced with a silent .wav, but the only silent .wavs I have are SFX 18 and 25. 
 
Here is the .qst file, it opens with Link on the screen with the Rupee Likes. Sometimes the draining sounds play correctly, sometimes they don't play at all:
 
https://drive.google...eTc4ekJoZ3gtaXM
 
The Wallet Fill/Drain SFX are set to 67 using Saffith's script (his last try didn't seem to have any effect when I tested it, so I've just been using his next to last script):
 

const int SFX_WALLETFILL = 67;
bool RupeeSFX;

//in global, before waitdraw
            UpdateRupeeSFX();
//end global

void UpdateRupeeSFX()
{
    if(Game->DCounter[CR_RUPEES]==0)
        return;
    RupeeSFX=!RupeeSFX;
    if(RupeeSFX)
        Game->PlaySound(SFX_WALLETFILL);
}

 
 
The Rupee Pickup SFX is set to 67 in the Item Editor, and SFX 18 used to be a silent .wav that popped, but I replaced that with a silent .wav which doesn't pop.
 
I somehow suspect it's connected to this:
 


EDIT: The Rupee Likes not playing the wallet drain SFX seems to happen most often if I'm engulfed by the red one first, and less often if I'm engulfed by the green one first.

 

EDIT2: Also, while nothing to really complain about, the Magic Meter Fill SFX is sometimes played when I collect a magic jar, even though the meter is filled (and there's no sound in the Pickup slot).

const int SFX_MAGICFILL = 82; // Or whatever
bool MagicSFX;

void UpdateMagicSFX()
{
    if(Game->DCounter[CR_MAGIC]==0)
        return;
    MagicSFX=!MagicSFX;
    if(MagicSFX)
        Game->PlaySound(SFX_MAGICFILL);
}

UpdateMagicSFX();

 

 

Where did you position these in your global script?



#27 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 07 August 2016 - 06:19 PM

global script Combined
{
    void run()
    {
        //Before while
        Link->DrawXOffset = 0;
        Link->DrawYOffset = 2;
        Link->X += 0;
        Link->Y += -2;
        Game->Cheat = 4;
        StartClock();
        Tango_Start();
        
        while(true)
        {
            //Before Waitdraw
            MessageSound(I_MSGSFX,SFX_MSG_END);
            UpdateEWeapons();
            UpdateClock();
            CleanUpGhostFFCs();
            Tango_Update1();
            BombBlastFake();
            SBombBlastFake();
            UpdateRupeeSFX();
            UpdateMagicSFX();
            
            Waitdraw();
            
            //After Waitdraw
            AutoGhost();
            Tango_Update2();
            UpdateFlowers();
              //Handles the flowers->Next stuff. 
            if(OldScreen != Game->GetCurScreen())OldScreen= Game->GetCurScreen();
              //Save what screen you're on if it changes.
            
            Waitframe();
        }
    }
}



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users