Warband Script Enhancer 2 (v1.1.2.6)

Users who are viewing this thread

I checked that profiency is calculated correctly. The fact is that the vanilla warband does not display information about the profiency if the player troop not equal to trp_player. WSE2 is more flexible and checks g_game->m_playerTroopNo instead hardcoded trp_player.
 
Hello,

Do you think it's possible for next WSE 2 patch to have brainybots inside ? so if we press F5 we have the brainy bots tools and can change difficulty of bots.

thx for all the good work ! keep going. You are making Full Invasion Osiris amazing since our server Gondolin are working with WSE 2 patch, no more lagging in late wave
 
Mission debug window
Enable edit mode and use CTRL + R in mission. Click ai agent with right mouse button to check debug info. Click P for pause/unpause.
Everytime I remember this feature I want to ask, is it possible for this to be added as a hard coded presentation? I would love to be able to hook into it and use it to inspect specific slots or other agent information by adding overlays.
 
1.1.0.3
-Added set_shuffle_factions_with_maps and get_shuffle_factions_with_maps dedicated server commands.
-Added wse_mission_debug_window mapped presentation.


Thanks to Anoki for sponsoring development a dedicated server commands.
 
Is it possible to implement a dynamic AI navigation mesh function similar to the NavMeshObstacle component of Unity? This could facilitate AI pathfinding for handling dynamic game scenes props, such as castle gates, drawbridges, siege ladders, castle wall destruction, etc.
 
Last edited:
Thanks for the info on party speed! Could you please explain how set_party_creation_random_limits interacts with party templates? I don't quite get what the formula is or what the real limits are
Code:
    case set_party_creation_random_limits:
        {
            int minPartyCreationRandomValue = rglClampInclusive(intValues[0], 0, 101);
            int maxPartyCreationRandomValue = rglClampInclusive(intValues[1], 0, 101);
            
            if (minPartyCreationRandomValue <= maxPartyCreationRandomValue)
            {
                g_game->m_minPartyCreationRandomValue = minPartyCreationRandomValue;
                g_game->m_maxPartyCreationRandomValue = maxPartyCreationRandomValue;
            }
        }

int mbGame::getScaledNumTroopsForStackTemplate(int partyTemplateNo, int stackNo)
{
    mbPartyStackTemplate *partyStackTemplate = &g_partyTemplates[partyTemplateNo].m_stacks[stackNo];
    
    return partyStackTemplate->m_min + rglRound((partyStackTemplate->m_max - partyStackTemplate->m_min) * rglRandf((float)m_minPartyCreationRandomValue, (float)m_maxPartyCreationRandomValue) * 0.01f);    
}

void mbGame::addTemplateToParty(int partyNo, int partyTemplateNo, bool reversePrisoners)
{
    mbPartyTemplate *partyTemplate = &g_partyTemplates[partyTemplateNo];
    mbParty *party = getParty(partyNo);

    for (int i = 0; i < MB_MAX_NUM_PARTY_TEMPLATE_STACKS; ++i)
    {
        mbPartyStackTemplate *partyStackTemplate = &partyTemplate->m_stacks[i];

        if (partyStackTemplate->m_troopNo >= 0)
        {
            int numTroops = getScaledNumTroopsForStackTemplate(partyTemplateNo, i);

            if (numTroops > 0)
            {
                unsigned int flags;

                if (partyStackTemplate->m_flags & pmf_is_prisoner)
                    flags = reversePrisoners ? 0 : pmf_is_prisoner;
                else
                    flags = reversePrisoners ? pmf_is_prisoner : 0;

                party->addTroops(partyStackTemplate->m_troopNo, numTroops, flags, 0, false);
            }
        }
    }
}
 
Is it possible to implement a dynamic AI navigation mesh function similar to the NavMeshObstacle component of Unity? This could facilitate AI pathfinding for handling dynamic game scenes props, such as castle gates, suspension bridges, siege ladders, city wall destruction, etc.
You can use ai_mesh_face_group_show_hide for enable and disable ai mesh when destroying or rebuilding a wall, for example.
Also possible implement operation for moving ai mesh, check Carribean module system
ai_mesh_face_group_translate = 2550 # (ai_mesh_face_group_translate, <group_no>, <position>), #translates the group by distance given in position.
 
Aha, so basically, every component in a template gets its minimum subtracted from the maximum and then a random percentage within the range of set_party_creation_random_limits is chosen and added to the minimum in the template, right?
 
Last edited:
You can use ai_mesh_face_group_show_hide for enable and disable ai mesh when destroying or rebuilding a wall, for example.
Also possible implement operation for moving ai mesh, check Carribean module system
ai_mesh_face_group_translate = 2550 # (ai_mesh_face_group_translate, <group_no>, <position>), #translates the group by distance given in position.
Thanks, I will look into their usage.
 
Back
Top Bottom