Kweebec_Merchant
Server/NPC/Roles/Intelligent/Neutral/Kweebec/Kweebec_Merchant.json, 6.3 KB
Fields
| Field | Type |
|---|---|
Type | string |
Parameters | object |
StartState | string |
DefaultNPCAttitude | string |
DefaultPlayerAttitude | string |
Appearance | string |
MaxHealth | number |
IsMemory | boolean |
MemoriesCategory | string |
MemoriesNameOverride | object |
DisableDamageGroups | array[1] |
CombatConfig | object |
BusyStates | array[1] |
Invulnerable | object |
KnockbackScale | number |
MotionControllerList | array[1] |
Instructions | array[1] |
InteractionInstruction | object |
NameTranslationKey | object |
Source
{
"Type": "Generic",
"Parameters": {
"Invulnerable": {
"Value": false,
"Description": "Whether this NPC is invulnerable."
},
"MemoriesNameOverride": {
"Value": "Kweebec_Rootling",
"Description": "Overrides the memory name if set"
},
"NameTranslationKey": {
"Value": "server.npcRoles.Kweebec_Merchant.name",
"Description": "Translation key for NPC name display"
}
},
"StartState": "Idle",
"DefaultNPCAttitude": "Ignore",
"DefaultPlayerAttitude": "Neutral",
"Appearance": "Kweebec_Rootling",
"MaxHealth": 50,
"IsMemory": true,
"MemoriesCategory": "Kweebec",
"MemoriesNameOverride": { "Compute": "MemoriesNameOverride" },
"DisableDamageGroups": [ "Self" ],
"CombatConfig": {
"EntityEffect": "Immunity_Environmental"
},
"BusyStates": [ "$Interaction" ],
"Invulnerable": { "Compute": "Invulnerable" },
"KnockbackScale": 0.5,
"MotionControllerList": [
{
"Type": "Walk",
"MaxWalkSpeed": 5,
"Gravity": 10,
"RunThreshold": 0.3,
"MaxFallSpeed": 15,
"MaxRotationSpeed": 360,
"Acceleration": 10
}
],
"Instructions": [
{
"Instructions": [
{
"$Comment": "Idle state - no player nearby",
"Sensor": {
"Type": "State",
"State": "Idle"
},
"Instructions": [
{
"$Comment": "Wave at player when they approach",
"ActionsBlocking": true,
"Sensor": {
"Type": "Player",
"Range": 8
},
"Actions": [
{
"Type": "PlayAnimation",
"Slot": "Status",
"Animation": "Wave"
},
{
"Type": "State",
"State": "Watching"
}
]
},
{
"Sensor": {
"Type": "Any"
},
"BodyMotion": {
"Type": "Nothing"
}
}
]
},
{
"$Comment": "Watching state - player is nearby, just watch them",
"Sensor": {
"Type": "State",
"State": "Watching"
},
"Instructions": [
{
"$Comment": "Watch nearby players with head",
"Continue": true,
"Sensor": {
"Type": "Player",
"Range": 12
},
"HeadMotion": {
"Type": "Watch"
}
},
{
"$Comment": "Clear wave animation after delay",
"Continue": true,
"Sensor": {
"Type": "Any"
},
"Actions": [
{
"Type": "Timeout",
"Delay": [ 2, 2 ],
"Action": {
"Type": "PlayAnimation",
"Slot": "Status"
}
}
]
},
{
"$Comment": "Return to Idle when player leaves (clear animation first)",
"Sensor": {
"Type": "Not",
"Sensor": {
"Type": "Player",
"Range": 12
}
},
"Actions": [
{
"Type": "PlayAnimation",
"Slot": "Status"
},
{
"Type": "State",
"State": "Idle"
}
]
},
{
"Sensor": {
"Type": "Any"
},
"BodyMotion": {
"Type": "Nothing"
}
}
]
},
{
"$Comment": "Interaction state - look at player while shop is open",
"Sensor": {
"Type": "State",
"State": "$Interaction"
},
"Instructions": [
{
"Continue": true,
"Sensor": {
"Type": "Target",
"Range": 10
},
"HeadMotion": {
"Type": "Watch"
}
},
{
"$Comment": "Return to Watching after interaction ends",
"Sensor": {
"Type": "Any"
},
"Actions": [
{
"Type": "Timeout",
"Delay": [ 1, 1 ],
"Action": {
"Type": "Sequence",
"Actions": [
{
"Type": "ReleaseTarget"
},
{
"Type": "State",
"State": "Watching"
}
]
}
}
]
}
]
}
]
}
],
"InteractionInstruction": {
"Instructions": [
{
"Sensor": {
"Type": "Not",
"Sensor": {
"Type": "CanInteract",
"ViewSector": 180
}
},
"Actions": [
{
"Type": "SetInteractable",
"Interactable": false
}
]
},
{
"Continue": true,
"Sensor": {
"Type": "Any"
},
"Actions": [
{
"Type": "SetInteractable",
"Interactable": true,
"Hint": "server.interactionHints.trade"
}
]
},
{
"Sensor": {
"Type": "HasInteracted"
},
"Instructions": [
{
"Sensor": {
"Type": "Not",
"Sensor": {
"Type": "State",
"State": "$Interaction"
}
},
"Actions": [
{
"Type": "LockOnInteractionTarget"
},
{
"Type": "OpenBarterShop",
"Shop": "Kweebec_Merchant"
},
{
"Type": "State",
"State": "$Interaction"
}
]
}
]
}
]
},
"NameTranslationKey": { "Compute": "NameTranslationKey" }
}