-
diff --git a/binaries/data/mods/public/civs/athen.json b/binaries/data/mods/public/civs/athen.json
index 2697011..3ce6b26 100644
a
|
b
|
|
132 | 132 | ], |
133 | 133 | "Formations": |
134 | 134 | [ |
135 | | "formations/scatter", |
| 135 | "formations/null", |
136 | 136 | "formations/box", |
137 | 137 | "formations/column_closed", |
138 | 138 | "formations/line_closed", |
-
diff --git a/binaries/data/mods/public/civs/brit.json b/binaries/data/mods/public/civs/brit.json
index 7368dc0..b8b12fe 100644
a
|
b
|
|
114 | 114 | ], |
115 | 115 | "Formations": |
116 | 116 | [ |
117 | | "formations/scatter", |
| 117 | "formations/null", |
118 | 118 | "formations/box", |
119 | 119 | "formations/column_closed", |
120 | 120 | "formations/line_closed", |
-
diff --git a/binaries/data/mods/public/civs/cart.json b/binaries/data/mods/public/civs/cart.json
index b52ba79..c6e9efb 100644
a
|
b
|
|
135 | 135 | ], |
136 | 136 | "Formations": |
137 | 137 | [ |
138 | | "formations/scatter", |
| 138 | "formations/null", |
139 | 139 | "formations/box", |
140 | 140 | "formations/column_closed", |
141 | 141 | "formations/line_closed", |
-
diff --git a/binaries/data/mods/public/civs/celt.json b/binaries/data/mods/public/civs/celt.json
index 56ea6fb..b4be9ea 100644
a
|
b
|
|
151 | 151 | ], |
152 | 152 | "Formations": |
153 | 153 | [ |
154 | | "formations/scatter", |
| 154 | "formations/null", |
155 | 155 | "formations/box", |
156 | 156 | "formations/column_closed", |
157 | 157 | "formations/line_closed", |
-
diff --git a/binaries/data/mods/public/civs/gaul.json b/binaries/data/mods/public/civs/gaul.json
index f24e2ab..bf918a2 100644
a
|
b
|
|
110 | 110 | ], |
111 | 111 | "Formations": |
112 | 112 | [ |
113 | | "formations/scatter", |
| 113 | "formations/null", |
114 | 114 | "formations/box", |
115 | 115 | "formations/column_closed", |
116 | 116 | "formations/line_closed", |
-
diff --git a/binaries/data/mods/public/civs/hele.json b/binaries/data/mods/public/civs/hele.json
index 1bf748c..fdc4d8a 100644
a
|
b
|
|
167 | 167 | ], |
168 | 168 | "Formations": |
169 | 169 | [ |
170 | | "formations/scatter", |
| 170 | "formations/null", |
171 | 171 | "formations/box", |
172 | 172 | "formations/column_closed", |
173 | 173 | "formations/line_closed", |
-
diff --git a/binaries/data/mods/public/civs/iber.json b/binaries/data/mods/public/civs/iber.json
index c79126d..3039a29 100644
a
|
b
|
|
108 | 108 | ], |
109 | 109 | "Formations": |
110 | 110 | [ |
111 | | "formations/scatter", |
| 111 | "formations/null", |
112 | 112 | "formations/box", |
113 | 113 | "formations/column_closed", |
114 | 114 | "formations/line_closed", |
-
diff --git a/binaries/data/mods/public/civs/mace.json b/binaries/data/mods/public/civs/mace.json
index 23cbebe..76ee3dd 100644
a
|
b
|
|
137 | 137 | ], |
138 | 138 | "Formations": |
139 | 139 | [ |
140 | | "formations/scatter", |
| 140 | "formations/null", |
141 | 141 | "formations/box", |
142 | 142 | "formations/column_closed", |
143 | 143 | "formations/line_closed", |
-
diff --git a/binaries/data/mods/public/civs/maur.json b/binaries/data/mods/public/civs/maur.json
index 24ba75d..5d230ae 100644
a
|
b
|
|
122 | 122 | ], |
123 | 123 | "Formations": |
124 | 124 | [ |
125 | | "formations/scatter", |
| 125 | "formations/null", |
126 | 126 | "formations/box", |
127 | 127 | "formations/column_closed", |
128 | 128 | "formations/line_closed", |
-
diff --git a/binaries/data/mods/public/civs/pers.json b/binaries/data/mods/public/civs/pers.json
index 437587c..36ad846 100644
a
|
b
|
|
127 | 127 | ], |
128 | 128 | "Formations": |
129 | 129 | [ |
130 | | "formations/scatter", |
| 130 | "formations/null", |
131 | 131 | "formations/box", |
132 | 132 | "formations/column_closed", |
133 | 133 | "formations/line_closed", |
-
diff --git a/binaries/data/mods/public/civs/ptol.json b/binaries/data/mods/public/civs/ptol.json
index 63352b3..4071b0f 100644
a
|
b
|
|
136 | 136 | ], |
137 | 137 | "Formations": |
138 | 138 | [ |
139 | | "formations/scatter", |
| 139 | "formations/null", |
140 | 140 | "formations/box", |
141 | 141 | "formations/column_closed", |
142 | 142 | "formations/line_closed", |
-
diff --git a/binaries/data/mods/public/civs/rome.json b/binaries/data/mods/public/civs/rome.json
index d1cf911..c79048a 100644
a
|
b
|
|
112 | 112 | ], |
113 | 113 | "Formations": |
114 | 114 | [ |
115 | | "formations/scatter", |
| 115 | "formations/null", |
116 | 116 | "formations/box", |
117 | 117 | "formations/column_closed", |
118 | 118 | "formations/line_closed", |
-
diff --git a/binaries/data/mods/public/civs/sele.json b/binaries/data/mods/public/civs/sele.json
index 2277bcd..557ff50 100644
a
|
b
|
|
133 | 133 | ], |
134 | 134 | "Formations": |
135 | 135 | [ |
136 | | "formations/scatter", |
| 136 | "formations/null", |
137 | 137 | "formations/box", |
138 | 138 | "formations/column_closed", |
139 | 139 | "formations/line_closed", |
-
diff --git a/binaries/data/mods/public/civs/spart.json b/binaries/data/mods/public/civs/spart.json
index bc16030..fee64cc 100644
a
|
b
|
|
128 | 128 | ], |
129 | 129 | "Formations": |
130 | 130 | [ |
131 | | "formations/scatter", |
| 131 | "formations/null", |
132 | 132 | "formations/box", |
133 | 133 | "formations/column_closed", |
134 | 134 | "formations/line_closed", |
-
diff --git a/binaries/data/mods/public/civs/theb.json b/binaries/data/mods/public/civs/theb.json
index 777b69e..262a3d2 100644
a
|
b
|
|
121 | 121 | ], |
122 | 122 | "Formations": |
123 | 123 | [ |
124 | | "formations/scatter", |
| 124 | "formations/null", |
125 | 125 | "formations/box", |
126 | 126 | "formations/column_closed", |
127 | 127 | "formations/line_closed", |
-
diff --git a/binaries/data/mods/public/simulation/helpers/Commands.js b/binaries/data/mods/public/simulation/helpers/Commands.js
index 23eb81c..8d4cfb2 100644
a
|
b
|
function GetFormationUnitAIs(ents, player, formationTemplate)
|
1273 | 1273 | // TODO: We only check if the formation is usable by some units |
1274 | 1274 | // if we move them to it. We should check if we can use formations |
1275 | 1275 | // for the other cases. |
1276 | | if (cmpIdentity && cmpIdentity.CanUseFormation(formationTemplate || "formations/line_closed")) |
| 1276 | var nullFormation = (formationTemplate || cmpUnitAI.GetLastFormationTemplate()) == "formations/null"; |
| 1277 | if (!nullFormation && cmpIdentity && cmpIdentity.CanUseFormation(formationTemplate || "formations/line_closed")) |
1277 | 1278 | formedEnts.push(ent); |
1278 | 1279 | else |
| 1280 | { |
| 1281 | if (nullFormation) |
| 1282 | cmpUnitAI.SetLastFormationTemplate("formations/null"); |
1279 | 1283 | nonformedUnitAIs.push(cmpUnitAI); |
| 1284 | } |
1280 | 1285 | } |
1281 | 1286 | |
1282 | 1287 | if (formedEnts.length == 0) |
… |
… |
function GetFormationUnitAIs(ents, player, formationTemplate)
|
1317 | 1322 | if (cmpFormation) |
1318 | 1323 | cmpFormation.RemoveMembers(formation.members[fid]); |
1319 | 1324 | } |
| 1325 | |
1320 | 1326 | // TODO replace the fixed 60 with something sensible, based on vision range f.e. |
1321 | 1327 | var formationSeparation = 60; |
1322 | 1328 | var clusters = ClusterEntities(formation.entities, formationSeparation); |
… |
… |
function GetFormationUnitAIs(ents, player, formationTemplate)
|
1356 | 1362 | formationUnitAIs.push(Engine.QueryInterface(formationEnt, IID_UnitAI)); |
1357 | 1363 | cmpFormation.SetFormationSeparation(formationSeparation); |
1358 | 1364 | cmpFormation.SetMembers(cluster); |
1359 | | |
| 1365 | |
1360 | 1366 | for each (var ent in formationEnts) |
1361 | 1367 | cmpFormation.RegisterTwinFormation(ent); |
1362 | 1368 | |
-
diff --git a/binaries/data/mods/public/simulation/templates/template_unit.xml b/binaries/data/mods/public/simulation/templates/template_unit.xml
index 131fc73..dab5125 100644
a
|
b
|
|
36 | 36 | <Identity> |
37 | 37 | <GenericName>Unit</GenericName> |
38 | 38 | <Classes datatype="tokens">Unit ConquestCritical</Classes> |
| 39 | <Formations datatype="tokens"> |
| 40 | formations/null |
| 41 | formations/box |
| 42 | formations/column_closed |
| 43 | formations/line_closed |
| 44 | formations/column_open |
| 45 | formations/line_open |
| 46 | formations/flank |
| 47 | formations/battle_line |
| 48 | </Formations> |
39 | 49 | </Identity> |
40 | 50 | <Looter/> |
41 | 51 | <Minimap> |
-
diff --git a/binaries/data/mods/public/art/textures/ui/session/icons/formations/null.png b/binaries/data/mods/public/art/textures/ui/session/icons/formations/null.png
new file mode 100644
index 0000000..e3eda01
Binary files /dev/null and b/binaries/data/mods/public/art/textures/ui/session/icons/formations/null.png differ
diff --git a/binaries/data/mods/public/simulation/templates/formations/null.xml b/binaries/data/mods/public/simulation/templates/formations/null.xml
new file mode 100644
index 0000000..6c94dab
-
|
+
|
|
| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <Entity parent="template_formation"> |
| 3 | <Formation> |
| 4 | <Icon>formations/null.png</Icon> |
| 5 | <FormationName>None</FormationName> |
| 6 | </Formation> |
| 7 | </Entity> |