Package net.risingworld.api.definitions
Klasse Npcs.NpcDefinition
java.lang.Object
net.risingworld.api.definitions.Npcs.NpcDefinition
- Umschließende Klasse:
Npcs
Npc definition
-
Verschachtelte Klassen - Übersicht
Modifizierer und TypKlasseBeschreibungfinal class
final class
final class
-
Feldübersicht
Modifizierer und TypFeldBeschreibungfloat
Strength factor how much the npc adapts to the ground normal.If this npc is a child, this is the adult version.int
float
Speed at which the move/run animations will play.float
Dot product for attacks.float
boolean
If this npc type can have childs, this is the child npc type name.boolean
float
int
Variation ID parameter for the footstep soundint
Gender of this npc (if defined)float
Max steepness (result of the dot product between terrain normal and up vector) of terrain where the npc can still walk.boolean
Determines if the npc has an alert animation (played when alert state changes from false to true)boolean
Determines whether or not the npc has a "Clothes" object (representing the outfit/clothes of the npc)boolean
Determines whether or not the npc has a "Skin" object (representing skin color, hairstyle etc)Default head rotation (worldspace).short
Npc health (hit points)int
int
When this npc spawns naturally, this determines how many of them the game will spawn per herd/group (maximum, inclusive)int
When this npc spawns naturally, this determines how many of them the game will spawn per herd/group (minimum, inclusive)short
Amount of damage the npc deals when hitting the player or other npcsshort
Internal type ID of the npcboolean
Is this a child?boolean
If true, the npc does not get stored in the database (i.e it does not exist persistently)int
Lifetime (in seconds) how long the npc will life (until it dies/despawns automatically).Default mouth rotation (worldspace).Name of the npcfloat
Determines how much the npc can open its mouth (angle of jaw)float
If another npc is related to this type, this is the relative.float
Rotate/turn speed of the npcfloat
Run speed of the npcfloat
Default scale factor that gets applied to the npc.int
boolean
float
short
Npc stamina (when running)Npc typeint
Number of npc variations.float
Walk speed of the npc -
Methodenübersicht
-
Felddetails
-
id
public short idInternal type ID of the npc -
name
Name of the npc -
type
Npc type -
variations
public int variationsNumber of npc variations. 0 means there are no additional variations available -
gender
Gender of this npc (if defined) -
ischild
public boolean ischildIs this a child? -
health
public short healthNpc health (hit points) -
stamina
public short staminaNpc stamina (when running) -
hitdamage
public short hitdamageAmount of damage the npc deals when hitting the player or other npcs -
attackrange
public float attackrange -
attackdot
public float attackdotDot product for attacks. Only if dot between player and npc is greater than this value, the npc can attack -
behaviour
-
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 scaleDefault scale factor that gets applied to the npc. Usually it's 1.0 -
grounddot
public float grounddotMax 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 -
headrotation
Default head rotation (worldspace). Only if a headbone is defined -
mouthrotation
Default mouth rotation (worldspace). Only if a mouthbone is defined -
openmouth
public float openmouthDetermines how much the npc can open its mouth (angle of jaw) -
hasskin
public boolean hasskinDetermines whether or not the npc has a "Skin" object (representing skin color, hairstyle etc) -
hasclothes
public boolean hasclothesDetermines whether or not the npc has a "Clothes" object (representing the outfit/clothes of the npc) -
hasalertanim
public boolean hasalertanimDetermines if the npc has an alert animation (played when alert state changes from false to true) -
istransient
public boolean istransientIf true, the npc does not get stored in the database (i.e it does not exist persistently) -
walkspeed
public float walkspeedWalk speed of the npc -
runspeed
public float runspeedRun speed of the npc -
rotatespeed
public float rotatespeedRotate/turn speed of the npc -
animspeed
public float animspeedSpeed at which the move/run animations will play. Default: 1.0 -
footstepvariant
public int footstepvariantVariation ID parameter for the footstep sound -
sleeps
public boolean sleeps -
canswim
public boolean canswim -
dropequippeditem
public boolean dropequippeditem -
lifetime
public int lifetimeLifetime (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 herdminWhen this npc spawns naturally, this determines how many of them the game will spawn per herd/group (minimum, inclusive) -
herdmax
public int herdmaxWhen this npc spawns naturally, this determines how many of them the game will spawn per herd/group (maximum, inclusive) -
adult
If this npc is a child, this is the adult version. May be null -
child
If this npc type can have childs, this is the child npc type name. May be null -
relative
If another npc is related to this type, this is the relative. May be null -
adapttoterrain
public float adapttoterrainStrength factor how much the npc adapts to the ground normal. 0 means no adapt, 1 means full adapt -
corpsetype
-
loottype
-
-
Methodendetails
-
synchronize
public void synchronize()
-