Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Model Engine 4 Model Engine 4
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 108
    • Issues 108
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • Model Engine 4Model Engine 4
  • Wiki
    • Modeling
  • Scriptable Keyframes

Last edited by Lxlp Oct 21, 2024
Page history

Scriptable Keyframes

Using the script keyframe, you can now call MM skills or MEG commands at the exact animation frame. You can add new script keyframes by opening the effects timeline within Blockbench.
image
Afterward, add a new keyframe on the Instructions timeline. Instead of the normal XYZ input, you will see an input called Script.
image

MM Skills

You can call any custom-defined MM skills by using the prefix mm: and the skill name. For example:

Primary_5:
  Skills:
    - message{m="Get punched";audience=world} @self
    - explode @ModelPart{m=dr_axis;p=attack_point}

image
You can even use Skill Parameters within keyframes.

Primary_5:
  Skills:
    - message{m=<skill.dialogue>;audience=world} @self
    - explode @ModelPart{m=dr_axis;p=attack_point}

image

MEG Commands

MEG Commands are, by design, structurally very similar to MM mechanics. Currently, we have 7 commands. All commands will only target the model you are editing.

changeparent

Attribute Description Type
parent The new parent bone String
child The bone being re-parented String

partvis

Attribute Description Type
part The affected bones String
visible Is the bone visible Boolean
exact Does the bone name need to match exactly Boolean

tint

Attribute Description Type
part The affected bones String
color Is the bone visible Hex Color
exact Does the bone name need to match exactly Boolean
damage Is this command modifying the damage color Boolean

enchant

Attribute Description Type
part The affected bones String
enchant Is the bone enchanted Boolean
exact Does the bone name need to match exactly Boolean

tag

Attribute Description Type
part The affected bone String
tag The displayed string String
visible Is the tag visible Boolean

changepart

Attribute Description Type
part The affected bone String
nmodel Model ID of the new bone model String
npart New bone ID String

remap

Attribute Description Type
model Model ID of the source model String
map Model ID of the mapping (optional) String

To use a MEG command, you just enter it like using them as a normal mechanic.
image

Multiline scripts

You can write multiple lines of scripts into a single keyframe, and you can also mix and match different script types.
image
This keyframe would run the MM Skill that plays the dialogue and effect first, then the MEG command to enchant the arm bone.

Using Animation Variables

Finally, you can make use of the Variable Placeholder system provided by Blockbench itself. This system is also extremely similar to MM's variable system, and it works on both MM skills and MEG commands.
image

Video Demo

Clone repository
Home
FAQ / Common Issues
Commands & Permissions
Configuration

Modeling
  • Creating a Model
    • Hitbox & Eye Height
    • Shadow
  • Bone Behaviors
    • Player Limbs
  • Animating a Model
  • Importing a Model
  • Scriptable Keyframes
  • Optional Tools
MythicMobs
  • Mechanics
  • Conditions
  • Targeters
Citizens (R4.0.4)
  • Trait
  • Commands & Permissions

API
  • Basic
    • Apply / Remove Model
    • Play / Stop Animation
    • Configure Bone Behaviors
    • Mounting / Dismounting Model
    • Per-Player Model
    • Events
  • Advanced
    • Custom Base Entity
    • Custom Mount Controller
    • Custom Importer
    • Custom Bone Behaviors
    • Custom Script Reader
    • Custom Timeline
    • Custom Animation Handler
    • Custom Render Type

Technical
  • Terminology
  • Animation Systems
  • Mount Controllers
Promotional Material