0 of 0

File information

Last updated

Original upload

Created by

Shinway

Uploaded by

Shnway

Virus scan

Safe to use

22 comments

  1. Shnway
    Shnway
    • member
    • 10 kudos
    Locked
    Sticky
    Please consider hitting the Endorse button, would be much appreciated!
  2. mythicguard
    mythicguard
    • member
    • 0 kudos
    I was wondering for days why is it not working for me and now I think I get it! - I simply changed keybind ALT in the game for another key for easier access. So now autohotkey still tries to use the old one in vain. I hope it will help for those who did the same as me.
  3. WinterElfeas
    WinterElfeas
    • premium
    • 47 kudos
    I wonder if perks or taunt could be activated by LUA script, this way you could trigger automatically on player OnAction and doing an attack
    1. Shnway
      Shnway
      • member
      • 10 kudos
      You could do that but I have already created a player on action based version. If you go into the Files tab and under Optional files download the keybind version, its called "Keybind Battle Cry - for Middle Mouse Button".

      If you want it to activate when you are doing an attack then open that script in Notepad and change this part of the script:
      ~*MButton::{

      To this:
      ~*LButton::{

      Then save the script and now it will activate when you are attacking the enemy. To keep it from spamming to much its on a 4 second cooldown but yea just change the M to an L which will change the keybind from the middle mouse button to the left mouse button and it will work the way you are wanting it to.
      No LUA script needed.

      Enjoy!
    2. WinterElfeas
      WinterElfeas
      • premium
      • 47 kudos
      I'm using a controller though, I searched a bit but I'd like a more in-game implementation that doesn't require external tool, still nice work for people that use AutoHotKey

      I know how to trigger the buff in LUA (AddBuff), but not sure about triggering the audio in LUA
    3. Shnway
      Shnway
      • member
      • 10 kudos
      Fully understand, hoping someone mods the internal Quick Chat so internal keybinds can be used.
      I am more familiar with AHK, Eventscript and Python. Only worked with LUA a handful of times.

      Just know that AutoHotkey can be used with controllers as well. You can use controller re-mappers or other programs which will let you know the names of your controller buttons and can use those names in the script to use your controller.

      Details I added in some of my other mods:
      "Controller Support (Workaround)

      • The script does not support controllers natively, but you can still use it by mapping a controller button to a keyboard key using a program like AntiMicroX.
      • Example: If you want to activate the script using a controller button, open AntiMicroX and map your controller’s button (e.g., Joy5) to a keyboard key (e.g., F).
      • If you prefer to directly modify the script for controller support, replace the activation key F with Joy5 (or any other button you find in the button mapper).

      The updated script with the controller button activation would look something like this:
      ~*Joy5::{
          while GetKeyState("Joy5", "P") {
      Controller users should map buttons to keyboard keys for this script to work properly."


      Here is the documentation from the AutoHotkey site explaining controller button names and how to use them in scripts:
      https://www.autohotkey.com/docs/v1/KeyList.htm
  4. NicolasBerdman
    NicolasBerdman
    • member
    • 0 kudos
    При запуске игры такая ошибка

    Ошибка: (6) Неверный дескриптор.
    040: Цикл
    040: {
    041: Если PixelSearch(&foundX, &foundY, startX, startY, startX + searchWidth - 1, startY + searchHeight - 1, цвет, вариация)
    041: {
    043: DllCall("kernel32.dll\Sleep", "UInt", 4000)
    Стек вызовов:
    E:\Auto Perfect Block и Riposte-545-1-0-1739598524\Auto Battle Cry - Работает с Auto Taunt Mod 1.3.ahk (41) : [PixelSearch] If PixelSearch(&foundX, &foundY, startX, startY, startX + searchWidth - 1, startY + searchHeight - 1, color, variation)
    E:\Auto Perfect Block и Riposte-545-1-0-1739598524\Auto Battle Cry - Работает с Auto Taunt Mod 1.3.ahk (41) : [] If PixelSearch(&foundX, &foundY, startX, startY, startX + searchWidth - 1, startY + searchHeight - 1, color, variation)
    > Автоматическое выполнение
    1. Shnway
      Shnway
      • member
      • 10 kudos
      NicolasBerdman's translation:

      "When launching the game, this error occurs:
      Error: (6) Invalid handle.
      040: Loop
      040: {
      ▶041: If PixelSearch(&foundX, &foundY, startX, startY, startX + searchWidth - 1, startY + searchHeight - 1, color, variation)
      041: {
      043: DllCall("kernel32.dll\Sleep", "UInt", 4000)
      Call Stack:
      E:\Auto Perfect Block and Riposte-545-1-0-1739598524\Auto Battle Cry - Works with Auto Taunt Mod 1.3.ahk (41) : [PixelSearch] If PixelSearch(&foundX, &foundY, startX, startY, startX + searchWidth - 1, startY + searchHeight - 1, color, variation)
      E:\Auto Perfect Block and Riposte-545-1-0-1739598524\Auto Battle Cry - Works with Auto Taunt Mod 1.3.ahk (41) : [] If PixelSearch(&foundX, &foundY, startX, startY, startX + searchWidth - 1, startY + searchHeight - 1, color, variation)
      Auto Execution"


      -Make sure you have the newest version of AutoHotkey (Older versions are not compatible with this script due to all the changes made in the new AHK 2.0 and above.) So definitely make sure you are using the newest version.

      -Make sure the script is saved somewhere on the computer where you have full read/write privileges. Maybe move the file to the desktop or in the root C drive in the Temp folder and if you don't have a Temp folder there than make one. May even want to re-download it and save and unzip it in a location where you know you have full read/write access.

      -Run the script as Administrator (Right click on the script and choose Run as Administrator).

      -Make sure you are running the game in Fullscreen mode

      -Make sure your version of Windows is fully updated. Recommended you are on Windows 11.

      -Make sure you are running Windows in a native session and not in a virtual machine (Like VMWare or Virtual Box).

      -Make sure your system drivers are all up to date. (Doubt this would cause that error but mainly your graphics card drivers but that would mainly be if the script cannot find the correct colors).


      I tried to reproduce that error but all tests I have done it always works just fine and I have also ran tests on a test bench and a few other systems. Hope the information provided has helped fix the error for you.




      ------------------------
      ------------------------
      ------------------------
      Translation:


      • Убедитесь, что у вас установлена самая новая версия AutoHotkey (Старые версии не совместимы с этим скриптом из-за изменений, внесённых в AutoHotkey 2.0 и выше). Поэтому обязательно используйте самую актуальную версию.
      • Убедитесь, что скрипт сохранён в папке на компьютере, где у вас есть полные права на чтение и запись. Попробуйте переместить файл на рабочий стол или в корневую папку C:\Temp. Если папки Temp там нет, создайте её. Также можно попробовать заново скачать и распаковать скрипт в папку, где у вас точно есть полный доступ.
      • Запускайте скрипт от имени администратора (Правый клик по скрипту → Выбрать Запуск от имени администратора).
      • Убедитесь, что игра запущена в полноэкранном режиме (Fullscreen mode).
      • Убедитесь, что ваша версия Windows полностью обновлена. Рекомендуется использовать Windows 11.
      • Убедитесь, что Windows работает в нативной среде, а не в виртуальной машине (например, VMWare или VirtualBox).
      • Убедитесь, что все драйверы вашей системы обновлены. (Сомнительно, что это вызывает ошибку, но в первую очередь обновите драйвер видеокарты, особенно если скрипт не может определить правильные цвета).
      Я пытался воспроизвести эту ошибку, но во всех проведённых тестах скрипт работал без проблем. Я также проверял его на тестовом стенде и нескольких других системах. Надеюсь, предоставленная информация помогла вам исправить ошибку.
  5. rc2the2nd
    rc2the2nd
    • premium
    • 1 kudos
    Hey great work! Just making you aware, occasionally this script activates other prompts. I've had it answer requests for surrender. Not sure if this is avoidable or not. I'm using the taunt compatible version if that matters. 
    1. Shnway
      Shnway
      • member
      • 10 kudos
      Thanks for the feedback! Yea during my initial testing I just stood still and let the script run during combat and did not notice that issue. The Quick Chat menu has option 1 (surrender) pre-selected when the menu comes up and certain buttons like left mouse button or q and possibly other buttons can be used to make a selection. So pressing left mouse button (attacking) at the same time as when the script does the Battle Cry it can sometimes choose option 1 (surrender) by mistake.
      I am going to do some more testing to see if the script can run faster so it opens the menu and selects option 2 faster which will better help avoid this issue. Right now the scripts using the AHK built-in sleep function but I will try with the Windows based sleep call "DllCall("kernel32.dll\Sleep" which can be faster and more reliable. It will depend on the speed tolerance that the game allows for buttons to be pressed. The avg key press for someone is around 77-80ms and the current script is using 60. Some games run into issues with key presses under 30ms.

      I will also test using Battle Cry and Taunts while blocking or doing certain actions and if its more reliable with those actions then I can make a keybind/hotkey version so the Battle Cry triggers when you block and then won't activate again till after 20 seconds. This approach may be more reliable and gives you more control of when you use Battle Cry.
      Juggling a couple other mod ideas as well.
    2. Shnway
      Shnway
      • member
      • 10 kudos
      I have uploaded a new version of both the Auto Battle Cry and Auto Taunt scripts which now use the other sleep method as well as use more reliable timings so the Quick Chat menu is used faster. Also updated the delayed timings. Let me know if it still runs into that same issue as well as if you use my Assisted Combat mod with this. I noticed that mod especially the E keybind for Auto Master Strike allows the attack button to be spammed more than normal which can sometimes still end up triggering the wrong menu choice.

      I also uploaded a keybind version for both the Auto Battle Cry and Auto Taunt scripts under optional files. For now they are both set for the Middle Mouse button so only pick one or the other. Or can always edit one of the scripts in Notepad and choose your own keybind.
    3. rc2the2nd
      rc2the2nd
      • premium
      • 1 kudos
      Seems like that did the trick. I haven't had any issues since v1.2. Thanks for the update! 
    4. Shnway
      Shnway
      • member
      • 10 kudos
      Great, glad to hear it!
      Since it was working far better I figured I would do a few more tests with it and found a way to remove the menu from showing up/flicker. The menu now opens and closes so fast you can hardly tell, also the audio playing is more reliable so make sure to update.

      Also uploaded a Battle Cry and Taunt combined version.
  6. LiuMingfu
    LiuMingfu
    • supporter
    • 0 kudos
    Thank you!
    1. Shnway
      Shnway
      • member
      • 10 kudos
      NP, enjoy. 
      I just released a new version that removed the menu from showing up and also made the audio more reliable so make sure to update!
  7. flosrn
    flosrn
    • supporter
    • 0 kudos
    I love it, simply War Cry ash of war but for KCD2
    1. Shnway
      Shnway
      • member
      • 10 kudos
      Glad to hear your enjoying the mod, I just released a new version that removed the menu from showing up and also made the audio more reliable so make sure to update!
  8. Aragorn2510858599
    Aragorn2510858599
    • member
    • 1 kudos
    That's more like it, I am sick of getting bashed in the face while shouting like a useless wanker because the blasted game prevents you from parry or attack during a battleccry
    1. Shnway
      Shnway
      • member
      • 10 kudos
      Indeed, I am juggling a few projects so not had much time to test in game but have you had any luck doing a Battle Cry while blocking? I am thinking about making a hotkey version and might use right click as the hotkey so if it lets you block while using Battle Cry that would also give good control over when it is used.
  9. kletus
    kletus
    • member
    • 0 kudos
    Heya! Is this compatible with your taunt and trash talk script? i.e. can i run them both in parallel?
    1. Shnway
      Shnway
      • member
      • 10 kudos
      Yes, I have tested using both together and not running into issues. The Taunt mod has Henry Taunt the enemy about every 18 seconds and this Battle Cry mod has Henry Battle Cry at the enemy about every 20 seconds. While I ran tests, Henry would still Taunt and Battle Cry. Though the activation trigger for both are currently the same so more testing may be needed to make sure the Battle Cry always activates on the enemies first attack before the Taunt. 
      If needed I can change it to the combat indicators instead of the perfect block shield which will make the Battle Cry happen sooner and always be before the Taunt.

      Right now the script looks for the perfect block prompt when an enemy attacks but so does the Taunt script.
      I might make a version that makes the script look for the rosette (Combat stance indicators) instead which show up sooner.
    2. Varthyel
      Varthyel
      • member
      • 0 kudos
      yeah the combat stance indicator seems like a pretty good idea if it can work correctly :D
    3. Shnway
      Shnway
      • member
      • 10 kudos
      I made a version that finds the combat stance indicators instead of the perfect block green shield but noticed that sometimes it takes a little while before the Quick Chat can be used, normally its a few moments into the battle so since the combat stance indicators shows up so much sooner the script would try and do the Battle Cry but would not be able to because no Quick Chat and then by the time the Quick Chat does show up the script is waiting 20 seconds before looking again. So that was a bit unreliable.

      So instead I kept it the way it was but made it so it waits longer to make sure the Quick Chat is available and if you also have the Taunt mod running the taunt will go first and then it will do the Battle Cry. 
      This makes for funny exchanges because Henry does the Taunt and then when the enemy goes to taunt back or talk trash sometimes Henry will just cut them off with a shout or another Battle Cry line.
      This should allow reliable Taunts and Battle Cry.
      The new version is uploaded so let me know how it works for you.