
Invincible 无坚不摧
Translated from github README by AI
This mod provides 4 keyMappings to help you create complex key combination combos for epic fight weapon type.
for example, you can create AABB, AAAB, BBAB, AB, AAB… (i hope you can know what i'm saying with my poor English)
Acknowledgements
Thank you to SettingDust, Cyber2049, and dfdyz for their guidance and assistance.
Introduction
This is a support library designed to facilitate the registration of epic combat combo data for code developers and data pack creators. It allows for the convenient construction of new weapon templates and supports many specific features, similar to Indestructible.
Code Example
The principle is straightforward: weapon combo data is saved as a skill and replaces the original WeaponInnate skill. Custom input handling is implemented, followed by skill execution requests. The input part supports delayed packet sending and pre-stored inputs, with support for dual keys. Input Request Principle
Data Pack Example
First, combo data needs to be registered, essentially registering a new skill: Example
Next, similar to a regular weapon template, register the weapon template: Example
Note that the combos in the template should not be left empty; some values should be filled in arbitrarily, as the template still relies on the original method. Ensure that the style corresponds, and then fill in the mod_id:name of the registered combo data into the template's innate skill.
Finally, apply it to your own weapon: Example
Currently Available Commands
/invincible setStack value Set skill stack level
/invincible consumeStack value Consume skill stack level
/invincible setConsumption value Set charge value
/invincible consumeConsumption value Consume charge value
Explanation of Parameters Supported by Data Packs
If you are familiar with Indestructible, you should be able to get started quickly.
"key":
The key required for this animation. It supports KEY_1, KEY_2, KEY_3, KEY_4, KEY_1_2, KEY_1_3, KEY_1_4, KEY_2_3, KEY_2_4, KEY_3_4. KEY_1_2 represents KEY_1 and KEY_2 being pressed simultaneously.
"animation":
The animation to be played for this instance. Some animations may not be usable due to their inherent restrictions on weapons.
"speed_multiplier":
An integer representing the playback speed multiplier for this attack animation, which only applies to AttackAnimation. It is important to note that the player's attack animation playback speed is affected by the weapon's attack speed.
"convert_time":
An integer representing the transition time for this animation.
"set_phase":
An integer representing the phase the player enters after this animation starts playing. Use in conjunction with the custom condition "invincible:phase".
"cooldown":
An integer representing the cooldown tick count the player enters after this animation starts playing. Use in conjunction with the custom condition "invincible:cooldown".
"not_charge":
A boolean value indicating that damage caused by this animation will not charge. Suitable for use as a skill animation.
"time_command_list":
A list of timestamp events that execute at a specific time during the animation playback. Affected by playback speed. For each element,
- "time": The playback time point, a floating-point number.
- "command": The command to be executed, a string.
- "execute_at_target": Whether to execute on the target, a boolean value.
"hurt_command_list":
A list of player hurt events that execute when the player is hit during the animation playback.
- "command": The command to be executed, a string.
- "execute_at_target": Whether to execute on the target, a boolean value.
"dodge_success_command_list":
A list of player successful attack events that execute when the player successfully deals damage during the animation playback.
Parameters are the same as above.
"dodge_success_command_list":
A list of player successful dodge events that execute when the player successfully dodges during the animation playback. This animation should be a dodge animation; otherwise, it is invalid.
Parameters are the same as above.
"conditions":
The conditions for this execution. It is important to note that different conditions cannot be used to control different animations for a single input.
- "predicate": The type of this condition, supporting all Epic Fight Conditions as well as those from Indestructible.
- Parameters required for each predicate, which will be introduced below for those provided by Invincible. For conditions from other mods, please refer to their documentation.
Explanation of Currently Supported Conditions
You can also take a look here.
invincible:jumping
Checks if the player is jumping. No parameters. Executes when the player is in a jumping state. This serves as compensation since this skill overrides the original jump attack and sprint attack.
invincible:sprinting
Checks if the player is sprinting. No parameters. Executes when the player is sprinting. This serves as compensation since this skill overrides the original jump attack and sprint attack.
invincible:stack_count
Checks the player's skill stack count, generally used in conjunction with the command "/invincible consumeStack 1".
- "min": An integer representing the minimum value of the player's skill stack.
- "max": An integer representing the maximum value of the player's skill stack.
invincible:phase
Checks the player's custom state.
- "min": An integer representing the minimum value of the player's custom state.
- "max": An integer representing the maximum value of the player's custom state.
invincible:target_blocking
Checks if the target is in a defensive state, only effective when used with Indestructible.
- "is_parry": A boolean value, true to request whether the target is in a perfect parry state. False to determine if the target is in a defensive state.
invincible:cooldown
Checks the skill's cooldown state, generally used in conjunction with "cooldown".
- "inCooldown": A boolean value, requesting whether the player is in cooldown. Generally used with false.