File information

Last updated

Original upload

Created by

Ahmed Salah

Uploaded by

ahmed007boss

Virus scan

Safe to use

About this mod

This dependency mod that enable modder to add config and settings for their mods in one place inside game settings in the main menu

Requirements
Permissions and credits
Changelogs
Donations
Mods Settings 

This dependency mod that enable modder to add  settings for their mods  in one place inside game settings in the main menu.

This mod is required by other mods to enable players to update their settings 

To open Mods Options  Main Menu > Settings > Mods Option (tab)


    Current Features : 
    • Add 'Mods Settings' tab inside both settings screen in the main menu and option screen from esc menu
    • Add toggle setting input (checkbox)
    • Add numeric setting input (Slider)
    • Add select setting input (Dropdown)
    • Group the same mod settings together in the same area






    Future Features : 
    • Implement settings order as its not working
    • More detailed  documentation  
    • Auto Saving Settings in json file
    • Add Keybinding settings input (Select Key)
    • Add text setting input (Textbox)
    • Add action button to do some other things (ex. open popup)
    • Localization
    • Enable player to search inside settings 
    • Enable player to Collapse/Expand mod settings area 
    • Display more information about mods



    Compatibility:
    It should be compatible with all other mods  Except the mods that uses the same UI element location on the screen,
    also its compatible with old and new save game.

    its working with 
    • Patch 1.0.10
    • Patch 1.0.09
    • before that i don't know try yourself 
    it's still not working with e1.1.0 beta (i am fixing that soon)


    Installation:
    Use vortex, and enable the mod in the launcher's mods tab.

    A manual install can be done by unzipping the file to your bannerlord's Modules directory and enable the mod in the launcher's mods tab.

    If the game can't load the mod, find the file "MBTargetEnemyStatus.dll" and right-click -> properties -> click unblock. The file is under bannerlord's install directory in "Modules\MBModsSettings\bin\Win64_Shipping_Client\MBModsSettings.dll"

    Please feel free to drop your suggestion or any bug you encountered 



    For Modders

    To add a config for your mod :

    • Add the following two static method to your main class (SubmoduleClassType) which inherits from MBSubModuleBase
         public static Dictionary<string, string> GetModSettingValue()
      {
     // write to get settings as Dictionary from anywhere you want
    //this method will be called when the player opens the settings screen to get your settings values 
      }

     public static void SaveModSettingValue(Dictionary<string, string> newSettings)
      {
    // write to save settings to anywhere you want
    //this method will be called when the player clicks on Done button in the settings screen
      }
             

             Note : Please keep the same methods signature as above 

    • Your code file should be like this
    

    • Add tag <ModSettings> in your mod SubModule.xml file  inside <Module> tag
    • Inside this tag you can define list of settings that your mod will have 
    • To define toggle setting add the following line inside  <ModToggleSettings> tag inside <ModSettings>
       
    <ModToggleSetting Key="EnableDebug" Order="2" Text="Enable Debug" Description="desc" DefaultValue="0"/>
     
       

       
     
    • To define  numeric  setting add the following line inside  <ModNumericSettings> tag inside <ModSettings>
    
    
     <ModNumericSetting Key="StatusDisplayTime" Order="3" Text="Status Display Time (Ticks)" Description="Time which status will disappear after" DefaultValue="600" MaxValue="2000" MinValue="300"/>
         

    


    • To define  select setting add the following line inside  <ModSelectSettings> tag inside <ModSettings>

     <ModSelectSetting Key="DebugLevel" Order="3" SelectList="Info,Warning,Error" Text="Debug Level" Description="desc" DefaultValue="0"/>

    
    • Your xml file should be like this




Note : Your mod will not depend on this mod , your mod will work either the user install or doesn't install this mod but you may want to add this mod as optional dependency for your mod