npcs.xml file format
This file describe npcs.
Example file:
- npcs.xml
<?xml version="1.0"?> <npcs> <npc id="100" sortOffsetY="30"> <sprite variant="0">npcs/xml/interactive.xml</sprite> </npc> <npc id="101" avatar="1" hoverCursor="talk" targetOffsetX="10" nameOffsetX="10"> <sprite variant="0">npcs/xml/unanimated.xml</sprite> </npc> <npc id="904" targetSelection="false"> <sprite>npcs/xml/hammock-animated1.xml</sprite> <menu name="Talk" command="talk 'NAME'"/> </npc> </npcs>
Each npc tag describe separate npc, inside tag describe npc sprite.
Npc tag attributes:
Parameter | Description | default value | Comment |
---|---|---|---|
id | npc id | 0 | |
avatar | npc avatar | 0 | |
targetCursor | selection cursor size | medium | possible values: small, medium, large |
targetSelection | is npc can be selected | true | |
hoverCursor | cursor over npc | talk | possible values see here |
targetOffsetX | selection cursor offset by x | 0 | |
targetOffsetY | selection cursor offset by y | 0 | |
nameOffsetX | npc name offset by x | 0 | |
nameOffsetY | npc name offset by y | 0 | |
sortOffsetY | npc drawing order offset by y | 0 |
menu tag
Menu tag describe npc context menu.
If menu tags misisng, used this tags:
- npcs.xml
<menu name="Talk" command="talk 'NAME'"/> <menu name="Buy" command="buy 'NAME'"/> <menu name="Sell" command="sell 'NAME'"/>
See also: being cursor types