6742715292dc6

6742715294d0a
2 Guests are here.
 

Topic: DML modders read! Read 40225 times  

67427152958a1voodoo47

6742715295911
DML limitations
How to make DMLs
How do I edit properties with DMLs?
How to assign custom scripts to archetypes

also, NewDark includes some other nice stuff, for example, the ability to load scripts via dml, this allows dml fixes that require extra scripts like NVscript to work with maps that don't have it loaded, meaning the rather user unfriendly process of manually adding NVscript into an orig map is not required anymore. example;
Code: [Select]
DML1

//load NVscript
#script "NVScript"

very useful for the battery bugfix mod, for example.

next useful addition is called dml fingerprinting, it conveniently solves the issue with dmls meant for orig SS2 missions getting applied to FMs (the missing elevator switch on Ponterbee when Rebirth is used). it allows you to specify a set of objects and their locations, and unless these objects are found at the specified spots when the mission is started, the dml will not be applied. just tested this (with already uploaded Rebirth 03a), and it works nicely. example (Rebirth earth);
Code: (earth.miss.dml) [Select]
DML1

// OM earth fingerprint
FINGERPRINT
{
   543 [43.53 -102.25 5]
   243 [-26.72 -28.26 4.27]
   448 [-26.76 -22.68 6.5]
   434 [23.84 -0.92 5.95]
   442 [-26.03 28.21 5]
   447 [43.73 190.15 60]
   604 [64.76 158.5 60.48]
   606 [64.47 142.57 60.48]
   607 [64.62 126.82 60.48]
   437 [36.34 170.4 60.48]
}

see dbmod-sample.dml in NewDark doc folder for more details.


//adding the rest of OM fingerprint blocks - anyone making a mod for the original game that uses dmls to move or change objects is strongly encouraged to add the fingerprint block to their dmls, this will make sure that nothing bad happens when playing FMs with the mod active (like moving a quest item out of player's reach).

Code: (station.mis.dml) [Select]
FINGERPRINT
{
   314 [-38 10 -42]
   462 [-42 10 -42]
   463 [-46 10 -42]
   464 [-50 10 -42]
   468 [-42 2 -36.5]
   469 [-46 2 -36.5]
   470 [-50 2 -36.5]
   313 [-38 6 -39]
   365 [-42 6 -39]
   466 [-46 6 -39]
}

Code: (eng1.mis.dml) [Select]
FINGERPRINT
{
   156 [-14 82 -28]
   158 [-14 72 -28]
   878 [-14 62 -28]
   155 [-14 52 -28]
   876 [-5 52 -28]
   877 [-5 62 -28]
   1156 [-5 72 -28]
   325 [4 52 -28]
   879 [4 62 -28]
   934 [4 72 -28]
}

Code: (eng2.mis.dml) [Select]
FINGERPRINT
{
   852 [119.58 -610.71 -27.35]
   857 [121.51 -604.94 -27.35]
   861 [124.51 -594.94 -27.35]
   856 [131.63 -599.69 -27.35]
   858 [131.72 -589.75 -27.35]
   862 [125.51 -581.94 -27.35]
   859 [127.68 -576.44 -27.35]
   864 [121.51 -569.94 -27.35]
   865 [118.51 -560.94 -27.35]
   860 [126.45 -560.13 -28.35]
}

Code: (medsci1.mis.dml) [Select]
FINGERPRINT
{
   1892 [105.14 -5.11 -2]
   870 [104.99 -0.17 -2]
   1131 [97.79 0.96 -2]
   1939 [94.26 4.32 -2]
   361 [90.57 9.52 -2]
   392 [101.62 18.81 -2]
   1087 [122.71 69.42 -2]
   388 [127.93 65.88 -2]
   476 [128.1 61.64 -2]
   365 [127.73 57.51 -2]
}

Code: (medsci2.mis.dml) [Select]
FINGERPRINT
{
   1209 [-67.27 -126.62 2]
   536 [-101.9 -168.81 0]
   1144 [-56.57 -280.48 2]
   218 [-109 -282.48 1.17]
   224 [-9.01 -197.53 5.78]
   1250 [53.51 -171.86 -2.05]
   480 [74.08 -280.33 4.35]
   726 [43.31 -268.7 -2]
   478 [43.09 -274.22 -2]
   727 [42.98 -281.24 -2]
}

Code: (hydro1.mis.dml) [Select]
FINGERPRINT
{
   1155 [-114 121 -12]
   1154 [-121 121 -12]
   144 [-73 -175.5 20]
   569 [-67 -179.5 20]
   76 [-60.5 -182 20]
   140 [-60.5 -179.5 20]
   1101 [-60.5 -177 20]
   75 [-63 -175.5 20]
   74 [-65 -175.5 15]
   73 [-67 -175.5 10]
}

Code: (hydro2.mis.dml) [Select]
FINGERPRINT
{
   1647 [-241 -12 0]
   1646 [-241 -18 0]
   1645 [-241 -24 0]
   1489 [-241 -30 0]
   1644 [-249 -12 0]
   1643 [-249 -18 0]
   1642 [-249 -24 0]
   1494 [-249 -30 0]
   426 [-249 -36 0]
   425 [-249 -42 0]
}

Code: (hydro3.mis.dml) [Select]
FINGERPRINT
{
   244 [-97 -103.5 50]
   158 [-97 -109.5 50]
   147 [-97 -112.5 50]
   152 [-100 -112.5 50]
   383 [-108 -109.5 50]
   153 [-100 -106.5 40]
   154 [-102 -106.5 30]
   384 [-104 -109.5 20]
   155 [-104 -106.5 20]
   248 [-108 -106.5 20]
}

Code: (ops1.mis.dml) [Select]
FINGERPRINT
{
   159 [70.5 -29.5 -15]
   158 [65.5 -29.5 -15]
   95 [65.5 -24.5 -15]
   157 [60.5 -29.5 -15]
   156 [53.5 -29.5 -15]
   111 [53.5 -34 -15]
   112 [48.5 -38.5 -15]
   110 [48.5 -34 -15]
   155 [48.5 -29.5 -15]
   141 [48.5 -24.5 -15]
}

Code: (ops2.mis.dml) [Select]
FINGERPRINT
{
   122 [-244 85 -22]
   123 [-244 90 -22]
   125 [-244 95 -22]
   341 [-244 100 -22]
   540 [-66.44 38.9 -18.84]
   538 [-71.73 38.92 -21.98]
   995 [-69.86 49.07 -21.98]
   993 [-74.98 48.94 -19.75]
   542 [-45.49 29.57 -18.84]
   1000 [-45.39 35.26 -22]
}

Code: (ops3.mis.dml) [Select]
FINGERPRINT
{
   1369 [-75.6622 478.468 -18.5647]
   1370 [-69.1622 478.468 -18.5647]
   1371 [-62.6622 478.468 -18.5647]
   1372 [-56.1622 478.468 -18.5647]
   1373 [-49.4084 482.74 -18.5647]
   1374 [-49.4412 474.365 -18.5647]
   1383 [-43.0707 464.585 -12.5578]
   1380 [-43.4606 491.324 -12.5578]
   1379 [-38.4532 483.08 -12.5578]
   1378 [-38.5104 473.873 -12.5578]
}

Code: (ops4.mis.dml) [Select]
FINGERPRINT
{
   811 [38 -222 -28]
   812 [43 -222 -28]
   813 [48 -222 -28]
   814 [53 -222 -28]
   815 [58 -222 -28]
   816 [64 -225 -28]
   817 [64 -219 -28]
   835 [47.7996 -213.929 -28]
   836 [55.8961 -210.736 -28]
   483 [63.1055 -208.245 -28]
}

Code: (rec1.mis.dml) [Select]
FINGERPRINT
{
   162 [33.4487 -554.949 4.91395]
   796 [37.6137 -554.605 4.91395]
   307 [41.7694 -554.159 4.91395]
   120 [44.2092 -554.334 4.91395]
   839 [42.9643 -544.603 4.91395]
   118 [41.6347 -533.931 4.91395]
   814 [38.2317 -531.325 4.91395]
   813 [34.3838 -530.806 4.91395]
   161 [30.9866 -527.87 4.91395]
   158 [26.4369 -532.171 4.91395]
}

Code: (rec2.mis.dml) [Select]
{
   503 [-233.682 -212.545 -23]
   1289 [-239.076 -202.044 -21.9052]
   1333 [-201.658 -177.397 -19.1932]
   1293 [-254.531 -140.747 -24.928]
   714 [-258.127 -135.928 -19.8609]
   233 [8.15881 -163.446 -3.16406]
   171 [-239.419 -134.798 -23]
   721 [-244.437 -144.387 -6.56267]
   760 [-78.9117 -52.1386 -19.5113]
   761 [-85.0766 -52.0627 -19.5113]
}

Code: (rec3.mis.dml) [Select]
FINGERPRINT
{
   306 [-172.1 -516.553 4.75]
   307 [-173.146 -531.749 4.75]
   308 [-171.055 -543.889 4.75]
   176 [-131.124 -526.953 8.91155]
   170 [-215.822 -502.854 2.78125]
   305 [-172.824 -482.623 4.75]
   186 [-183.935 -451.218 0.485492]
   212 [-200.637 -438.315 0.833361]
   514 [-209.873 -436.506 -11]
   492 [-190.469 -251.048 -11]
}

Code: (command1.mis.dml) [Select]
FINGERPRINT
{
   327 [822.249 235.744 -1.4402]
   328 [815.249 229.744 -1.4402]
   326 [818.249 230.744 -1.4402]
   116 [814.839 225.321 -1.4402]
   120 [824.014 224.14 -1.4402]
   117 [742.692 223.717 -1.4402]
   284 [833.998 224.658 -15.6902]
   119 [829.014 225.14 -1.4402]
   647 [845.141 244.272 -20.0397]
   1306 [943.668 86.0644 -43.5]
}

Code: (command2.mis.dml) [Select]
FINGERPRINT
{
   830 [15.7867 -185.556 -37.0402]
   186 [9.40433 -208.802 -43]
   811 [31.2836 -208.708 -31]
   220 [14.8879 -208.721 -22.2407]
   503 [25.7041 -208.768 -17.2902]
   529 [3.83202 -208.804 -15.25]
   836 [-65.4684 -176.147 -23.4186]
   446 [-68.4684 -176.147 -23.4186]
   509 [-70.024 -165.577 -22.4186]
   162 [-69.4684 -173.397 -23.4186]
}

Code: (rick1.mis.dml) [Select]
FINGERPRINT
{
   1391 [-15.5391 -67.2955 -63]
   1392 [-15.5391 -61.2955 -63]
   1421 [-15.5391 -55.2955 -63]
   1422 [-15.5391 -49.2955 -63]
   1423 [-15.5391 -43.2955 -63]
   1416 [-20.3978 -62.4597 -63]
   1417 [-20.3978 -56.4597 -63]
   1418 [-20.3978 -50.4597 -63]
   1419 [-20.3978 -44.4597 -63]
   1420 [-20.3978 -38.4597 -63]
}

Code: (rick2.mis.dml) [Select]
FINGERPRINT
{
   249 [-497.87 -31.9472 290.5]
   743 [-506.344 -19.3096 287.872]
   697 [-312.566 1.89874 230.487]
   253 [-312.857 12.9559 232.5]
   83 [-420.175 -7.64825 224.759]
   731 [-411.819 -3.0144 232]
   730 [-410.693 -7.35611 232]
   247 [-295.203 8.33517 225]
   729 [-399.194 9.04406 232]
   732 [-498.056 -16.9528 287.872]
}

Code: (rick3.mis.dml) [Select]
FINGERPRINT
{
   499 [-731.053 53.301 263]
   1075 [-704.277 58.6011 276]
   1074 [-701.671 57.305 276]
   1071 [-704.277 51.1011 276]
   1066 [-701.671 49.805 276]
   1067 [-704.277 44.1011 276]
   1065 [-701.671 42.805 276]
   754 [-704.277 38.1011 276]
   753 [-701.671 37.805 276]
   1064 [-688.277 41.6011 276]
}

Code: (many.mis.dml) [Select]
FINGERPRINT
{
   1493 [-690.081 411.329 45.7212]
   1402 [113.153 -132.321 4.07417]
   1401 [112.832 -135.377 4.07417]
   154 [-101.314 46.3092 15.5092]
   750 [-37.6059 33.6295 5.12103]
   400 [-28.6458 32.3455 5.12103]
   1488 [-721.837 410.683 45.7212]
   749 [-763.789 341.653 40.4907]
   904 [-760.939 372.604 23.7362]
   496 [-692.581 356.683 36.7531]
}

Code: (shodan.mis.dml) [Select]
FINGERPRINT
{
   570 [12 262 -8]
   655 [11.5 257 -8]
   1240 [6.5 253.5 -8]
   402 [-4.5 4.5 3]
   734 [-80 16 -118]
   288 [-43.5 -140 4]
   642 [-92 -36 -8]
   128 [-132 44 19.5]
   127 [-124 44 19.5]
   126 [-124 36 19.5]
}
« Last Edit: 11. June 2023, 17:56:28 by voodoo47 »

6742715295a0fYankee Clipper

Re: notes on SS2 2.43, dml modders read!
6742715295a66
Excellent! Now, if only there was a way to create a new object class via a dml. I'd like to copy the OneRifledSlug from ADaOB, but unless I'm missing something, you can't create something new in a dml; just manipulate the stuff that is already in the maps or gamesys.

6742715295b1avoodoo47

Re: notes on SS2 2.43, dml modders read!
6742715295b67
I have tried this a couple of hours ago, and unfortunately, ADaoB's unloaded hybrid shotgun cannot be recreated as a separate dml mod, as you have no way of creating OneRifledSlug via dml.

6742715295c16Yankee Clipper

Re: notes on SS2 2.43, dml modders read!
6742715295c61
If I understand correctly what you are intending with these examples - that they can be used interchangeably with either vanilla or SCP - the fingerprint block for rec1 is no good. Object 162 does not have the same coordinates in SCP that it had in vanilla.

6742715295cfdvoodoo47

Re: notes on SS2 2.43, dml modders read!
6742715295d4c
yeah, looks like the fingerprint objects have been rearranged, so now the rec1 fingerprint won't be a match. crap. I'll see whether this can be solved somehow.

6742715295e6bvoodoo47

Re: notes on SS2 2.43, dml modders read!
6742715295ebc
ok, add an extra fingerprint block to each dml with
Code: [Select]
FINGERPRINT
{
   QVAR "scplevel" == 1
}
so the rec1 dml would look like this;

Code: [Select]
FINGERPRINT
{
   162 [33.4487 -554.949 4.91395]
   796 [37.6137 -554.605 4.91395]
   307 [41.7694 -554.159 4.91395]
   120 [44.2092 -554.334 4.91395]
   839 [42.9643 -544.603 4.91395]
   118 [41.6347 -533.931 4.91395]
   814 [38.2317 -531.325 4.91395]
   813 [34.3838 -530.806 4.91395]
   161 [30.9866 -527.87 4.91395]
   158 [26.4369 -532.171 4.91395]
}
FINGERPRINT
{
   QVAR "scplevel" == 1
}

this will ensure that the dml will load for vanilla and SCP alike.

6742715296385voodoo47

Re: notes on SS2 2.43, dml modders read!
67427152963f0
unloaded hybrid shotgun cannot be recreated as a separate dml mod, as you have no way of creating OneRifledSlug via dml.
so I've lied - as long as the gamesys has an empty archetype that can be recycled, it can be pulled off - example of a gamesys dml for Ponterbee station (cshock2.gam.dml);
Code: [Select]
DML1


//remove the slug from the hybrid shotgun
ObjProp -4073 "GunState"
{
"Ammo" 0
}
//add it to the hybrid loot
+ObjProp -175 "Scripts"
{
"Script 0" NVGuaranteedLoot
}
+ObjProp -175 "ObjList"
{
"" NVGuaranteedLoot0="pd1die";
}
//create the onerifledslug archetype from an empty/missing archetype (-5151 pd1die)
+ObjProp -5151 "StackCount"
{
"" 1
}
+Link -516 -5151 "Clip"
{
}
+Link -3422 -5151 "Clip"
{
}

+ObjProp -5151 "CombineType"
{
"" RifledSlug
}
+ObjProp -5151 "ObjIcon"
{
"" SG_I
}
+ObjProp -5151 "ObjName"
{
"" Rifled_Slug_Box: "A box of %d rifled slugs."
}
+ObjProp -5151 "ObjShort"
{
"" Rifled_Slug_Box: "Rifled slugs"
}
+ObjProp -5151 "FabCost"
{
"" 60
}
+ObjProp -5151 "ModelName"
{
"" ammosg
}

+ObjProp -5151 "InvDims"
{
"Width" 1
"Height" 1
}
+ObjProp -5151 "Recycle"
{
"" 1
}
+ObjProp -5151 "StackInc"
{
"" 3
}
+ObjProp -5151 "PhysType"
{
"Type" Sphere
"# Submodels" 1
"Remove on Sleep" false
"Special" false
}
+ObjProp -5151 "PhysDims"
{
"Radius 1" 0.31
"Radius 2" 0.00
"Offset 1" 0
"Offset 2" 0
"Point vs Terrain" false
"Point vs Not Special" false
}
+ObjProp -5151 "PhysAttr"
{
"Gravity %" 100
"Mass" 30
"Density" 1.00
"Elasticity" 1.00
"Base Friction" 0.00
"COG Offset" 0, 0, 0
"Rotation Axes" X Axis, Y Axis, Z Axis
"Rest Axes" +Z Axis, -Z Axis
}
+ObjProp -5151 "Alchemy"
{
"" 1.25
}
+ObjProp -5151 "Fabricate"
{
"" 6
}
//+ObjProp -5151 "Scale" = 0.6, 0.6, 0.6
//SCP ammo dims maybe? should be shrinked to 0.6, must also modify phys Radius 1 to 0.25

+ObjProp -5151 "FrobInfo"
{
"World Action" Move
"Inv Action" Script
"Tool Action" Script
}
+ObjProp -5151 "NameType"
{
"" Stack Count
}
+ObjProp -5151 "PsiRadar"
{
"" Powerup
}
+ObjProp -5151 "Material Tags"
{
"1: Tags" Material Metal
}
+ObjProp -5151 "Scripts"
{
"Script 0" AmmoScript
}

+ObjProp -5151 "ElevAble"
{
"" true
}
+ObjProp -5151 "HUDSelect"
{
"" true
}

+ObjProp -5151 "BashParams"
{
"Threshold" 200.00
"Coefficient" 0.01
}
+Link -1347 -5151 "Hit Spang"
{
"Hit Spang Obj" -4462
}
+Link -519 -5151 "Hit Spang"
{
"Hit Spang Obj" -381
}
+Link -518 -5151 "Hit Spang"
{
"Hit Spang Obj" -381
}
+Link -1137 -5151 "Hit Spang"
{
"Hit Spang Obj" -5437
}
+Link -1136 -5151 "Hit Spang"
{
"Hit Spang Obj" -5436
}
+ObjProp -5151 "NetworkCategory"
{
"" Hosted
}

+ObjProp -5151 "Heartbeat"
{
"" 1000
}
+ObjProp -5151 "AutoPickup"
{
"" true
}

no more shotgun unloading, har har. of course, it's infinitely easier to just make one tiny edit to the gamesys, but where'd be fun in that, right?

674271529651dvoodoo47

Re: notes on SS2 2.43, dml modders read!
6742715296580
as of 2.44, dmls can use object names (not just obj ids) as well - "OneRifledSlug" instead of -4476, for example;
Code: [Select]
+ObjProp "OneRifledSlug" "AutoPickup"
{
"" true
}

archetypes only.
« Last Edit: 01. November 2015, 09:22:27 by voodoo47 »

6742715296728voodoo47

Re: notes on SS2 2.43, dml modders read!
6742715296788
as of today, SCP (beta2) and vanilla (SS2tool patched) builds of SS2 include 10 empty archetypes (grouped under one uber archetype);
Code: [Select]
DML
   DML1
   DML2
   DML3
   DML4
   DML5
   DML6
   DML7
   DML8
   DML9
   DML10

this will allow creation of more complex dml mods (like the pumpkin mod), as you are not limited to mission dmls anymore. remember to reference the archetypes by name, not by number.

67427152968cbZylonBane

Re: notes on SS2 2.43, dml modders read!
674271529691e
But, like gamesys mods, only one mod that uses them can be active at a time.

6742715296a07voodoo47

Re: notes on SS2 2.43, dml modders read!
6742715296a58
technically, it could accommodate more than one, but they would have to be set up to not use the same archetypes. for example, it wouldn't be too difficult to make a minimod that would bring the ADaoB hybrid shotgun fix to pure vanilla, and another one that would add the SCP shotgun hybrid muzzle flash, and set them up so they could be active at the same time.

but as I tend to say, we'll cross that bridge once we actually get to it.

Your name:
This box must be left blank:

How can you challenge a perfect, _____ machine? (Fill in the missing word):
Sticky topic
2 Guests are here.
James Bond is an operative, not a spy.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
6742715297845