Help with music mod

hasanchik

Terrarian
This is my first post, please bear with me here.

I am making a very simple mod for someone that changes all vanilla music. The problem is that the music for some reason does not play. There is not a single error when i build it.
I do not know very much about modding and this is my first attempt with modding.

When i enter another biome that the music i did not add to, the silence goes away. Also sometimes the music volume goes to 0 for some reason. When i enter a biome i did add music to, the music from the previous biome persists. Any help would be appreciated.

Code:
C#:
using System;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;

namespace SonicMusicMod
{
    class SonicMusicMod : Mod
    {
        public override void Load()
        {
            Main.music[MusicID.Boss1] = GetMusic("Sounds/Music/Boss1");
            Main.music[MusicID.Snow] = GetMusic("Sounds/Music/Snow");
            Main.music[MusicID.Title] = GetMusic("Sounds/Music/Title");
        }
    }
}
 
I don't know about coding a mod for it, but if you're wanting to just replace the vanilla music you can build a wave bank using XACT 3 (or the quick wave bank tool here in the forums).
 
I don't know about coding a mod for it, but if you're wanting to just replace the vanilla music you can build a wave bank using XACT 3 (or the quick wave bank tool here in the forums).
I want it to be a mod on the tmodloader browser. Making a mod is way easier in my opinion and you can share it easier. Maybe got more suggestions? Anyway, i will try to make a ''wavebank''.
 
I don't have much coding experience, but you probably need to have the music in a wave bank anyway and reference them from there.
 
Back
Top Bottom