====== Townsfolk NPC - Code References ====== This page contains machine-readable reference information about the Townsfolk NPC entity for automated tools and AI assistants. ===== Entity Information ===== * **Entity Kind:** TownsfolkNPC * **Entity Type:** NPC (Non-Player Character) * **Namespace:** mr: (machine-readable/metadata reference) * **Implementation:** Java class (no Lua script) ===== Java Classes ===== * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mobs/npc/TownsfolkNPC.java|TownsfolkNPC.java]] - Main Townsfolk NPC class * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mobs/npc/TownsfolkSilentNPC.java|TownsfolkSilentNPC.java]] - Silent variant of Townsfolk NPC * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mobs/npc/TownsfolkMovieNPC.java|TownsfolkMovieNPC.java]] - Movie theater variant of Townsfolk NPC * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mobs/common/MobFactory.java#L240|MobFactory.java]] - Registration of TownsfolkNPC class in mob factory * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mobs/npc/ImmortalNPC.java|ImmortalNPC.java]] - Base class for immortal NPCs ===== Class Implementation Details ===== package com.nyrds.pixeldungeon.mobs.npc; import com.nyrds.pixeldungeon.ml.R; import com.watabou.pixeldungeon.actors.Char; import com.watabou.pixeldungeon.scenes.GameScene; import com.watabou.pixeldungeon.windows.WndQuest; public class TownsfolkNPC extends ImmortalNPC { public TownsfolkNPC() {} @Override public boolean interact(final Char hero) { getSprite().turnTo( getPos(), hero.getPos() ); GameScene.show(new WndQuest(this, R.string.TownsfolkNPC_Message1, R.string.TownsfolkNPC_Message2, R.string.TownsfolkNPC_Message3, R.string.TownsfolkNPC_Message4)); return true; } } ===== JSON Configuration ===== No specific JSON configuration for this NPC found. This entity is implemented entirely in Java. ===== String Resources (English) ===== Source: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values/strings_all.xml|strings_all.xml]] Ah! Another adventurer, lovely! Make sure to loot as many valuables as you can! Town became so wealthy thanks to that dungeon, that everyone in town can afford to go on a vacation whenever we please! In fact that\'s why there is so few people in here right now. What a lovely day. I hope the sewers won\'t get flooded when spring arrives. We don\'t need another rat infestation. Hmph! ... Hmmm... Do you know about that special service the "movie theater" provides? Too bad they ask for some exotic thing called the "Internet", I never even heard about such a thing. ===== String Resources (Russian) ===== Source: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values-ru/strings_all.xml|strings_all.xml (Russian)]] * Russian localization available in values-ru/strings_all.xml ===== Lua Scripts ===== This entity is implemented in Java, no Lua script exists. ===== Behavior ===== * **Interaction:** Uses WndQuest window to display random messages * **Movement:** Turns to face the hero when interacted with * **Variants:** Three variants exist (standard, silent, movie theater) * **Immortality:** Inherits from ImmortalNPC, cannot be killed ===== Related Entities ===== * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mobs/npc/ImmortalNPC.java|ImmortalNPC]] - Parent class * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mobs/npc/TownsfolkSilentNPC.java|TownsfolkSilentNPC]] - Silent variant * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mobs/npc/TownsfolkMovieNPC.java|TownsfolkMovieNPC]] - Movie theater variant ===== See Also ===== * [[en:rpd:npcs|NPCs]] (English wiki) * [[mr:npc|mr: NPC Entity Reference]] (Machine-readable NPC reference) {{tag> mr npc reference code}}