Jump to content

Figura Guide: Adding Sound To Models


Sander
 Share

Recommended Posts

Hello everyone! Sander here,

 

A few days ago I figured out how to add sounds to a figura model. (For those of you who don't use the figura mod, ignore this guide or get figura. Seriously it's really good, it's like moreplayermodels but better, look it up!) So far I haven't heard of anyone else in the LOTC community who uses figura having figured this out before, and when I asked people in the discord if they wanted a guide some folks seemed very eager so here we are!

Let me just say; figuring this out was a pain, since I didn't know squat about blockbench's animating, lua scripting or how the intricacies of figura worked. Now that I know how to do this though, I can tell you it's super easy and you too can add cool sounds to your models using this simple guide!

 

Step 1: Open your model in blockbench and go to the "Animate" tab (credit to gaiusmarius/IbnKhaldun8 for this lovely model).

 

33748b7d86fd1bc67b9596542f6be3e3.png

 

Step 2: In this tab, click on the plus button on the left of the screen to create a new animation, and name it (do NOT put . or other punctuation marks in the name, keep it simple).

 

acacfdfa38ecb62d26a4da67d4f7b190.png

 

Step 3: Now that you've made the new animation, go to the bottom of the screen where it says 'Timeline' and click on 'Animate Effects'. This adds the Effects tab with the options 'Particle', 'Sound' and 'Instructions'. You can ignore the 'Particle' option.

 

7064df573f9e6fca87a708a7c8ecc487.png

 

Step 4: Select a point of time on the Timeline (Example is 0.25, I recommend not doing 0.00 because it might be bugged). This is where your animation (sound) will start. Then click on the + icon for Sound, which adds a so-called 'Sound Keyframe'. Options for these keyframes are displayed on the left. Click on the button that says 'Select Keyframe File' and upload the sound file that you wish to use. Note that you need to use a .ogg file, it seems .mp3 or other formats do not work with either blockbench or figura. (If you have a .mp3 file, you can easily convert it using various websites for free).
IMPORTANT: Every second of a .ogg file is roughly 10kb. Your figura avatar can at most be 100kb. The sound is not the only thing taking up this space, so just to be safe try to keep your sound to 8 seconds at max.

 

45ed8aa8dfbefcb0d84df1e8e0e4d131.png

 

Step 5: Now that you have added the sound file, create an 'Instructions Keyframe' in the same manner you've created the Sound Keyframe (do this at the same point in the timeline). You'll find that in this keyframe, instead of an Effect box where you can upload a file, there is a Script box you can type in. Paste this following script into that box, with 'ExampleSound' being whatever you named the sound file at Step 4:

 

sounds:playSound("ExampleSound",player:getPos())

 

e302d7897c37678237959534eedcd7ee.png

 

Step 6: You have created both Keyframes now. If you press play to run the animation, you should be able to hear the soundfile you uploaded. Good job, I'm so proud of you! Now, download your .bbmodel file (blockbench model) and put it in your avatar folder as per usual. Not as per usual though, also put the .ogg file you used into the avatar folder. If you don't put the .ogg file in the folder, figura will have no clue what sound file your bbmodel is referencing.
 

IMPORTANT: Make sure that the .ogg file is also called 'ExampleSound' or whatever name you gave it, between the file in the folder, the Effect in the Sound Keyframe and the Script in the Instructions Keyframe, there can be NO difference in name.

 

Step 7: Getting close now! Also put a script file in your avatar folder in case you don't have a script file in there yet. At the bare minimum, your script file should look like this, with the following line of code. YourBBModelName is whatever you called the .bbmodel you put in the avatar folder and ExampleName is whatever you named your animation at Step 2. Make sure to SAVE the script file before closing it.

 

d162866e4f3c00e9f2df9c51d9a252ef.png

 

Step 8: The line of script you added in Step 7 will cause the sound animation to be played whenever you select (played client side) and upload (others can hear it too) the avatar ingame. If you want to play the sound again, just select and upload the avatar again, people won't notice a difference. If you want to trigger the sound animation in some other way, you could try scripting it to run repeatedly, through using the action wheel or if certain criteria are met. This is simply the most basic way to have the sound animation be triggered. 

That's basically it though! If you did everything right, you should now be able to simply close the folder you put everything into and try equipping the avatar ingame, upon doing which the sound should play for you.

 

If you have any questions because following these steps didn't work or you have follow up questions; feel free to send 'em my way and who knows I might be able to help.

(I won't promise I can though, I'm still pretty new to all of this myself!)

 

Hope this was useful to my fellow figura users!

Link to post
Share on other sites

Very cool +1

Link to post
Share on other sites

If anyone wants to start figura, there’s a dedicated figura RP discord server with guides, people to help and displaying great models. https://discord.gg/ZEpr54Yq
Thanks for the guide sanders!

Link to post
Share on other sites

On 7/25/2023 at 8:25 PM, creamynoteblock said:

you can still delete this before its too late

que?

Link to post
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.



×
×
  • Create New...