Search results

  1. NPC too weak, up level too slow, skill point max capped

    NPCs need a combat xp multiplier which is very easy to implement. I even made a personal mod that does just that.
    From my own testing i found that a 10x multiplier works best for melee weapons and 5x for ranged.
    Also a 5x multiplier works best for simulated (auto resolve) battles since NPCs score more kills in simulated battles than real ones.
  2. BL Coding XP gain rate in arena

    You are free to upload it if you wish.
    And you do not have to bother with giving me credits.
  3. BL Coding XP gain rate in arena

    Strange, it builds just fine on my end. Even copy pasted the code from your post.
    Guessing there must be some configuration that is causing the issue. Best advice i can give is to explore the settings and maybe you will stumble on cause of this error.

    Or you could upload the entire project folder and then i could take a closer look at it.
  4. BL Coding XP gain rate in arena

    Since your goal is to just alter the xp values, i would recommend using the transpiler to snipe the specific values you want to change.
    Link to transpiler documentation.

    In your case it should look like this:
    C#:
        [HarmonyPatch(typeof(DefaultCombatXpModel))]
        [HarmonyPatch("GetXpFromHit")]
        public static class ArenaXPOverride
        {
            static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
            {
                var codes = new List<CodeInstruction>(instructions);
                int num = 0;
                for (var i = 0; i < codes.Count; i++)
                {
                    if (num == 0 && codes[i].opcode == OpCodes.Ldc_R4 && (float)codes[i].operand == 0.9f)
                    {
                        codes[i].operand = 1f;
                        num++;
                        i++;
                    }
                    if (num == 1 && codes[i].opcode == OpCodes.Ldc_R4 && (float)codes[i].operand == 0.33f)
                    {
                        codes[i].operand = 1f;
                        num++;
                        i++;
                    }
                    if (num == 2 && codes[i].opcode == OpCodes.Ldc_R4 && (float)codes[i].operand == 0.0625f)
                    {
                        codes[i].operand = 1f;
                        break;
                    }
                }
                return codes.AsEnumerable();
            }
        }
    Hope this helps.
  5. BL Coding XP gain rate in arena

    The proper way of modding is by patching existing code on runtime using harmony.
    I suggest looking around the forums for documentation and tutorials on the subject.
    If that fails you can always peek at working code from another mod to figure out how to use harmony. My mod "Leveling Rebalance" has the source code included with the mod, so feel free to use that as an example.
    Edit: And you also need a C# decompiler such as dotPeek or ILSpy to look at the game's code.
  6. BL Coding XP gain rate in arena

    DefaultCombatXpModel in TaleWorlds.CampaignSystem.DLL.
    Though i'm pretty sure a mod already exists that increases xp gain in the arena.
  7. why we don't?

    It's just that the chances of death are low. 2% for each character if I remember correctly.
    The player character can never die in battle. Here is a snippet from the method "GetSurvivalChance" inside DefaultPartyHealingModel.cs:
    Code:
          if (damageType == DamageTypes.Blunt || character.IsPlayerCharacter || character.IsHero && !character.HeroObject.CanDie())
            return 1f;
    For those who do not understand C#:
    If the character has been downed with bunt damage, then the survival chance is 100%.
    Or if the character is the player character, then the survival chance is 100%.
    Or if the character is a hero (companions, lords etc) and does not have the CanDie flag, then the survival chance is 100%.
  8. Game not starting

    What are your pc's specs?
    The only things i can think of that could cause the crashes are:
    1. Not enough memory.
    2. If your cpu has a integrated gpu, it could end up being used instead of your dedicated gpu.
    3. Out of date gpu drivers.
  9. Need More Info Hit directions are random

    Reviving an old thread since the issue still exits when using the mouse to control the attack/block direction.

    The issue is not directly caused by the game itself, but rather due to the natural jitteriness of human movement.
    This becomes especially apparent and problematic when using a high sensitivity mouse or if a person suffers from motor control problems (injury, disability etc).

    Best way to solve this is by implementing these two features:
    1. Using a rolling average of the mouse movement over the last # of milliseconds to select the attack/block direction.
    2. Adding a minimum mouse movement threshold for the attack/block direction to be chosen.

    Both of these can have adjustable parameters in the options so the player can set them to fit their personal preference.
    This should greatly reduce or eliminate the odds of the wrong direction being selected.
  10. Beta Patch Notes e1.6.3

    ****ing good. Leave it like that. It can join the half-empty lifeboat of actually interesting perks instead of the endless embiggening of already bigass numbers.
    I fail to understand your point.
    Do you think being able to escape from any unwinnable battle by sacrificing only 1 single unit is good game design? Because that is the case right now.
  11. Axe bonus vs shields?

    Yep, any weapon with the damaged shield icon.
  12. Axe bonus vs shields?

    Peeked into the code: it is double the damage.
  13. Beta Patch Notes e1.6.3

    Fixed a bug that caused the Tactics skill to increase the number of sacrificed troops when trying to get away, or when breaking in and breaking out. (Also in e1.6.2 hotfix.)
    And now having tactics over 200 decreases the number of sacrificed troops by 100%.
    In the bug report i gave a fix for the broken math. But this was skipped over.
  14. In Progress Number of sacrificed troops incorrectly affected by tactics skill.

    The recent hotfix (28/09) did not fully solve the issue.
    While the number of sacrificed troops does decrease with higher skill, because of bad math it reduces the number by 100% when the tactics skill is above 200.
    Code:
    //GetNumberOfTroopsSacrificedForTryingToGetAway
    
    //This math is bad
          ExplainedNumber stat2 = new ExplainedNumber((float) Math.Max(((double) ofRegularMembers * Math.Pow((double) Math.Min(val1, 3f), 1.3) * 0.1 / (2.0 / (2.0 + ((double) stat1.ResultNumber - 1.0) * 10.0)) + 5.0).Round(), 1), false, (TextObject) null);
    
    //Replace with this
          ExplainedNumber stat2 = new ExplainedNumber((float) Math.Max(((double) ofRegularMembers * Math.Pow((double) Math.Min(val1, 3f), 1.3) * 0.1 * (double) stat1.ResultNumber + 5.0).Round(), 1), false, (TextObject) null);
  15. What's your favourite weapon?

    I love charging full speed at enemies and launching javelins from horseback
    Gets my **** hard.
    A fellow man of culture. You are right, there is nothing more satisfying than yeeting a javelin so hard it sends a guy flying 20+ meters.
    Also the impale perk is amazing since it completely negates shields.
  16. Resolved Food shortage in high prosperity cities

    Solution Prosperity drift, like we have loyalty and security drift
    It does exist already, but the thresholds do not make much sense.
    Code:
          if (fortification.IsTown)
          {
            if ((double) fortification.Prosperity < 250.0)
              explainedNumber.Add(6f, DefaultSettlementProsperityModel.HousingCostsText, (TextObject) null);
            else if ((double) fortification.Prosperity < 500.0)
              explainedNumber.Add(5f, DefaultSettlementProsperityModel.HousingCostsText, (TextObject) null);
            else if ((double) fortification.Prosperity < 750.0)
              explainedNumber.Add(4f, DefaultSettlementProsperityModel.HousingCostsText, (TextObject) null);
            else if ((double) fortification.Prosperity < 1000.0)
              explainedNumber.Add(3f, DefaultSettlementProsperityModel.HousingCostsText, (TextObject) null);
            else if ((double) fortification.Prosperity < 1250.0)
              explainedNumber.Add(2f, DefaultSettlementProsperityModel.HousingCostsText, (TextObject) null);
            else if ((double) fortification.Prosperity < 1500.0)
              explainedNumber.Add(1f, DefaultSettlementProsperityModel.HousingCostsText, (TextObject) null);
            if ((double) fortification.Prosperity > 21000.0)
              explainedNumber.Add(-6f, DefaultSettlementProsperityModel.HousingCostsText, (TextObject) null);
            else if ((double) fortification.Prosperity > 18000.0)
              explainedNumber.Add(-5f, DefaultSettlementProsperityModel.HousingCostsText, (TextObject) null);
            else if ((double) fortification.Prosperity > 15000.0)
              explainedNumber.Add(-4f, DefaultSettlementProsperityModel.HousingCostsText, (TextObject) null);
            else if ((double) fortification.Prosperity > 12000.0)
              explainedNumber.Add(-3f, DefaultSettlementProsperityModel.HousingCostsText, (TextObject) null);
            else if ((double) fortification.Prosperity > 9000.0)
              explainedNumber.Add(-2f, DefaultSettlementProsperityModel.HousingCostsText, (TextObject) null);
            else if ((double) fortification.Prosperity > 6000.0)
              explainedNumber.Add(-1f, DefaultSettlementProsperityModel.HousingCostsText, (TextObject) null);
          }
  17. Resolved Food shortage in high prosperity cities

    Two things are needed to fix this issue:
    1. A prosperity penalty for when the food storage is not full. Can be explained as increased food prices.
    2. Changing the prosperity bonus of perks from a flat value to a % bonus to the net prosperity growth of a settlement.
    With these changes settlement prosperity should plateau while maintaining a mostly full food storage.
  18. Editing Death Rate

    I see people arguing over what % the death chance should be, but little about using a more deterministic approach rather than putting everything in the hands of RNG.
    We have room for creativity here.

    Here is one idea for example:
    Each time a character is downed in battle they collect a "lasting injury" and if they collect too many of them they die.
    Perhaps these "injuries" could also heal over a period of seasons or years, dependent on the age op the character.

    This gives the player some choices when a clan member gets downed:
    Keep them in the party and risk them dying.
    Or put them in a town (maybe as governor) for a year or two until their "injury" is healed and they are no longer at risk of dying.

    The AI could also make the same kind of risk assessment.
    Keep injured lords safe until healed, or risk their death and deploy them so their clan/faction is at full strength in the war.

    Anyway this is just an example, but my point is that we do not need to constrain ourselves to just a random % value.
  19. In Progress Number of sacrificed troops incorrectly affected by tactics skill.

    Summary: The number of troops sacrificed when trying to escape from battle increases with high tactics skill instead of decreasing. For example a sacrifice of 36 troops at 0 tactics would become 84 troops at 300 tactics. Also the number of troops sacrificed when breaking into or out of a siege...
  20. Character movement speed and encumbrance.

    I decided to peek into the code to see how movement speed is calculated and what i found was... rather annoying, but i will spare you my rambling about that.
    So i made a personal mod to change the formula into effectively this: Base speed * (1 + (Athletics * (0.5 / 300))) / (1 + (Encumbrance / 120)).

    The result of this was that most troops have roughly the same speed since the heavy equipment of high tier troops would cancel out their athletics bonus.
    Only when combining high athletics and low encumbrance would the player be fast enough to catch up to fleeing looters for example, but still not as fast as pre 1.5.10.
    Only issue i encountered was that certain units had too little athletics relative to their encumbrance. But that can be fixed by tweaking the weight of equipment and athletics value of those units.

    Would you kindly open SandboxAgentStatCalculateModel.cs and turn this:
    Code:
    float maxValue = (float) (0.7 * (1.0 + 3.0 * (double) DefaultSkillEffects.AthleticsSpeedFactor.PrimaryBonus));
    float num4 = MBMath.ClampFloat((float)(0.7 + ((double)maxValue - 0.7) / 300.0 * (double)effectiveSkill1) - Math.Max((float)(0.2 * (1.0 - (double)DefaultSkillEffects.AthleticsWeightFactor.GetPrimaryValue(effectiveSkill1) * 0.01)), 0.0f) * num1 / (float)weight, 0.0f, maxValue);
    Into this:
    Code:
    float maxValue = (float) (0.7 * (1.0 + 5.0 * (double) DefaultSkillEffects.AthleticsSpeedFactor.PrimaryBonus));
    float num4 = MBMath.ClampFloat((float)(0.7 + ((double)maxValue - 0.7) / 300.0 * (double)effectiveSkill1) / (1 + (num1 / 120)), 0.0f, maxValue);
    Pretty please 🥺
Top Bottom