Search results for query: *

  1. Barabashenko

    Phased reload for muskets in Warband

    Hi. Does anyone now (or, maybe, can suggest) how to implement phased reload for muskets with a custom (not NW) animation? And does the use_phased_reload option works only with use_crossbow_as_firearm like in WFaS and NW? Because I have both crossbows and muskets in my mod. I would be very...
  2. Barabashenko

    SP Musket Era Honour & Glory 1.9

    Ran into a bug for the first time with this mod.

    After completing the crocodile quest at Korsun for Birula Madskyj I could not leave the village, I'd hit "leave" and nothing would happen. I could hit the other buttons, and they would work as intended, but I still couldn't leave after. I have applied the hotfix btw.
    Try to press the "Leave" two times. Should help.
  3. Barabashenko

    SP Musket Era Honour & Glory 1.9

    Will 1.9.0 saves be compatible with 1.9.1?
    Yes, they should be.
  4. Barabashenko

    SP Musket Era Honour & Glory 1.9

    Honour & Glory mod has been updated to 1.9 version. Check out the first post.

    Changelog for 1.9

    Main changes:

    New faction quests for Cossacks, Crimean Tatars, Poland, Russia and Holy Roman Empire;
    Freelancer;
    Custom troops;
    New realistic and atmospheric scenes of towns, castles, villages, taverns, arenas etc.

    Other changes:
    New clothes, armors and weapons;
    Arena battles and tournaments reworked;
    Few global map and faction balance changes, global map is slightly optimized;
    New troops, especially reworked troop branches of Crimean Khanate and Kingdom of Poland;
    New culture - Hungarian. Some lords have hungarian culture;
    New icons;
    New music and new sounds;
    Rebalance of troops, weapons and armor;
    New random quests;
    New quest NPCs in Lviv and Vienna, also special NPC in Astrakhan;
    Choice of nationality at the start;
    The cost of access to military camps has been reduced;
    Mercenaries now serve in the armies of lords and caravan parties;
    Random events;
    The number of working hours at the saltworks and sawmill has been reduced. Slaves can be sold at the salt quarry;
    Hunting camps added;
    You can dry fresh meat at the camp menu;
    Trade routes reworked;
    The cost of mercenaries is reduced;
    Mayors and NPCs in taverns are reworked;
    The amount of food in the inventory is doubled;
    New troop tree for the peasant women;
    You can ask for a shelter in villages;
    Fishing in villages;
    The player as a mercenary gets more wages;
    You can bribe guards, also more options in dialogue with them;
    New pretenders for Cossacks, Moldova, Germans and the Ottomans;
    Troops can be recruited in towns and castles;
    Banks;
    A new resource - glass;
    Iron and gold mines in villages;
    Caravans give more loot;
    Lance breaking;
    Reiters do not go into hand-to-hand combat, but shoot the enemy from afar;
    Most of the clothes and armor have a female version now;
    Moving animations of the environment;
    Fixed a bug with a book from Henric's quest;
    Fixed other bugs from old version.

    What is planned in 1.9.1: Factional quests for Moldova, Lithuania, Ottoman, Sweden and Livonia; Some special quests for particular lords; A new group of mercenaries - Circassians; Lairs for all bandits; New companions; Crafting in towns; Book manufactures; Improved diplomacy and more.
  5. Barabashenko

    SP Musket Era Honour & Glory 1.9

    Thanks for your reply, we've added the hungarian (rather carpathian) culture to the settlements. You will be able to recruit hungarian troops.
    Since I like it so much, I took a deeper look at the mod, and I think I have a few observations (if the mod is still in developement?)

    Features I am already in love with
    - the sabre tournaments are super fun (and for me, also challenging). They also remind me of the Michalku-Kmicic duel from the novel Deluge

    - I like that bows are cutting damage. Very cool. I love WFAS, but I always feel that I am playing suboptimal when deciding to play something else than a horse archer.
    - I think I like the recruitment systems, but I think being a player of WFAS helps a lot. In my opinion players not knowing WFAS, coming straight from Warband might have some troubles figuring it out. Some kind of summary would be nice (you can put it into the camp menu, or game concepts, and use the starting screen to point the players to read it)


    Spellings
    Tamash Nadashdy (HRE vassal) - Tamás Nádasdy, or Tamas Nadasdy if you don't want to use "á"
    Trentschin - german spelling. SK is Trencin, HU is Trencsén
    Neusohl - german. HU spelling is Besztercebanya, SK is Banska Bystrica
    Lizenz - I don't know this city
    Kaschau - SK is Kosice, HU is Kassa


    Some strange things, which are not serious, but I don't know wether these are intended or not:
    - you can swing with some obviously thrusting weapons (like daggers)
    - you can block with very small blades and very unwieldy weapons (the game warband works you can block a lance charge with a small blade)
    - as a commoner, you cannot enter a noble feast, even when you win the duels
    - there are some slow weapons which should crush through blocks (also, I think heavy lances should also do the same. It seems wrong to block a lancer charge with a small blade)
    - "horsemen spears" are missing from the mod. It was actually quite common to use not long lances, but standard spears on horseback (length similar to napoleonic uhlans, maximum 2 meters). These should be standard spears, 150-180 length, but only thrust attack and high speed (100-110). There are records of duels (Hungarian-tartar, hungarian ottomans) fought with spears on horseback. This is not a big deal, but I think it would add some flavor to the mod. Also, while my examples are hungarian, I think tartars, lithuanians, polish also used shorter spears this way.


    Smaller suggestions:
    - create a gun ammo which holds only 1-2 bullets. Use this for reiter type units. In Csatádi's WFAS mod, these types of cavalry units are armed with sword, pistol, pistol, 1 spare bullet. This means they fire twice, reload once, and then charge into melee. Not really meant for player use, but help the AI decision making a ton. (I actually started using this loadout on companions too)
    - Csatádi also has a nice script, which breaks the lances after the first blow. Again, help the AI a lot in sieges. (IIRC this is OSP)
    - I would also advise to remove the melee use from the guns. Again, to help the AI. Currently they swith to melee and use the gun to block instead of firing in your face.
    - the Habsburgs used tercios from their other territories in this theatre of war. If you want, adding valloon, italian and iberian mercenary units to taverns would be historical. These are: valoon/napolitan/iberian tercio pikeman/rodelero/arquebus mercs. Also vlach units to taverns for ottomans, moldovans and maybe polish. (voynuks)
    - in some mods I saw melee pistols used as a small club
    - "brace of pistols". A pistol weapon with 4 shots, but possible minimum reload speed, and 4X the price of a pistol. A "pistol pair" with 2 shots and very slow reload time, with double price. Simulating going to battle with 2/4 pre-loaded guns, and not bothering with reloading them when they are emptied. This was very common, there is even a folk song from the era where the soldier gives different names to his four pistols.
    - I'm not sure if this is allowed, but there are nice items in Caribbean: Blood&Gold which you could use, if it is allowed. Breastplates, some of the hats, shoes, women dresses, horses. What is really nice is that Caribbean has female versions of all armor. Obviously bucaneer stuff is out of place, but Caribbean is a nice pike and shot mod, and a breastplate is a breastplate, so...


    Kind of difficult suggestion:
    As a hungarian, I always wanted a mod where I can fight the ottomans (and after them, the Habsburgs :grin:), so really big thanks for this. However, it feels very strange that you can only recruit ottoman and german peasants in Hungary. Even though I understand the reason behind this.
    However, I would like to ask if you could add two types of hungarian mercenaries to the mod? Both to the german and the ottoman merc camp? Historically, both of these employed hungarians in numbers. (germans as normal recruits, ottomans as mostly vassal forces from Transylvania).

    Hungary mercs:
    - pikes: nope (some transylvanian princes created halberd units, but mostly for the show.)
    - crossbowmen/archers: not really. Because of the "hungarian time of troubles" the population was very militarized, and everyone had a weapon. Even shepherds, peasants and cattle herders had a gun and a fokos (pick axe) at minimum.
    - light infantry: yes
    - light cavalry: yes
    Hungarian pickaxe: 70-100cm long handle, the blade is similar to axe, but the opposite side is usually a pick. There are also blunt versions. In warband terms it is a swing only one handed/two handed weapon, quite good speed, but relatively short reach (~90) for a bastard weapon.
    VB.FOKOS.9-2T.jpg

    light infantry: troublemaker (or protagonist) - hajdú - veteran hajdú
    Fur hat, fur hat with feathers, polish type kaftans, kuntush. Some kind of firearm. Melee weaponry should be pickaxe, maybe sabre and rondel dagger at high tier. Should be skilled in one handed and firearms, no pikes or crossbows.

    light cavalry: horseman - cavalry - hussar
    The basic equipment would be tarsch shield and fur hats, again with polish-ottoman style kuntush. Main melee should be a mix of sabres and pickaxes, and a choice of either a lance or a horseman spear. High tier hussars should get military pick instead of regular pick, some mail and a helmet (lobster type). This era a bit too early for the classic hungarian hussars (sabre and 4 pistols)

    Bocskay_hajd%C3%BAk.jpg
    Ein_Hungarischer_Husar_und_Henduck.jpg

    WFAS low tier hussar (note the shield and the pick)
    50601457331_05632e0c8a_b.jpg
    veteran with mail, lobster helmet. (polish colors, but since WFAS doesn't have a Transylvania faction, it is a compromise. Hungarians used very similar equipment to this below). No giant lances, plate armor or wings like in Poland tho. So not heavy cavalry, but rather medium)
    50600716193_b161d6d603_b.jpg
  6. Barabashenko

    SP Musket Era Honour & Glory 1.9

    I was enjoying 1.8 (with the bug fix patch) today, then out of curiosity I reinstalled that Adventuress mini submod you recommended for 1.7, but now it just crashes on loading ( at "loading map" ) ..........
    Well, uninstall it then :wink:
    The original version already has improved women faces, so there is no need really for the submod
  7. Barabashenko

    SP Dark Ages TRYZNA

    This is an official announcement of the Mount&Blade II Bannerlord mod Tryzna (укр. Тризна), which brings you to the Early Medieval Eastern Europe. The history of the early Slavs is dark and mysterious. After the devastation of the old Antes federation by the fearsome Avar warriors, the Slavic...
  8. Barabashenko

    SP Musket Era Honour & Glory 1.9

    Mod updated to v.1.8!

    Changelog for 1.8:
    New map + Holy Roman Empire
    Diplomacy
    Improvement of battle AI
    Bribe town authorities to gain right to rule
    New scenes
    New items
    New music
    New scripts
    More bandits
    Reworked recruiting system
    Wagenburg
    New interactions with patrols
    Field armies
    New animations
    New banners
    Start as faction ruler or noble
    New balance
    New map icons
    Improved female faces

    Check the first post for download links.

    This is not our last update, so keep tracking.
  9. Barabashenko

    SP Musket Era Honour & Glory 1.9

    In this 1.8 are the ladies' faces ( and outfits etc ) now " improved " ?
    Please - it behoves a mod to present aesthetically appealing ( artfully, proudly, made ) companions, wife .......
    Yes, we've added some new female faces.
  10. Barabashenko

    SP Musket Era Honour & Glory 1.9

    Honour&Glory 1.8 will be released this month.


    Quick changelog:
    New map + Holy Roman Empire
    Diplomacy
    Improvement of battle AI
    Bribe town authorities to gain right to rule
    New scenes
    New items
    New troops
    New music
    New scripts
    More bandits
    Reworked recruiting system
    Wagenburgs
    New interactions with patrols
    Field armies
    New animations
    New banners
    Start as faction ruler or noble
    New quest
    New interaction with tavern visitors
  11. Barabashenko

    OSP Code Campaign Field army - Separated player warband

    Is there a way to double the maintenance of field army? Because this code leads to ignoring the leadership skill and food providing from player's inventory.
  12. Barabashenko

    Modding Q&A [For Quick Questions and Answers]

    kalarhan said:
    Barabashenko said:
    Hi. How can I set "agent_set_speed_modifier" for the specific animation (for example - "reload_musket")? I need to make agents walk instead of running while reloading muskets, as they do in WFaS or Gekokujo. Thanks.

    those are different things. The operation is used to control run speed, not the animation that is in use.

    You can download the modsys from WFaS and see how they used the flags to control reload as well. It is public like Warband and Viking Conquest.

    Already did that before posting my question here, but no luck. I have no idea which script responds for this function, I even thought that it's hardcoded, but Gekokujo has the same feature.
  13. Barabashenko

    Modding Q&A [For Quick Questions and Answers]

    Hi. How can I set "agent_set_speed_modifier" for the specific animation (for example - "reload_musket")? I need to make agents walk instead of running while reloading muskets, as they do in WFaS or Gekokujo. Thanks.
  14. Barabashenko

    SP Musket Era Honour & Glory 1.9

    Ningauble said:
    Any Development Log teasers ?

    ( attractive ladies, wife can be a Companion, koncerz can be couched ............? )

    Sure, maybe later.
  15. Barabashenko

    SP Musket Era Honour & Glory 1.9

    Corbul said:
    What's the latest version and where to best download it - on moddb or the nexus?
    The latest version is 1.7, you can download it on the both sites.
  16. Barabashenko

    Modding Q&A [For Quick Questions and Answers]

    Simple question: how to make troops and player walk (not run) while reloading the musket? You know, like in the WFaS and Gekokujo.
  17. Barabashenko

    Modding Q&A [For Quick Questions and Answers]

    kalarhan said:
    Code:
    (agent_set_scripted_destination, ":agent_no", pos50, 1),

    you need to review the math behind calculation for pos50 used on this line, as it is how it calculates based on the map, agent position, enemy position, etc the point where to run to. If in doubt check header_operations.py for the operations descriptions, as it also uses trigonometry operations.

    Well, I've found the needed part of the code, but I just can't realize which value I should change and to what - I am too bad at math. As I understand, the value for x in the maneuver function should be changed, maybe to opposite value. If anyone can suggest which value I should change - please, reply in this thread.

    So, the needed part of this code:
    (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),
  18. Barabashenko

    SP Musket Era Honour & Glory 1.9

    Ningauble said:
    28 Mar 19    PS    I am wondering if I should keep playing this outstanding mod as is, or now wait for your update, which will be even better ........ ETA ?  Changelog ?

                              ( of course, this is the mod player's recurring dilemma ! )



    14 Apr 19            Nothing ?

    We are still working, the global map is done. You can keep playing, right now I am trying to implement new useful scripts and mechanics, also our team is attempting to make new quest - a small storyline for the Cossacks, maybe for someone else. New release won't be too soon, that's for sure.
  19. Barabashenko

    Modding Q&A [For Quick Questions and Answers]

    Okay, I have rather simple question. There is a code for mounted archers AI improvement by JunYue(君悦). You can see this code under the spoiler.

    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),
      ])

    So my question is: how to change the direction of movement of mounted archers? Currently, they are moving to the right (counterclockwise), how can I change the direction to clockwise / leftwards?

    Would be thankful for your help, guys.
Back
Top Bottom