NPC – character functions¶
zDExt_Npc_GetRoutineFuncName¶
Gets the function name of the NPC's current routine (e.g. RTN_PRESTART_100).
npc– instance of the NPCreturn– function name of the NPC's current routine; empty if the NPC is invalid or the routine does not start withRTN_
| Example usage | |
|---|---|
zDExt_Npc_GetRoutineName¶
Gets the name of the NPC's current routine (e.g. PRESTART).
npc– instance of the NPCreturn– name of the NPC's current routine
zDExt_Npc_EquipItem¶
Equips or unequips an existing item on the NPC through the engine equip operation. It does not create an item.
npc– instance of the NPCitemInstance– instance name of the item
| Example usage | |
|---|---|
zDExt_Npc_GetWalkMode¶
Gets the current walk mode of the NPC.
-1- invalid0/NPC_RUN- run1/NPC_WALK- walk2/NPC_SNEAK- sneak3- in water4- swim5- dive
npc– instance of the NPCreturn– walk mode
zDExt_Npc_IsStanding¶
Checks if the NPC is currently standing still.
npc– instance of the NPCreturn–TRUEif NPC is standing,FALSEotherwise
zDExt_Npc_IsWalking¶
Checks if the NPC is currently walking.
npc– instance of the NPCreturn–TRUEif NPC is walking,FALSEotherwise
zDExt_Npc_HasOverlayMds¶
Checks if the NPC has the specified animation overlay active.
npc– instance of the NPCreturn–TRUEif NPC has overlay with specified name,FALSEotherwise
zDExt_Npc_HasTimedOverlayMds¶
Checks if the NPC has the specified timed animation overlay active.
npc– instance of the NPCreturn–TRUEif NPC has overlay with specified name,FALSEotherwise
zDExt_Npc_OpenDeadNpcInventory¶
Opens NPC's plunder inventory.
npc– instance of the NPC
| Example usage | |
|---|---|
zDExt_Npc_CloseInventory¶
Closes NPC's main inventory.
npc– instance of the NPC
| Example usage | |
|---|---|
zDExt_Npc_CloseInventorySteal¶
Closes the steal inventory of npc's focus NPC.
npc– instance of the NPC
| Example usage | |
|---|---|
zDExt_Npc_CloseDeadNpcInventory¶
Closes NPC's plunder inventory.
npc– instance of the NPC
| Example usage | |
|---|---|
zDExt_Npc_GetDistToPos¶
Gets the distance between the NPC and a world position using the engine distance calculation (in cm).
npc– instance of the NPCposX– X coordinate in the game worldposY– Y coordinate in the game worldposZ– Z coordinate in the game worldreturn– distance in cm, truncated to an integer;2147483647for an invalid NPC
zDExt_Npc_GetDistToVob¶
Gets the distance between the NPC and an vob (in cm).
npc– instance of the NPCvobName– name of vob in game worldreturn– distance between NPC and vob in cm, truncated to an integer;2147483647if either object is invalid
zDExt_Npc_GetVisualBody¶
Gets the name of the NPC's visual body.
npc– instance of the NPCreturn– name of the NPC's visual body (for example HUM_BODY_NAKED0)
| Example usage | |
|---|---|
zDExt_Npc_GetVisualHead¶
Gets the name of the NPC's visual head.
npc– instance of the NPCreturn– name of the NPC's visual head (for example HUM_HEAD_PONY)
| Example usage | |
|---|---|
zDExt_Npc_GetPortalRoom¶
Gets the name of the portal room in which the NPC is currently located.
npc– instance of the NPCreturn– name of the portal room, or an empty string if the NPC is invalid or outside a portal room
| Example usage | |
|---|---|
zDExt_Npc_Teleport¶
Teleports the NPC to the specified location without an AI queue.
npc– instance of the NPCpoint– name of the waypoint, freepoint or any vob in the game world
| Example usage | |
|---|---|
zDExt_Npc_OpenInventorySteal¶
Opens the steal inventory of the NPC currently focused by npc.
npc– NPC opening the steal inventory
| Example usage | |
|---|---|
zDExt_Npc_SetAsPlayer¶
Makes the specified NPC the player character.
npc– NPC to set as the player character
| Example usage | |
|---|---|
zDExt_Npc_TakeItem¶
Makes the NPC take the specified item vob directly, without adding an AI action to its queue.
npc– NPC taking the itemitem– reference to an existing item vob, not its instance ID
| Example usage | |
|---|---|
zDExt_Npc_DropItem¶
Makes the NPC drop the specified item vob directly, without adding an AI action to its queue.
npc– NPC dropping the itemitem– reference to an existing item belonging to the NPC
| Example usage | |
|---|---|
zDExt_Npc_EquipArmor¶
Passes the existing armor item to the engine armor equip operation. It does not create an item.
npc– NPC equipping the armoritemInstance– instance ID of an existing armor item
| Example usage | |
|---|---|
zDExt_Npc_UnequipArmor¶
Toggles the currently equipped armor through the engine armor equip operation. The second argument is required and must be nonzero; it does not select which armor is removed.
npc– NPC whose equipped armor is removeditemInstance– nonzero argument required by the current implementation
| Example usage | |
|---|---|