Warband Script Enhancer 2 (v1.1.2.5)

Users who are viewing this thread

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)
 
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)
Proficiency can't be set above 1000
 
Speaking of weapon proficiency, which Warband's hardcoded limits does WSE2 remove or what are the new caps? I'm talking about level, attributes, skills, weapon proficiency, max number of items in the inventory and such
 
 
Is there any way to make cheat trainers for Warband to work for WSE2? Or do any newer trainers exist specifically for WSE2?
 
Just try WSE 2 with prophesy of pendor, very unstable in 200+ battle, crash instantly when horse archer AI on with lots of ( you guess it) horse achers.
any idea how to fix it??
 
It's not a crash. From the logs it looks like you just closed your game. Are these really crash logs?
maybe it bc at my first time screen go black, kinda freeze,... I just close it asap.
2nd time I wait until the battle begin, all the unit body texture fail to load, turn black so I quit it right away.
both time it just enter battle but if I keep playing it will crash/freeze like a few time before. and the fps stay at 40/50.
but the same battle without WSE 2 play just fine in vanila with fps stable at limit 70.
do I need to actual crash it for you?? pls let me know.
sorry about how I wrote before.
 
Hi guys, i wanted to play Warband again after a long pause but i can't manage to open my game.
Even when not using WSE2 it launch the intro video and after that the game shutdown....
It crashes no matter which mod i use.
I was looking for a fix as i saw your thread, the tool seems really cool and i wanted to try it, especially with that log function maybe someone will stubble upon this post and enlighten me, it's 6 am and i can't think of anything else to make it work..
Log file
Edit : i finally fixed my problem, after a clean install of my amd drivers i tried as a last ressort to just download the game directly from https://www.taleworlds.com/en/Games/Warband and now it works somehow.
I feel really stupid not trying this first, anyway i can enjoy the WSE2 now :xf-smile:
 
Last edited:
Back
Top Bottom