BetterModel
Overview
BetterModel connects the BetterModel plugin to TypeWriter. You design a model and its animations in Blockbench, install it in BetterModel, then use it in TypeWriter as an entity: a definition says which model to use, an instance places it in the world, and the usual TypeWriter entity machinery (audiences, activities, interactions, dialogue speakers) works on it.
Models are rendered with packets, per player, so each player can see a different state of the same NPC: other bones shown, other glow, other equipment. The extension also adds actions to play and stop animations, cinematic entries to animate models and player limbs, and a camera that rides a bone of an animated model.
Features
- Model entities — a definition and an instance turn any BetterModel model into an NPC with audience, activity and interaction support.
- Automatic animations — idle, walk, strafe, jump, fly, attack, hurt and interact animations are played from the entity state, with names you can change.
- Animation actions — play or stop an animation on a placed model from any trigger.
- Bone control per player — show or hide bones and set glow, tint, enchant glint and brightness depending on criteria.
- Custom hitboxes — click areas bound to bones with Hitbox, or automatic ones from
hitboxbones of the model. - Bone replacement — swap a bone with one from another model using Attachment or Passenger.
- Player animations — play BetterModel player-limb animations on the player with an action or in a cinematic.
- Cinematics — drive a model from a recording with the entity cinematic and film it with the bone camera.
- Interaction indicator — named models show an interact or dialogue indicator above their name, driven by interact objectives and interaction entries.
Installation
- Install BetterModel on the server and make sure it loads your models. The bone camera needs BetterModel 2.1.0 or later; the extension is built against BetterModel 3.3.0.
- Install the official TypeWriter extensions Quest, Basic, Entity and RoadNetwork (the extension is built against all four).
- Obtain BetterModel from the stores (see the buttons above) and put the JAR in
plugins/Typewriter/extensions/. - Restart the server. The log shows
[BetterModelExtension] BetterModel detected: initializing. If BetterModel is missing, it showsBetterModel plugin not found; extension disabled. - Put your models in BetterModel and generate its resource pack as BetterModel documents. Players must have accepted the resource pack to see the models.
Getting started
Place an animated NPC that waves when you click it:
- In the TypeWriter web panel, open a static page and add a BetterModel Definition. Set
modelIdto the name of your model in BetterModel, enablenamedand setdisplayName. - In
defaultAnimationSettings, check thatidle,walkandinteractmatch the animation names of your model (the defaults areidle,walkandinteract). - Open a manifest page and add a BetterModel Instance, set
definitionto the one you just created and capturespawnLocationwith the position tool. - Optionally add Bone Visibility in the
dataof the definition to hide a bone (for example a hat) from players who do not match a criteria. - Add an entity interact event and a Play Entity Animation action. Set
entityto the instance andanimationto a custom animation name. - Publish and click the NPC in game.
The NPC can only be clicked where it has an interaction hitbox. Name a bone hitbox in Blockbench, or add a Hitbox entry. Without either, a single box covering the whole model is used.
How it works
The definition holds what is shared (model, animation names, hitboxes, data). The instance holds the position, extra data and an activity. Data entries of the instance are applied after those of the definition, so an instance can override its definition.
Configuration
The extension has no configuration file. Models, limbs and the resource pack are managed by BetterModel.
Two folders of BetterModel are used by name: entities use models registered by BetterModel, and the player actions and cinematics read player-limb models from BetterModel's players folder (for example steve, alex).
Entries
15 entries, generated from the extension source.
Actions3
- Play Bettermodel AnimationPlay an animation on a BetterModel entity
- Play Player AnimationPlay a player animation from BetterModel players folder
- Stop Bettermodel AnimationStop an animation on a BetterModel entity
Cinematics4
- Bettermodel Animation CinematicPlay a BetterModel model animation during a cinematic
- Bettermodel Bone Camera CinematicAttach the cinematic camera to a bone of a BetterModel
- Bettermodel Entity CinematicUse an animated BetterModel entity in a cinematic
- Player Animation CinematicPlay a player animation during a cinematic
Entities2
- Bettermodel DefinitionA BetterModel entity definition
- Bettermodel InstanceAn instance of a BetterModel entity
Entity data6
- Bettermodel AttachmentReplace a bone of a BetterModel with one from another model
- Bettermodel Bone AppearancePer-bone glow, tint, glint and brightness
- Bettermodel Bone VisibilityControl bone visibility with criteria
- Bettermodel Hitbox DataConfigure hitbox on a specific bone
- Bettermodel Indicator ConfigConfigure the interaction indicator for a BetterModel entity
- Bettermodel PassengerAttach a passenger entity to a BetterModel bone
Troubleshooting
The NPC is invisible. Check the log for Model '...' not found. The modelId must match a model loaded by BetterModel. When it does not, the extension tries a model called steve and, if that is also missing, spawns nothing. Also check that the player accepted the resource pack.
The NPC appears but cannot be clicked. The interaction hitbox comes from a bone whose name contains hitbox or hit_box, or from Hitbox entries. If the model has neither, one box covering the model is created, and its height is at least 1.8 blocks. Adjust hitboxYOffset in defaultAnimationSettings if the boxes float at the wrong height (default -1.6).
An animation does nothing. Animation names are those of the Blockbench model, with exact spelling. For Play Player Animation, the modelId must be a limb model from BetterModel's players folder, not a regular model.
Equipment, fire or other vanilla data have no effect. A model has no vanilla entity metadata. The log prints a one-time warning such as '...' has no BetterModel equivalent and is ignored. Main hand, off hand and helmet equipment need bones tagged ri, li and ph in Blockbench (otherwise the log says the model has no bone for that slot); armour slots are not supported. Non-uniform 3D scale uses the X value only.
The bone camera does not move. It stays where it was while the model is not visible to the player or the bone is not found. Check boneName (case-insensitive), and that either entityCinematic or instance is set; the entity cinematic wins when both are.
The model is gone after a world change or a reconnect. The extension reloads the models after join, respawn, teleport and resource pack load with short delays (up to 5 seconds). If a model stays missing, relog; cinematic models are removed on world change and when the player quits.
Related extensions
- Text Display Dialogue — floating dialogue above model NPCs.