# How do I add custom music?

**URL:** <https://discourse.stonehearth.net/t/how-do-i-add-custom-music/14064>\
**Category:** Modding\
**Created:** [July 1, 2015, 9:07am UTC](https://discourse.stonehearth.net/t/how-do-i-add-custom-music/14064 "2015-07-01T09:07:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flitty](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/flitty/32/47000_2.png) [@Flitty](https://discourse.stonehearth.net/u/Flitty)\
**Post date:** [July 1, 2015, 9:07am UTC](https://discourse.stonehearth.net/t/how-do-i-add-custom-music/14064/1 "2015-07-01T09:07:52Z")

</div>

how would I go about adding custom tracks into the mix of existing stonehearth music? even further how would i add in custom music variants for specific things like the battle music and such? thanks.

---

<div class="post-metadata">

**Author:** ![Tuhalu](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/tuhalu/32/44358_2.png) [@Tuhalu](https://discourse.stonehearth.net/u/Tuhalu)\
**Post date:** [July 1, 2015, 9:26am UTC](https://discourse.stonehearth.net/t/how-do-i-add-custom-music/14064/2 "2015-07-01T09:26:53Z")

</div>

Basically, modding.

You’d need to create a mod that overrides services/client/sound/sounds\_service.luac in stonehearth.smod to tell it what music to play if you want to add additional tracks into the mix. You’d also need to create some tracks of the correct format. All the current music is in data/music of the stonehearth.smod and is in .ogg format.

If you just want some different tracks, then you’d still need to convert to .ogg format, but you’d just replace the music files with your own (using the same names).

---

<div class="post-metadata">

**Author:** ![Flitty](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/flitty/32/47000_2.png) [@Flitty](https://discourse.stonehearth.net/u/Flitty)\
**Post date:** [July 1, 2015, 10:04am UTC](https://discourse.stonehearth.net/t/how-do-i-add-custom-music/14064/3 "2015-07-01T10:04:52Z")

</div>

ok great, thanks. i can’t seem to decompile the luac file, any chance you could help me out there? i’m sure i can get it going but it’s a nightmare to read.

---

<div class="post-metadata">

**Author:** ![Tuhalu](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/tuhalu/32/44358_2.png) [@Tuhalu](https://discourse.stonehearth.net/u/Tuhalu)\
**Post date:** [July 1, 2015, 10:42am UTC](https://discourse.stonehearth.net/t/how-do-i-add-custom-music/14064/4 "2015-07-01T10:42:10Z")

</div>

[Lua Unminifier](http://discourse.stonehearth.net/t/lua-unminifier-formatter-improved/8217). luac is almost exactly the same as uncompiled lua, just with less spacing in it. The lua unminifier does a fair job of fixing the spacing again (it mostly has problems with comments and variable declaration).

Lua Unminifier doesn’t have any save function, but you can just cut and paste back into the original file using a text editor.
