|
|
|
## Model
|
|
|
|
Apply the model to the target entity.
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|------------|---------------|------------------------------------------|----------------|
|
|
|
|
| modelid | m, mid, model | The model id of the model | |
|
|
|
|
| hitbox | h | Should the model override the hitbox | true |
|
|
|
|
| remove | r | Is this mechanic used for removing model | false |
|
|
|
|
| killowner | ko | Remove: Should the base entity be killed | true |
|
|
|
|
| invisible | i, invis | Should the base entity be invisible | true |
|
|
|
|
| damagetint | d, tint | Should the model flash red when damaged | true |
|
|
|
|
| nametag | n, name | The tag bone used to display the name | |
|
|
|
|
| drive | | Can this model be driven | false |
|
|
|
|
| ride | | Can this model have passengers | false |
|
|
|
|
| mode | | What animation mode should it use | Config default |
|
|
|
|
| lockpitch | lp, lpitch | Should the model's pitch be locked | false |
|
|
|
|
| lockyaw | ly, lyaw | Should the model's yaw be locked | false |
|
|
|
|
| step | s | The step height of the model. | 0.5 |
|
|
|
|
| radius | rad | View radius of the model, in blocks.<br>Any value less than or equal to 0 has no effect.| 0 |
|
|
|
|
### Example
|
|
|
|
`- model{m=kindletronsr;d=false;n=nametag;drive=true;ride=true;step=3} @self ~onSpawn`
|
|
|
|
This will apply the model to the caster when it spawns. It will also set a few conditions. Such as disabling damage tint, displaying the name on a bone named `nametag`, allowing a driver and passengers to mount the model, and letting the model step up blocks up to 3 blocks tall automatically.
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## State
|
|
|
|
Tell the model to start or stop playing an animation.
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|------------|---------------|------------------------------------------------------------------|---------|
|
|
|
|
| modelid | m, mid, model | The model receiving a state change | |
|
|
|
|
| state | s | The state | |
|
|
|
|
| remove | r | Is this mechanic used for removing state | false |
|
|
|
|
| speed | sp | Speed multiplier of the state | 1 |
|
|
|
|
| lerpin | li | Transition tick before playing the animation | 0 |
|
|
|
|
| lerpout | lo | Transition tick after playing the animation | 1 |
|
|
|
|
| ignorelerp | i | Remove: Should the state be instantly removed without transition | false |
|
|
|
|
### Example
|
|
|
|
`- state{mid=kindletronjr;s=attack;li=3;lo=3} @self ~onAttack`
|
|
|
|
This will add an `attack` state to the specified model, and gives it 3 ticks to transition in and out of the animation.
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## MountModel
|
|
|
|
If the model has driver/passenger bones, mount entities to those bones.
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|-------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|
|
|
|
|
| driver | d, drive | Is this mechanic mounting a driver | true |
|
|
|
|
| force | f | Should the target be forced to mount on the bone<br>Driver: dismount the original driver and mount the target<br>Passenger: find a seat with the least passengers and mount the target | false |
|
|
|
|
| damagemount | dmg | Can the mounted entity damage the mount | false |
|
|
|
|
| mode | m | What mount mode should the mounted entity use<br>**Walking**: WASD ground controller<br>**Flying**: WASD-Sneak-Jump aerial controller (jump to ascend, shift to descend, shift while mount on ground to dismount)<br>**Flying_v16**: WASD-Pitch-Jump aerial controller for 1.16 (look up + space to ascend, look down + space to descend)<br>**Force_Walking**: Same as Walking, but mounted entity cannot dismount<br>**Force_Flying**: Same as Flying, but mounted entity cannot dismount | walking |
|
|
|
|
| pbone | p | Not Driver: A list of seats searched when mounting entities<br>Format: pbone=seat1,seat2,seat3<br>If force is not enabled, this will fill all the seats until no more passengers can be mounted. | |
|
|
|
|
>Note: Minecraft 1.16 has a bug where player dismount happens client-sided, which means the server cannot intercept it. Hence, all force mode would not work for 1.16 clients, and must use flying_v16 for flying. For more information, read [MC-202202](https://bugs.mojang.com/browse/MC-202202).
|
|
|
|
### Example
|
|
|
|
`- mountmodel{mode=flying} @trigger ~onInteract`
|
|
|
|
Mount the player to the mount point when right-clicked, and gives the player flying control. If there is already a driver, it will not do anything.
|
|
|
|
`- mountmodel{driver=false;mode=force;pbone=seat1,seat2,seat3,seat4;dmg=true} @PIR{r=5} ~onDamaged`
|
|
|
|
Mount 4 players within a 5 blocks radius to seat1-4 when damaged. Players could not sneak to dismount, but they can hit the mount.
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## DismountModel
|
|
|
|
Dismount the target from the model.
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|-----------|----------|---------------------------------------------------------------------------------------------------|---------|
|
|
|
|
| driver | d, drive | Is this mechanic dismounting a driver | true |
|
|
|
|
| pbone | p | Not Driver: A list of seats searched when dismounting entities<br>Format: pbone=seat1,seat2,seat3 | |
|
|
|
|
### Example
|
|
|
|
`- dismountmodel{p=seat1} @self ~onTimer:100`
|
|
|
|
Dismount any entities on seat1 every 100 ticks.
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## DismountAll
|
|
|
|
Dismount all passengers on the model. To dismount a driver, see [DismountModel](https://github.com/Ticxo/Model-Engine-Wiki/wiki/Mechanics#dismountmodel).
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|-----------|---------|---------------------------------------------------------------------------------------|---------|
|
|
|
|
| pbone | p | A list of seats searched when dismounting entities<br>Format: pbone=seat1,seat2,seat3 | |
|
|
|
|
### Example
|
|
|
|
`- dismountall{p=seat1,seat2,seat3,seat4} @self ~onDamaged`
|
|
|
|
Dismount all passengers on seat1-4 when damaged.
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## Tint
|
|
|
|
Tint certain parts of the model to said color. Damage tint will not reset this tint.
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|------------|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|
|
|
|
|
| modelid | m, mid, model | The model being tinted | |
|
|
|
|
| partid | p, pid, part | The part being tinted | |
|
|
|
|
| color | c | The color in hex<br>Format: `FFFFFF`/`#FFFFFF` | FFFFFF |
|
|
|
|
| exactmatch | em, exact, match | Does the part need to match the partid completely<br>If set to false, this will tint all parts with IDs containing partid<br>Example: pid=arm;em=false<br>This will tint both leftarm and rightarm | true |
|
|
|
|
### Example
|
|
|
|
`- tint{m=kindletronsr;pid=arm;em=false;c=FF0000} @self ~onAttack`
|
|
|
|
This will tint both arms of the model when the mob attacks. Since `em=false`, any bone with IDs containing `arm` (right_arm / left_arm) will be tinted.
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## Enchant
|
|
|
|
Enchant or disenchant certain parts of the model.
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|------------|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|
|
|
|
|
| modelid | m, mid, model | The model being tinted | |
|
|
|
|
| partid | p, pid, part | The part being tinted | |
|
|
|
|
| enchant | en | Is this mechanic enchanting part or disenchanting | true |
|
|
|
|
| exactmatch | em, exact, match | Does the part need to match the partid completely<br>If set to false, this will tint all parts with IDs containing partid<br>Example: pid=arm;em=false<br>This will tint both leftarm and rightarm | true |
|
|
|
|
### Example
|
|
|
|
`- enchant{m=kindletronsr;pid=arm;en=true;em=false} @self ~onDamaged =50%`
|
|
|
|
This will enchant both of the model's arms, when the mob falls below 50% HP. Since `em=false`, any bone with IDs containing `arm` (right_arm / left_arm) will be enchanted.
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## SwapModel
|
|
|
|
Macro mechanic for adding and removing models at the same time.
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|------------|------------------|-----------------------------|---------|
|
|
|
|
| modelid | m, mid, model | The model being removed | |
|
|
|
|
| newmodelid | n, nid, newmodel | The new model being applied | |
|
|
|
|
### Example
|
|
|
|
`- swapmodel{m=kindletronjr;nid=kindletronsr} @self ~onDamaged =50%`
|
|
|
|
This will change the entire model of the existing mob when it falls below 50% HP.
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## ChangePart
|
|
|
|
Set the part to display a part from a different model. This will not change the location of the bone, only visually change the model.
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|------------|--------------------|----------------------------------|---------|
|
|
|
|
| modelid | m, mid, model | The targeted model | |
|
|
|
|
| partid | p, pid, part | The targeted part | |
|
|
|
|
| newmodelid | nm, nmid, newmodel | The model of the new part | |
|
|
|
|
| newpartid | np, npid, newpart | The new part id replacing partid | |
|
|
|
|
### Example
|
|
|
|
`- changepart{m=kindletronjr;pid=left_arm;nm=kindletronsr;npid=left_arm} @self ~onSpawn`
|
|
|
|
This will change Kindletron Jr's left arm to Kindletron Sr's left arm when it spawns. Yes, you can mix & match parts from different models with this mechanic! Note that the location of a bone cannot change, therefore in this example, Kindletron Jr would have one giant floating arm!
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## SubModel
|
|
|
|
Add or remove a part of a different model to the targeted model. This will create all child bones contained in the substitution, with the offset and rotation taken from the model.
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|------------|--------------------|------------------------------------------------------------------------------------------------------------------|---------|
|
|
|
|
| modelid | m, mid, model | The targeted model | |
|
|
|
|
| partid | p, pid, part | The targeted part | |
|
|
|
|
| submodelid | sm, smid, submodel | The model of the new part | |
|
|
|
|
| subpartid | sp, spid, subpart | The new part | |
|
|
|
|
| customid | c, cid | Optional: Give the substitution a unique part id<br>Afterwards, when manupulating this part, this id can be used | |
|
|
|
|
| remove | r | Is this mechanic removing a part | |
|
|
|
|
### Example
|
|
|
|
`- submodel{model=kindletronjr;part=right_hand;submodel=weapons;subpart=whip;customid=kindle_whip} @self ~onAttack`
|
|
|
|
Create the whip part and its children from `weapons`, name the whip bone `kindle_whip`, and set `right_hand` as the whip's parent when attacking.
|
|
|
|
`- submodel{model=kindletronjr;subpart=kindle_whip;remove=true} @self ~onDamaged`
|
|
|
|
Remove `whip` from kindletronjr using custom id `kindle_whip` when damaged.
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## Petrify
|
|
|
|
Create a statue of the model. This model will no longer be able to change or move.
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|------------|--------------------|----------------------------------|---------|
|
|
|
|
| modelid | m, mid, model | The targeted model | |
|
|
|
|
### Example
|
|
|
|
`- petrify{m=kindletronjr} @self ~onDeath`
|
|
|
|
This will create a statue of Kindletron Jr when he dies. Note that petrify does kill the mob that the model is "riding" on, with no way of removing it!
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## DefaultState
|
|
|
|
Set the default state to a different state. This is for changing automatic states such as idle animation.
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|-----------|---------------|---------------------------------------------------------------------------------|---------|
|
|
|
|
| modelid | m, mid, model | The targeted model | |
|
|
|
|
| type | t | The targeted default state<br>Available default states: IDLE, WALK, JUMP, DEATH | |
|
|
|
|
| state | s | The new default state | |
|
|
|
|
### Example
|
|
|
|
`- defaultstate{m=kindletronjr;t=walk;s=run} @self ~onDamaged`
|
|
|
|
This will set Kindletron Jr's walking animation to a running animation. This is very useful when combined with stance & auras! I personally use this when passive mobs "flee" from the player, then run another `defaultstate` mechanic after the mob has disengaged from combat.
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## BodyClamp
|
|
|
|
Set the maximum head rotation before rotating the body. This effect can be seen on player models, where the body will stay stationary before the head rotates beyond 50 degrees.
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|-----------|---------------|---------------------------------------------------------------|---------|
|
|
|
|
| modelid | m, mid, model | The targeted model | |
|
|
|
|
| clamp | c, angle | The maximum head rotation before the body moves with the head | 50 |
|
|
|
|
### Example
|
|
|
|
`- bodyclamp{m=kindletronsr;c=10} @self ~onSpawn`
|
|
|
|
This will set the amount of rotation limit of the "neck" before the body begins to rotate with it. Note how all mobs in Minecraft have neck rotations, before also moving their body to follow the player!
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## SetModelTag
|
|
|
|
Set the name displayed on the name tag of the model.
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|-----------|---------|------------------------------------|---------|
|
|
|
|
| bone | b | The selected bone | |
|
|
|
|
| tag | t | The name, or a placeholder string | |
|
|
|
|
| visible | v | The visibility of the name tag | true |
|
|
|
|
### Example
|
|
|
|
`- setmodeltag{bone=hp_bar;tag=<caster.hp>} @self ~onSpawn`
|
|
|
|
This will find a nametag bone called `hp_bar` and set it to display the caster's HP on spawn. The value would update automatically without ~onTimer trigger.
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## SetModelTagVisible
|
|
|
|
Set the visibility of the name tag of the model.
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|-----------|---------|--------------------------------|---------|
|
|
|
|
| bone | b | The selected bone | |
|
|
|
|
| visible | v | The visibility of the name tag | false |
|
|
|
|
### Example
|
|
|
|
`- setmodeltagvisible{b=enrage_tag;v=false} @self ~onDamaged =10%`
|
|
|
|
This will hide the model's enraged status tag when it falls below 10% HP.
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## Disguise
|
|
|
|
Disguise the targeted player to the model.
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|-----------|---------------|---------------------------------------|---------|
|
|
|
|
| modelid | m, mod, model | The model id of the disguise | |
|
|
|
|
| seeself | s, see | Can the player see their own disguise | true |
|
|
|
|
### Example
|
|
|
|
`- disguise{m=kindletronjr;s=true} @trigger ~onInteract`
|
|
|
|
This will disguise the player as a Model Engine model.
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## Undisguise
|
|
|
|
Remove the model disguise of the targeted player.
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|-----------|---------------|---------------------------------------|---------|
|
|
|
|
### Example
|
|
|
|
`- undisguise @trigger ~onInteract`
|
|
|
|
This will clear a player's Model Engine disguise.
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## LockHead
|
|
|
|
Lock the pitch and yaw rotation of the model.
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|-----------|------------|----------------------------|-----------|
|
|
|
|
| lockpitch | lp, lpitch | Should the pitch be locked | No change |
|
|
|
|
| lockyaw | ly, lyaw | Should the yaw be locked | No change |
|
|
|
|
### Example
|
|
|
|
`- lockhead{lp=true} @self ~onInteract`
|
|
|
|
This will lock the pitch of the model's head when right-clicked.
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## ChangeParent
|
|
|
|
Force a part of the model to be child bone of another part. This will not create any new part.
|
|
|
|
> Note: The part would still be using the offset from its old parent.
|
|
|
|
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|-----------|---------------|----------------------------------|---------|
|
|
|
|
| modelid | m, mid, model | The model id of the model | |
|
|
|
|
| parent | p | The new parent of the child part | |
|
|
|
|
| child | c | The targeted child part | |
|
|
|
|
### Example
|
|
|
|
`- changeparent{model=guard;parent=left_hand_attach;child=sword} ~onEnterCombat`
|
|
|
|
Make the guard hold the sword with their left hand when in combat, and
|
|
|
|
`- changeparent{model=guard;parent=sheath_attach;child=sword} ~onDropCombat`
|
|
|
|
Make the guard put the sword back into their sheath.
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## PartVisibility
|
|
|
|
Set the visibility of a part of the model. This will not remove or add any part.
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|------------|---------------|----------------------------|---------|
|
|
|
|
| modelid | m, mod, model | The model id of the model | |
|
|
|
|
| partid | p, pid, part | The targeted part | |
|
|
|
|
| visibility | v, visible | Should the part be visible | false |
|
|
|
|
| exactmatch | em, exact, match | Does the part need to match the partid completely<br>If set to false, this will change the visibility of all parts with IDs containing partid<br>Example: pid=arm;em=false<br>This will select both leftarm and rightarm | true |
|
|
|
|
### Example
|
|
|
|
`- partvisibility{m=kindletronsr;p=right_arm;v=false} @self ~onDamaged =20%`
|
|
|
|
This will make Kindletron Sr's right arm disappear when he goes below 20% health.
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## BindHitbox
|
|
|
|
Spawn a mythic mob and bind that mob to a specific sub-hitbox.
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|-----------|---------------|----------------------------------------|----------|
|
|
|
|
| modelid | m, mid, model | The model id of the sub-hitbox | |
|
|
|
|
| partid | p, pid, part | The id of the sub-hitbox | |
|
|
|
|
| type | t, mob, m | The mythic mob bound to the sub-hitbox | SKELETON |
|
|
|
|
### Example
|
|
|
|
`- bindhitbox{m=kindletronsr;p=b_right_arm;t=KindletronSR_RightArmHitbox} @self ~onSpawn`
|
|
|
|
This will summon a mythic mob that represents Kindletron Sr's right arm sub-hitbox. All triggers would work separately from the base mob.
|
|
|
|
To target the base mob from the sub-hitbox mob, use @Parent targeter.
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## HitboxConfig
|
|
|
|
Configure the interaction between a sub-hitbox and the base mob.
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|-----------|---------------|------------------------------------------------------------------------------------------------------------------------------------------------|---------|
|
|
|
|
| modelid | m, mid, model | The model id of the sub-hitbox | |
|
|
|
|
| partid | p, pid, part | The id of the sub-hitbox | |
|
|
|
|
| pass | | Percentage of damage passed to base mob.<br>If value > 0, attack and interact remain.<br>If value <= 0, attack and interact would be canceled. | 1 |
|
|
|
|
### Example
|
|
|
|
`- hitboxconfig{m=kindletronsr;p=b_right_arm;pass=0.5;delay=1} @self ~onSpawn`
|
|
|
|
This will make the right arm hitbox transfer only 50% of the damage received. However, if a mythic mob is bound using [BindHitbox](https://github.com/Ticxo/Model-Engine-Wiki/wiki/Mechanics#bindhitbox), the mythic mob would take full damage.
|
|
|
|
Add a delay to the mechanic to ensure the bone is correctly initialized.
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
## RemapModel
|
|
|
|
Remap a new model to the current model, part by part.
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|
|------------|------------------|------------------------------------------------------------------|---------|
|
|
|
|
| modelid | m, mid, model | The model id of the current model | |
|
|
|
|
| newmodelid | n, nid, newmodel | The model id of the new model | |
|
|
|
|
| map | | (Optional) The model of a map used to map from newmodel to model | |
|
|
|
|
### Example
|
|
|
|
`- remapmodel{m=kindletronsr;n=kindletronsr_enraged} @self ~onDamaged =20%`
|
|
|
|
This will enrage Kindletron Sr and change the appearance of the model. However, all the animations are still using the old model.
|
|
|
|
If you wish to remap again, please use the initial model id as `modelid`. In this scenario, it would be `kindletronsr`, not `kindletronsr_enraged`. |
|
|
|
\ No newline at end of file |