This repository was archived by the owner on Dec 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathcreature.xml
More file actions
119 lines (117 loc) · 5.49 KB
/
creature.xml
File metadata and controls
119 lines (117 loc) · 5.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<atlas>
<map>
<!-- A base class for most creatures. -->
<map name="attributes">
<map name="geometry">
<map name="default">
<string name="type">capsule-y</string>
</map>
</map>
<!-- By default don't allow creatures to tumble -->
<map name="angularfactor">
<list name="default">
<float>0</float>
<float>0</float>
<float>0</float>
</list>
</map>
<map name="mind">
<map name="default">
<string name="language">python</string>
<string name="name">mind.NPCMind.NPCMind</string>
</map>
</map>
<map name="status">
<float name="default">1.0</float>
</map>
<!-- Standard density for meat and bones -->
<map name="density">
<float name="default">125</float>
</map>
<map name="stamina">
<float name="default">1</float>
</map>
<map name="perception_sight">
<float name="default">1.0</float>
</map>
<map name="mode">
<string name="default">free</string>
</map>
<!-- Default to a reach of 1 meters (this applies to all creatures, even for worms) -->
<map name="reach">
<float name="default">1</float>
</map>
<!-- Characters are by default omnivores and handle both plants and meats.
To limit put "_modifier_consume_type_meat=0" or "_modifier_consume_type_plant=0" on subclasses. -->
<map name="_modifier_eat">
<float name="default">1</float>
</map>
<!-- All creatures should by default have inventory domains, although for most animals they can't equip anything -->
<map name="domain">
<string name="default">inventory</string>
</map>
<!-- Don't allow movement of too heavy objects.-->
<map name="mover_constraint">
<string name="default">entity.mass = none or describe('Entity is too heavy.', entity.mass = none or entity.mass < actor._mover_mass_max)</string>
</map>
<!--
Don't allow too large entities to be put in inventory. We check that no dimension is longer than 2.5 meters.
Most things that we can't put in our inventory should be blocked by their mass. We still want to be able to put tools like the scythe in the inventory though, and that's a large tool.
This way of limiting inventory might not be perfect though. It might be revisited.
For now it's disabled.
-->
<!-- <map name="destination_constraint">-->
<!-- <string name="default">describe("Entity is too large to fit in inventory.", (entity.bbox = none or (entity.bbox.width < 2.5 and entity.bbox.height < 2.5 and entity.bbox.depth-->
<!-- < 2.5)))-->
<!-- </string>-->
<!-- </map>-->
<!-- By default don't allow it to move much. This is overridden in sub types. -->
<map name="_mover_mass_max">
<float name="default">1.0</float>
</map>
<!-- The max amount of food we can contain in our stomach, relative to our mass. -->
<map name="_nutrients_max_factor">
<float name="default">0.1</float>
</map>
<map name="_goals">
<list name="append">
<map>
<!-- Standard is that all creatures know how to fight or fly. -->
<string name="class">mind.goals.common.combat.FightOrFlight</string>
</map>
</list>
</map>
<map name="__scripts">
<list name="append">
<map>
<string name="language">python</string>
<string name="name">world.traits.Hittable.Hittable</string>
</map>
<map>
<string name="language">python</string>
<string name="name">world.traits.Metabolizing.Metabolizing</string>
</map>
<map>
<string name="language">python</string>
<string name="name">world.traits.Nourishable.Nourishable</string>
</map>
<map>
<string name="language">python</string>
<string name="name">world.traits.StatusDeletable.StatusDeletable</string>
</map>
<map>
<string name="language">python</string>
<string name="name">world.traits.Immortality.Immortality</string>
</map>
<map>
<string name="language">python</string>
<string name="name">world.traits.OriginRecording.OriginRecording</string>
</map>
</list>
</map>
</map>
<string name="id">creature</string>
<string name="objtype">class</string>
<string name="parent">thing</string>
</map>
</atlas>