-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathXML.txt
1437 lines (991 loc) · 48.5 KB
/
XML.txt
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
---------------------------------------------------------------------
---------------------------------------------------------------------
To Whom It May Concern:
This file is a courtesy to modders, prefab builders, or anyone else incorrigibly curious and snooping around the XML config files.
This information comes with no guarantees whatsoever.
Tags and properties are added and removed in every major update and what they do or in which cases can change as well.
Keeping all that information in "their" files started to become awkward because of the amount of notes so this file was added.
Gazz.
---------------------------------------------------------------------
---------------------------------------------------------------------
Property: IsDeveloper (mostly blocks.xml + items.xml)
<property name="IsDeveloper" value="true" />
There is a "Developer" button on the creative menu.
By default it is off.
When it is off you do not see any blocks / items that have this flag set.
These blocks or items are ones you SHOULD NOT USE unless you know exactly what you are doing.
In most cases these are master blocks / items that provide default values for "real" blocks and items that are extended from them.
The flag itself is not inherited by "Extends" so all child blocks / items remain visible.
Extended items do NOT inherit auto-calculated weight.
Only items with actual recipes have it.
That's why cowboy boots (loot only but extending leather boots) did not scrap.
---------------------------------------------------------------------
---------------------------------------------------------------------
File: BLOCKS.XML
The block naming convention for "basic" blocks (with interchangeable textures) is
[material|look|texture] [shape] [extra properties if needed]
[Materials]: Generally speaking, the texture. If you search for "concreteTrimBlock" because you need that look, having "Trim" as an extra property after the shape might not be helpful.
[Shape]: keeping it non-technical if possible.
block - basic full meter square.
half - value="Half"
quarter - value="Quarter"
eighth - value="Eighth"
pyramid - value="Pyramid"
sheet - one side of a block, a billboard
sheet2 - value="shantyWall01Sheet2" - "shantyWall04Sheet2"
sheet3 - value="curtain"
sheet4 - value="HousingDecor/Boarded_windows" or other custom models
CTRSheet - like windows or glass panes
ramp - the basic 45 degree triangle shapes
stairs25 - value="StairsFilled" / "StairsFilledVerticalUV" 25 cm steps
stairs50 - value="StairsQuarterFilled" 50 cm steps
stairsBoard - value="Stairs"
pole - value="Pole"
poleSupportCtr - value="pole_diagonal_centered"
poleSupport - value="pole_diagonal"
poleSupport2 - value="pole_diagonal_2"
crossCtr - value="pole_diagonal_centered_cross"
cross - value="pole_diagonal_cross"
plate - value="Plate"
CTRPlate - value="PlateCentered"
TRN - value="Terrain"
wedge - value="Wedged60Full"
wedgeTip - value="Wedged60Tip"
curb - sidewalk value="Curb"
CNRCurb - value="Curb_Corner"
pillar100 - value="Pole1m" 100 cm version
pillar50 - 50 cm version
CNRFull - value="WedgedCornerFull" corner with a full (square) base for outside pyramid roofs
CNRRamp - value="WedgedCorner" corner with a half (triangle) base for outside pyramid roofs
CNRInside - value="WedgedInnerFull" concave shape for roofs
CNRRound - value="corner_round1m"
gable - value="Gable" small triangle tip for roofs
support - value="Branch", 45° angled beam
Example
awningRedBlock
rebarFrameRamp
rConcreteCNRFull
rConcretePlate
curtainBottomSheet01
sandTRN
- - - - - - - - - - - - - - - - - - - - - - - - -
NOTE: This plan was implemented only partially (tree, cnt) - maybe some day... or another system will be used.
I'll leave it in for future reference. Gazz
Many blocks like "scrapIronPile" have unique models / shapes.
For these I would use
MDL [type|category] [Name]
[Type]:
cnt - container, typically loot; (I would call block-based containers like "CntWeaponsBlock")
I would also mislabel the damage 2 car so it stays with the others.
Useful filters and a useful list >> strict adherence to rules.
Also containers that downgrade into loot containers. "cntSupplyCrateShamway"
fnt - furniture. Desks, chairs, potted plants
elt - electrical things like control panels that we don't have a clear purpose for, yet
lgt - all lights, including wall torches and candles
tree - trees, grass, shrubbery, cactus
plt - all other plants, shrubberiers, farming crops, or blocks that fulfil the purpose of a plant even if its just a pickup.
wrk - workstation of any kind
trp - traps, spikes, mines that DO something
sgn - signs
dst - destroyed or damaged... something.
prt - particle effects like snowstorm
drw - doors, hatches, windows
otr - other
This allows you to filter by categories, such as "find me all trees". It doesn't break the full text search.
Example
MDLdrwSteelDoor1_v1
MDLfntSchooldesk
MDLcntCooler
- - - - - - - - - - - - - - - - - - - - - - - - -
Use of "Extends" in blocks.xml:
This can be tricky so pay attention. =)
"Extend" copies upgrade and downgrade blocks/properties.
As you can see in the file you can mix and match, keeping the upgrade material and amount thereof but overwriting the target block.
For repairs you cannot un-extend a material.
If you extend a wooden door that is repaired with wood, then use that to make a metal door...
the metal door will require the wood in addition to the metal repair materials you assign.
Blocks using extends now do give the resources from the parent's destroy event.
If a block is using extends, but has its own destroy event, it will use that one instead.
<block id="1456" name="cntCar03Red">
<drop event="Fall" name="cntCar03BlueDamage1" count="0" prob="0" stick_chance="1" />
<drop event="Fall" name="cntCar03WhiteDamage1" count="1" prob="1.0" stick_chance="1" />
Without "unextending" that *specific* property the drop would be a cntCar03BlueDamage1 if that's the fall event of the parent block.
Extend should be the first entry in a block / item.
The file is read sequentially and if you put
<property name="Shape" value="WedgedCornerFull" />
above the extend it reads that line and THEN reads all the properties from
the parent block - including the shape.
- - - - - - - - - - - - - - - - - - - - - - - - -
<property name="CanMobsSpawnOn" value="true" />
The default value for a block is now FALSE.
Static spawners in prefabs / POI completely ignore this flag.
A placed bedroll ("your" bedroll, not any that exists) works like a claim stone.
It blocks zombie spawns in a rectangular area of 31x31 meters from bedrock to sky.
(that's 15 + 1 + 15m)
- - - - - - - - - - - - - - - - - - - - - - - - -
<drop event="Destroy" name="scrapIron" count="1,2" prob="1" />
count="min,max" specifies the min/max count, prob="x" specifies if ANY are dropped with this probability.
This is only applied to the very last destroy event on a block.
It cannot be used on a harvest event as here the total amount has to be fixed.
<drop event="Destroy" name="[recipe]" />
half of the ingredients of the first recipe for this item/block are awarded.
Currently it's always half and you cannot specify a factor.
Also if you specify a [recipe] you cannot/should not specify other items for this drop event.
Without a destroy event the block will always "drop self".
You can use this to make road signs or anything else collectible.
- - - - - - - - - - - - - - - - - - - - - - - - -
Looping fall events.
<drop event="Fall" name="destroyedStone" count="1" prob="0.1" stick_chance="1" />
If a falling block decides to "stick" on top of a block with
<property name="StabilitySupport" value="false" />
it will fall again.
Then it will stick on top of the same block again.
Then... do you see a pattern there?
Either completely avoid blocks falling "as themselves" or assign a stick chance <1 so it would eventually give up and poof.
- - - - - - - - - - - - - - - - - - - - - - - - -
You can change the crafting skill of blocks.
Look at the land mines.
- - - - - - - - - - - - - - - - - - - - - - - - -
Collision masks
<property name="Collide" value="melee,bullet,rocket" />
<property name="Collide" value="meleeweapons,bullets,rockets" />
These are functionally identical. Only the start of the string is checked.
Personal preference:
<block id="385" name="metalTrussingBlock">
<property name="Collide" value="movement,melee,rocket" /> <!-- -rocket -->
In *my* opinion you should be allowed to shoot arrows through those if bullets fit.
If you agree you can remove all occurrences of this with one search&replace.
Keep in mind that this also allows rockets to pass so
it *can* be a problem depending on your server settings and rules.
- - - - - - - - - - - - - - - - - - - - - - - - -
Selective "Extends"
For blocks/items.xml you need to use this syntax:
<property name="Extends" param1="<excluded defs>" />
for entityclasses.xml like this:
<.... ignore="<excluded defs>" ... >
Excluded defs are properties like "Downgrade" or "FuelValue" (comma delimited)
so you can better tailor an extended block to your needs.
We cannot exclude the drop definitions so far
- - - - - - - - - - - - - - - - - - - - - - - - -
Butcher tools are currently not supported in blocks.
Maybe later. Not a priority.
<drop event="Harvest" name="femur" tool_category="Butcher" count="1" prob=".4" />
- - - - - - - - - - - - - - - - - - - - - - - - -
Disassembling (wrench)
<drop event="Destroy" name="barbedFence" count="1" tool_category="Disassemble" />
<drop event="Harvest" name="headlight" count="1" prob="0.2" tool_category="Disassemble" />
Both harvest and destroy events can be limited to only fire if the correct tool is used.
This does not disable ungated events. They fire as well.
Note that you do NOT get the "disassemble" animation with just a destroy event.
You need to do it this way:
<drop event="Harvest" name="" count="0" tool_category="Disassemble" />
<drop event="Destroy" name="workbench" count="1" tool_category="Disassemble" />
- - - - - - - - - - - - - - - - - - - - - - - - -
Farming / Harvest yield of farmed crops.
This only affects block class "CropsGrown".
The "fertile_level" (defined in materials.xml) of the block that the plant is growing on can affect the harvest yield.
To use that you add
<property name="CropsGrown.BonusHarvestDivisor" value="5.0" /> (float, default=VeryLargeNumber)
to the to-be-harvested block.
This will generate bonus items when the plant is harvested.
The number of additional harvest items is
= ( "fertile_level" of the block directly below ) / ( CropsGrown.BonusHarvestDivisor )
So for a fertile_level of 5 and a BonusHarvestDivisor of 1.2 you get +4 harvest items.
Now if you were to make some fertiliser and further increase the fertile level of the dirt...
- - - - - - - - - - - - - - - - - - - - - - - - -
PlantGrowing.IsRandom growth timers
All the coders tell me that using "random" for the timer is much cheaper in CPU terms so that would be a good thing for a farm that can have thousands of plants.
Unfortunately it was a bit short on the max duration so couldn't actually be used for anything.
Now, when using PlantGrowing.IsRandom the max value for PlantGrowing.GrowthRate has been increased to 63.
At the setting of 63 I timed that to be 43 - 106 minutes.
- - - - - - - - - - - - - - - - - - - - - - - - -
Trees growing to variable sizes depending on the soil.
Any plant/block using
<property name="PlantGrowing.
to upgrade will check the
<property name="PlantGrowing.FertileLevel" value="xxx" />
of the TARGET block first.
If this PlantGrowing.FertileLevel is higher than the fertile_level of the block directly below then the upgrade will not occur.
Score one for biome diversity. =)
- - - - - - - - - - - - - - - - - - - - - - - - -
Support and multiblocks
(A15) On destruction, blocks with "MultiBlockDim" are properly cleaned up, leaving no invisible support blocks in mid-air. (Sorry! =)
<property name="UpwardsCount" value="8" />
is obsolete.
It's function is/was to create an invisible "supporting" block in mid-air over objects like trees so you could build on top of them.
This is now solved better with MultiBlockDim.
It may or may not continue to work. Try it first...
Multiblocks and <property name="StabilitySupport" value="false" />
If the multiblock's Y dimension is >1 it will self destruct.
In general, multiblocks can not have a horizontal dimension >7.
Lead programmer said so and he knows things.
He added a special exception for vertical dimension (trees).
- - - - - - - - - - - - - - - - - - - - - - - - -
Upgrade and hit sounds
When you upgrade a block then the tool plays a sound on every hit.
This sound is from the material value of the upgrade RESOURCE.
<property name="CustomUpgradeSound" value="Crafting/place_block_wood" />
This sound is played once when the upgrade is taking effect.
- - - - - - - - - - - - - - - - - - - - - - - - -
Attributes:
"count"
"event"
"id"
"name"
"prob"
"stick_chance"
"tool_category"
Keys:
"ActionSkillGroup"
"ActiveRadiusEffects"
"BigDecorationRadius"
"BuffsWhenWalkedOn"
"CanDecorateOnSlopes"
"CanMobsSpawnOn"
"CanPickup"
"CanPlayersSpawnOn"
"Class"
"Collide"
"Count"
"CraftComponentExpValue"
"CraftComponentTimeValue"
"CraftingSkillGroup"
"CustomIcon"
"Density"
"DescriptionKey"
"DestroyExpValue"
"DowngradeBlock"
"EconomicValue"
"EconomicBundleSize"
"Extends"
"FallDamage"
"FuelValue"
"Group"
"HeatMapFrequency"
"HeatMapStrength"
"HeatMapTime"
"IndexName"
"IsDeveloper"
"IsPlant"
"IsTerrainDecoration"
"LPHardnessScale"
"Light"
"LightOpacity"
"LootExpValue"
"Map.Color"
"Map.Color2"
"Map.ElevMinMax"
"Map.Specular"
"MaxDamage"
"Mesh"
"MovementFactor"
"MultiBlockDim"
"MultiBlockLayer"
"PickupSource"
"PickupTarget"
"Place"
"PlaceAltBlockValue"
"PlaceExpValue"
"PlacementWireframe"
"RepairItems"
"RotationAllowed"
"Shape"
"ShapeMinBB"
"ShowModelOnFall"
"SiblingBlock"
"SmallDecorationRadius"
"StabilitySupport"
"Stacknumber"
"Tag"
"Texture"
"UpgradeBlock.ToBlock"
"UpgradeExpValue"
"Weight"
---------------------------------------------------------------------
---------------------------------------------------------------------
<property name="EconomicValue" value="xxx" /> (integer)
"EconomicBundleSize" :
Was put in because the coder did not want a float there. =)
A trader will trade this many items as the smallest bundle. You won't be able to sell a single small rock.
The "EconomicValue" applies to the bundle.
The price of an assembled item (gun) is equal to the sum of it's parts.
First step was to figure out *some* rules to get some consistency into this and not having to reinvent the wheel for every item.
Rarity of the resource.
In my latest game I have some 500 brass scrap and just the excavation for my base's walls got me about 100000 small rocks.
I'm trying to figure out a base value for "how long does it take to acquire this resource".
Forge required.
Resource value x 1.2
Common tool required. Cooking pot or grill - essentially free with a forge so does not stack with that bonus.
Resource value x 1.2
Rare tool required. Calipers, beaker...
Resource value x 1.5
Farming required. Not hard but time-consuming.
Resource value x 1.33
Skill / perk / recipe / special scavenging or disassembling required.
There it gets muddy.
Im thinking _up to_ x1.5 based on uhh... best guess?
Can only be found: x5
For a start I assigned these values in Duke Coins:
5 brassScrap
.5 paper
.005 rockSmall
.005 crushedSand
.002 clay / dirtFragment
.05 unitIron
.2 unitLead
1 unitBrass
.25 ironScrap
.6 forgedIron
1.6 forgedSteel
1 leadScrap
.005 yuccaFibers
.4 coal
.4 potassiumNitratePowder
1.5 bulletCasing
.24 bulletTip
1.6 gunPowder
.48 buckshot
.0072 cement
.25 cloth
3.5 ductTape
.3 emptyJar
1.5 bottledWater
1.5 femur
24 for 100 gasCan
1 animalFat
1.5 bioFuel
1.2 tallow
2.4 grainAlcohol
.1 feather
1 rawMeat
1 egg
.1 corn / potato / blueberry / goldenrod / cotton
.5 mushrooms
1 animalHide
1.1 leather
5 oil
.11 ironArrowHead
.37 steelArrowHead
12 spring
12 headlight
---------------------------------------------------------------------
---------------------------------------------------------------------
File: LOOT.XML
How random loot generation works now:
A loot container defines a list of items and/or lootgroups, a count, and a size configuration.
The size configuration is the strict limit on the what the container can hold, and this limit can be reached even if
your container specifies a much smaller count value.
The loot containers count value specified how many if the items in the containers loot list should be selected randomly.
NOTE: that the same item could be chosen more than one time.
If the chosen item is an item then the item is spawned into the conatiner according to its count.
However if the chosen item is a lootgroup then a lootgroup is spawned into the container.
Loot Groups:
NOTE: if a lootgroup says count="all" then all subitems will be spawned.
A lootgroup functions identically to a container in its spawning logic. A lootgroup has a count like a container does.
The count value specifies how many items out of the lootgroup should be spawned each time the lootgroup is spawend. This
can lead to multiplicitive behaviour if it is setup that way for example:
<lootgroup name="group1" count="2" level="25,50">
...
</lootgroup>
<lootcontainer id="1" count="2" size="4,4">
<item group="group1" count="2">
</lootcontainer>
The above example would spawn the contents of group1 8 times. Here's why:
The container is told to spawn 2 items, since there's only 1 item in the container it will choose group1
2 times. Each time group1 is chosen, the container <item group="group1" count="2"> line specifies that
the contents of group1 should be spawned 2 times. So on the first iteration of the container group1 is spawned
2 times, and then again on the second iteration.
The group1 lootgroup specifies that each time it is spawned (recall 4 times in the example) that is should
select 2 items from its list.
So the above example would spawn 8 items into the container.
NOTE: it is safe to specify groups and counts that exceed the containers capacity. If the containers space
is exceeded excess items will not be spawned, and items will automatically stack to fill the container.
<item name="smallEngine" quality="1,200"/>
- - - - - - - - - - - - - - - - - - - - - - - - -
Optional attributes of a lootcontainer:
"buff"
"buff_chance"
---------------------------------------------------------------------
---------------------------------------------------------------------
File: ITEMS.XML
Keys:
"Active"
"Armor"
"Candrop"
"Canhold"
"Class"
"Concussive"
"Degradation"
"DegradationBreaksAfter"
"DegradationFloor"
"DropMeshfile"
"EconomicValue"
"EconomicBundleSize"
"Extends"
"HandMeshfile"
"HoldType"
"ImageEffectOnActive"
"Material"
"Meshfile"
"Pos"
"Preview"
"Puncture"
"RepairAmount"
"RepairTime"
"RepairTools"
"Rot"
"Stacknumber"
"Zoom"
Attributes:
"belt_range"
"belt_strength"
"duration"
"heat_map_strength"
"heat_map_time"
"holster"
"hordemeter"
"hordemeter_player_only"
"id"
"muffled_when_crouched"
"name"
"newmodel"
"player_only"
"prio"
"range"
"ray_cast"
"ray_cast_moving"
"speed"
"strength"
"time"
"two_handed"
"unholster"
- - - - - - - - - - - - - - - - - - - - - - - - -
Material types
material="wood|metal|organic|bullet"
These *are* defined in materials.xml. If you need a new "scrapable" material it must be defined as such in materials.xml + recipes.xml.
Hold types are in misc.xml
UMA Slots
EquipSlot: This defines protection values and general placement.
Head, Eyes, Face, Chest, Hands, Legs, Feet
Layer: This defines the index of the mesh that will be placed.
0 = base mesh layer, where the nude underwear model resides. any item put on with a layer of 0 will remove the mesh already in that Equipment slot.
1 = First overlay layer, this will lay over top of anything on layer 0 in the same EquipSlot.
2 = Second overlay layer, this will lay over top of anything on layer 0 or layer 1 in the same EquipSlot
UISlot: This defines the slot in the character screen that this clothing belongs to and any slots that may need disabled.
Headgear, Eyewear, Face, Shirt, Jacket, ChestArmor, Gloves, Backpack, Pants, Footwear, LegArmor
:UI Slot mutex:
Sometimes one item will cover another slot and we do not want to allow usage of that slot until the covering clothing/armor is removed.
This can be done by prepending an 'x' to the UISlot name.
Welding mask example
<item id="000" name="weldingMask" material="metal" stacknumber="1" mesh_file="Items/Clothing/Head/prefabWeldingMask" hold_type="21" repair_tools="scrapMetal">
<property name="EquipSlot" value="Head"/>
<property name="Degradation" value="100" param1="true" />
<property class="Armor">
<property name="Melee" value="0.3"/> <!-- legacy names! -->
<property name="Bullet" value="0.2"/>
<property name="Puncture" value="0.2"/>
<property name="Blunt" value="0.25"/>
<property name="Explosive" value="0.1" />
<property name="Group" value="Clothing" />
<property class="UMA">
<property name="Mesh" value="armor_leather_helmet" />
<property name="Overlay" value="armor_leather_helmet" />
<property name="Layer" value="1" />
<property name="UISlot" value="Headgear, xFace, xEyewear" />
</property>
</item>
WEAPON PARTS EXAMPLE
Below is an example of the values that need to be added to a weapon to give it parts. Part list should coincide with recipe.
All parts must be filled in or the weapon will not work, period.
<item id="40" name="pistol">
<property class="Parts">
<property name="Stock" value="partsPistol_grip" />
<property name="Receiver" value="partsPistol_receiver" />
<property name="Pump" value="partsPistol_parts" />
<property name="Barrel" value="partsPistol_barrel" />
</property>
</item>
PART ATTRIBUTE EXAMPLES
Below is an example of the properties that must be added (or set) for parts to work correctly.
StackNumber: This must be 1 so we can use degradation.
Degradation: Any default value, the weapon quality system will change this later, it just has to be set.
Attributes: These currently will interpolate from,to (based on quality from worst to best) for each of the below attribute types.
Atttributes/Damage: min,max damage as value.
Atttributes/Accuracy: 1 being worse accuracy (full offset multiplier) to 0 being best accuracy (0 offset) eg value="1,0" is correct, value="0,1" is wrong
Atttributes/FalloffRange: ray cast range in meters min,max
Atttributes/Degradation: points each part is degraded per shot
<item id="212" name="partsPistol_parts">
<property name="Extends" value="partsMaster" />
<property name="DescriptionKey" value="partsPistolGroupDesc"/>
<property name="PartType" value="Pump" />
<property name="Weight" value="10" />
<property class="Attributes">
<property name="DegradationMax" value="30,600" />
</property>
</item>
<item id="213" name="partsPistol_barrel">
<property name="Extends" value="partsMaster" />
<property name="DescriptionKey" value="partsPistolGroupDesc"/>
<property name="PartType" value="Barrel" />
<property name="Weight" value="10" />
<property class="Attributes">
<property name="EntityDamage" value="5, 40" />
<property name="BlockDamage" value="1,3" />
<property name="Accuracy" value="1, 0.01" />
<property name="DegradationMax" value="30,600" />
</property>
</item>
ARMOR ATTRIBUTE EXAMPLE
Removal of the Armor class in the item is completely optional, it's reverse compatible like the others. If no Armor class or values it'll only read Attributes and any missing ones will have a default value of 0 percent protection.
Each range for armor is a percentage value. 1 being full protection but the armor will take the damage as degradation instead. So higher protection means faster degradation which balances it out.
DegradationMin is the minimum percentage degradation that the armor can be taken down to.
leatherBoots currently have been swapped to the scaling attribute system as an example.
<property class="Attributes">
<property name="MeleeProtection" value="0.1, 0.5" />
<property name="BulletProtection" value="0.1, 0.3" />
<property name="PunctureProtection" value="0.1, 0.3" />
<property name="BluntProtection" value="0.15, 0.35" />
<property name="ExplosiveProtection" value="0.05,0.15" />
<property name="DegradationMin" value="0.1,0.5" />
</property>
WEAPON ATTACHABLES
Add the following property to a item to define it as a weapon attachable:
<property name="IsWeaponAttachment" value="true" />
Action Experience
<property name="ActionExp" value="1" /> (default value = 2)
<property name="ActionExpBonusMultiplier" value="2" /> (default value = 10)
These go under an action, woodenClub is an example. That will handle actions.
On kill or destroy events the multiplier is applied.
And for the repair and upgrade actions, each swing for repair or upgrade will give ActionExp amount
of skill/playerExp, the action bonus multiplier is applied when fully upgading a block to it's next level.
In the case of a recipe book, when first learned the multiplier is applied and after then
only the action exp is applied but it's applied for EACH item in the book.
Also, you only get "reading XP" for items that have a
<property name="ActionSkillGroup" value="Science"/>
defined.
You get XP to THIS group, not the crafting group of the item.
Now, as for crafting skill exp,
add these to anywhere inside an item that will be used as an ingredient, it's like the old ones but renamed for clarity's sake.
<property name="CraftingIngredientExp" value="4" /> (default value = 1)
<property name="CraftingIngredientTime" value="4" /> (default value = 1)
Then the recipe skill gain and craft time will be calculated internally
- - - - - - - - - - - - - - - - - - - - - - - - -
Weather survival / temperature rebalance
Wetness is ONLY affected by the coat and hat slot.
All heavy armor has 0 temperature insulation.
All light armor has a max of +2 (hide), making it useful wearing furry armor in a snow biome while not making it a liability outside.
Face and eye slot items offer a little damage protection but have zero effect on temperature or wetness.
The majority of the temperature mod is on the coat slot items.
It's too warm? Take off that puffer coat.
General clothing items like pants and shirts warm you from +1 to +5. HazMat 6.
Some clothing items that cool you are t-shirts (-5) or cowboy hats (-10).
The poncho is -20. Because Clint Eastwood looked good in it.
- - - - - - - - - - - - - - - - - - - - - - - - -
Food healing balance when eating food
Healing = ( Food + Food * Wellness ) / 2
Food poisoning counts as -1 wellness so 17 food with 100% Food Poisoning is 0 healing.
- - - - - - - - - - - - - - - - - - - - - - - - -
Unlocking a recipe:
<property class="Action1">
<property name="Recipes_to_learn" value="gunRocketLauncher,rocket,rocketCasing,rocketTip" />
<property name="ActionExp" value="50"/>
</property>
Instead of unlocking a list of recipes you can now learn / unlock a list of skills and perks.
1 point or level per book and skill.
<property class="Action1">
<property name="Class" value="GainSkill" />
<property name="Skills_to_gain" value="Treasure Hunter,Blunt Weapons" />
</property>
- - - - - - - - - - - - - - - - - - - - - - - - -
Note that item IDs CAN be moved around without icons, descriptions, or any references to them breaking.
All but one. "handPlayer" must remain on ID 70. Because.
- - - - - - - - - - - - - - - - - - - - - - - - -
All items have a "Stacknumber" and tags for batch-modding: (you're welcome)
<!-- STK ammo -->
<!-- STK book -->
<!-- STK explosives -->
<!-- STK food -->
<!-- STK drink -->
<!-- STK loot -->
<!-- STK medical -->
<!-- STK repairKit -->
<!-- STK resource -->
<!-- STK torch -->
Replace (using regex)
value=".*?" /> <!-- STK resource -->
with
value="675" /> <!-- STK resource -->
and you have adjusted everything that is used for crafting and does
nothing useful (like healing or eating) beyond that.
- - - - - - - - - - - - - - - - - - - - - - - - -
Buffs / Items / Critical hits / Melee :
This is a bit tricky.
A BUFF can have a property
critical="true"
That means that in addition to the (items) "Buff_chance" listed,
the buff DOES NOT FIRE if it fails
the SECONDARY roll against (items) "CritChance".
"CritChance" listed is the base chance and can fluctuate up and down a bit depending on your current stamina.
So with
"Buff_chance" and "CritChance" both at 0.3
you have an average chance of about 0.09 to ACTUALLY apply the buff.
- - - - - - - - - - - - - - - - - - - - - - - - -
Items can be excluded from underwater use.
<property name="UsableUnderwater" value="false" />
- - - - - - - - - - - - - - - - - - - - - - - - -
If an item adds a buff and this buff has no
name_key
assigned, neither the buff nor it's proc chance are listed on the item.
This is useful to trigger random food effects, rarely getting an infection from
a dirty needle on a blood draw kit... use the nasty side of your imagination.
- - - - - - - - - - - - - - - - - - - - - - - - -
"Stacknumber"
If an item has
<property class="Attributes">
</property>
or
<property class="Parts">
</property>
it's Stacknumber = 1 and does not need to be defined.
- - - - - - - - - - - - - - - - - - - - - - - - -
Zombie limb dismemberment
-------------------------
This is work in progress. 15.1. Or later.
A zombie limb has no defined hit points.
A zombie only has one hit point pool and DAMAGE to a limb is tracked.
The only hit point values that go into the formula are the zombie's max HP and accumulated damage to specific limbs.
I collated and translated that into pseudocode... mostly so I'd have something compact to reference. =)
private float GetDamageFraction(float _damage) { return _damage / zombie.GetMaxHealth() ;}
GetDamageOverlimit = Max(0, GetDamageFraction(bodyDamage.RightLowerLeg + _damage)- ec.LowerLegDismemberThreshold)
baseChance = ec.LowerLegDismemberBaseChance + (GetDamageOverlimit * ec.LowerLegDismemberBonusChance);
totalChance = canDismember ? (baseChance + _weaponBase + (_damage * _weaponBonus)) : 0f;
totalChance is the actual chance for limb dismemberment.
---------------------------------------------------------------------
---------------------------------------------------------------------
Balancing, tool / weapon balance
General balancing rule for tools: Iron should be 2x as good as stone, and steel 1.5x as good as iron. Steel to have great durability.
Weapons:
In general, the low end damage of a weapon will be 40% of the max damage.
For "newbie" weapons, the low end damage may be higher because these weapons are supposed to be replaced "soon" anyway.
Armor:
In general, the low end armor will be 40% of the max armor.
Maxed out armor skills will ADD 20% on top of item armor values. They no longer multiply the armor value.
If accumulated armor values + skill buff exceeds 100% the player becomes invulnerable.
Don't do that. Unless you want to. Then go nuts.
Important point on armor balancing:
The Mark 1 zombie does 10 damage. If your armor = 0.08 it reduces this damage by INT(0.08 * 10) or in other words 0 damage.
Skills *can* multiply armor skills but this is a terrible idea because light armor will always suck and if you push the values, leather will be OP.
I switched to adding flat protection from skill which is much easier to balance and let me make clothing or hide armor *work* as armor.
Light armor at high QL and skill can actually be decent protection now which may just be useful in a snow biome.
Heavy armor (+ max skill, +rare armor at max QL) can get up to 95% melee protection.
Getting that is not realistic so hey... keep making those first aid kits.
- - - - - - - - - - - - - - - - - - - - - - - - -
How armor worked in A13:
To be honest ahh... not too well.
If equipment slots are empty but you *are* wearing a full suit of armor, hits can go through without impacting armor.
If you wear armor (or anything), the AVERAGE protection value of all "connected" slots
(chest armor, overcoat, shirt) applies. Wearing a shirt kind of halves the value of your iron chest armor. Because of reasons.