NPC Behavior Data Structures: Difference between revisions
Jump to navigation
Jump to search
m add to category (Engine documents) |
|||
Line 7: | Line 7: | ||
data/npcbehave.xml : contains the behaviour types <npctype> | data/npcbehave.xml : contains the behaviour types <npctype> | ||
This file contains: | |||
* '''NPC Types''' : defines one type of NPC for example "wanderer", it's a collection of behaviors and reactions to events. Read this page for info: [[NPC Types]] | |||
* '''Behavior''' : is a series of operations the NPC will have to perform. Can be a base behaviour like "walk" or a custom one like "thorian_go_to_work". This page [[Behavior_Operations]] lists all operations you can use inside a behaviour. | |||
* '''Reactions''': each NPC can react to an event and trigger a Behaviour. You can read here for more infromation :[[Behaviors_and_Reactions]] | |||
* '''Timings''': we call timings the reactions to time. Like thorian going home at 8 pm. | |||
==== npcdefs.xml (Deprecated) ==== | ==== npcdefs.xml (Deprecated) ==== |
Revision as of 21:22, 24 October 2010
Where the information is located
Server files
npcbehave.xml
data/npcbehave.xml : contains the behaviour types <npctype>
This file contains:
- NPC Types : defines one type of NPC for example "wanderer", it's a collection of behaviors and reactions to events. Read this page for info: NPC Types
- Behavior : is a series of operations the NPC will have to perform. Can be a base behaviour like "walk" or a custom one like "thorian_go_to_work". This page Behavior_Operations lists all operations you can use inside a behaviour.
- Reactions: each NPC can react to an event and trigger a Behaviour. You can read here for more infromation :Behaviors_and_Reactions
- Timings: we call timings the reactions to time. Like thorian going home at 8 pm.
npcdefs.xml (Deprecated)
data/npcdefs.xml : contains definitions for <locations> , <paths> , <waypoints>
This file is deprecated as definition file. All the data has been moved to the DB.
Database tables
sc_location_type
sc_locations
sc_npc_definitions
This table associates a specific behavior with an NPC, In the npctype column you have the same name you find in the npcbehave.xml
tribes
Field | type | Description |
---|---|---|
id | int | The ID of the tribe. |
name | string | The name of the tribe. |
home_sector_id | int | The ID of the sector where the tribe home is located |
home_x | float | X-coordinate of the tribe home location |
home_y | float | Y-coordinate of the tribe home location |
home_z | float | Z-coordinate of the tribe home location |
home_radius | float | The radius of the tribe home |
max_size | int | The maximum number of tribe memers allowed for this tribe. |
wealth_resource_name | string | Name of the resource this tribe treasures most. Collecting this will enable growth capability in the tribe. |
wealth_resource_nick | string | Commands like dig use the nick of the resource instead of the name. |
wealth_resource_area | string | The name of the Location Type that represents location where the wealth resource might be found. |
wealth_gather_need | string | The name of the tribe need that will enable collection of wealth resources. Made the primary need when the tribe has dead members. |
wealth_resource_growth | float | When there are no members of the tribe we need a push of resources at this rate to enable reproduction. |
reproduction_cost | int | The cost to reproduce. |