Jump to content
Sign in to follow this  
chernaruski

Inventory Sounds for dummies

Recommended Posts

Small tutorial on how to add the inventory sounds in Exile:
This will require the following client files to be overwritten:

Bag open sound - ExileClient_object_player_event_onInventoryOpened.sqf 
Bag closes sound - ExileClient_object_player_event_onInventoryClosed.sqf 
Pickup sound (the one when the hand icon appears) - ExileClient_object_player_event_onTake.sqf
Drop item - ExileClient_object_player_event_onPut.sqf

1) Find yourself 4 sounds you want to add to the following actions : bag open , bag close , pickup and drop.  
2) Put them somewhere in your mission file folder -  myexilemission.whatevermap.PBO.  i.e  sounds\sfx 
3) Add the following sounds configs to your description.ext . Make sure the sounds folder path and names are the exactly the same that you've put your files in.

class CfgSounds
{

    sounds[] = {};

    class bagopen
    {
        name = "Open Inventory";
        sound[] = {sounds\sfx\bagopen.ogg, db+2, 1.0};
        titles[] = {0, ""};
    };
    class bagclose
    {
        name = "Close Inventory";
        sound[] = {sounds\sfx\bagclose.ogg, db+3, 1.0};
        titles[] = {0, ""};
    };
    class pickup
    {
        name = "Pick Up Item";
        sound[] = {sounds\sfx\pickup.ogg, db+6, 1.0};
        titles[] = {0, ""};
    };
    class drop
    {
        name = "Drop Item";
        sound[] = {sounds\sfx\drop.ogg, db+3, 1.0};
        titles[] = {0, ""};
    };
};

4) Thats it your sound files are ready to be used in game. Now its time to add a playsound command to call for them on a game action.
For this , you need to know what exile overwrites are and how to use them.

4.1 - Add the following to your ExileClient_object_player_event_onInventoryOpened.sqf   (around line 49-50) :
  

playSound "bagopen"; 



4.2 -  Add the following to your ExileClient_object_player_event_onInventoryClosed.sqf  (around line 14-15) :
 

playSound "bagclose";


4.3 - Add the following to your ExileClient_object_player_event_onTake.sqf  (at the very end) :
 

playSound "pickup"; true



4.4 - Add the following to your ExileClient_object_player_event_onPut (anywhere , it was empty ;))
 

playSound "drop"; true



If your overwrites are correctly set, you should hear the sounds in-game now.

  • Like 3

Share this post


Link to post
Share on other sites

Pickup and drop sound is not working for me 🤨
Pretty sure i did nothing wrong, am i the only one ?

Share this post


Link to post
Share on other sites

I don't see where 😅Tried it multiple times.....

Edit: I typed the lines manually and it worked 🙄These errors sometimes 😄
 

Share this post


Link to post
Share on other sites

Hello

I'm not sure I understand how this thing works.

Do I have to modify the files that are in exile_client.pbo, located in my ExileMod\addons folder ? Or do I have to do it serverside ?

Because, If I edit my client files, when I try to connect it won't let me in, since I have different files (therefore no same keys), and if I edit server files, then people won't be able to join, since they have different exile.pbo ?

What am I missing here ?

 

edit: Okay seems like I did not really know what overwrites were. Looked into that.

Now, I added a  folder in my mission like that: overwrites\exile_client\code\

And i've put the edited files in it, with the lines added like in this tutorial.

Then, I added in my config.cgg, in cfgcustomcode, 4 lines like this:

    //Inventory sounds
    ExileClient_object_player_event_onInventoryClosed = "overwrites\exile_client\code\ExileClient_object_player_event_onInventoryClosed.sqf";
    ExileClient_object_player_event_onInventoryOpened = "overwrites\exile_client\code\ExileClient_object_player_event_onInventoryOpened.sqf";
    ExileClient_object_player_event_onPut = "overwrites\exile_client\code\ExileClient_object_player_event_onPut.sqf";
    ExileClient_object_player_event_onTake = "overwrites\exile_client\code\ExileClient_object_player_event_onTake.sqf";

 

But it still doesn't work...

 

Can someone help me ?

Thanks.

Edited by goodfella66
Progress but still no luck

Share this post


Link to post
Share on other sites

When complete, the files should all be located in your Mission file (Chernarus.pbo, for example). Everything is contained within that PBO, so when players connect, the first thing that happens is: they automatically download the PBO. Not sure if that helps or not.

 

Unfortunately, unless you can post a copy of your server report (in a Spoiler format, please), there's not much else anyone can do in helping you troubleshoot the issue.

Share this post


Link to post
Share on other sites

Here's the thing, the error I get in my RPT doesn't even concern that new addition anyway, it gives me errors but for my Occupation Mod lol, which is totally fine if I go back without the Sound Inventory script.

 

Maybe I didn't enter the lines in the 4 sqf files at the right place in each file ?

-For ExileClient_object_player_event_onInventoryClosed.sqf, I put it between line 14 and 15

-For ExileClient_object_player_event_onInventoryOpened.sqf, I put the line between 49 and 59

-For ExileClient_object_player_event_onPut.sqf, I put it at the very end (even after the last "true" line

-For ExileClient_object_player_event_onTake.sqf, same, at the very very last line

 

I really don't know what I did wrong here...

 

I'll put the RPT in the next message since it won't let me do it in a single answer...

Share this post


Link to post
Share on other sites
Sign in to follow this  

×