[Release v1.0.0] NoHarmony : mod loader for bannerlord

Users who are viewing this thread

Hey I tried your mod instead of harmony but cannot seem to make it work. I am replacing defaultSmithingModel with my own but it didnt seem to replace it.

Any idea?

Also do you think you can make it work with enum? I want to add option to some enum without doing shady trick. So replacing with my own enum would be nice.
 
Hi, and thanks for your post.

I tried just now to use Foreversmith from Calsev with my Loader and it worked perfectly. So i'll ask a few more details.
First what version are you using? (Where did you got it, i might have messed a bit with my GitHub)

Secondly how do you use it?
With Foreversmith i removed all the content from ForeverSmithSubModule that is it's loader, extended it from NoHarmonyLoader and added ReplaceModel<ForeverSmithModel, DefaultSmithingModel>(); to NoHarmonyLoad().

What do you mean by work with enum? If you want more options i can look to add them yes, but need to be more specific. (And remember even if i'm close to ver 1 it's still work in project).
 
Downloaded it from your github.

Well I have a class inherited from defaultSmithingModel, my sub module is inherited from NoHarmonyLoader and I implemented both NoHarmonyInit and NoHarmonyLoad. In NoHarmonyLoad, I have
Code:
 ReplaceModel<NewSmithingModel, DefaultSmithingModel>();


Also by enum I mean something like the CraftingMaterials enum. I want to create a new crafting system for bow and stuff and want to add different crafting materials.
 
No it should be ok. Even if i would drop it at another place than bin folder. If it's available in VS it should copy it to the release folder you will copy to your game folder (Or it will do it on it's own).
Maybe check the bin engine directory and look for the log file NoHarmony.txt by default if it says anything useful?
 
Hello and thanks a lot for your work.

I'm totally new to C# and modding so I might be doing everything wrong.
I can't get the ReplaceBehavior method to work with an internal class since it's inaccessible due to its protection level (SandBox.LordConversationsCampaignBehavior for example) :
ReplaceBehavior<CustomLordConversationsCampaignBehavior, LordConversationsCampaignBehavior>();

Is it supposed to work for internal class as well ? Is there a specific way to handle these ?
 
Hello,
Yes you are right, you can't alter an internal class as it is only visible for other classes inside the same assembly. Yet with how the game is designed and how C# works it might be possible to use a workaround and still replace one of those class. Sadly it will require me to investigate if i can make it work.
If it was an issue with a model i would tell you to simply replace the upperclass, but for behaviors as they all directly extends from CampaignBehaviorBase it's not possible ... So for now it's not possible. But will try to add something about it in the future versions, it's added to the "todo list".
 
Back
Top Bottom