Merge branch 'main' into 'main'

added chatter npc behaviour, script and associated lang files

See merge request cable-mc/cobblemon!2194
This commit is contained in:
Hiroku
2026-04-18 01:33:44 +00:00
3 changed files with 53 additions and 0 deletions
@@ -3919,6 +3919,18 @@
"cobblemon.entity.variable.dialogue_selection.name": "Dialogue",
"cobblemon.entity.variable.dialogue_selection.desc": "The resource identifier of the dialogue to open on interaction, such as cobblemon:your_dialogue",
"cobblemon.behaviour.chatter_npc.name": "Chatter NPC",
"cobblemon.behaviour.chatter_npc.desc": "Allows the NPC to talk with the player using the in-game chat when interacted with, optional animation support.",
"cobblemon.entity.variable.chat_message.name": "Chat Message",
"cobblemon.entity.variable.chat_message.desc": "Content for the message the NPC says when interacted with. Supports traditional minecraft colour and formatting.",
"cobblemon.entity.variable.animation_name.name": "Animation Name",
"cobblemon.entity.variable.animation_name.desc": "The name of the animation to play when the NPC is interacted with.",
"cobblemon.entity.variable.play_animation.name": "Play Animation",
"cobblemon.entity.variable.play_animation.desc": "Whether to play an animation when the NPC is interacted with.",
"npc.sacchi.name": "Professor Sacchi",
"cobblemon.move.pound": "Pound",
@@ -0,0 +1,39 @@
{
"name": "cobblemon.behaviour.chatter_npc.name",
"description": "cobblemon.behaviour.chatter_npc.desc",
"entityType": "cobblemon:npc",
"undo": [
"q.entity.unset_interaction();"
],
"configurations": [
{
"type": "script",
"variables": [
{
"variableName": "chat_message",
"displayName": "cobblemon.entity.variable.chat_message.name",
"description": "cobblemon.entity.variable.chat_message.desc",
"type": "TEXT",
"defaultValue": "Hello!"
},
{
"variableName": "animation_name",
"displayName": "cobblemon.entity.variable.animation_name.name",
"description": "cobblemon.entity.variable.animation_name.desc",
"type": "TEXT",
"defaultValue": "wave"
},
{
"variableName": "play_animation",
"displayName": "cobblemon.entity.variable.play_animation.name",
"description": "cobblemon.entity.variable.play_animation.desc",
"type": "BOOLEAN",
"defaultValue": "false"
}
],
"script": [
"q.entity.set_script_interaction('cobblemon:chatter-npc-interaction')"
]
}
]
}
@@ -0,0 +1,2 @@
q.player.tell(q.npc.name + ': ' + q.npc.config.chat_message);
q.npc.config.play_animation ? q.npc.play_animation(q.npc.config.animation_name, q.player.uuid);