Class Npcs.NpcDefinition

java.lang.Object
net.risingworld.api.definitions.Npcs.NpcDefinition
Enclosing class:
Npcs

public final class Npcs.NpcDefinition extends Object
  • Field Details

    • id

      public short id
      Internal type ID of the npc
    • name

      public String name
      Name of the npc
    • type

      public Npcs.Type type
      Npc type
    • variations

      public int variations
      Number of npc variations. 0 means there are no additional variations available
    • gender

      public Npcs.Gender gender
      Gender of this npc (if defined)
    • ischild

      public boolean ischild
      Is this a child?
    • health

      public short health
      Npc health (hit points)
    • stamina

      public short stamina
      Npc stamina (when running)
    • hitdamage

      public short hitdamage
      Amount of damage the npc deals when hitting the player or other npcs
    • attackrange

      public float attackrange
    • attackdot

      public float attackdot
      Dot product for attacks. Only if dot between player and npc is greater than this value, the npc can attack
    • behaviour

      public Npcs.Behaviour behaviour
    • attackreaction

      public Npcs.AttackReaction attackreaction
    • aggroradius

      public int aggroradius
    • fov

      public int fov
    • sight

      public int sight
    • hearingrange

      public int hearingrange
    • eyeheight

      public float eyeheight
    • rayoffset

      public float rayoffset
    • spherecastradius

      public float spherecastradius
    • scale

      public float scale
      Default scale factor that gets applied to the npc. Usually it's 1.0
    • grounddot

      public float grounddot
      Max steepness (result of the dot product between terrain normal and up vector) of terrain where the npc can still walk. Higher values (towards 1) result in less mobility, lower values (towards 0) in more mobility on steep terrain
    • hasalertanim

      public boolean hasalertanim
      Determines if the npc has an alert animation (played when alert state changes from false to true)
    • istransient

      public boolean istransient
      If true, the npc does not get stored in the database (i.e it does not exist persistently)
    • walkspeed

      public float walkspeed
      Walk speed of the npc
    • runspeed

      public float runspeed
      Run speed of the npc
    • rotatespeed

      public float rotatespeed
      Rotate/turn speed of the npc
    • animspeed

      public float animspeed
      Speed at which the move/run animations will play. Default: 1.0
    • footstepvariant

      public int footstepvariant
      Variation ID parameter for the footstep sound
    • sleeps

      public boolean sleeps
    • canswim

      public boolean canswim
    • lifetime

      public int lifetime
      Lifetime (in seconds) how long the npc will life (until it dies/despawns automatically). -1 for not limit.
      If this is a child npc and the "adult" field is not null, the lifetime instead determines how long it takes until the child is grown up
    • herdmin

      public int herdmin
      When this npc spawns naturally, this determines how many of them the game will spawn per herd/group (minimum, inclusive)
    • herdmax

      public int herdmax
      When this npc spawns naturally, this determines how many of them the game will spawn per herd/group (maximum, inclusive)
    • adult

      public String adult
      If this npc is a child, this is the adult version. May be null
    • child

      public String child
      If this npc type can have childs, this is the child npc type name. May be null
    • relative

      public String relative
      If another npc is related to this type, this is the relative. May be null
    • adapttoterrain

      public float adapttoterrain
      Strength factor how much the npc adapts to the ground normal. 0 means no adapt, 1 means full adapt
    • corpsetype

      public Npcs.CorpseType corpsetype
    • loottype

      public Npcs.LootType loottype
  • Method Details

    • synchronize

      public void synchronize()