Technically yes, however, it needs to write to "_battleMode" and "_campaignMode", both of which are readonly (and then probably call Initialize), in order for it to take effect.
private readonly MBMusicManager.BattleMusicMode _battleMode;
private readonly MBMusicManager.CampaignMusicMode _campaignMode;
private MBMusicManager()
{
if (!NativeConfig.DisableSound)
{
int num = (int) PsaiCore.Instance.LoadSoundtrackFromProjectFile(BasePath.Name + "music/soundtrack.xml");
}
this._battleMode = new MBMusicManager.BattleMusicMode();
this._campaignMode = new MBMusicManager.CampaignMusicMode();
}
100% Agreed! This overly convoluted method should be fixed.
namespace Shokuho
{
// Music Patching
[HarmonyPatch(typeof(MBMusicManager), MethodType.Constructor)]
public class MBMusicManagerPatch
{
private static void Postfix(MBMusicManager __instance)
{
if (!NativeConfig.DisableSound)
{
int num = (int)PsaiCore.Instance.LoadSoundtrackFromProjectFile(BasePath.Name + "Modules/Shokuho/ModuleSounds/Music/soundtrack.xml");
}
System.Diagnostics.Debug.WriteLine("Postfix loaded! (Music)");
}
}
}
Indeed, it would seem that way.
//example:
int soundIndex = SoundEvent.GetEventIdFromString("example/voice/charge");//to avoid string operations in runtime soundIndex can be cached.
if (playOneshot)
{
MakeSound(soundIndex, MainAgent.Position, false, true, -1, -1);//plays oneshot sound at position with given parameters.
}
else
{
SoundEvent eventRef = SoundEvent.CreateEvent(soundIndex, Scene);//get a reference to sound and update parameters later.
eventRef.SetPosition(MainAgent.Position);
eventRef.Play();
}
SoundEvent.PlaySound2D(SoundEvent.GetEventIdFromString("hl1scientistdeathscream"));
Wait you can sell them? brb gonna become rich.talvas said:
leugimimi said:
Yay! Welp here I go!Tuidjy said:
gsanders said:
Also, another question, how do I use magic if I already had read the book and gotten 2 spells? What are the keybinds?Morrowind Mod Man said:
Nice! Is it 100% random or like within constraint?Morrowind Mod Man said: