Warband Script Enhancer 2 (v1.1.2.7)

Users who are viewing this thread

hi k700. I want to use xbox 360 controller, and original warband supports it without doing anything, but the controller wont respond with wse 2. if you can bring that back or make controller support even better would be good.
 
Going back to the lag spike issues again lol, one thing I am wondering about is how come in the A Clash of Kings mod, siege battles run perfectly smoothly, with no lag issues. I could have like 500 characters and it runs totally fine. In field battles however, there are lag spikes, micro freezes, etc. Would that still be a morale script issue? Could it have something to do with the battle AI? For instance, if I play WFAS with WSE2, I can run big battles smoothly even with over 600 characters, but there is a mod called English Civil War which adds a ton of new features, including a new battle AI and THAT particular mod runs much slower, with lag spikes and micro freezes when using WSE2. Could it be AI related? and if so, is there a way to turn it off or something?
 
WSE2 enabled notification for remove_troops_from_prisoners operation. It is not in the warband, which is probably a bug.
16th Century mod relies on this bugged behavior of this operation, executing it in any battle simulation without making any checks to see if the player is participating in this battle.
I know this is a very late follow-up, but I checked 16th's source code and remove_troops_from_prisoners isn't really called outside of some conversation dialogues for trading prisoners. Also given the insane rate of the notification spam I don't think they are triggered by individual battles specifically. However, what I do observe is that when you begin a game in the first few in-game hours there is no spam, and then it suddenly starts to, and the behavior itself is almost like running an infinite loop.

Is it possible that something else is causing the spam?
 

the text and graphics looks fine in original warband and turning up the fxaa fixes the text issue but other textures and some parts of map looks blurry just like that helmet. pls help.
The mod is prophesy of pendor.

~Nevermind. i didn't know you have to create specific shortcut for the module and now everything is fine.~
 
Last edited:
Could you please add the comparison between the original formulas and the ones these options use:
- bAdjustedAttackHoldFactor
- bAdjustedCrushthrough
- bAdjustedTwoHandedAndPolearmPenalties
- bAdjustedShieldSkillDamage
- bAdjustedStagger
- bAdjustedKnockdown
- bParry
Also could you please add the code for chamber success calculation? I have been testing it for bots and it seems to work in most cases but I feel like I'm still missing something important
 
Last edited:
how long excatly? because i would not play again until i can use controller. And thanks man you are great, if it wasn't for wse 2 i could not have played warband year ago without this much performance.
You can just use steam input to play with a controller. Works fine for me.
 
hi k700. I want to use xbox 360 controller, and original warband supports it without doing anything, but the controller wont respond with wse 2. if you can bring that back or make controller support even better would be good.
If you are playing through Steam you could try Steam Input to set up or import controller configurations. It works with the Steam Deck not sure if it works outside of it with other controllers. Can't wait for WSE2 to officially support controllers but patience.
 
Before I start writing, please understand that I used a translator because I am not good at English.
I'm a user who was playing warsword conquest with WSE2.
But the game hasn't been running since yesterday.
I can operate the launcher, but the 'play M&B Warband WSE2' button does not work.
Other functions, such as options, exit, and module selection, all work well.
Neither the DLC nor any other modules, including native, will run.
I reinstalled the game after deleting it and installed wse2 but it still doesn't work.
I experienced the same issue and couldn't solve it when I was doing the previous version of 1.1.1.9, but it was solved when I upgraded to version 1.1.2.0, but the same problem occurred again and I'm asking for help.
 
Before I start writing, please understand that I used a translator because I am not good at English.
I'm a user who was playing warsword conquest with WSE2.
But the game hasn't been running since yesterday.
I can operate the launcher, but the 'play M&B Warband WSE2' button does not work.
Other functions, such as options, exit, and module selection, all work well.
Neither the DLC nor any other modules, including native, will run.
I reinstalled the game after deleting it and installed wse2 but it still doesn't work.
I experienced the same issue and couldn't solve it when I was doing the previous version of 1.1.1.9, but it was solved when I upgraded to version 1.1.2.0, but the same problem occurred again and I'm asking for help.
Try adding wse2 to your antivirus exceptions
 
Could you please add the comparison between the original formulas and the ones these options use:
- bAdjustedAttackHoldFactor
- bAdjustedCrushthrough
- bAdjustedTwoHandedAndPolearmPenalties
- bAdjustedShieldSkillDamage
- bAdjustedStagger
- bAdjustedKnockdown
- bParry
Also could you please add the code for chamber success calculation? I have been testing it for bots and it seems to work in most cases but I feel like I'm still missing something important
Code:
chamber

if (defendPhase < 0)
{
    if (dstAttackPhase != ap_ready)
        return 0;

    float progress = dstAgent->m_actionChannels[1].m_progress;

    if (srcAttackType == at_overswing)
    {
        if (dstAttackType != at_overswing)
            return 0;
    }
    else if (srcAttackType == at_swing_left)
    {
        if (dstAttackType != at_swing_right)
            return 0;
    }
    else if (srcAttackType == at_swing_right)
    {
        if (dstAttackType != at_swing_left)
            return 0;
    }
    else
    {
        if (dstAttackType == at_overswing)
        {
            if (hasUpperStab)
                return 0;
        }
        else if (dstAttackType != at_thrust)
        {
            return 0;
        }
    }

    if (rglBetween(progress, 0.3f, 0.7f) && (rglConfig::Battle::bCouchedLanceChambered || !srcAgent->isCouching()))
        return mct_chambered;

    return 0;
}

bAdjustedAttackHoldFactor

float mbAttack::getHoldFactor()
{
    float factor;

    if (rglConfig::Battle::bAdjustedAttackHoldFactor)
    {
        if (m_holdTime < 0.5f)
            factor = m_holdTime + 1.0f;
        else if (m_holdTime < 0.6f)
            factor = 1.5f;
        else if (m_holdTime < 1.1f)
            factor = 1.2f + (1.1f - m_holdTime) * 0.6f;
        else
            factor = 1.2f - (m_holdTime - 1.1f) * 0.3f;

        return rglClamp(factor, 0.5f, 1.5f);
    }
    else
    {
        if (m_holdTime < 0.5f)
            factor = m_holdTime + 1.0f;
        else if (m_holdTime < 0.6f)
            factor = 1.5f;
        else if (m_holdTime < 1.1f)
            factor = 1.2f + (1.1f - m_holdTime) * 0.6f;
        else
            factor = 1.2f;

        return rglClamp(factor, 1.0f, 2.0f);
    }
}

bAdjustedCrushthrough

bool mbMission::checkCrushthrough(int agentNo, mbBlow &blow, mbAttack &attack)
{
    float crushFactor = blow.m_damageType != dt_cut ? 3.0f : 2.0f;
    float defendFactor = 1.0f;

    mbAgent *defendAgent = getAgent(agentNo);
    mbItem defendItem = defendAgent->getWieldedItem(ah_secondary);

    if (!defendItem.isValid() || defendItem.isNotShield())
        defendItem = defendAgent->getWieldedItem(ah_primary);

    if (rglConfig::Battle::bAdjustedCrushthrough)
    {
        crushFactor *= (blow.m_rawDamage + 40.0f) / 40.0f * 0.4f;

        if (blow.m_item.isValid())
        {
            mbItemKind *itemKind = blow.m_item.getItemKind();

            if (!(itemKind->m_properties & itp_crush_through))
                return false;

            if (itemKind->m_properties & itp_two_handed)
                crushFactor *= 1.5f;

            crushFactor *= (itemKind->m_weight + 10.0f) / 10.0f;
        }

        crushFactor *= rglPow(attack.getHoldFactor(), 1.5f);

        if (defendItem.isValid())
        {
            mbItemKind *defendItemKind = defendItem.getItemKind();

            if (defendItemKind->isShield())
            {
                defendFactor = 1.0f + defendItemKind->m_weight * 0.4f;
            }
            else
            {
                defendFactor = 3.0f + defendItemKind->m_weight * 0.5f;

                if (defendItemKind->m_properties & itp_two_handed)
                    defendFactor *= 1.2f;
            }
        }
    }
    else
    {
        crushFactor *= blow.m_rawDamage * 0.02f;

        if (blow.m_item.isValid())
        {
            mbItemKind *itemKind = blow.m_item.getItemKind();

            if (itemKind->getType() == itp_type_two_handed || itemKind->getType() == itp_type_polearm)
                crushFactor *= 2.0f;

            if (!(itemKind->m_properties & itp_crush_through))
                crushFactor = 0.0f;

            crushFactor *= (itemKind->m_weight + 4.0f) / 5.0f;
        }

        if (attack.m_power > 1.25f)
            crushFactor *= 1.3f;

        if (attack.m_type == at_thrust)
            crushFactor *= 0.5f;

        if (defendItem.isValid())
        {
            mbItemKind *defendItemKind = defendItem.getItemKind();

            defendFactor = defendItemKind->m_weight * 0.2f + 5.0f;

            if (defendItemKind->getType() == itp_type_two_handed || defendItemKind->getType() == itp_type_polearm)
                defendFactor *= 1.2f;
        }
    }

    return rglConfig::Battle::fCrushthroughThreshold < crushFactor / defendFactor;
}

bAdjustedTwoHandedAndPolearmPenalties

if (type == itp_type_two_handed || type == itp_type_polearm)
{
    if (rglConfig::Battle::bAdjustedTwoHandedAndPolearmPenalties)
    {
        if (srcAgent->hasMount())
        {
            if (type == itp_type_polearm)
                damage *= 0.75f;

            if (itemKind->m_properties & itp_two_handed)
                damage *= 0.8f;
        }
        else if (shieldItem.isValid())
        {
            damage *= 0.9f;
        }
    }
    else
    {
        if (shieldItem.isValid() || srcAgent->hasMount())
        {
            damage *= 0.85f;

            if (type == itp_type_polearm)
                damage *= 0.85f;

            if (itemKind->m_properties & itp_two_handed)
                damage *= 0.9f;
        }
    }
}
bAdjustedShieldSkillDamage

damage = (rglConfig::Battle::bAdjustedShieldSkillDamage) ? rglRound(damage * (1.0f - (0.1f + g_game->getTroopSkill(m_troopNo, skl_shield, true) * 0.06f))) : (int)(damage * (1.0f - g_game->getTroopSkill(m_troopNo, skl_shield, true) * 0.08f));

bAdjustedStagger and bAdjustedKnockdown 

if (itemKind && (itemKind->isRangedWeapon() || itemKind->getType() == itp_type_polearm && !(itemKind->m_properties & itp_can_knock_down)) || m_blow.hasFlags(blf_stagger))
{
                if (!noInterrupt)
                {
                    if (rglConfig::Battle::bAdjustedStagger)
                    {
                        if (m_blow.hasFlags(blf_stagger) ||
                            itemKind->getType() == itp_type_polearm && rglRandf() < 0.5f && m_blow.m_rawDamage > 15.0f && rglConfig::Battle::bPolearmStagger || //FEATURE: use a flag
                            itemKind->getType() == itp_type_thrown && rglRandf() < (0.4f + staggerAdd) && inflictedDamage > (25.0f + staggerChanceAdd) ||
                            itemKind->getType() == itp_type_bow && rglRandf() < (0.3f + staggerAdd) && inflictedDamage > (20.0f + staggerChanceAdd) ||
                            itemKind->getType() == itp_type_crossbow && rglRandf() < (0.3f + staggerAdd) && inflictedDamage > (20.0f + staggerChanceAdd))
                        {
                            lowerActionNo = getStrikeAction(2);
                            knockBack = true;
                            knockBackForce = m_blow.m_direction * rglRandf(2.1f, 2.3f);
                        }
                        else
                        {
                            upperActionNo = getStrikeAction(1);
                        }
                    }
                    else
                    {
                        if (m_blow.hasFlags(blf_stagger) ||
                            itemKind->getType() == itp_type_polearm && rglRandf() < 0.5f && m_blow.m_rawDamage > 15.0f && rglConfig::Battle::bPolearmStagger || //FEATURE: use a flag
                            itemKind->getType() == itp_type_thrown && rglRandf() < 0.4f && m_blow.m_rawDamage > 15.0f ||
                            itemKind->getType() == itp_type_bow && rglRandf() < 0.3f && m_blow.m_rawDamage > 25.0f ||
                            itemKind->getType() == itp_type_crossbow && rglRandf() < 0.3f && m_blow.m_rawDamage > 25.0f)
                        {
                            lowerActionNo = getStrikeAction(2);
                            knockBack = true;
                            knockBackForce = m_blow.m_direction * rglRandf(2.1f, 2.3f);
                        }
                        else
                        {
                            lowerActionNo = getStrikeAction(1);
                        }
                    }
                }
}
else if (rglConfig::Battle::bAdjustedKnockdown && (m_blow.hasFlags(blf_horse_charge) && m_blow.m_rawDamage > 10.0f ||
                (rglClamp((itemKind ? itemKind->m_weight : 1.0f) * 0.33f, 1.0f, 2.0f) * rglClamp((m_blow.m_rawDamage - 40.0f) * kdRawDamageMult, itemKind ? 5.0f : 2.5f, 15.0f) * 0.015f > (rglRandf() + kdRandAdd)) && m_blow.m_damageType == dt_blunt) &&
                !m_blow.hasFlags(blf_crushthrough) && !m_blow.hasFlags(blf_no_knockdown) && (!itemKind || itemKind->m_properties & itp_can_knock_down) && m_actionChannels[0].m_actionNo != anim_strike_fall_back_rise)
{
                lowerActionNo = anim_strike_fall_back_rise;
                upperActionNo = anim_strike_fall_back_rise_upper;
                knockBack = true;
                knockBackForce = m_movementDir * -0.6f;

                if (m_blow.hasFlags(blf_horse_charge))
                    knockBackForce += m_blow.m_direction * rglRandf(1.5f, 1.9f);
}
else if (!rglConfig::Battle::bAdjustedKnockdown && (m_blow.hasFlags(blf_horse_charge) && m_blow.m_rawDamage > 10.0f || 
                (rglMin((itemKind ? itemKind->m_weight : 1.0f) * 0.33f, 2.0f) * rglMin((m_blow.m_rawDamage - 20.0f) * 0.5f, 10.0f) * 0.015f > rglRandf()) && m_blow.m_damageType == dt_blunt) &&
                !m_blow.hasFlags(blf_crushthrough) && (!itemKind || itemKind->m_properties & itp_can_knock_down) && m_actionChannels[0].m_actionNo != anim_strike_fall_back_rise)
{
                lowerActionNo = anim_strike_fall_back_rise;
                upperActionNo = anim_strike_fall_back_rise_upper;
                knockBack = true;
                knockBackForce = m_movementDir * -0.6f;

                if (m_blow.hasFlags(blf_horse_charge))
                    knockBackForce += m_blow.m_direction * rglRandf(1.5f, 1.9f);
}
else
{
                upperActionNo = getStrikeAction(1);

                if (m_blow.hasFlags(blf_horse_charge) || m_blow.m_rawDamage > 15.0f && rglRandf() < 0.3f)
                {
                    knockBack = true;
                    knockBackForce = m_blow.m_direction * rglRandf(0.6f, 1.6f) * (m_blow.m_rawDamage + 30.0f) * 0.02f + m_scaledTransform.s * rglRandf(-0.5f, 0.5f) * 0.5f;
                }
}

bParry 

else if (rglConfig::Battle::bParry && wasDefending && m_defendTimer.getElapsedTime() < 0.15f && m_parryTimer.getElapsedTime() > 1.0f)
{
    m_parryTimer.reset();
    m_isParry = true;
}

m_defendAction = m_isParry ? da_parrying : da_blocking;
 
Hi there, I remember that in old version (I Don't remember but like 3-5 months ago) I can edit the weapons proficiency and it doesn't change when i hit enemy but now it's return to 1,000 cap again. i wonder if there are any setting rgl_config i can change like the attribute one ? Thanks a lot !

(P.S The proficiency cap working for all the module btw)
 
Back
Top Bottom