Search results for query: *

  1. Avareee

    SP Native Medieval Bannerlord 48 Unique Companions Mod

    ..."Interesting Companions" works with e1.3.0< version too...?

    ciauz^^,
    Jab

    I have never tried, as I have initially created this on 1.3.1. But it should :smile:

    Here I actually had some fun doing some Banners, maybe you can use them for additional clans!



    It is not possible for me to use these images as banners I am afraid, the banners are made on a website, which then are used with their codes to show up ingame.
    Here:
  2. Avareee

    Resolved Wanderer skills and levels are set to "0" in 1.4.3

    Forwarding this issue to the QA team for further investigation. Thanks for reporting.
    I found something "new", I don't know if it is an issue related to the core game and not a mod even though I don't use a mod related to that bug. But the bodyproperities seem to get 'reset' to "skinny" too(of Wanderers only). Even if they are just set to the default 0.5 weight/build.

    And thanks for the quick response! :smile:
  3. Avareee

    Resolved Wanderer skills and levels are set to "0" in 1.4.3

    Hi, Some others and me have encountered an issue, and don't know whether it was a wanted change or was done unintentionally. So I run a selfmade mod of 48 Wanderers with backstories and such, and it worked just fine till 1.4.3. On that gameversion the skills I have set for the wanderers are...
  4. Avareee

    SP Native Medieval Bannerlord 48 Unique Companions Mod

    ...On what BL version it run...?

    ciauz^^,
    Jab
    1.3.0 upwards
    How can I recognize these companions? I've been playing for a while and I cant find none
    From their second names or titles. :smile:
    There are screenshots from which you can compare.
  5. Avareee

    SP Native Medieval Bannerlord 48 Unique Companions Mod

    I made a Companion mod consisting of 44 Companions with unique backstories and faces. It was almost a month ago now that I have released it. But I wanted to present it here aswell, for the people who might have missed it! :smile: Link to my mod...
  6. Avareee

    Show off your Bannerlord faces!

    Faces I made, that I wanted to share:


    ObHR9o7.jpg

    z2A4Gom.jpg

    EiUysuf.jpg

    Rc0JAon.jpg

    xnEDWEy.jpg
  7. Avareee

    Modding Q&A [For Quick Questions and Answers]

    kalarhan said:
    coderjosh said:
     
    Code:
       (agent_get_position, pos1, ":player_agent"),
       (agent_get_position, pos1, ":enemy_trp"),
       (get_distance_between_positions_in_meters, ":distance_trp", ":player_agent", ":enemy_trp"),

    there are a few issues with your code, so you will need to check the tutorials and, in special, read the header_operations.py description on each operation (get Lav's version).

    for example the above. Why would you try to save two different coordinates on the same variable? The second would just remove the first. And look at how you are trying to find distance, as you are passing the wrong parameters for the operation.

    https://forums.taleworlds.com/index.php/topic,142422.0.html
    https://forums.taleworlds.com/index.php/topic,56798.0.html -> get the PDF
    https://forums.taleworlds.com/index.php/board,12.0.html

    http://forums.taleworlds.com/index.php/topic,324874.0.html -> Lav's


    Avareee said:
    And everything works fine, but I want to limit the script to just Heroes/Lords.
    I want to assign that script to arrows or bows. Anyone knows how to do that?

    Heroes/Lords.
    1 TROOP : Many AGENTS
    1 AGENT : 1 TROOP

    you have operations to get the ID between them, like "agent_get_troop_id". Then you use other operations to check if that troop belong to the list you want, or is of a type (hero), etc.

    like in
    Code:
    (is_between, ":variable_here", active_npcs_begin, active_npcs_end), # choose the list start-end for filtering

    get Lav's and check the sections for AGENT and TROOP to see the relevant operations.

    arrows or bows
    similar case. Items have a ID and types. You use that information to filter them and find if they belong to a list.


    Now that I found time to edit the code, I came up with something like this:
      (0.9, 0, 0, [],
    [     
            (set_fixed_point_multiplier, 1000),
            (try_for_agents, ":agent_no"),
            (agent_get_troop_id, ":troop_no", ":agent_no"),
        (this_or_next|is_between, ":troop_no", heroes_begin, heroes_end),
    # (this_or_next|eq, ":troop_no", "trp_khergit_horse_archer"),
    (this_or_next|eq, ":troop_no", "trp_khergit_veteran_horse_archer"),
            (this_or_next|eq, ":troop_no", "trp_khergit_lancer"),
            (this_or_next|eq, ":troop_no", "trp_khergit_heavy_lancer"),
    # (this_or_next|eq, ":troop_no", "trp_rebellious_khergit_horse_archer"),
    (this_or_next|eq, ":troop_no", "trp_rebellious_khergit_veteran_horse_archer"),
            (this_or_next|eq, ":troop_no", "trp_rebellious_khergit_heavy_horse_archer"),
            (this_or_next|eq, ":troop_no", "trp_rebellious_khergit_lancer"),
            (this_or_next|eq, ":troop_no", "trp_rebellious_khergit_heavy_lancer"),
            (this_or_next|eq, ":troop_no", "trp_barbarian_hardened_horse_archer"),
            (this_or_next|eq, ":troop_no", "trp_barbarian_khan"),
            (eq, ":troop_no", "trp_khergit_heavy_horse_archer"),
              # (agent_is_alive, ":agent_no"),
              # (agent_is_human, ":agent_no"),
              # (agent_is_non_player, ":agent_no"),
              # (neg|agent_slot_eq, ":agent_no", 1003, 1),
                (agent_get_horse, ":horse_no", ":agent_no"),
                (assign, ":melee_weapon", -1),
                (try_begin),
                    (agent_slot_eq, ":agent_no", slot_agent_is_running_away, 0),
                    (gt, ":horse_no", -1),
                    (agent_get_team, ":team_no", ":agent_no"),
                    (agent_get_division, ":class_no", ":agent_no"),
                    (team_get_weapon_usage_order, ":weapon_usage_order", ":team_no", ":class_no"),
                    (team_get_movement_order, ":movement_order", ":team_no", ":class_no"),
                    (team_get_hold_fire_order, ":hold_fire", ":team_no", ":class_no"),
                    (assign, ":thrown_ammo", 0),
                    (assign, ":ranged_weapon", -1),
                    (try_for_range, ":item", 0, 4),
                      (agent_get_item_slot, ":item_weapon", ":agent_no", ":item"),
                      (gt, ":item_weapon", 0),
                      (item_get_type, ":item_weapon_type", ":item_weapon"),
                      (try_begin),
                        (eq, ":item_weapon_type", itp_type_thrown),
                        (agent_get_ammo_for_slot, ":ammo_for_slot", ":agent_no", ":item"),
                        (val_add, ":thrown_ammo", ":ammo_for_slot"),
                      (else_try),
                      (this_or_next|eq, ":item_weapon_type", itp_type_musket),
                      (this_or_next|eq, ":item_weapon_type", itp_type_pistol),
                        (this_or_next|eq, ":item_weapon_type", itp_type_crossbow),  
                        (eq, ":item_weapon_type", itp_type_bow),
                        (assign, ":ranged_weapon", ":item_weapon"),
                      (else_try),
                        (this_or_next|eq, ":item_weapon_type", itp_type_one_handed_wpn),
                        (this_or_next|eq, ":item_weapon_type", itp_type_two_handed_wpn),
                        (eq, ":item_weapon_type", itp_type_polearm),
                        (assign, ":melee_weapon", ":item_weapon"),
                      (try_end),
                    (try_end),
                    (gt, ":ranged_weapon", -1),           
                    (neg|item_has_property, ":ranged_weapon", itp_cant_reload_on_horseback),
                    (neg|item_has_property, ":ranged_weapon", itp_cant_use_on_horseback),
                    (agent_get_ammo, ":ammo", ":agent_no", 0),
                    (val_sub, ":ammo", ":thrown_ammo"),
                    (gt, ":ammo", 0),
                    (agent_set_slot, ":agent_no", 1003, 2),
                    (neg|eq, ":hold_fire", aordr_hold_your_fire),
                    (neg|eq, ":weapon_usage_order", wordr_use_melee_weapons),
                    (eq, ":movement_order", mordr_charge),
                    (agent_get_position, pos50, ":agent_no"),
                    (agent_get_speed, pos31, ":agent_no"),
                    (position_get_y,":speed_y",pos31),
                    (assign, ":distance_closest", 100000),#1000m
                    (assign, ":enemies_closest", -1),
                    (try_for_agents, ":enemies"),
                        (agent_is_alive, ":enemies"),
                        (agent_is_human, ":enemies"),
                        (agent_get_position, pos36, ":enemies"),
                        (agent_get_team, ":enemies_team", ":enemies"),
                        (teams_are_enemies, ":team_no", ":enemies_team"),
                        (get_distance_between_positions, ":distance", pos50, pos36),
                        (try_begin),
                          (agent_slot_eq, ":enemies", slot_agent_is_running_away, 1),
                          (val_add, ":distance", 10000),
                        (try_end),
                        (try_begin),
                          (agent_get_horse, ":enemies_horse", ":enemies"),
                          (gt, ":enemies_horse", -1),
                          (agent_get_speed, pos32, ":enemies"),
                          (position_get_y,":speed_y_enemies",pos32),
                          (val_sub, ":speed_y_enemies", ":speed_y"),
                          (store_div, ":distance_cavalry", ":speed_y_enemies",5),
                          (val_max, ":distance_cavalry", 0),
                          (val_add, ":distance_cavalry", 500),
                          (val_sub, ":distance", ":distance_cavalry"),
                        (else_try),
                          (agent_get_wielded_item, ":weapon_hold", ":enemies", 1),
                          (neg|gt, ":weapon_hold", 1),
                          (val_sub, ":distance", 500),
                        (try_end),
                        (lt, ":distance", ":distance_closest"),
                        (assign, ":distance_closest", ":distance"),
                        (assign, ":enemies_closest", ":enemies"),
                    (try_end),
                    (neq, ":enemies_closest", -1),
                    (agent_get_position, pos51, ":enemies_closest"),
                    (get_distance_between_positions, ":distance_true", pos50, pos51),
                    (try_begin),
                      (agent_slot_eq, ":enemies_closest", slot_agent_is_running_away, 0),
                      (gt,":distance_true",200),
                      (agent_set_wielded_item, ":agent_no", ":ranged_weapon"),
                    (else_try),
                      (le, ":distance_true", 200),
                      (gt, ":melee_weapon", -1),
                      (agent_set_wielded_item, ":agent_no", ":melee_weapon"),
                    (try_end),
                    (assign, ":speed_limit", 1000),
                    (try_begin),
                        (agent_get_wielded_item, ":weapon_hold", ":agent_no", 0),
                        (gt, ":weapon_hold", 0),
                        (item_get_type, ":weapon_type", ":weapon_hold"),
                        (this_or_next|eq, ":weapon_type", itp_type_musket),
                        (this_or_next|eq, ":weapon_type", itp_type_pistol),
                        (this_or_next|eq, ":weapon_type", itp_type_crossbow),
                        (eq, ":weapon_type", itp_type_bow),
                        (agent_get_bone_position, pos53, ":agent_no", 8, 1),
                        (agent_get_bone_position, pos54, ":enemies_closest", 9, 1),
                        (position_has_line_of_sight_to_position, pos53, pos54),
                        (agent_set_look_target_agent, ":agent_no", ":enemies_closest"),
                        (try_begin),
                          (assign, ":shoot_distance", 4000),
                          (agent_get_attack_action, ":attack_action", ":agent_no"),
                          (eq, ":attack_action", 1),
                          (try_begin),
                            (gt, ":distance_closest", 700),
                            (le, ":distance_closest", ":shoot_distance"),
                            (store_div, ":speed_limit", ":speed_y",2000),#
                            (val_max, ":speed_limit", 0),
                          (try_end),
                          (eq, ":weapon_type", itp_type_bow),
                          (try_begin),
                            (le, ":distance_true", ":shoot_distance"),
                            (agent_set_defend_action, ":agent_no", -2, 1),
                            (agent_set_attack_action, ":agent_no", 3, 0),
                          (else_try),
                            (gt, ":distance_true", ":shoot_distance"),
                            (agent_set_attack_action, ":agent_no", -2, 1),
                            (agent_set_defend_action, ":agent_no", 3, 1),
                          (try_end),
                        (else_try),
                          (eq, ":weapon_type", itp_type_bow),
                          (le, ":distance_true", ":shoot_distance"),#
                          (agent_get_combat_state, ":combat_state", ":agent_no"),
                          (neq, ":combat_state", :cool:,
                          (agent_set_attack_action, ":agent_no", 3, 1),
                        (try_end),
                    (try_end),
                    (agent_set_speed_limit, ":agent_no", ":speed_limit"),
                    (try_begin),
                      (agent_slot_eq, ":enemies_closest", slot_agent_is_running_away, 0),
                      (lt, ":distance_closest", 10000),
                      (try_begin),
                        (get_scene_boundaries, pos2, pos3),
                        (position_transform_position_to_local, pos4, pos2,pos50),
                        (position_get_x, ":left", pos4),
                        (position_get_y, ":down", pos4),
                        (position_transform_position_to_local, pos4, pos2,pos3),
                        (position_get_x, ":map_width", pos4),
                        (position_get_y, ":map_height", pos4),
                        (store_sub, ":right", ":map_width", ":left"),
                        (store_sub, ":up", ":map_height", ":down"),
                        (position_transform_position_to_local, pos4, pos50, pos51),
                        (position_get_x, ":enemies_x", pos4),
                        (position_get_y, ":enemies_y", pos4),
                        (assign, ":effect", 0),
                        (try_begin),
                          (neg|gt, ":distance_closest", 1000),
                          (assign, ":effect", -78000),
                        (else_try),
                          (gt, ":distance_closest", 2000),#
                          (store_sub,":effect", ":distance_closest", 0),
                          (val_mul, ":effect", 5),
                          (val_clamp, ":effect", 35000, 90000),
                        (try_end),
                        (assign, ":distance_to_boundary", 30000),
                        (val_min, ":distance_to_boundary", ":left"),
                        (val_min, ":distance_to_boundary", ":up"),
                        (val_min, ":distance_to_boundary", ":right"),
                        (val_min, ":distance_to_boundary", ":down"),
                        (try_begin),
                          (lt, ":distance_to_boundary", 30000),
                          (agent_slot_eq, ":enemies_closest", slot_agent_is_running_away, 0),
                          (store_div, ":map_middle_x", ":map_width", 20),
                          (store_div, ":map_middle_y", ":map_height", 20),
                          (position_copy_origin, pos4, pos2),
                          (position_move_x, pos4, ":map_middle_x", 1),
                          (position_move_y, pos4, ":map_middle_y", 1),
                          (get_distance_between_positions,":distance_middle", pos4, pos50),
                          (position_transform_position_to_local, pos4, pos50, pos4),
                          (position_get_x, ":map_middle_x", pos4),
                          (position_get_y, ":map_middle_y", pos4),
                          (val_mul, ":map_middle_x", 100),
                          (val_mul, ":map_middle_y", 100),
                          (val_mul, ":enemies_x", 100),
                          (val_mul, ":enemies_y", 100),
                          (store_div,":cos_middle",":map_middle_x",":distance_middle"),
                          (store_div,":sin_middle",":map_middle_y",":distance_middle"),
                          (store_div,":cos_enemies",":enemies_x",":distance_true"),
                          (store_div,":sin_enemies",":enemies_y",":distance_true"),
                          (store_acos, ":angle_cos", ":cos_middle"),
                          (store_asin, ":angle_sin", ":sin_middle"),
                          (store_acos, ":angle_cos_enemies", ":cos_enemies"),
                          (store_asin, ":angle_sin_enemies", ":sin_enemies"),
                          (try_begin),
                            (lt, ":angle_sin", 0),
                            (val_mul,":angle_cos", -1),
                            (val_add,":angle_cos", 360000),
                          (try_end),
                          (try_begin),
                            (lt, ":angle_sin_enemies", 0),
                            (val_mul,":angle_cos_enemies", -1),
                            (val_add,":angle_cos_enemies", 360000),
                          (try_end),
                          (store_sub, ":k2", ":angle_cos", ":angle_cos_enemies"),
                          (val_sub, ":k2", 270000),
                          (val_sub, ":k2", ":effect"),
                          (store_add, ":effect", ":k2", ":effect"),
                          (try_begin),
                            (lt, ":angle_cos", ":angle_cos_enemies"),
                            (val_add, ":effect", 360000),
                          (try_end),
                          (val_clamp,":effect",-210000, 15000),
                          (agent_set_attack_action, ":agent_no", -2, 1),
                          (agent_set_defend_action, ":agent_no", 3, 1),
                        (try_end),
                        (store_cos, ":cos", ":effect"),
                        (store_sin, ":sin", ":effect"),
                        (store_mul, ":k_x1", ":cos", ":enemies_y",),
                        (store_mul, ":k_x2", ":sin", ":enemies_x",),
                        (store_mul, ":k_y1", ":sin", ":enemies_y",),
                        (store_mul, ":k_y2", ":cos", ":enemies_x",),
                        (store_add, ":move_x",":k_x1", ":k_x2"),
                        (store_sub, ":move_y",":k_y1", ":k_y2"),
                        (position_move_x, pos50, ":move_x", 0),
                        (position_move_y, pos50, ":move_y", 0),
                      (try_end),
                      (agent_set_scripted_destination, ":agent_no", pos50, 1),
                    (else_try),
                      (agent_clear_scripted_mode, ":agent_no"),
                      (agent_force_rethink, ":agent_no"),
                    (try_end),
                (else_try),
                    (try_begin),
                      (agent_slot_eq, ":agent_no", 1003, 0),
                      (agent_set_slot, ":agent_no", 1003, 1),
                    (else_try),
                      (agent_slot_eq, ":agent_no", 1003, 2),
                      (this_or_next|agent_slot_eq, ":agent_no", slot_agent_is_running_away, 1),
                      (this_or_next|lt, ":horse_no", 0),
                      (this_or_next|eq, ":ammo", 0),
                      (this_or_next|eq, ":hold_fire", aordr_hold_your_fire),
                      (this_or_next|eq, ":weapon_usage_order", wordr_use_melee_weapons),
                      (neq, ":movement_order", mordr_charge),
                      (agent_clear_scripted_mode, ":agent_no"),
                      (agent_set_speed_limit, ":agent_no", 100),
                      (agent_force_rethink, ":agent_no"),
                      (agent_set_slot, ":agent_no", 1003, 3),
                      (this_or_next|eq, ":hold_fire", aordr_hold_your_fire),
                      (eq, ":ammo", 0),
                      (gt, ":melee_weapon", -1),
                      (agent_set_wielded_item, ":agent_no", ":melee_weapon"),
                    (try_end),
                (try_end),
            (try_end),
    ]),  

    I basically just added the script to heroes and specific units.
    And it seems to work just fine, just a bit stutters in bigger battles.
    Do you have any suggestions to make it better?


    Also now while testing my personal mod I came across a known native bug, the Butterlord(after looting village).
    Do you have an idea how I can fix that?
  8. Avareee

    Modding Q&A [For Quick Questions and Answers]

    I have a question people.

    So I have put this Horse Archer Script into the native game:

    ###JunYue(君悦)###
      0.5, 0, 0, [],
      [     
            (set_fixed_point_multiplier, 1000),
            (try_for_agents, ":agent_no"),
                (agent_is_alive, ":agent_no"),
                (agent_is_human, ":agent_no"),
                (agent_is_non_player, ":agent_no"),
                (neg|agent_slot_eq, ":agent_no", 1003, 1),
                (agent_get_horse, ":horse_no", ":agent_no"),
                (assign, ":melee_weapon", -1),
                (try_begin),
                    (agent_slot_eq, ":agent_no", slot_agent_is_running_away, 0),
                    (gt, ":horse_no", -1),
                    (agent_get_team, ":team_no", ":agent_no"),
                    (agent_get_division, ":class_no", ":agent_no"),
                    (team_get_weapon_usage_order, ":weapon_usage_order", ":team_no", ":class_no"),
                    (team_get_movement_order, ":movement_order", ":team_no", ":class_no"),
                    (team_get_hold_fire_order, ":hold_fire", ":team_no", ":class_no"),
                    (assign, ":thrown_ammo", 0),
                    (assign, ":ranged_weapon", -1),
                    (try_for_range, ":item", 0, 4),
                      (agent_get_item_slot, ":item_weapon", ":agent_no", ":item"),
                      (gt, ":item_weapon", 0),
                      (item_get_type, ":item_weapon_type", ":item_weapon"),
                      (try_begin),
                        (eq, ":item_weapon_type", itp_type_thrown),
                        (agent_get_ammo_for_slot, ":ammo_for_slot", ":agent_no", ":item"),
                        (val_add, ":thrown_ammo", ":ammo_for_slot"),
                      (else_try),
                        (this_or_next|eq, ":item_weapon_type", itp_type_bow),
                        (this_or_next|eq, ":item_weapon_type", itp_type_pistol),
                        (eq, ":item_weapon_type", itp_type_musket),
                        (assign, ":ranged_weapon", ":item_weapon"),
                      (else_try),
                        (this_or_next|eq, ":item_weapon_type", itp_type_one_handed_wpn),
                        (this_or_next|eq, ":item_weapon_type", itp_type_two_handed_wpn),
                        (eq, ":item_weapon_type", itp_type_polearm),
                        (assign, ":melee_weapon", ":item_weapon"),
                      (try_end),
                    (try_end),
                    (gt, ":ranged_weapon", -1),         
                    (neg|item_has_property, ":ranged_weapon", itp_cant_reload_on_horseback),
                    (neg|item_has_property, ":ranged_weapon", itp_cant_use_on_horseback),
                    (agent_get_ammo, ":ammo", ":agent_no", 0),
                    (val_sub, ":ammo", ":thrown_ammo"),
                    (gt, ":ammo", 0),
                    (agent_set_slot, ":agent_no", 1003, 2),
                    (neg|eq, ":hold_fire", aordr_hold_your_fire),
                    (neg|eq, ":weapon_usage_order", wordr_use_melee_weapons),
                    (eq, ":movement_order", mordr_charge),
                    (agent_get_position, pos50, ":agent_no"),
                    (agent_get_speed, pos31, ":agent_no"),
                    (position_get_y,":speed_y",pos31),
                    (assign, ":distance_closest", 100000),#1000m
                    (assign, ":enemies_closest", -1),
                    (try_for_agents, ":enemies"),
                        (agent_is_alive, ":enemies"),
                        (agent_is_human, ":enemies"),
                        (agent_get_position, pos36, ":enemies"),
                        (agent_get_team, ":enemies_team", ":enemies"),
                        (teams_are_enemies, ":team_no", ":enemies_team"),
                        (get_distance_between_positions, ":distance", pos50, pos36),
                        (try_begin),
                          (agent_slot_eq, ":enemies", slot_agent_is_running_away, 1),
                          (val_add, ":distance", 10000),
                        (try_end),
                        (try_begin),
                          (agent_get_horse, ":enemies_horse", ":enemies"),
                          (gt, ":enemies_horse", -1),
                          (agent_get_speed, pos32, ":enemies"),
                          (position_get_y,":speed_y_enemies",pos32),
                          (val_sub, ":speed_y_enemies", ":speed_y"),
                          (store_div, ":distance_cavalry", ":speed_y_enemies",5),
                          (val_max, ":distance_cavalry", 0),
                          (val_add, ":distance_cavalry", 500),
                          (val_sub, ":distance", ":distance_cavalry"),
                        (else_try),
                          (agent_get_wielded_item, ":weapon_hold", ":enemies", 1),
                          (neg|gt, ":weapon_hold", 1),
                          (val_sub, ":distance", 500),
                        (try_end),
                        (lt, ":distance", ":distance_closest"),
                        (assign, ":distance_closest", ":distance"),
                        (assign, ":enemies_closest", ":enemies"),
                    (try_end),
                    (neq, ":enemies_closest", -1),
                    (agent_get_position, pos51, ":enemies_closest"),
                    (get_distance_between_positions, ":distance_true", pos50, pos51),
                    (try_begin),
                      (agent_slot_eq, ":enemies_closest", slot_agent_is_running_away, 0),
                      (gt,":distance_true",200),
                      (agent_set_wielded_item, ":agent_no", ":ranged_weapon"),
                    (else_try),
                      (le, ":distance_true", 200),
                      (gt, ":melee_weapon", -1),
                      (agent_set_wielded_item, ":agent_no", ":melee_weapon"),
                    (try_end),
                    (assign, ":speed_limit", 1000),
                    (try_begin),
                        (agent_get_wielded_item, ":weapon_hold", ":agent_no", 0),
                        (gt, ":weapon_hold", 0),
                        (item_get_type, ":weapon_type", ":weapon_hold"),
                        (this_or_next|eq, ":weapon_type", itp_type_bow),
                        (this_or_next|eq, ":weapon_type", itp_type_pistol),
                        (eq, ":weapon_type", itp_type_musket),
                        (agent_get_bone_position, pos53, ":agent_no", 8, 1),
                        (agent_get_bone_position, pos54, ":enemies_closest", 9, 1),
                        (position_has_line_of_sight_to_position, pos53, pos54),
                        (agent_set_look_target_agent, ":agent_no", ":enemies_closest"),
                        (try_begin),
                          (assign, ":shoot_distance", 4000),
                          (agent_get_attack_action, ":attack_action", ":agent_no"),
                          (eq, ":attack_action", 1),
                          (try_begin),
                            (gt, ":distance_closest", 700),
                            (le, ":distance_closest", ":shoot_distance"),
                            (store_div, ":speed_limit", ":speed_y",2000),#
                            (val_max, ":speed_limit", 0),
                          (try_end),
                          (eq, ":weapon_type", itp_type_bow),
                          (try_begin),
                            (le, ":distance_true", ":shoot_distance"),
                            (agent_set_defend_action, ":agent_no", -2, 1),
                            (agent_set_attack_action, ":agent_no", 3, 0),
                          (else_try),
                            (gt, ":distance_true", ":shoot_distance"),
                            (agent_set_attack_action, ":agent_no", -2, 1),
                            (agent_set_defend_action, ":agent_no", 3, 1),
                          (try_end),
                        (else_try),
                          (eq, ":weapon_type", itp_type_bow),
                          (le, ":distance_true", ":shoot_distance"),#
                          (agent_get_combat_state, ":combat_state", ":agent_no"),
                          (neq, ":combat_state", :cool:,
                          (agent_set_attack_action, ":agent_no", 3, 1),
                        (try_end),
                    (try_end),
                    (agent_set_speed_limit, ":agent_no", ":speed_limit"),
                    (try_begin),
                      (agent_slot_eq, ":enemies_closest", slot_agent_is_running_away, 0),
                      (lt, ":distance_closest", 10000),
                      (try_begin),
                        (get_scene_boundaries, pos2, pos3),
                        (position_transform_position_to_local, pos4, pos2,pos50),
                        (position_get_x, ":left", pos4),
                        (position_get_y, ":down", pos4),
                        (position_transform_position_to_local, pos4, pos2,pos3),
                        (position_get_x, ":map_width", pos4),
                        (position_get_y, ":map_height", pos4),
                        (store_sub, ":right", ":map_width", ":left"),
                        (store_sub, ":up", ":map_height", ":down"),
                        (position_transform_position_to_local, pos4, pos50, pos51),
                        (position_get_x, ":enemies_x", pos4),
                        (position_get_y, ":enemies_y", pos4),
                        (assign, ":effect", 0),
                        (try_begin),
                          (neg|gt, ":distance_closest", 1000),
                          (assign, ":effect", -78000),
                        (else_try),
                          (gt, ":distance_closest", 2000),#
                          (store_sub,":effect", ":distance_closest", 0),
                          (val_mul, ":effect", 5),
                          (val_clamp, ":effect", 35000, 90000),
                        (try_end),
                        (assign, ":distance_to_boundary", 30000),
                        (val_min, ":distance_to_boundary", ":left"),
                        (val_min, ":distance_to_boundary", ":up"),
                        (val_min, ":distance_to_boundary", ":right"),
                        (val_min, ":distance_to_boundary", ":down"),
                        (try_begin),
                          (lt, ":distance_to_boundary", 30000),
                          (agent_slot_eq, ":enemies_closest", slot_agent_is_running_away, 0),
                          (store_div, ":map_middle_x", ":map_width", 20),
                          (store_div, ":map_middle_y", ":map_height", 20),
                          (position_copy_origin, pos4, pos2),
                          (position_move_x, pos4, ":map_middle_x", 1),
                          (position_move_y, pos4, ":map_middle_y", 1),
                          (get_distance_between_positions,":distance_middle", pos4, pos50),
                          (position_transform_position_to_local, pos4, pos50, pos4),
                          (position_get_x, ":map_middle_x", pos4),
                          (position_get_y, ":map_middle_y", pos4),
                          (val_mul, ":map_middle_x", 100),
                          (val_mul, ":map_middle_y", 100),
                          (val_mul, ":enemies_x", 100),
                          (val_mul, ":enemies_y", 100),
                          (store_div,":cos_middle",":map_middle_x",":distance_middle"),
                          (store_div,":sin_middle",":map_middle_y",":distance_middle"),
                          (store_div,":cos_enemies",":enemies_x",":distance_true"),
                          (store_div,":sin_enemies",":enemies_y",":distance_true"),
                          (store_acos, ":angle_cos", ":cos_middle"),
                          (store_asin, ":angle_sin", ":sin_middle"),
                          (store_acos, ":angle_cos_enemies", ":cos_enemies"),
                          (store_asin, ":angle_sin_enemies", ":sin_enemies"),
                          (try_begin),
                            (lt, ":angle_sin", 0),
                            (val_mul,":angle_cos", -1),
                            (val_add,":angle_cos", 360000),
                          (try_end),
                          (try_begin),
                            (lt, ":angle_sin_enemies", 0),
                            (val_mul,":angle_cos_enemies", -1),
                            (val_add,":angle_cos_enemies", 360000),
                          (try_end),
                          (store_sub, ":k2", ":angle_cos", ":angle_cos_enemies"),
                          (val_sub, ":k2", 270000),
                          (val_sub, ":k2", ":effect"),
                          (store_add, ":effect", ":k2", ":effect"),
                          (try_begin),
                            (lt, ":angle_cos", ":angle_cos_enemies"),
                            (val_add, ":effect", 360000),
                          (try_end),
                          (val_clamp,":effect",-210000, 15000),
                          (agent_set_attack_action, ":agent_no", -2, 1),
                          (agent_set_defend_action, ":agent_no", 3, 1),
                        (try_end),
                        (store_cos, ":cos", ":effect"),
                        (store_sin, ":sin", ":effect"),
                        (store_mul, ":k_x1", ":cos", ":enemies_y",),
                        (store_mul, ":k_x2", ":sin", ":enemies_x",),
                        (store_mul, ":k_y1", ":sin", ":enemies_y",),
                        (store_mul, ":k_y2", ":cos", ":enemies_x",),
                        (store_add, ":move_x",":k_x1", ":k_x2"),
                        (store_sub, ":move_y",":k_y1", ":k_y2"),
                        (position_move_x, pos50, ":move_x", 0),
                        (position_move_y, pos50, ":move_y", 0),
                      (try_end),
                      (agent_set_scripted_destination, ":agent_no", pos50, 1),
                    (else_try),
                      (agent_clear_scripted_mode, ":agent_no"),
                      (agent_force_rethink, ":agent_no"),
                    (try_end),
                (else_try),
                    (try_begin),
                      (agent_slot_eq, ":agent_no", 1003, 0),
                      (agent_set_slot, ":agent_no", 1003, 1),
                    (else_try),
                      (agent_slot_eq, ":agent_no", 1003, 2),
                      (this_or_next|agent_slot_eq, ":agent_no", slot_agent_is_running_away, 1),
                      (this_or_next|lt, ":horse_no", 0),
                      (this_or_next|eq, ":ammo", 0),
                      (this_or_next|eq, ":hold_fire", aordr_hold_your_fire),
                      (this_or_next|eq, ":weapon_usage_order", wordr_use_melee_weapons),
                      (neq, ":movement_order", mordr_charge),
                      (agent_clear_scripted_mode, ":agent_no"),
                      (agent_set_speed_limit, ":agent_no", 100),
                      (agent_force_rethink, ":agent_no"),
                      (agent_set_slot, ":agent_no", 1003, 3),
                      (this_or_next|eq, ":hold_fire", aordr_hold_your_fire),
                      (eq, ":ammo", 0),
                      (gt, ":melee_weapon", -1),
                      (agent_set_wielded_item, ":agent_no", ":melee_weapon"),
                    (try_end),
                (try_end),
            (try_end),
      ])

    And everything works fine, but I want to limit the script to just Heroes/Lords.
    I want to assign that script to arrows or bows. Anyone knows how to do that?

  9. Avareee

    SP Musket Era Csatádi's Visual and Historical Mod

    Csatádi said:
    Avareee said:
    Here:
    https://forums.taleworlds.com/index.php?topic=366006.0
    Makes the game much more playable. I can't imagine how it would make Dragoons so much more effective.
    Thanks. This is a cheat for the player and companions. You may export your character and give him/her as high shooting as you wish and import back. Same effect.
    It is not just for companions, it is for every mounted-range unit. The Enemy-AI has it aswell.  It is in the spoiler box, the post just is titled as that, because it is used only for companions and some other "Elite" units in that mod.
    Also you can check a gameplayfootage
    https://www.youtube.com/watch?v=VRpiRkNL3e8
    its not a cheat. I have used that script in Warband.
  10. Avareee

    SP Musket Era Csatádi's Visual and Historical Mod

    Csatádi said:
    Avareee said:
    Is this still being worked on? Because I'd like to ask if you can fix the Horse Archer Ai with the script from Prophesy of Pendor mod. Or you can link me the source privately and I do it for myself.
    If this fix is open source, please give a link.

    Here:
    https://forums.taleworlds.com/index.php?topic=366006.0
    Makes the game much more playable. I can't imagine how it would make Dragoons so much more effective.
  11. Avareee

    Modding Q&A [For Quick Questions and Answers]

    kalarhan said:
    Avareee said:
    EDIT: Today I had this error, anyone knows what can I do against it? It happened when a lord left the faction and took the fiefs with him. But in reality he just left the faction with no fiefs. (says the notes, "no fiefs")
    https://imgur.com/SBr3RXH

    track the error point (as the error log shows it). Remember the "no fiefs" is just a text that is updated often, so dont trust that text. Check if the lord has or not any fiefs. If the update notes worked or not. And why that part of get notes is blowing up.

    Code:
    script_update_faction_notes = 400
    script_update_faction_political_notes = 401
    script_update_faction_traveler_notes = 402
    script_update_troop_notes = 403
    script_update_troop_location_notes = 404
    script_update_troop_location_notes_prisoned = 405
    script_update_troop_political_notes = 406
    script_update_center_notes = 407
    script_update_center_recon_notes = 408
    script_update_all_notes = 409

    How do I track it? Sorry, I didn't get it. I'm a noob in modding still :p. I looked and looked but didn't get it or found something.
  12. Avareee

    SP Musket Era Csatádi's Visual and Historical Mod

    Is this still being worked on? Because I'd like to ask if you can fix the Horse Archer Ai with the script from Prophesy of Pendor mod. Or you can link me the source privately and I do it for myself.
  13. Avareee

    Modding Q&A [For Quick Questions and Answers]

    kalarhan said:
    Avareee said:
    Hey people. Does any of you know how I can set a Lord Title for a created faction/culture, through module system?

    also check the OSP section and you will find a few extended code ready to use / study, like this one https://forums.taleworlds.com/index.php/topic,129691.0.html and https://forums.taleworlds.com/index.php/topic,323422.0.html, for more complex title management
    [Bcw]Btm_Earendil said:
    Avareee said:
    Hey people. Does any of you know how I can set a Lord Title for a created faction/culture, through module system?
    Its not a problem, as I can give the Lords their titles in troops.py, together with their names. But once a lord switches factions, through defecting or treason he gets another random title assigned.
    And not the one he should get which is used in the faction he just joins.
    Have a look here
    https://forums.taleworlds.com/index.php/topic,343357.msg8208171.html#msg8208171

    Oh, thanks :p



    EDIT: Today I had this error, anyone knows what can I do against it? It happened when a lord left the faction and took the fiefs with him. But in reality he just left the faction with no fiefs. (says the notes, "no fiefs")
    https://imgur.com/SBr3RXH
  14. Avareee

    Modding Q&A [For Quick Questions and Answers]

    Hey people. Does any of you know how I can set a Lord Title for a created faction/culture, through module system?
    Its not a problem, as I can give the Lords their titles in troops.py, together with their names. But once a lord switches factions, through defecting or treason he gets another random title assigned.
    And not the one he should get which is used in the faction he just joins.
  15. Avareee

    Modding Q&A [For Quick Questions and Answers]

    Hi guys
    I have short and quick questions, how can I make the battle-maps bigger, and disable the stat loss after 757 in game days? (without tweakmb, but with the modulesys)


    Thanks in advance


    EDIT: Nvm. I found out.
  16. Avareee

    Modding Q&A [For Quick Questions and Answers]

    NPC99 said:
    Avareee said:
    Hey guys,

    So I've been merging some mods together trying to create my own personal mod. So far its been working, compiled the modsys without errors.
    But the game gave me some errors while play-testing, and I don't exactly found a way to fix them.(maybe I'm just dumb :oops:)

    Here are the bugs in screenshots:
    https://imgur.com/a/AeE5zo6

    https://imgur.com/a/fTg8sBb
    The weekly budget is always zero no matter how much troops I have.


    Have a nice weekend guys.

    A clean compile isn’t a guarantee that there are no bugs. The mods you have merged may be incompatible, making it up to the modder to adjust them for compatibility. For example, different mods may use the same slots defined in module_constants.py for conflicting purposes.

    Well, I have used Lav's Modsys
    https://forums.taleworlds.com/index.php?topic=324874.0
    And merged Diplomacy into it with some parts of "Warband Enhanced"
    https://forums.taleworlds.com/index.php?topic=245269.0
    and "MRC" Mod
    https://www.nexusmods.com/mbwarband/mods/6044
    .

  17. Avareee

    Modding Q&A [For Quick Questions and Answers]

    Hey guys,

    So I've been merging some mods together trying to create my own personal mod. So far its been working, compiled the modsys without errors.
    But the game gave me some errors while play-testing, and I don't exactly found a way to fix them.(maybe I'm just dumb :oops:)

    Here are the bugs in screenshots:
    https://imgur.com/a/AeE5zo6

    https://imgur.com/a/fTg8sBb
    The weekly budget is always zero no matter how much troops I have.


    Have a nice weekend guys.


  18. Avareee

    Modding Q&A [For Quick Questions and Answers]

    kalarhan said:
    Avareee said:
    Hello guys!
    I need a quick help, does anyone know what I have to do when I get this error?:
    https://imgur.com/GEV2CHx

    "TypeError: 'int' object is not iterable"
    during compiling the modsys.

    syntax error on one of your troops. In this case in the inventory (list of items) section of that troop.

    Thanks. Got it :smile:
  19. Avareee

    Modding Q&A [For Quick Questions and Answers]

    Hello guys!
    I need a quick help, does anyone know what I have to do when I get this error?:
    https://imgur.com/GEV2CHx

    "TypeError: 'int' object is not iterable"
    during compiling the modsys.
  20. Avareee

    Diplomacy for 1.174

    Somebody said:
    Avareee said:
    Corbul said:
    Avareee said:
    I just found out that it has to do with horse speed feature, once I disabled it in the camp menu it was gone. :razz:
    Hm yes it doesn't happen in cities, or if you choose to "walk around" in the camp menu. Only during a battle.
    Okeys, so I found the mod_sys for Diplomacy v. 1.172 - https://www.nexusmods.com/mountandblade/mods/5967 - This one actually worked fine (I downloaded it that last time). I'm not very sure what the uploader speaks of in the description though.
    I'll test it out, just to make sure.

    Edit: Ah, so apparently, the mod_sys requires Daedal's lively tavern (or whatever it's called), because it won't compile without it.
    Edit 2: Yes. Once installed the tavern pack, it compiles no problem. Still, it doesn't seem to be a very good recourse, the diplomacy options in v. 1.172 are reverted to the messy menu of the previous version, now with more selectables. But what if I try installing v. 1.174 atop v. 1.172? Might that fix the horse issue? Will have to try it.
    Edit 3: Nope, didn't work. Well, I guess we'll just have to wait for a fix.
    Edit 4: Ah, so I took the horse_cul and horse_speed lines from mod_sys 1.172's module_mission_templates.py and replaced the same ones in 1.174 with them. It fixed the issue, but I'm not sure if it'll cause any new issues beyond that.

    What exactly did you do to fix the issue? Just 'horse_cul' ? I tried that by removing the 2nd l at the end of 'horse_cull' but it didn't help.
    Oh I was testing something and forgot to revert, just remove the (agent_start_running_away, ":horse_agent"), thing.

    Thank you. It works now, but I have a question.
    Why can't I modmerge Formations and FormAI with this source? It gives me errors.
    https://imgur.com/a/Pd0FgGi[/

    Thanks in advance
Back
Top Bottom