Jump to content

Custom Sound Effects


Recommended Posts

Its been a while since my first go at making Custom Sounds for my mod, and Im starting from scratch.

 

Just wanted to confirm a few things.

1) What version of Unity do I want to use for Asset Bundling the sounds?
I tried checking https://7daystodie.fandom.com/wiki/Unity but it doesnt suggest Unity version there.
My old post has a user saying 7D2D (A19.6) uses Unity version: 2019.2.17f1. Is that still the case?


2) I remember in addition to getting the proper version of Unity, I had to have some Asset Bundling script.
Where would I find the proper script?
I also tried checking the same page (https://7daystodie.fandom.com/wiki/Unity) has a 404 Link when clicking on the Asset Bundler Script link.
 

Thanks!

Edited by Bladestorm Games (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

My best effort, BUT I have not made any sounds in awhile for a20. been busy...

 

For Unity version, if you can't find the "correct" one to use ( like the required, base version. It should be listed somewhere but I don't know where anymore), you can try looking at the games "[install path]/7 Days To Die/7DaysToDie_Data/output_log_client_****.log" for the version of the game you're running (start a game, have it generate a new log).

Look for this line near the top of the log (I think I'm running the latest stable a20.x for this line in the log):

"Initialize engine version: 2020.3.14f1 (d0d1bb862f9d)"

 

I'm not sure if you can get that exact version of Unity, but get as close as you can without going to a newer version.

 

For the asset bundle exporter script,I'm not 100% sure but it may be in here, though it still says "a19" and when a20 came out I'm not sure if its still working...

https://github.com/7D2D/Templates-and-Utilities <- File: "MultiPlatformExportAssetBundles.zip"

 

This might help anything you may have forgotten. 

 

 

Edited by doughphunghus (see edit history)
Link to comment
Share on other sites

Thanks! I got my sounds to work!

For anyone else, are my notes on how it worked for me:

 

1 ) Installed Unity Hub

2 ) Find Version 2020.3.14f:
https://unity3d.com/get-unity/download/archive
(Clicked on Unity 2020.x Tab)

3 ) Download & Installed via Unity Hub

4 ) Launched new project as version 2020.3.14f

5 ) Drag & Dropped the following into the Assets area:
 • MultiPlatformExportAssetBundles.cs (From doughphunghus's Github link above)
 • My sounds (I had 2 WAV and the rest were MP3)

6 ) Highlight (click-select) all sounds

7 ) Right click'd any of the highlighted sounds, and selected "Build Multi-Platform AssetBundle From Selection"

8 ) Save the [NAME].Unity3D to my mod's Resources folder.

9 ) Add code to mod's sounds.xml (example seen in spoiler below)

 

sounds.xml:

Spoiler
<config>
  <append xpath="/Sounds">
    <SoundDataNode name="Sound_PoisonApply">
      <AudioSource name="Sounds/AudioSource_VO"/>
      <Noise ID="2" noise="11" time="3" muffled_when_crouched="0.5"/>
      <AudioClip ClipName="#@modfolder:Resources/sounds_arpg.unity3d?snd_poison_apply"/>
      <LocalCrouchVolumeScale value="0.3"/>
      <CrouchNoiseScale value="0.5"/>
      <NoiseScale value="1"/>
      <MaxVoices value="5"/>
      <MaxRepeatRate value="0.01"/>
    </SoundDataNode>
  </append>
</config>

 

 

 

Sound usage in other XML:

Spoiler
<effect_group>
  <!-- Play Custom Sound -->
  <triggered_effect trigger="onSelfSecondaryActionStart" action="PlaySound" sound="Sound_PoisonApply"/>
</effect_group>

 

 

 

EDIT: quick note, for fun, I tried using a version of unity for 2022 and 2021, and I would get issues in 7D2D when 7D2D tried to load/unpack the .Unity3D file.

Edited by Bladestorm Games (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...