1
<?xml version="1.0" encoding="ISO-8859-1"?>
3
<!ELEMENT game (info, loader, diceSides?, map, resourceList?, playerList, unitList?, gamePlay, production?, technology?, attatchmentList? , initialize?, propertyList?)>
5
<!-- version must be in the form xx.xx or xx.xx.xx where xx is a positive integer -->
9
version CDATA #REQUIRED
12
<!-- javaClass must implement the IGameLoader interface -->
13
<!ELEMENT loader EMPTY>
15
javaClass CDATA #REQUIRED
18
<!-- Number of sides on dice -->
19
<!ELEMENT diceSides EMPTY>
24
<!ELEMENT map ((grid | territory)+ , connection*, remove-connection*)>
28
type (square | points-and-lines) #REQUIRED
31
horizontal-connections (explicit | implicit) 'explicit'
32
vertical-connections (explicit | implicit) 'explicit'
33
diagonal-connections (explicit | implicit) 'explicit'
36
<!ELEMENT territory EMPTY>
39
water (true | false) "false"
41
<!-- connections are two way -->
42
<!ELEMENT connection EMPTY>
48
<!ELEMENT remove-connection EMPTY>
49
<!ATTLIST remove-connection
54
<!ELEMENT resourceList (resource+) >
55
<!ELEMENT resource EMPTY>
60
<!ELEMENT unitList (unit+) >
66
<!ELEMENT playerList (player+, alliance*) >
67
<!ELEMENT player EMPTY>
70
optional (true | false) 'false'
72
<!ELEMENT alliance EMPTY>
75
player IDREF #REQUIRED
76
alliance CDATA #REQUIRED
82
<!ELEMENT gamePlay (delegate+, sequence)>
83
<!ELEMENT delegate EMPTY>
84
<!-- javaClass must implement Delegate
85
1 instance created per delegate declaration, ie 1 instance per name -->
88
javaClass CDATA #REQUIRED
89
display CDATA #IMPLIED
91
<!-- if no player given, then delegate is initialized with a null player -->
92
<!-- max run count is the maximum number of times that a delegate can run, if specified must be > 0, if not specified its infinity-->
93
<!ELEMENT sequence (step+)>
94
<!ELEMENT step (stepProperty*)>
97
delegate IDREF #REQUIRED
99
maxRunCount CDATA #IMPLIED
100
display CDATA #IMPLIED
102
<!ELEMENT stepProperty EMPTY>
103
<!ATTLIST stepProperty
105
value CDATA #REQUIRED
109
<!ELEMENT production (productionRule+, repairRule*, repairFrontier*, productionFrontier+, playerProduction+, playerRepair*)>
110
<!ELEMENT productionRule (cost+ , result+)>
111
<!ATTLIST productionRule
114
<!ELEMENT cost EMPTY>
116
resource IDREF #REQUIRED
117
quantity CDATA #REQUIRED
119
<!ELEMENT result EMPTY>
121
resourceOrUnit IDREF #REQUIRED
122
quantity CDATA #REQUIRED
125
<!ELEMENT repairRule (cost+ , result+)>
130
<!ELEMENT repairFrontier (repairRules+)>
131
<!ATTLIST repairFrontier
134
<!ELEMENT repairRules EMPTY>
135
<!ATTLIST repairRules
139
<!ELEMENT productionFrontier (frontierRules+)>
140
<!ATTLIST productionFrontier
143
<!ELEMENT frontierRules EMPTY>
144
<!ATTLIST frontierRules
147
<!ELEMENT playerProduction EMPTY>
148
<!ATTLIST playerProduction
149
player IDREF #REQUIRED
150
frontier IDREF #REQUIRED
153
<!ELEMENT playerRepair EMPTY>
154
<!ATTLIST playerRepair
155
player IDREF #REQUIRED
156
frontier IDREF #REQUIRED
159
<!ELEMENT technology (technologies,playerTech+)>
161
<!ELEMENT technologies (techname+)>
162
<!ELEMENT techname EMPTY>
167
<!ELEMENT playerTech (category*)>
169
player IDREF #REQUIRED
171
<!ELEMENT category (tech*)>
175
<!ELEMENT tech EMPTY>
180
<!-- attatchments must implement Attatchment -->
181
<!ELEMENT attatchmentList (attatchment+) >
182
<!ELEMENT attatchment (option+) >
183
<!ATTLIST attatchment
185
attatchTo CDATA #REQUIRED
186
javaClass CDATA #REQUIRED
187
type (unitType | territory | resource | player) "unitType"
189
<!ELEMENT option EMPTY >
192
value CDATA #REQUIRED
197
<!ELEMENT initialize (ownerInitialize?, unitInitialize?, resourceInitialize?) >
198
<!ELEMENT ownerInitialize (territoryOwner+) >
199
<!ELEMENT territoryOwner EMPTY>
200
<!ATTLIST territoryOwner
201
territory CDATA #REQUIRED
202
owner IDREF #REQUIRED
204
<!ELEMENT unitInitialize (unitPlacement*, heldUnits*) >
205
<!-- units are owned by no one if owner isnt set -->
206
<!ELEMENT unitPlacement EMPTY>
207
<!ATTLIST unitPlacement
208
unitType IDREF #REQUIRED
209
territory CDATA #REQUIRED
210
quantity CDATA #REQUIRED
213
<!-- units that have not been placed yet -->
214
<!ELEMENT heldUnits EMPTY>
216
unitType IDREF #REQUIRED
217
player IDREF #REQUIRED
218
quantity CDATA #REQUIRED
220
<!ELEMENT resourceInitialize (resourceGiven+) >
221
<!ELEMENT resourceGiven EMPTY>
222
<!ATTLIST resourceGiven
223
player IDREF #REQUIRED
224
resource IDREF #REQUIRED
225
quantity CDATA #REQUIRED
228
<!ELEMENT propertyList (property*)>
229
<!ELEMENT property (boolean?, string?, file?, number?, color?, list?, value?) >
230
<!-- can the player edit this on start up? if true then the type must be specified with a nested element -->
234
editable (true | false) "false"
237
<!ELEMENT value (#PCDATA)>
239
<!ELEMENT boolean EMPTY>
242
<!ELEMENT string EMPTY>
245
<!ELEMENT file EMPTY>
248
<!ELEMENT number EMPTY>
249
<!-- currently only integers are supported -->
255
<!ELEMENT color EMPTY>
259
<!ELEMENT list EMPTY>
260
<!-- a comma seperated list of possible values -->
262
values CDATA #REQUIRED