mr:imp_shopkeeper_npc
Table of Contents
Imp Shopkeeper NPC - Machine Reference
This page contains machine-readable reference information about the Imp Shopkeeper NPC for automated tools and AI assistants.
Entity Information
- Entity Type: NPC (Shopkeeper variant)
- Implementation: Lua (Shopkeeper.lua script) + JSON configuration
- Entity Kind: ImpShopkeeper
- Script File: scripts/npc/Shopkeeper.lua
- Sprite: spritesDesc/Imp.json
JSON Configuration
- File: mobsDesc/ImpShopkeeper.json
- Key Properties:
{
"baseSpeed": 1,
"spriteDesc": "spritesDesc/Imp.json",
"scriptFile": "scripts/npc/Shopkeeper",
"friendly": true,
"movable": false,
"aiState": "Passive",
"demon": true,
"fraction": "NEUTRAL",
"npc": true,
"isHumanoid": true,
"immunities": ["Regeneration"],
"ht": 1,
"exp": 0,
"carcassChance": 0,
"persistOnReset": true
}
Lua Implementation
- Script: Shopkeeper.lua
- Key Behaviors:
- Uses shared Shopkeeper.lua script with TownShopkeeper
- First-sight greeting gated by entity kind check (ImpShopkeeper)
- Greeting uses “ImpShopkeeper_Greetings� string resource
- Standard shopkeeper trading functionality
Spawn Configuration
- Level: City level (depth 17+)
- Spawner: CityLevel.spawnMobs()
- Random chance based on depth
String Resources
- Greeting: ImpShopkeeper_Greetings
- Name: ImpShopkeeper_Name
- English: strings_all.xml
- Russian: strings_all.xml (ru)
Related mr Entities
- Shopkeeper NPC - Base shopkeeper implementation
- Imp NPC - Quest-giving Imp variant
- Town Shopkeeper NPC - Town shopkeeper variant
Code References
- Shopkeeper.lua - Shared shopkeeper Lua script
- ImpShopkeeper.json - NPC configuration
- CityLevel.java - Spawn logic
mr/imp_shopkeeper_npc.txt · Last modified: by 127.0.0.1
