Warband Script Enhancer 2 (v1.0.4.6)

Currently viewing this thread:

K700

Knight at Arms
WB
1.0.4.2
-Fixed reloading bug.
-Fixed agent_equip_item, face_keys operations.
-Added undocumented store_main_party_wounded, str_store_agent_face_keys Warband's operations.


Also wse2 now inlcude pdb files for simplify debug.
 

K700

Knight at Arms
WB
Put pdb files together with exes. When the game crashes, names of procedures will be displayed in call stack.
 

Vetrogor

Sergeant at Arms
Where can I download the pdb files? I have checked WSE2, WSE sdk - nothing. Do I need to search google a what?
 

K700

Knight at Arms
WB
Code:
float mbAgent::getMissileSpeed()
{
    float missileSpeed = 10.0f;
    float speedFactor = 1.0f;
    mbItem item = getWieldedItem(ah_primary);

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

        missileSpeed = (float)itemKind->getMissileSpeed();

        if (itemKind->getType() == itp_type_bow)
        {
            speedFactor = rglMin(g_game->getTroopSkill(m_troopNo, skl_power_draw, true), item.getDifficulty() + 4) * 0.12f + 1.0f;

            if (m_horseAgentNo != -1)
                speedFactor *= g_game->getTroopSkill(m_troopNo, skl_horse_archery, true) * 0.019f + 0.8f;

            if (g_mission->m_weather.m_precipitationType == wpr_rain)
                speedFactor *= 0.9f;
        }
        else if (itemKind->getType() == itp_type_crossbow)
        {
            if (g_mission->m_weather.m_precipitationType == wpr_rain)
                speedFactor *= 0.75f;
        }
        else if (itemKind->getType() == itp_type_thrown)
        {
            speedFactor = g_game->getTroopSkill(m_troopNo, skl_power_throw, true) * 0.1f + 1.0f;

            if (m_horseAgentNo != -1)
                speedFactor *= g_game->getTroopSkill(m_troopNo, skl_horse_archery, true) * 0.019f + 0.8f;
        }
    }
    
    return rglSqrt(speedFactor) * missileSpeed * 1.2f;
}
 

Vetrogor

Sergeant at Arms
If I am not misstaken, none of both skills give a missile speed bonus, they give merely a damage bonus.
The physic is bad. When you shoot on the horse while moving forward horse's speed added to missile speed. But when you shoot to the sides the missile will not change it's course. The only delay is caused by animation of releasing bow. I mean original engine. In WSE the physic is changed. I haven't explored it a lot. Example of changes when you run forward and throw a javeline at the standing horse you will get speed_damage_multiplier bonus but in the vanilla you will not.
 

Eärendil Ardamírë

Subforum Moderator
WBWF&SM&B
The physic is bad. When you shoot on the horse while moving forward horse's speed added to missile speed. But when you shoot to the sides the missile will not change it's course. The only delay is caused by animation of releasing bow. I mean original engine. In WSE the physic is changed. I haven't explored it a lot. Example of changes when you run forward and throw a javeline at the standing horse you will get speed_damage_multiplier bonus but in the vanilla you will not.
Thanks for the explanation, I was not aware that it differs so much between WSE and Native. I assume then that the formula above is not the same for Native, @K700 ?
 

K700

Knight at Arms
WB
1.0.4.3
-Added some Carribean operations - set_random_seed, store_application_time, is_party_skill, agent_get_horse_rotation_velocity, agent_get_current_vertical_speed, agent_set_current_vertical_speed, agent_get_position_in_group, agent_get_current_ai_mesh_face_group, prop_instance_remove_particle_system, prop_instance_remove_light, prop_instance_get_sound_progress, cur_item_mesh_set_color, cur_item_add_mesh_with_material, party_switch_stacks, party_stack_upgrade, position_get_length, get_dot_product_of_positions, get_cross_product_of_positions, str_store_skill_desc, overlay_button_set_type, overlay_get_scroll_pos, overlay_set_scroll_pos.
-Extended add_point_light and add_point_light_to_entity operations - range parameter.
-Operations that are performed in lua now get context (trigger).
-Fixed particle_system_remove and cur_item_add_mesh operations.


Thanks to the development sponsor who wished to remain anonymous.
 

Vetrogor

Sergeant at Arms
Can you tell how calculates the missile trajectory with G value (acceleration of gravity). I need to launch missile and find an angle. I have done some calculations but they are not precise.

Updated. I have found a bug in my calculations. So physic works fine.
 
Last edited:
Top Bottom