alexutalew
Recruit

Hi
I just started learning some MB Bannerlord modding. I am trying to build a custom culture and just one castle and a village for it. The settlements belong to the player faction from the very beginning. I add the culture in its corresponding XML file, and the settlements to their specific XML file. I also have a DLL for more tweaks that I need to apply. I have the culture figured out, but with the settlements I have a few troubles.
To begin, in the submodule code, I overridden the OnNewGameCreated method like this:
I just started learning some MB Bannerlord modding. I am trying to build a custom culture and just one castle and a village for it. The settlements belong to the player faction from the very beginning. I add the culture in its corresponding XML file, and the settlements to their specific XML file. I also have a DLL for more tweaks that I need to apply. I have the culture figured out, but with the settlements I have a few troubles.
To begin, in the submodule code, I overridden the OnNewGameCreated method like this:
C#:
public override void OnNewGameCreated(Game game, object initializerObject)
{
base.OnNewGameCreated(game, initializerObject);
Settlement castle = Settlement.Find("castle_1111");
Settlement village = Settlement.Find("village_1111");
castle.Militia = 0;
castle.Town.Settlement.Militia = 0;
castle.AddGarrisonParty(false);
village.Village.Settlement.Notables.RemoveAll(delegate (Hero h) { return true; });
}
- I don't want any initial garrison for my castle, but I can't figure out how to remove the one that is added by the game. With the current code, all I see is that a new empty garrison is added next to the existing one
- I also want to remove the initial notables in the village, but this code doesn't do it.
- A strange behavior that I have encountered (which I try to fix by removing the notables) are messages that show up at the top of the screen telling me that the reputation with the notables in the villages has changed. These messages appear as soon as the intro video in the Sandbox game starts playing, even before I select a culture. I really don't know what triggers the creation of the notables and these messages so soon. My mod works on top of the Europe_LemmyProject mod, but I don't think there's any Harmony patch that fiddles with that. Maybe I could somehow postpone the creation of the settlement and the notables so that I don't see the messages so early.
- Finally, since I have a custom culture which I can select from the character creation menu, I noticed that I cannot select a family. Could I somehow get rid of this step in the character creation menu?