User Tools

Site Tools


mr:imp_shopkeeper_npc

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

  • Key Behaviors:
    1. Uses shared Shopkeeper.lua script with TownShopkeeper
    2. First-sight greeting gated by entity kind check (ImpShopkeeper)
    3. Greeting uses “ImpShopkeeper_Greetings� string resource
    4. Standard shopkeeper trading functionality

Spawn Configuration

  • Level: City level (depth 17+)
  • Spawner: CityLevel.spawnMobs()
  • Random chance based on depth

String Resources

Code References

mr/imp_shopkeeper_npc.txt · Last modified: by 127.0.0.1