搜索结果: *

  1. BrandonM

    About making ModLib (or any other mod I guess) a soft-dependency.

    I did it with reflection. The ModLib settings file and the 'Normal' settings file have the same named properties.
    This isn't the most optimized way, but it only runs once during startup so I wasn't worried about performance too much.
    The ModLib version of the settings can return a 'Normal' version like so:

    C#:
           public TournamentXPSettings GetSettings()
            {                   
                TournamentXPSettings dto = new TournamentXPSettings();
                PropertyInfo[] propertiesML = typeof(TournamentXPSettingsModLib).GetProperties();
                foreach (PropertyInfo pTXP in typeof(TournamentXPSettings).GetProperties())
                {
                    foreach (PropertyInfo pML in propertiesML)
                    {
                        try
                        {
                            if (pTXP.Name == pML.Name && pML.Name != "Instance")
                            {
                                pTXP.SetValue(dto, pML.GetValue(TournamentXPSettingsModLib.Instance));
                                break;
                            }
                        }
                        catch (Exception ex)
                        {
                            ErrorLog.Log("Error in assigning ModLib property to TXPSettings: " + pTXP.Name + "\n" + ex.ToStringFull());
                        }
                    }
                }
                return dto;
            }

    Doing it this way also means as long as I add new settings to both classes, I don't have to worry about the update/link between the two. I tried using Automapper as well, but was running into issues with it not loading all the time.
  2. BrandonM

    About making ModLib (or any other mod I guess) a soft-dependency.

    This is similar to how I did it in TournamentsXPanded as well. Yours is more organized. :smile:
  3. BrandonM

    In Progress Game is unable to save config/savegame files in : ...\Documents\Mount and Blade II Bannerlord

    Tournament XPanded - Version 1.6.3.hf2 (and hf1) fixes the save issue with BL1.2.0. There may be another issue around item modifiers that has yet to be figured out - hf2 adds extra error handling around that to try and prevent it from being an issue. (Or you can turn off item modifiers in the experimental settings of the mod).
    I've been playing all morning with it on the latest BL1.2.1 that came out today and I've had no problems saving or crashing. If you do have problems you can send me the logfile on nexus or I can tell you how to turn on more diagnostics if you're in a mind to help troubleshoot it.
  4. BrandonM

    BL Coding Command line parameter to disable safe mode popup?

    This is a silly request but would make my life easier - is there a command line switch to disable the enable safe mode popup when the game crashes? I never shut it down properly during development and I've accidentally reset my settings a number of times now.
  5. BrandonM

    SP Native Tournament XP Enabler

    I added a popup.

  6. BrandonM

    SP Native Corrupted Save Fixer

    I've discovered the underlaying issue and can repair the wanderers to a playable state again.
    The cause is that their BattleEquipment and CivilianEquipment are set to null.
    I reinitialize them with a basic equipment and they are viewable in the encyclopedia, tavern and tournament.
  7. BrandonM

    BL Coding Game crashes with more than 11 mods (Modules)

    You can mostly just combine them into a single mod if you hit some hard limit. If you pull out the SubModule section of a few mods and combine into one, you can have one module load all the dlls.
    Make sure to grab any ModuleData and other files they require.

    Take a look at the SubModule.xml and then the SubModules section

    XML:
    <SubModules>
        <SubModule>
          <Name value="BMTournamentXP"/>
          <DLLName value="BMTournamentXP.dll"/>
          <SubModuleClassType value="BMTournamentXP.BMTournamentXPMain"/>
          <Tags>
            <Tag key="DedicatedServerType" value="none" />
            <Tag key="IsNoRenderModeElement" value="false" />
          </Tags>
        </SubModule>
         <SubModule>
          <Name value="BMTournamentPrizes"/>
          <DLLName value="BMTournamentPrizes.dll"/>
          <SubModuleClassType value="BMTournamentPrizes.BMTournamentPrizesMain"/>
          <Tags>
            <Tag key="DedicatedServerType" value="none" />
            <Tag key="IsNoRenderModeElement" value="false" />
          </Tags>
        </SubModule>
      </SubModules>
  8. BrandonM

    Documentation Coding Community Modding Documentation

    I suggest in the sample documentation for basic C# project setup that you don't have them include ALL the TaleWorlds dlls by default but only the ones they will actually be using. Second and more importantly, in the documentation tell them to set Copy Local to false for all the taleworld dlls. I've seen a few mods now with all those dlls in their local Win64 folder and it's not needed (and likely a source of some problems).
  9. BrandonM

    SP Native Discord Rich Presence [Look cool on Discord]

    Can you make so if you are running in DEBUG mode through visual studio it uses say an inDebugMode string instead of inCampaign?
    I don't know why - I just thought of it.
  10. BrandonM

    SP Native Corrupted Save Fixer

    https://www.nexusmods.com/mountandblade2bannerlord/mods/115/ Corrupted saves got you down? Murder those offending NPCs and play again. This little utility mod will cycle through all the characters on game start. If it detects Hero's with exceptions - specifically in the IsArcher...
  11. BrandonM

    SP Native Tournament XP Enabler

    Hey I have it on Vortex and it still does not work or is not updated. Do we have to wait a bit?
    Many people are using it with Vortex. Make sure it's not another mods XML problem. See the sticky on the nexus page.
  12. BrandonM

    SP Native Tournament XP Enabler

    v1.1.2-beta adds a neat new feature. You can edit the BMTournamentPrizeList.json file to add/remove items to pick from. You can find these ids in the spitems.xml file in I think Native or SandboxCore.
    Additionally, you can enable it to use the local town's items as prizes. It does this by examining the in stock items and adding the top 10 valuable ones to the randomized list.There are settings to enable it to use only the town items, only the stock items, town and stock, only custom or town and custom.
    I've made it through a tournament with a new item and it worked but this is still very experiemental. Have fun.
  13. BrandonM

    SP Native Tournament XP Enabler

    I have not been able to get this mod working with build e1.0.3. I keep getting an application crash after the launcher. I get to the first loading screen with the background then i get the pop up.

    I have tried re-downloading the mod, and unblocking the 2 DLL files multiple times.
    Remove any other mods - especially any that replace original taleworlds dlls. And by remove I mean completely from your Modules directory.
    Make sure you have version e1.1.0 of the mod. Then see if it launches. If it does - go read the stick on my mods nexus posts on finding which of the other mods SubModule.xml is messed up. If one SubModule.xml is messed up it can cause other mods to crash - even if that mod is not enabled hence the need to completely remove all other modules while testing.

    If that still doesn't work then you fall into the unknown category where it's working for some and not others. I'm playing it with Tournament Bet Cap v 0.4 and some other unreleased mods of my own. I played it for about 5 hours last night with no crashes, mainly just going from one city to the next fighting in tournaments.

    However the Tournament Bet Cap mod author tried it on his, with just our two, and it crashes on startup for him. So for some people it still always crashes - even two people using the same set of mods. I should ask him what language of Bannerlord - maybe it's a Language/Culture issue? Mine is english version.
  14. BrandonM

    Another Harmony Sample

    https://github.com/brandonm4/BannerlordMods Hello - here is another set of mods that use Harmony to patch in-game methods instead of replacing the default modules. It also shows how I'm injecting new Behaviors into the tournaments. It also shows how I read xml or json files from the...
  15. BrandonM

    SP Native Tournament XP Enabler

    It's failing because it has to load after the Sandbox module. However, the launcher is not placing it in the right position. If you use the command line you can force the order of the mods and it loads.
  16. BrandonM

    SP Native Tournament XP Enabler

    Try unblocking the DLL. Some people are having that issue. Also, make sure you are using version e1.0.2 or higher of the mod. Yes it should bypass the launcher. For some reason it's crashing the launcher. I think it has to do with the dependencies but I haven't figured out that problem yet.

    I've also noticed that some of the tournaments will crash - however, when I unload the mod, that specific tournament will still crash, so I don't think it's the mod. For me it's Lycandon that usually is the culprit.

    However, right now it is fully usable if you can get it to run - I will continue to improve it.
  17. BrandonM

    SP Native Tournament XP Enabler

    I created a mod that enabled XP in tournaments. https://www.nexusmods.com/mountandblade2bannerlord/mods/27/ Let me know if you run into any issues. I've played through a few tournaments now with no problems. Right now it's giving full xp for all skills. So you'll get tactics and leadership...
  18. BrandonM

    Is there a way to cheat 300 for village mine?

    I have literally spent a whole day rolling for 300 for my villages. Two just won't give it to me and after hours upon hours and obscene amounts of gold on prospectors, I feel I have more than earned it and it is driving me insane. I know about building a mine and then closing it to get he dice rolling, but the value isn't getting past 150. The grinding is keeping my mind off of corona virus, but it is also depressing the hell out of me. Help is appreciated.

    My guess (not verified/validated) would be it's contained in a slot on the village party record. I would suggest trying the following:
    1> Go to your village in the game and get the exact value of the mine - so if it's 152 or whatever, just get the exact number (this will help in a bit)
    2> Use the MnbSaveGameEditor to load your save game.
    3> Expand party_records, expand your village entry (they start around 79)
    3a> Expand the party entry, expand #slots
    4> In here you are looking for your value from step 1. There are some promising looking slots around slot number 137. If you find your exact value in one of the slots, replace it with 300, and then save the changes (to a new save game slot).
    5> Load the save and see if you picked the right slot to change. If so, congrats, if not, try again.
  19. BrandonM

    [MODDING] Prophesy of Pendor Tweaks and Talk

    Good Day! I wanted to ask if the The Complete Arsenal of Al-Aziz 3.9.4 is compatible with 3.9.5 (I know stupid question ask but I still wanted to try).
    Depending on your level of technical ability, you can use the guide on the pendor wikia to do the conversion yourself. I have the items from the 'seller' (Haridan, Hamidan, whatever his name is). I partially have the guy that takes the wine/gems to upgrade the weapons working. Some of them work fine, and some are using the wrong items still.
    The item ids roughly changed/increased by 33, but not all.
    I think the upgrade guy's (crazy guy) id also changed by 1.
    I have not bothered with the lady that swaps the cloak vs non-cloak versions yet.

    You can't just copy/paste the code from the wikia, you have to look at the items in the item editor to get their ids and adjust the itemids for each one.

    But it's certainly do-able, it just takes a bit of careful editing of the files. If you have little technical ability I'd wait for the update. Mine is customized so it wouldn't work with the stock pendor files anyway.
后退
顶部 底部