Table of Contents
Servant NPC - Code References
Java Classes
JSON Configuration
JSON Configuration (Sprite)
Level Configuration
String Resources
Lua Scripts
Additional References
Related mr Entities
Servant NPC - Code References
Java Classes
This entity is implemented via JSON configuration and Lua script, no Java class exists.
JSON Configuration
ServantNPC.json
- Mob configuration file
Location: `RemixedDungeon/src/main/assets/mobsDesc/ServantNPC.json`
Properties:
`friendly`: true (non-hostile NPC)
`movable`: true (can move around)
`aiState`: “Passive” (passive AI behavior)
`fraction`: “NEUTRAL” (neutral faction)
`immortal`: true (cannot be killed)
`spriteDesc`: “spritesDesc/ServantNPC.json” (sprite configuration)
`scriptFile`: “scripts/npc/Servant” (Lua behavior script)
JSON Configuration (Sprite)
spritesDesc/ServantNPC.json
- Sprite animation configuration
Level Configuration
Inn_2021_03.json
- Level configuration where ServantNPC spawns
Location: `RemixedDungeon/src/main/assets/levelsDesc/Inn_2021_03.json`
Spawn: Line 27, `“kind”:“ServantNPC”`
String Resources
English
(`values/strings_all.xml`):
`ServantNPC_Name` (line 1964): “inn servant”
`ServantNPC_Name_Objective` (line 1965): “inn servant”
`ServantNPC_Gender` (line 1966): “feminine”
`ServantNPC_Desc` (line 1967): “A very busy inn servant.”
Russian
(`values-ru/strings_all.xml`):
`ServantNPC_Name`: “служанка”
`ServantNPC_Name_Objective`: “служанку”
`ServantNPC_Gender`: “feminine”
`ServantNPC_Desc`: “Очень занятая служанка в таверне.”
Lua Scripts
Servant.lua
- NPC behavior script
Location: `RemixedDungeon/src/main/assets/scripts/npc/Servant.lua`
Behavior: Uses `mob.init()` with `interact` and `act` functions
Interactions: Says random phrases from `InnServant_Phrase_1` to `InnServant_Phrase_4`
AI: Moves randomly using `MoveOrder` state, avoids other ServantNPCs
Additional References
strings_all.xml (EN)
- English string resources
strings_all.xml (RU)
- Russian string resources
Related mr Entities
Inn Level