Table of Contents

Mercenary NPC - Code References

Entity Information

Java Classes

JSON Configuration

{
   "baseSpeed"     :0,
   "spriteDesc"    :"spritesDesc/MercenaryNPC.json",
   "scriptFile"    :"scripts/npc/Mercenary",
   "friendly"      :true,
   "movable"       :false,
   "aiState"       :"Passive",
   "fraction"      :"NEUTRAL",
   "immortal"      :true,
   "isHumanoid"    :true
}

Sprite Configuration

{
   "texture" : "mobs/town_townsfolk_mercenary.png",
   "width" : 16,
   "height" : 16,
   "idle" : {
      "fps" : 4,
      "looped" : true,
      "frames" : [0, 1, 2, 3, 4, 5]
   },
   "run" : {
      "fps" : 8,
      "looped" : true,
      "frames" : [0, 1, 2, 3]
   },
   "attack" : {
      "fps" : 8,
      "looped" : true,
      "frames" : [0, 1, 2, 3]
   },
   "die" : {
      "fps" : 8,
      "looped" : true,
      "frames" : [0, 1, 2, 3]
   }
}

String Resources

<string name="MercenaryNPC_Name">mercenary</string>
<string name="MercenaryNPC_Name_Objective">mercenary</string>
<string name="MercenaryNPC_Gender">masculine</string>
<string name="MercenaryNPC_Desc">Sturdy looking man.</string>

Lua Scripts

Implementation Details