Now the problem is after the build.
Apparently the tutorial was for older versions, but I can't figure it out myself yet.
error at startup - the application faced a problem.
bebug log
System.NullReferenceException
HResult=0x80004003
Message = Object reference not set to an instance of an object.
A source = TaleWorlds.MountAndBlade
Stack Trace:
at TaleWorlds.MountAndBlade.Module.InitializeSubModules()
at TaleWorlds.MountAndBlade.Module.LoadSubModules()
at TaleWorlds.MountAndBlade.Module.Initialize()
the code from the tutorial with the correction.
using TaleWorlds.Core;
using TaleWorlds.MountAndBlade;
using TaleWorlds.Localization;
namespace ExampleModNameSpace
{
public class MySubModule : MBSubModuleBase
{
protected override void OnSubModuleLoad()
{
Module.CurrentModule.AddInitialStateOption(new InitialStateOption("Message",
new TextObject("Message", null),
9990,
() => { InformationManager.DisplayMessage(new InformationMessage("Hello World!")); },
() => (false, new TextObject())));
}
}
}