User Tools

Site Tools


mr:townsfolk_npc_mob

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

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: strings_all.xml

<string name="TownsfolkNPC_Message1">Ah! Another adventurer, lovely! Make sure to loot as many valuables as you can!</string>
<string name="TownsfolkNPC_Message2">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.</string>
<string name="TownsfolkNPC_Message3">What a lovely day.</string>
<string name="TownsfolkNPC_Message4">I hope the sewers won\'t get flooded when spring arrives. We don\'t need another rat infestation.</string>
<string name="TownsfolkSilentNPC_Message1">Hmph!</string>
<string name="TownsfolkSilentNPC_Message2">...</string>
<string name="TownsfolkSilentNPC_Message3">Hmmm...</string>
<string name="TownsfolkMovieNPC_Message">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>

String Resources (Russian)

Source: 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

See Also

mr/townsfolk_npc_mob.txt · Last modified: by 127.0.0.1