-
Notifications
You must be signed in to change notification settings - Fork 1
/
mudlogic.ttl
206 lines (167 loc) · 8.69 KB
/
mudlogic.ttl
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix schema: <http://schema.org/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix time: <http://www.w3.org/2006/time#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix mud: <https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/mud.ttl#> .
@prefix mudlogic: <#> .
mudlogic: rdf:type owl:Ontology ;
# Description
dcterms:title "Multi-User Domain Logic ontology" ;
dcterms:description """
Vocabulary defines Tasks and Actions conducted by agents in a game world.
""" ;
# Ownership
dcterms:license <http://creativecommons.org/licenses/by/4.0/> ;
dcterms:creator <https://calum.inrupt.net/profile/card#me> .
mudlogic:Action a rdfs:Class ;
rdfs:subClassOf time:Instant ;
rdfs:label "Action"@en ;
rdfs:comment "An Instant Action - one which is completed by an Actor to achieve some end state"@en .
mudlogic:Task a rdfs:Class ;
rdfs:subClassOf time:Interval ;
rdfs:label "Task"@en ;
rdfs:comment "An Interval which is being completed by an Actor to achieve some end state"@en .
mudlogic:Transit a mudlogic:Task ;
rdfs:subclassOf mudlogic:Task ;
rdfs:label "Transit Task"@en ;
rdfs:comment "A Task which models the changing of location"@en .
mudlogic:Effect a rdfs:Class ;
rdfs:subClassOf mudlogic:Action ;
rdfs:label "Effect"@en ;
rdfs:commnet "An effect is a type of action which is recurring (e.g. damage health from poison)"@en .
mudlogic:Event a rdfs:Class ;
rdfs:subClassOf mudlogic:Action ;
rdfs:label "Event"@en ;
rdfs:comment "An Event is generated by the world and is typically randomly occurring. Modelled after a common mechanism in games"@en .
mudlogic:hasChoices a rdf:Property ;
rdfs:label "hasChoices"@en ;
rdfs:comment "For modelling when an event has many outcomes which the player can select from. Range is a container of action consequences"@en ;
rdfs:range ldp:Container .
mudlogic:actAt a rdf:Property ;
rdfs:label "actAt"@en ;
rdfs:comment "The URL where the Action can be found"@en ;
rdfs:domain mudlogic:Action, mudlogic:Task ;
rdfs:range schema:URL .
mudlogic:parameterConstraintsShape a rdf:Property ;
rdfs:label "Parameter Constraints Shape"@en ;
rdfs:comment "A shape which is used for validating input parameters, on the global world state. For example if an action must be performed at night"@en ;
rdfs:range sh:NodeShape .
mudlogic:recursAfterSeconds a rdf:Property ;
rdfs:label "recursAfterSeconds"@en ;
rdfs:comment "Indicates the number of seconds to wait before implementing the effect changes again"@en ;
rdfs:domain mudlogic:Effect ;
rdfs:range xsd:Integer .
mudlogic:expiresAfterOccurences a rdf:Property ;
rdfs:label "expiresAfterOccurences"@en ;
rdfs:comment "Indicates the number of occurences before the effect expires"@en ;
rdfs:range xsd:Integer .
mudlogic:activeEffects a rdf:Property ;
rdfs:label "activeEffects"@en ;
rdfs:comment "An ldp:Container of the Effects which are actively recurring on the subject"@en ;
rdfs:range ldp:Container .
# Bindings: Action parameters
mudlogic:ActionBinding a rdfs:Class ;
rdfs:label "Action Binding"@en ;
rdfs:comment "A resource which is bound to the input or output graph of an action"@en .
mudlogic:boundTo a rdf:Property ;
rdfs:label "boundTo"@en ;
rdfs:comment "The object indicates the object which is bound via the binding"@en ;
rdfs:domain mudlogic:ActionBinding .
mudlogic:hasBinding a rdf:Property ;
rdfs:label "hasBinding"@en ;
rdfs:comment "Indicates that an action has a binding to a resource (i.e. a parameter, a resource which is involved in the action)"@en ;
rdfs:range mudlogic:ActionBinding .
mudlogic:hasBindings a rdf:Property ;
rdfs:label "hasBindings"@en ;
rdfs:comment "Contains bindings used to map game logic to the Interaction represented in Linked Data"@en ;
rdfs:range ldp:Container .
mudlogic:boundToShapes a rdf:Property ;
rdfs:label "boundToShape"@en ;
rdfs:comment "Indicates a shape constraining which resources can be bound to the given Binding"@en ;
rdfs:range ldp:Container .
mudlogic:bindingIsRequired a rdf:Property ;
rdfs:label "bindingIsRequired"@en ;
rdfs:comment "If true, the action cannot be completed without making the binding"@en ;
rdfs:range xsd:boolean .
# The Binding types below define the relationship to the Action
mudlogic:ActorBinding a rdfs:Class ;
rdfs:subClassOf mudlogic:ActionBinding ;
rdfs:label "Actor Binding"@en ;
rdfs:comment "The binding to the actor performing an action."@en .
mudlogic:TargetBinding a rdfs:Class ;
rdfs:subClassOf mudlogic:ActionBinding ;
rdfs:label "Target Binding"@en ;
rdfs:comment "The binding to a target of a particular action."@en .
mudlogic:WitnessBinding a rdfs:Class ;
rdfs:subClassOf mudlogic:ActionBinding ;
rdfs:label "Witness Binding"@en ;
rdfs:comment "The binding to a witness to the action performed."@en .
mudlogic:ConsumableBinding a rdfs:Class ;
rdfs:subClassOf mudlogic:ActionBinding ;
rdfs:label "ConsumableBinding"@en ;
rdfs:comment "Indicates the object bound is a consumable in the recipe of the action. Making the binding a consumable does not mean it will be deleted necessarily, you need to define this in the Patch operations of the Action"@en .
mudlogic:LocationBinding a rdfs:Class ;
rdfs:subClassOf mudlogic:ActionBinding ;
rdfs:label "Location Binding"@en ;
rdfs:comment "The binding to the location where the Action must be performed. Included for example to place restrictions on where an action can be completed."@en .
# modelling graph state changes made by an Action
mudlogic:Operation a rdfs:Class ;
rdfs:label "Operation"@en ;
rdfs:label "Operation"@fr ;
rdfs:comment "Base class for different kinds of graph operation (e.g. Patch and Post)"@en .
mudlogic:Post a rdfs:Class ;
rdfs:subClassOf mudlogic:Operation ;
rdfs:label "Post"@en ;
rdfs:comment "Attaches resources (via property inserts) to be created during a state change"@en .
mudlogic:Patch a rdfs:Class ;
rdfs:subClassOf mudlogic:Operation ;
rdfs:label "Patch"@en ;
rdfs:comment "Attaches resources (via properties inserts and deletes) to be PATCHed during a state change. During a PATCH the referenced resources are not replaced"@en .
mudlogic:isComplete a rdf:Property ;
rdfs:label "isComplete"@en ;
rdfs:comment "If True, the task completion conditions have been met and the task has been completed"@en ;
rdfs:domain mudlogic:Task ;
rdfs:range xsd:boolean .
mudlogic:progress a rdf:Property ;
rdfs:label "progress"@en ;
rdfs:comment "A floating point value between 0.0 and 1.0, indicating the amount of progress completed for a given Task"@en ;
rdfs:domain mudlogic:Task .
mudlogic:inserts a rdf:Property ;
rdfs:label "Inserts"@en ;
rdfs:comment "A pointer to (clone of a) Resource holding properties which should be inserted to a Graph during the change"@en ;
rdfs:domain mudlogic:Operation ;
rdfs:range ldp:Container .
mudlogic:deletes a rdf:Property ;
rdfs:label "Deletes"@en ;
rdfs:comment "A pointer to a (clone of a) Resource holding properties which should be deleted in a Graph during the change"@en ;
rdfs:domain mudlogic:Operation ;
rdfs:range ldp:Container .
# TODO: replace these below properties with "operationsOnComplete"
mudlogic:postsOnComplete a rdf:Property ;
rdfs:label "postsOnComplete"@en ;
rdfs:comment "When an action or task is complete, the connected Post changes are made"@en ;
rdfs:range mudlogic:Post .
mudlogic:patchesOnComplete a rdf:Property ;
rdfs:label "patchesOnComplete"@en ;
rdfs:comment "When an action or task is complete, the connected Patch changes are made"@en ;
rdfs:range mudlogic:Patch .
mudlogic:actionDiscoveryEndpoint a rdf:Property ;
rdfs:label "actionDiscoveryEndpoint"@en ;
rdfs:comment "The URL where a supported action discovery endpoint can be found"@en ;
rdfs:domain mud:Configuration ;
rdfs:range schema:URL .
mudlogic:hasOngoingTask a rdf:Property ;
rdfs:label "hasOngoingTask"@en ;
rdfs:comment "a mudlogic:Task that a Thing is pre-occupied with" ;
rdfs:range mudlogic:Task .
mudlogic:changesTriggeredOnEntry a rdf:Property ;
rdfs:label "changesTriggeredOnEntry"@en ;
rdfs:comment "Intended for buildings. Triggers scene changes when the player enters (mudlogic:Operation )"@en ;
# a container of mudlogic:Operations
rdfs:range ldp:Container .