Recent content by EvZone

  1. EvZone

    UIExtenderLib: library to extend standard UI

    Have you actually installed and enabled `UIExtenderLibModule`? All runtime is in that module, `UIExtenderLib.dll` is just an API for it.

    I haven't because I can't seem to find the xml :/. Maybe I'm an idiot, but I can't find it anywhere in the folder (with a version from a couple of days ago).

    Ohh nice, I might use this for my Party Manager Extended mod. Any pointers on how to adjust the party manager screen? I'm struggling with finding the location where the party view is opened.

    I might be trying to do something similar, the class PartyVM in TaleWorlds.CampaignSystem.ViewModelCollection.dll seems to be where things happen. Were you onto that already? What are you trying to do? I'd be curious to know if you managed to do something on that screen !
  2. EvZone

    Guide for .dll files?

    Check this guide out: https://forums.taleworlds.com/index.php?threads/community-modding-documentation.397351/

    In it, there's a section on making a simple C# mod: https://docs.bannerlordmodding.com/_tutorials/basic-csharp-mod

    As for the dlls themselves, I think they're files compiled in a language between C# and assembly with lots of metadata (allowing for variable names to be kept for example). I think Visual Studio is supposed to have extensions to decompile them into C# but I've had more luck using dotPeek or dnSpy (I'm liking the former better because it allows me to export a dll as a C# project in VS).

    Once you've followed the guide you have an empty working mod the game can use. You can either use the API functions to modify the game's behaviour or patch core methods using Harmony. What I've been doing, to try and understand this, is decompiling mods from Nexus and this forum and tweaking them.

    So far I've only managed simple things: make smithing energy regen outside of town (it's been done since), make the character party move faster. But with better and better mods coming out I hope we'll soon be able to go further (some people are already going much further).

    If you have any questions, you can always go to the discord (https://discordapp.com/channels/411286129317249035/695263351726538853) where I've found people to be quite helpful.
  3. EvZone

    UIExtenderLib: library to extend standard UI

    Hello, your mod library and mods look great! Also, thank you very much for including the sources and VS project, it's much easier to get started fiddling with them.

    I'm trying to draw inspiration from your camp mod to add a button to the party menu allowing to recruit all prisoners and upgrade all 1 path troops. I compiled the lib and the mod itself, copied the GUI folder and xml. The game launches alright but I don't see the new button.

    Could you perhaps upload the compiled version of your Camp Mod? Or do you know why the game would launch without a problem but the button doesn't appear?
  4. EvZone

    Bows are WAY too accurate.

    I got a "noble long bow" from marrying a chick that had it equipped, I don't dare imagine how expensive it would be to buy since I can get about 300k selling it, IIRC. It's supposed to do over 90 or 100 damage, not sure anymore, and with about 150 skill I'm not one shotting most units (except with headshots).

    I think the skills should give more noticeable progress, where your aim would be absolute crap, draw speed low, damage and projectile speed slow, in the beginning, and all of those factors would get better as you skill up. Troops should have a skill standing in-between a character's beginnings and uber-state of end-game.
  5. EvZone

    Modding in C# feels incredibly boring and tedious.


    Cool, thanks, so that confirms the fact that objects in C# can have multiple types. For instance John is Person but also object. Seen as object, you can check if it implements TakeDamage(), but if you assume it's Person, it's obvious from the get-go it does.

    So the opposite code

    C#:
    if ( !(obj is IDamageable damageableObj) ) damageableObj.TakeDamage(10);

    also compiles but throws an exception or equivalent at run-time? As in, damageableObj would be null and calling TakeDamage on it would be illegal?
  6. EvZone

    Modding in C# feels incredibly boring and tedious.

    Right, interfaces... you'd benefit from using them for a simple reason: you can abstractly reference them like you would an actual object.

    For example, let's say I have a method in a 'Weapon' class that is meant to deal damage to other objects, and let's say I want it to damage different types of object such as a 'Character', and a piece of Furniture, let's say a 'Door'. I implement the interface 'IDamagable' that contains the TakeDamage() method on both 'Character" and "Door" classes, that way the Weapon can directly interact with any object that implements the interface (hence the word 'interface' eh), both 'Character' and 'Door', and each of those objects manages how taking damage affects it internally. That's way better than a endless if-elseif-else litany of "if object type A then do damage method B, if object type C then do damage method E" on the 'Weapon' class.

    To sum up: given a collision trigger is called, and the Weapon receives a callback with a colliding class object as a parameter...

    With interface implemented :
    > if colliding Type has interface IDamagable, call TakeDamage method.
    Without interface :
    > if Type is 'Door', do Method A, if Type is 'Character', do Method B, if Type is 'Balloon,' do Method C, and so on and so on.

    Tyvm for the explanation, that actually makes things clearer. The thing I don't understand is how you can even write womething along the lines of:

    if(object is of class that implements IDamageable)
    call object.TakeDamage()

    given the object might not have such a method, the second line would be illegal, right ? Coming from C++ for example, a class either has TakeDamage(), which is known at compile time, or it doesn't. Here you're telling me these things aren't known at compile time but at run time? Or what you mean is you don't actually write the if, but the interface acts as a collection of types, and the compiler checks that the object is instantiated from a class that belongs to a collection of types that has TakeDamage()? Also how can a method perform on variable-typed objects ? I thought variables were typed. In that case the method that calls TakeDamage() has a Chair argument and just calls Chair.TakeDamage(), right?


    I think it's pretty neat, but I must just be irreversibly alienated by the dogma of OOP gurus. Again it's pretty self-evident: an interface suggests utility in interaction, ofcourse there's no point implementing one if you are not planning for your object to have any sort of interaction with another.


    it's pretty self-evident

    it's not if you weren't told ! If I gave you a screwdriver and you'd never seen a screw, would you know what it's for? You'd understand its mechanical properties, how to hold it in your hand, but you wouldn't know what purpose it serves. That's what I'm talking about. Of course, if you carried that screwdriver around for a while, trying on every object to find a purpose for it, you might end up finding its intended use. Or you might instead use it to carve wood, who knows.

    I don't know what this has to do with "culture", programming is a discipline of applied mathematics (or should be treated like one), there's no 'culture' of mathematics in the sense you're suggesting, there's not a german nor russian nor nigerian way to program or code. There's a bad way, a better way, and the optimal way.

    By culture I don't mean the arbitrary but the transmitted from person to person. In that sense, mathematics is culture much more than anything else. Learning straight from textbooks is the exception rather than the norm. Let me give you a simple example. The textbook says,

    " Let f:R->R, f is said to be continuous in x0 iff : forall epsilon > 0, there exists eta > 0, such that forall x in R, |x-x0| < eta implies |f(x0)-f(x)| < epsilon "

    The professor says,

    "A function is continuous in x0 if for f(x) to be arbitrarily close to f(x0) all you have to ensure is that x is close enough to x0"

    According to you, which one is better, and faster, understood? Extrapolating from this, it's obvious mathematics as a whole is taught in the latter way better than the former. To give another, maybe more to the point, example. The differential is defined as such:

    "f:E->F is said to be differentiable in x0 if there exists a linear application L0 such that for all x, f(x) = f(x0) + L0(x-x0) + O((x-x0)^2)"

    which is all nice and dandy, but how do you go from that to the intuitive understanding of what a differential is? Again, human transmission, not logic but drawings, heuristics. Without these, that's just another definition you'd read, maybe remember, but never really understand the significance of. You might be able to apply it to test if a function is differentiable, but that wouldn't tell you why you'd want to do that.

    Anyways, I got a bit off track. As for the definition of culture you were using, it also applies to mathematics and, I imagine, every branch of science.

    What I'm trying to make you understand here, is that these things you find obvious are not, and sometimes people don't need help with what to write but rather why they'd write it. That little explanation you gave, though it led me to more questions, actually helped me more than any syntax I might have picked up or knowing what such and such keyword does.
  7. EvZone

    Modding in C# feels incredibly boring and tedious.

    > this thread, aka I don't want to put the slightest effort into learning self evident OOP concepts.

    C# is redundant? What the actual ****? Have you tried Warband's MS Scripting?

    So you're scared/annoyed by "protected", "static", "public," "private", "abstract", "virtual" etc.. eh-kay . Those are actually here to limit redundancy and allow proper system architecture and lower risk of programming mistakes. Ever heard of inheritance, interfaces and delegates? Talk to me about C# redundancy if you grasp how to actually use those efficiently.

    I mean, I think the issue is exactly that he doesn't grasp those concepts, which neither do I really tbf. I mean, I know what an interface is, it's an unimplemented class. Great, but why would you do that? Specifically, I see some interfaces with like one or two void foo() methods and that's it, why not just skip defining that and add those methods directly? Moreover, since they have no return type and no arguments, they basically hold no other information than their name. So, why do that?

    The thing is, there's a difference between understanding and applying the standard of a language and following its 'good practices' or dogma. That's akin to culture, which is acquired through working with others. I understand why these interfaces are legal. I understand what you have to do with them if you pass them to a new class. I just don't understand why you would that, how it benefits you, what it's supposed to mean.

    Also how is this a low-level language :O this is the exact opposite, everything is structure, relationships, etc... Low-level languages deal in integers and reals and arrays thereof, they have loops, ifs and gotos and sometimes, but not always, a very simple 'close to the metal' explicit memory management system (such as pointers). C is a subset of C++ basically, but C++ is high level where C is low level. That's because the 'high level' or 'low level' describes the highest level of abstraction available to a language, not the lowest.

    I'm not too good at C# yet but I'm grateful for having a real programming language to work with. Since it's widely used, you can google stuff. I just can't wait for a release of the core dll sources, if they're ever planning to do it, because a few comments here and there (in the headers especially, explaining what the classes are intended for, if they're scraped, etc...) wouldn't hurt.
  8. EvZone

    [BL] Post & Find Mod Ideas

    Since we're on the topic of mods, I'd really like BL to have a more complex inventory management system.

    The way I imagine it, the inventory would be a grid much like in A-RPGS with variable sized items. Right now, each item stack takes a whole inventory line, so the current system has lots of unused space and I don't think this would make things more cluttered.

    Mounts could add blocks to the grid. To avoid micro-management, I think a carriage system based on the engineer skill could be implemented, where you could camp (ties in with another mod idea) in a forest and select a ''Create carts for the horses" option. Once you have carts going on, every mile*(inventory square used) grants x engineering xp, which could make for an early-game route of leveling Engineering. These carts multiply the inventory slots granted by the mount. Mount types are kept, in that this option is only available for pack animals, and so the fast traveling is still possible.

    Maybe instead of having to camp in a forest, you'd consume hardwood, which you could also gather by camping in the forest.

    The short-coming of this kind of inventory is the necessity for organization. Now to make this an early-game only problem, I suggest carts can be fused together, so that you have an abundance of space later on. In the end, this would just allow for a more visual and less scrolly way to present the inventory contents.

    Where this system could get interesting, is with the addition of containers. You could purchase chests, boxes, etc... Similar things exist in other games, but basically a satchel could take one inventory slot (square) but offer 4 when opened. Where this would be a QoL improvement, is if you could assign, to each container, a type of item: smeltable weapons, armor, etc... There could be specific mechanics associated to these containers; for example, a crate full of smeltables could be deposited as is at a workshop for smelting. When you come back later, you have a box full of metal ingots to retrieve.

    I don't know, it's just a kind of inventory I like in games !
  9. EvZone

    [BL] Post & Find Mod Ideas

    I have a suggestion: Troop auto-upgrade

    Two new buttons on the troop "collapse bar":
    a ) Upgrade all troops that have only one possible path
    b ) Upgrade all troops; when two paths are possible, one must have been on the encyclopedia before-hand to tick a box on the troop possibilities meaning "preferred path". If the upgrade is impossible because of a lack of horse or money, just skip it (meaning don't go the other way).

    I imagine logos for the buttons could be :
    a ) a single thick upwards arrow
    b ) two upwards branching arrows, one thick and one thin

    And also: Prisoner auto-recruit
    This one's straightforward !


    I think these could even be in Native, frankly.
  10. EvZone

    SP - General Warband's Missing Features Megathread

    Is the fast-forward option in BL as fast as it? You can use that by pressing 3, or clicking on the button, I think. But a faster speed up is probably necessary for some things.

    It's much slower, Ctrl+Space made going from one city to the other a matter of a couple of seconds.
  11. EvZone

    SP - General Warband's Missing Features Megathread

    Well, I guess any feature that's in Warband and not in Bannerlord is a missing WB feature, including things that might not be what TW envisioned.

    One simple QoL feature I couldn't find is the Ctrl+Space time speed-up.
  12. EvZone

    SP - General Warband's Missing Features Megathread

    I completely disagree with the late medieval armor, this game is in another setting. For instance, did you have equipment from the Renaissance period in WB? Would that not have felt out of place?

    Don't worry, in a year's time, if not less, there'll be plenty of equipment mods with this kind of stuff, but I think it'd be silly of TaleWorlds to do it themselves when they set out to change the setting of the game (to an earlier time period).

    I'd add skill books, which I've suggested in another thread ! In the current system, they could add +1 Focus or hidden perks.

    Also this one's not a WB feature per se, but Viking Conquest had religions which expanded on the culture system. I'm a bit fuzzy on the details but there were, at least, pagans and christians, and you sometimes had to walk on egg-shells regarding companions especially. I think that's the kind of thing that could give the characters more personality.
  13. EvZone

    Trying to show messages for debugging, not sure my patched routine is being called

    Hello, Using Harmony, I'm trying to patch CustomBattleMoraleModel.GetImportance() (for kicks, mostly) which checks if the killed agent is the team's general. In that case, I put a to try and check if the function is called. However this doesn't show anything, as far as I can tell. In...
  14. EvZone

    Modding in C# feels incredibly boring and tedious.

    Sure whatever, you seem very smart, good on you. I am not a pro coder, so having 3 different decimals (float, double, decimals) types is beyond me. And for me, this is exactly what is wrong with this langage. Mostly having to define everything, then create it, then populate it, is overly complex for my small brain, furthermore because this doesn't exist in other langages I came across. Maybe, as I learn more, I will get to appreciate it, but so far, this is really humbling, and a total pain in the arse compared to other langages.

    It does exist in other languages, it's just hidden from you. Even in python

    blabla = 1

    translates more or less to (except in Python every thing is a piece of crap class I've heard)

    int blabla = 1

    whereas

    blabla = 1.0

    translates to (I assume) double blabla = 1.

    As for why you'd use one or the other, it's a matter of memory but also of speed. Doubles take double the space, which allows circa 10^-16 precision, where float affords 10^-8. This has an obvious impact on RAM usage. The other thing that's less obvious, is vectorized instruction deal in half as many doubles as floats (think of it as automatic parallelization of your code).

    At any rate, you'll very quickly know all about the different types of variables you can use. In doing so, you'll have some knowledge of architecture, which is always interesting to have. If you want to learn more on the subject, maybe you could follow some C or Fortran tutorials, which are low-level languages where you'll learn these fundamentals without the clutter of OOP (such as in C++, C#). If you can read french, you can read the tutorial I used to learn C way back when (it doesn't require any prior knowledge whatsoever).

    On a practical level, these kinds of languages allows the compiler to tell you to **** off when you ask for something illegal, which honestly just saves you so much time down the road. In being compiled, they're also much much faster (a dumb loop is potentially 100x slower in an interpreted language such as Python than in C or Fortran).

    Frankly, of all the silly high level languages that go around (Python, Julia, Rust or whatever, etc...) and of the little I've seen of C#, I think things will be rather straightforward to code here. At least it's a compiled language ! And if you look at the code, it's just so readable, every variable has a long-ass name but at least you can guess what it stands for.

    Old-school Fortran code has variables with capped (short) length and no capitalization, so everything is called x12, y31, lmfro, whatever. Be grateful for these modern languages !
Back
Top Bottom