-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Custom entities as of now can only have a single animation marked as "Idle".
Trying to mark another animation as it will automatically set the previous one as "Other".
This is sad as multiple idle animations - which would be picked at random - could "spice up" an NPC on a server by having it not just have one single looped animation.
So, my feature request would be to allow multiple animations to be marked as "Idle" which ItemsAdder would then pick at random.
Additionally should there be a setting to set a percentage for the animation. By default would each Idle animation have an equal chance of being picked, but by setting your own value could there be a better way of controlling which animation to play.
For example: Setting animations npc.idle and npc.idle_wave as Idle animations and then set the second one with a percentage of 10 would make it have a 1 in 10 chance of being selected, once the first idle animation would finish its loop.
Another thing I would like to quickly talk about is a way to define this through config files.
It could be of interest for the server owner to have a way of defining the animations in a configuration that would allow them further customization.
Perhaps the above idea could be realized by having the BlockBench plugin not just export assets, but also an items_pack file with the "bare-bones" setup.
This would of course require more settings in the plugin to allow the right stuff to be set.
Example:
Exporting a project with the following settings:
- namespace:
example - name:
npc - entity:
Zombie - silent:
true - can_sun_burn:
false - speed:
- movement:
1 - flying:
0
- movement:
- animations:
npc.idle(idle)npc.idle_wave(idle, 10%)npc.chest.open.1(other)npc.chest.open.2(other)
...would create items_packs/example/npc.yml with the following set:
info:
namespace: example
entities:
npc:
type: ZOMBIE
model_folder: "entity/npc"
silent: true
can_sun_burn: false
speed:
movement: 1
flying: 0
max_health: 20
animations:
'npc.idle':
type: idle
'npc.idle_wave':
type: idle
percentage: 10
'npc.chest.open.1':
type: other
'npc.chest.open.2':
type: otherThis in the end would - as mentioned - allow server owners to modify the NPC and what animations should be played.
Tho, this could have some downsides when f.e. a non-looped animation is set as idle... Maybe make IA not care about that in such a case and just let it repeat the animation either way?
Those things would of course require IA to have changes, but I think this could be a big benefit for the future.