Skip to content

GitLab

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

Last edited by Lxlp May 24, 2023
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 which have the same attributes as their MM mechanic counterpart. However, all commands will only target the model you are editing.

  • changeparent = ChangeParent
  • partvis = PartVisibility
  • tint = Tint
  • enchant = Enchant
  • tag = SetModelTag
  • changepart = ChangePart
  • remap = RemapModel

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
  • Before You Start
    • Home
    • Limitations
    • Comparison: ItemsAdder
    • Where is MoLang support?
    • Converting RP to 1.19.3
  • Modeling
    • Recommended tool
    • Making your first model
    • Importing and Exporting
    • Animating your model
    • Scriptable Keyframes
  • Mythic Mobs Integration
    • Mechanics: Model
    • Mechanics: VFX
    • Targeters
    • Conditions
  • API
    • Javadoc