About this mod
This mod extends SCAR to support magic combat in the same way as melee combat.
Like additional animation file, SCAR_Dummy.hkx, is used in melee to add extra annotations.
Similarly, in magic combat, I have added a Dummy.hkx to serve the same purpose.
This allows magic-using NPCs making their magical combat more dynamic and diverse.
- Requirements
- Permissions and credits
- Donations
In vanilla behavior, magic combat differs from melee combat as it only has two simple states: ready and casting. This makes magic-using NPCs feel quite dull.
I am committed to adding a variety of rich magic behaviors.
This module utilizes SCAR to influence the magic AI, giving NPCs the opportunity to perform different actions.
It also integrates with my other magic behavior modules, enhancing the diversity and dynamics of magical combat.
About This Mod This is a source resource mod.
- If you are a user:
You only need to know how to install it. Install it if it's required or recommended by other modules.It won’t cause any bugs or affect anything else in your game. - If you are a modder:
Please refer to the instructions below for more details on how to utilize this module in your own projects.
在原版(Vanilla)的魔法行為中,與近戰不同,魔法僅有簡單的 準備(ready) 和 施法(casting) 兩種狀態,這使得使用魔法的 NPC 顯得十分單調。
我致力於添加各種豐富的魔法行為。
此模組透過 SCAR 的方式干涉魔法 AI,讓 NPC 有機會執行不同的行為,
並與我其他的魔法行為模組相互結合,進一步提升魔法戰鬥的多樣性與動態表現。
關於此模組這是一個 Source 資源模組。
- 如果你是使用者:
你只需要知道如何安裝它,並根據其他模組的需求或建議來進行安裝。此模組不會造成任何 Bug,也不會影響遊戲內的其他內容。 - 如果你是模組作者:
請參閱下方的說明,以了解如何在你的模組中使用此資源。
How to Install:
Requirement:
(1) SCAR
(2) Nemesis or Pandora
INSTALLATION:
- Install the mod using a mod manager.
- Run Nemesis or Pandora, enable the patch, and generate the output.
- If you encounter any issues, follow the common troubleshooting steps for behavior mods:
- Delete the existing Nemesis Output or Pandora Output.
- Reinstall the mod and regenerate the output in Nemesis or Pandora.
For Mod Authors
Although this mod is an extension of SCAR, it's important to note that SCAR is primarily focused on melee AI, and there are key differences when it comes to magic AI.
- Magic Behavior Differences:
Unlike melee combat, magic behavior doesn’t have a concept of combos.This means chaining one animation directly into another, as done in melee, isn’t possible in the same way for magic. - Expanding Possibilities:
However, you can still create diverse and dynamic behaviors by combining this module with OAR (Open Animation Replacer) and payloads.These tools allow you to design unique interactions and magic combat styles beyond the limitations of vanilla AI. - Starter Animations Included:
To help you get started, I’ve included some basic preset animations in the options.These are designed for you to experiment with and build upon in your own creations.Additionally, I will use these presets as examples to explain how this system works, which will also serve as the foundation for one of my future magic modules.
Annotation Details : Similar to melee combat, where
SCAR_1hmReadyDummy.hkx
is used to add additional annotations,I have created
MagSCAR_Dummy.hkx
for magic behavior to achieve the same functionality.But Unlike
SCAR_1hmReadyDummy.hkx
, which only plays in the combat-ready state, MagSCAR_Dummy.hkx
plays in any state during magic behavior.(You can verify this using this tool.)
This allows for flexible integration with OAR’s rich condition system.
As long as the OAR conditions are met,
MagSCAR_Dummy.hkx
with theSCAR_ComboStart
annotation will play.SCAR’s condition checks will be triggered within any magic behavior animation that uses
MagSCAR_Dummy.hkx
.In
MagSCAR_Dummy.hkx
:- 3.100000
SCAR_ComboStart
- Triggers SCAR_ActionData checks when the animation reaches 3.1 seconds.
- Triggers SCAR_ActionData checks when the animation reaches 3.1 seconds.
- 4.500000
MagFrenzy_UpdateEvent
- Refreshes this animation every 4.5 seconds.
- Refreshes this animation every 4.5 seconds.
- 1.000000
SCAR_ActionData
{"IdleAnimation":"StartMagCS", "MinDistance":0, "MaxDistance":1000, "StartAngle":-180, "EndAngle":180, "Chance":100, "Type":"IDLE", "WeaponLength":90}
- If conditions are met, executes the
StartMagCS
event command, which triggers theMagInfusion_Intro.hkx
animation.
- If conditions are met, executes the
MagInfusion_Intro.hkx
:- 2.000000
SCAR_ComboStart
- Triggers SCAR_ActionData checks when the animation reaches 2.0 seconds.
- Triggers SCAR_ActionData checks when the animation reaches 2.0 seconds.
- 1.000000
SCAR_ActionData
{"IdleAnimation":"MagIFType2", "MinDistance":0, "MaxDistance":70, "StartAngle":-90, "EndAngle":90, "Chance":70, "Type":"IDLE", "WeaponLength":90}
- If conditions are met, executes the
MagIFType2
event command to play theMagFrenzy_Type2.hkx
animation.
- If conditions are met, executes the
- 0.900000
SCAR_ActionData
{"IdleAnimation":"MagIFType1", "MinDistance":0, "MaxDistance":1000, "StartAngle":-120, "EndAngle":120, "Chance":100, "Type":"IDLE", "WeaponLength":100}
- If conditions are met, executes the
MagIFType1
event command to play theMagFrenzy_Type1.hkx
animation.
- If conditions are met, executes the
So Example Workflow is (From the Provided Option File):
- Is the NPC in a magic behavior state?
(Are they in combat with spells equipped?) - OAR Condition Check
- Determine if a valid
MagSCAR_Dummy.hkx
should play - Does the playing
MagSCAR_Dummy.hkx
contain aSCAR_ComboStart
annotation? - If SCAR_ActionData conditions are met:
- Triggers the
StartMagCS
event, playingMagInfusion_Intro.hkx
.
- Triggers the
- If conditions within
MagInfusion_Intro.hkx
are met:- Plays the corresponding animation (
MagFrenzy_Type1.hkx
orMagFrenzy_Type2.hkx
).
- Plays the corresponding animation (
中文:
給模組作者的說明 雖然此模組是 SCAR 的擴充,但需注意 SCAR 主要專注於近戰 AI,與魔法 AI 之間仍有一些差異。
- 魔法行為的差異:
不同於近戰,魔法行為並沒有「連擊」的概念,因此無法像近戰一樣,將一段動畫直接接續到下一段動畫。 - 擴展更多可能性:
儘管如此,你仍然可以透過與 OAR(Open Animation Replacer) 和 payload 的結合,創造出多樣化且豐富的魔法行為,突破原版 AI 的限制。 - 內建基礎動畫:
為了幫助你更好地理解與應用,我在模組選項中提供了一些 預設基礎動畫,供你進行創作與實驗。這些範例不僅是我未來另一個魔法模組的基礎,也將作為說明範本,幫助你了解系統的運作方式。
註解說明: 如同在近戰中,
SCAR_1hmReadyDummy.hkx
動畫文件可用於添加額外註解,我在魔法狀態下新增了
MagSCAR_Dummy.hkx
來達成相同的功能。但 與
SCAR_1hmReadyDummy.hkx
不同,SCAR_1hmReadyDummy.hkx
只會在 戰鬥準備(ready) 狀態下播放,而
MagSCAR_Dummy.hkx
則會在 魔法行為的任何狀態 下播放。(你可以使用 這個工具 進行檢查。)
這使得它能夠與 OAR 的豐富條件進行靈活搭配。
只要 OAR 條件符合,帶有
SCAR_ComboStart
註解的 MagSCAR_Dummy.hkx
就會播放。在 任何魔法行為動畫 中使用
MagSCAR_Dummy.hkx
,即可進行 SCAR 的條件判定。在
MagSCAR_Dummy.hkx
中:- 3.100000
SCAR_ComboStart
- 表示在此動畫進行到 3.1 秒時,會執行 SCAR_ActionData 的判定檢查。
- 表示在此動畫進行到 3.1 秒時,會執行 SCAR_ActionData 的判定檢查。
- 4.500000
MagFrenzy_UpdateEvent
- 每 4.5 秒會刷新此動畫。
- 每 4.5 秒會刷新此動畫。
- 1.000000
SCAR_ActionData
{"IdleAnimation":"StartMagCS", "MinDistance":0, "MaxDistance":1000, "StartAngle":-180, "EndAngle":180, "Chance":100, "Type":"IDLE", "WeaponLength":90}
- 如果符合條件,則執行
StartMagCS
的事件指令,觸發播放MagInfusion_Intro.hkx
動畫。
- 如果符合條件,則執行
在
MagInfusion_Intro.hkx
中:- 2.000000
SCAR_ComboStart
- 表示在此動畫進行到 2.0 秒時,會執行 SCAR_ActionData 的判定檢查。
- 表示在此動畫進行到 2.0 秒時,會執行 SCAR_ActionData 的判定檢查。
- 1.000000
SCAR_ActionData
{"IdleAnimation":"MagIFType2", "MinDistance":0, "MaxDistance":70, "StartAngle":-90, "EndAngle":90, "Chance":70, "Type":"IDLE", "WeaponLength":90}
- 如果符合條件,則執行
MagIFType2
的事件指令,觸發播放MagFrenzy_Type2.hkx
動畫。
- 如果符合條件,則執行
- 0.900000
SCAR_ActionData
{"IdleAnimation":"MagIFType1", "MinDistance":0, "MaxDistance":1000, "StartAngle":-120, "EndAngle":120, "Chance":100, "Type":"IDLE", "WeaponLength":100}
- 如果符合條件,則執行
MagIFType1
的事件指令,觸發播放MagFrenzy_Type1.hkx
動畫。
- 如果符合條件,則執行
因此範例流程(來自選項的檔案):
- 是否處於魔法行為狀態?
(戰鬥狀態下是否手持咒語?) - 進行 OAR 條件檢查
- 判定是否應播放有效的
MagSCAR_Dummy.hkx
- 播放的
MagSCAR_Dummy.hkx
是否帶有SCAR_ComboStart
註解? - 若 SCAR_ActionData 條件吻合:
- 執行
StartMagCS
事件,播放MagInfusion_Intro.hkx
。
- 執行
- 在
MagInfusion_Intro.hkx
中,若任一條件吻合:- 播放對應的動畫(如
MagFrenzy_Type1.hkx
或MagFrenzy_Type2.hkx
)。
- 播放對應的動畫(如