|
9 | 9 | # @contributors Max^ |
10 | 10 | # @thanks Darwin, Max^, kalebbroo, sharklaserss - for helping with reference models, testing, ideas, etc |
11 | 11 | # @date 2022/06/01 |
12 | | -# @updated 2022/12/24 |
| 12 | +# @updated 2023/05/12 |
13 | 13 | # @denizen-build REL-1782 |
14 | | -# @script-version 1.6 |
| 14 | +# @script-version 1.7 |
15 | 15 | # |
16 | 16 | # This takes BlockBench "BBModel" files, converts them to a client-ready resource pack and Denizen internal data, |
17 | 17 | # then is able to display them in minecraft and even animate them, by spawning and moving invisible armor stands with resource pack items on their heads. |
|
55 | 55 | # /dmodels animate [animation] - "dmodels.animate" - Causes your nearest real-spawned model to play the specified animation |
56 | 56 | # /dmodels stopanimate - "dmodels.stopanimate" - Causes your nearest real-spawned model to stop animating |
57 | 57 | # /dmodels npcmodel [model] - "dmodels.npcmodel" - sets an NPC to render as a given model (must be loaded). Use 'none' to remove the model. |
| 58 | +# /dmodels rotate [0,0,0] - "dmodels.rotate" - Rotates the entire model to the set euler angles. |
| 59 | +# /dmodels scale [1,1,1] - "dmodels.scale" - Scales the entire model to the set scale. |
| 60 | +# /dmodels color [255,255,255] - "dmodels.color" - Sets the color of the model to the set color. |
58 | 61 | # |
59 | 62 | # ######### |
60 | 63 | # |
|
75 | 78 | # - run dmodels_move_to_frame def.root_entity:<[root]> def.animation:idle def.timespot:0.5 |
76 | 79 | # # To remove a model |
77 | 80 | # - run dmodels_delete def.root_entity:<[root]> |
| 81 | +# # To rotate a model |
| 82 | +# - run dmodels_set_rotation def.root_entity:<[root]> def.quaternion:<quaternion[identity]> |
| 83 | +# # To scale a model |
| 84 | +# - run dmodels_scale_model def.root_entity:<[root]> def.scale:<location[1,1,1]> |
| 85 | +# # To set the color of a model |
| 86 | +# - run dmodels_set_color def.root_entity:<[root]> def.color:<color[red]> |
78 | 87 | # |
79 | 88 | # ######### |
80 | 89 | # |
|
92 | 101 | # list: A ListTag of valid model names, equivalent to the ones that can be input to 'dmodels_load_bbmodel' |
93 | 102 | # This task should be ~waited for. |
94 | 103 | # dmodels_spawn_model |
95 | | -# Usage: Spawns a single instance of a model using real armor stand entities at a location. |
| 104 | +# Usage: Spawns a single instance of a model using real item display entities at a location. |
96 | 105 | # Input definitions: |
97 | 106 | # model_name: The name of the model to spawn, must already have been loaded via 'dmodels_load_bbmodel'. |
98 | 107 | # location: The location to spawn the model at. |
99 | | -# tracking_range: (OPTIONAL) can override the global tracking_range setting in the config below per-model if desired. |
| 108 | +# scale: The scale to spawn the model with. |
| 109 | +# rotation: The rotation to spawn the model with. |
| 110 | +# view_range: (OPTIONAL) can override the global view_range setting in the config below per-model if desired. |
100 | 111 | # fake_to: (OPTIONAL) list of players to fake-spawn the model to. If left off, will use a real (serverside) entity spawn. |
101 | 112 | # Supplies determination: EntityTag of the model root entity. |
102 | 113 | # dmodels_delete |
103 | 114 | # Usage: Deletes a spawned model. |
104 | 115 | # Input definitions: |
105 | 116 | # root_entity: The root entity gotten from 'dmodels_spawn_model'. |
106 | 117 | # dmodels_reset_model_position |
107 | | -# Usage: Resets any animation data on a model, moving the model back to its default positioning. |
| 118 | +# Usage: Updates the model's position, rotation, and scale. |
108 | 119 | # Input definitions: |
109 | 120 | # root_entity: The root entity gotten from 'dmodels_spawn_model'. |
110 | 121 | # dmodels_end_animation |
|
123 | 134 | # animation: The name of the animation to play (as set in BlockBench). |
124 | 135 | # timespot: The time (in seconds) from the start of the animation to select as the frame. |
125 | 136 | # delay_pose: 'true' if playing fluidly to offset the pose application over time, 'false' to snap exactly to frame position. |
| 137 | +# dmodels_set_rotation: |
| 138 | +# Usage: Sets the global rotation of the model |
| 139 | +# Input definitions: |
| 140 | +# root_entity: The root entity gotten from 'dmodels_spawn_model'. |
| 141 | +# quaternion: The quaternion to set the rotation to. |
| 142 | +# update: 'true' if the model should update it's global rotation. |
| 143 | +# dmodel_set_scale: |
| 144 | +# Usage: Sets the scale of the model |
| 145 | +# Input definitions: |
| 146 | +# root_entity: The root entity gotten from 'dmodels_spawn_model |
| 147 | +# scale: The scale to set the model to as a LocationTag <location[1,1,1]>. |
| 148 | +# update: 'true' if the model should update it's scale. |
| 149 | +# dmodels_set_color: |
| 150 | +# Usage: Sets the color of the model |
| 151 | +# Input definitions: |
| 152 | +# root_entity: The root entity gotten from 'dmodels_spawn_model |
| 153 | +# color: The color to set the model to as a ColorTag <color[red]>.' |
| 154 | +# dmodels_set_view_range: |
| 155 | +# Usage: Sets the view range of the model |
| 156 | +# Input definitions: |
| 157 | +# root_entity: The root entity gotten from 'dmodels_spawn_model |
| 158 | +# view_range: The view range of the model. |
126 | 159 | # dmodels_attach_to |
127 | 160 | # Usage: Attaches a model's position/rotation to an entity. |
128 | 161 | # Input definitions: |
|
137 | 170 | # 'dmodel_anim_part.<ID_HERE>': a mapping of outline IDs to the part entity spawned for them. |
138 | 171 | # 'dmodels_animation_id': only if the model is animating automatically, contains the animation ID. |
139 | 172 | # 'dmodels_anim_time': only if the model is animating automatically, contains the progress through the current animation as a number representing time. |
| 173 | +# 'dmodels_global_rotation' the rotation of the entire model this also affects the rotation while the model is animating. |
| 174 | +# 'dmodels_global_scale' the scale of the entire model. |
| 175 | +# 'dmodels_view_range' the view range of the model. |
| 176 | +# 'dmodels_color' the color of the model. |
| 177 | +# 'dmodels_can_teleport' determines if the root and parts of the model can teleport or not this should be used for non-moveable animated models. |
140 | 178 | # 'dmodels_attached_to': the entity this model is attached to, if any. |
141 | 179 | # 'dmodels_temp_alt_anim': if set to a truthy value, will tell the model to not play any auto-animations (so other scripts can indicate they need to override the default) |
142 | | -# Additional flags are present on both the root and on parts, but are not considered API - use at your own risk. |
| 180 | +# Parts of the model have the following flags: |
| 181 | +# 'dmodel_def_part_id': the name of the part. |
| 182 | +# 'dmodel_def_can_rotate' if the part can rotate or not while playing animations. |
| 183 | +# 'dmodel_def_can_scale' if the part can scale or not while playing animations. |
| 184 | +# 'dmodel_def_pose' the default pose of the part after spawning |
| 185 | +# 'dmodel_def_offset' the relative offset of the part from the root entity's position |
| 186 | +# 'dmodel_root' returns the root entity of the part |
143 | 187 | # |
144 | 188 | # ######### |
145 | 189 | # |
|
158 | 202 | dmodels_config: |
159 | 203 | type: data |
160 | 204 | debug: false |
161 | | - # You can optionally set a tracking range for all properly-spawned model entities. |
162 | | - # If set to 0, will use the server default for armor stands. |
| 205 | + # You can optionally set a view range for all properly-spawned model entities. |
| 206 | + # If set to 0, will use the server default for display entities. |
163 | 207 | # You can instead set to a value like 16 for only short range visibility, or 128 for super long range, or any other number. |
164 | | - tracking_range: 0 |
| 208 | + view_range: 0 |
165 | 209 | # You can choose which item is used to override for models. |
166 | 210 | # Using a leather based item is recommended to allow for dynamically recoloring items. |
167 | 211 | # Leather_Horse_Armor is ideal because other leather armors make noise when equipped. |
|
0 commit comments