-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtraps_config.cpp
529 lines (526 loc) · 16.2 KB
/
traps_config.cpp
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
////////////////////////////////////////////////////////////////////
//DeRap: gear_traps\config.bin
//Produced from mikero's Dos Tools Dll version 6.44
//'now' is Thu Dec 27 16:34:15 2018 : 'file' last modified on Mon Dec 10 15:58:35 2018
//http://dev-heaven.net/projects/list_files/mikero-pbodll
////////////////////////////////////////////////////////////////////
#define _ARMA_
//(12 Enums)
enum {
destructengine = 2,
destructdefault = 6,
destructwreck = 7,
destructtree = 3,
destructtent = 4,
stabilizedinaxisx = 1,
stabilizedinaxisy = 2,
destructno = 0,
stabilizedinaxesboth = 3,
stabilizedinaxesnone = 0,
destructman = 5,
destructbuilding = 1
};
class RecipeToolOnTool;
class CfgRecipes
{
class CraftTripWireMetal: RecipeToolOnTool
{
name = "Craft tripwire from %TOOL1 and %TOOL2";
tools[] = {"Crafting_WoodenStick","Crafting_MetalWire"};
results[] = {"Trap_TripWire"};
condition = "quantity _tool1 > 1 && damage _tool1 < 0.75 && damage _tool2 < 0.75";
action = "_dmg = (0.5*damage _tool1) + (0.5*damage _tool2); _tool1 addQuantity -2; deleteVehicle _tool2; if (quantity _tool1 < 1) then {deleteVehicle _tool1}; _result1 setDamage _dmg; [_owner,format['I have made a %1.',displayName _result1],'colorAction'] call fnc_playerMessage; _result1 callMethod ['SetStringType', 0];";
};
class CraftTripWireBarb: RecipeToolOnTool
{
name = "Craft tripwire from %TOOL1 and %TOOL2";
tools[] = {"Crafting_WoodenStick","Fence_BarbedWire"};
results[] = {"Trap_TripWire"};
condition = "quantity _tool1 > 1 && damage _tool1 < 0.75 && damage _tool2 < 0.75";
action = "_dmg = (0.5*damage _tool1) + (0.5*damage _tool2); _tool1 addQuantity -2; deleteVehicle _tool2; if (quantity _tool1 < 1) then {deleteVehicle _tool1}; _result1 setDamage _dmg; [_owner,format['I have made a %1.',displayName _result1],'colorAction'] call fnc_playerMessage; _result1 callMethod ['SetStringType', 1];";
};
class Craft_TrapSmallFish: RecipeToolOnTool
{
name = "Craft small fish trap from %TOOL1 and %TOOL2";
tools[] = {"Drink_WaterBottle","KnifeBase"};
results[] = {"Trap_SmallFish"};
condition = "damage _tool1 < 1 && damage _tool2 < 1";
action = "_dmg = (0.5*damage _tool1) + (0.5*damage _tool2); deleteVehicle _tool1; _result1 setDamage _dmg; [_owner,format['I have made a %1.',displayName _result1],'colorAction'] call fnc_playerMessage;";
};
class Craft_TrapFishNet: RecipeToolOnTool
{
name = "Craft fish net from %TOOL1 and %TOOL2";
tools[] = {"Consumable_Netting","Crafting_MetalWire"};
results[] = {"Trap_FishNet"};
condition = "damage _tool1 < 0.75 && damage _tool2 < 0.75";
action = "_dmg = (0.5*damage _tool1) + (0.5*damage _tool2); _tool1 addQuantity -1; if (quantity _tool1 < 1) then {deleteVehicle _tool1}; deleteVehicle _tool2; _result1 setDamage _dmg; [_owner,format['I have made a %1.',displayName _result1],'colorAction'] call fnc_playerMessage;";
};
class CraftRabbitSnare: RecipeToolOnTool
{
name = "Craft snare trap from %TOOL1 and %TOOL2";
tools[] = {"Crafting_MetalWire","Crafting_WoodenStick"};
condition = "damage _tool1 < 1 && damage _tool2 < 1";
results[] = {"Trap_RabbitSnare"};
action = "_result1 setDamage (damage _tool1 + damage _tool2 )/2; _tool2 addQuantity -1; if (quantity _tool2 < 1) then {deleteVehicle _tool2}; deleteVehicle _tool1; [_owner,format['I have made a snare trap.',displayName _result1],'colorAction'] call fnc_playerMessage;";
};
class Decraft_SnareTrap
{
name = "Break down into wooden stick";
condition = "_owner getVariable ['isUsingSomething',0] == 0";
material[] = {"Trap_RabbitSnare"};
results[] = {"Crafting_WoodenStick"};
action = "_result1 setQuantity 1; _result1 setdamage (damage _material1); [_owner,format['I have broken down the %1, but ruined the wire while doing it.',displayName _material1],'colorAction'] call fnc_playerMessage";
};
class Decraft_Trap_TripWireMetal
{
name = "Break down into Wooden stick and Metal wire";
condition = "_owner getVariable ['isUsingSomething',0] == 0 && _material1 callMethod ['GetStringType'] == 0;";
material[] = {"Trap_TripWire"};
results[] = {"Crafting_WoodenStick","Crafting_MetalWire"};
action = "_result1 setQuantity 2; _result1 setdamage (damage _material1); _result2 setQuantity 1; _result2 setdamage (damage _material1); [_owner,format['I have broken down the %1.',displayName _material1],'colorAction'] call fnc_playerMessage";
};
class Decraft_Trap_TripWireBarb
{
name = "Break down into Wooden stick and Barbed wire";
condition = "_owner getVariable ['isUsingSomething',0] == 0 && _material1 callMethod ['GetStringType'] == 1;";
material[] = {"Trap_TripWire"};
results[] = {"Crafting_WoodenStick","Fence_BarbedWire"};
action = "_result1 setQuantity 2; _result1 setdamage (damage _material1); _result2 setQuantity 1; _result2 setdamage (damage _material1); [_owner,format['I have broken down the %1.',displayName _material1],'colorAction'] call fnc_playerMessage";
};
};
class CfgPatches
{
class DZ_Gear_Traps
{
units[] = {};
weapons[] = {};
requiredVersion = 0.1;
requiredAddons[] = {"DZ_Data"};
};
};
class CfgAmmo
{
class DefaultAmmo;
class LandMineExplosion: DefaultAmmo
{
hit = 60;
indirectHit = 28;
indirectHitRange = 7;
particle = "explosion_landmine_01";
explosive = 1;
typicalSpeed = 3;
initSpeed = 3;
fuseDistance = 1;
cost = 40;
simulation = "shotShell";
simulationStep = 0.05;
soundSetExplosion[] = {"Grenade_explosion_SoundSet","Grenade_Tail_SoundSet"};
soundHit[] = {"DZ\sounds\weapons\grenades\hand_grenade_1",10.0,1};
soundFly[] = {"dz\sounds\Weapons\explosions\noise",3.162277e-005,1};
soundEngine[] = {"",9.999998e-005,4};
visibleFire = 2;
audibleFire = 0.25;
whistleDist = 4;
visibleFireTime = 0;
class DamageApplied
{
type = "Projectile";
Health = 99;
Blood = 500;
Shock = 500;
};
};
};
class CfgVehicles
{
class Trap_Base;
class BearTrap: Trap_Base
{
scope = 2;
displayName = "$STR_CfgVehicles_BearTrap0";
descriptionShort = "$STR_CfgVehicles_BearTrap1";
model = "\DZ\gear\traps\beartrap.p3d";
itemSize[] = {7,3};
weight = 12000;
itemBehaviour = 2;
lootTag[] = {"Hunting","Forester","Work"};
SingleUseActions[] = {560,527};
ContinuousActions[] = {231};
hiddenSelections[] = {"placing"};
hiddenSelectionsTextures[] = {"dz\gear\traps\data\beartrap_CO.paa"};
hiddenSelectionsMaterials[] = {"dz\gear\traps\data\beartrap.rvmat"};
hologramMaterial = "beartrap";
hologramMaterialPath = "dz\gear\traps\data";
class DamageSystem
{
class GlobalHealth
{
class Health
{
hitpoints = 100;
healthLevels[] = {{1.0,{"DZ\gear\traps\data\beartrap.rvmat"}},{0.7,{}},{0.5,{"DZ\gear\traps\data\beartrap_damage.rvmat"}},{0.3,{}},{0.0,{"DZ\gear\traps\data\beartrap_destruct.rvmat"}}};
};
};
};
class AnimationSources
{
class BearTrap_Set
{
source = "user";
animPeriod = 0.01;
initPhase = 1;
};
class inventory
{
source = "user";
animPeriod = 0.01;
initPhase = 0;
};
class placing
{
source = "user";
animPeriod = 0.01;
initPhase = 0;
};
};
class AnimEvents
{
class SoundWeapon
{
class movement_walk
{
soundSet = "beartrap_movement_walk_SoundSet";
id = 101;
};
class movement_run
{
soundSet = "beartrap_movement_run_SoundSet";
id = 102;
};
class movement_sprint
{
soundSet = "beartrap_movement_sprint_SoundSet";
id = 103;
};
class pickUpItem_Light
{
soundSet = "pickUpBearTrapLight_SoundSet";
id = 796;
};
class pickUpItem
{
soundSet = "pickUpBearTrap_SoundSet";
id = 797;
};
};
};
};
class LandMineTrap: Trap_Base
{
scope = 2;
displayName = "$STR_CfgVehicles_LandMineTrap0";
descriptionShort = "$STR_CfgVehicles_LandMineTrap1";
model = "\DZ\gear\traps\landmine.p3d";
weight = 1670;
itemSize[] = {2,2};
itemBehaviour = 1;
SingleUseActions[] = {527};
InteractActions[] = {233};
ContinuousActions[] = {231};
hiddenSelections[] = {"placing"};
hiddenSelectionsTextures[] = {"dz\gear\traps\data\landmine_CO.paa"};
hiddenSelectionsMaterials[] = {"dz\gear\traps\data\landmine.rvmat"};
hologramMaterial = "landmine";
hologramMaterialPath = "dz\gear\traps\data";
ammoType = "LandMineExplosion";
class DamageSystem
{
class GlobalHealth
{
class Health
{
hitpoints = 100;
healthLevels[] = {{1.0,{"DZ\gear\traps\data\landmine.rvmat"}},{0.7,{}},{0.5,{"DZ\gear\traps\data\landmine_damage.rvmat"}},{0.3,{}},{0.0,{"DZ\gear\traps\data\landmine_destruct.rvmat"}}};
};
};
};
class AnimationSources
{
class placing
{
source = "user";
animPeriod = 0.01;
initPhase = 0;
};
class safety_pin
{
source = "user";
animPeriod = 0.01;
initPhase = 0;
};
};
class AnimEvents
{
class SoundWeapon
{
class landmine_start
{
soundSet = "landmine_start_SoundSet";
id = 1;
};
class landmine_loop
{
soundSet = "landmine_loop_SoundSet";
id = 2;
};
class landmine_end
{
soundSet = "landmine_end_SoundSet";
id = 3;
};
};
};
};
class SmallFishTrap: Trap_Base
{
scope = 2;
displayName = "$STR_CfgVehicles_SmallFishTrap0";
descriptionShort = "$STR_CfgVehicles_SmallFishTrap1";
model = "\dz\gear\tools\improvised_fish_trap.p3d";
lootCategory = "Crafted";
rotationFlags = 17;
weight = 60;
itemSize[] = {2,3};
itemsCargoSize[] = {1,2};
allowOwnedCargoManipulation = 1;
itemBehaviour = 1;
SingleUseActions[] = {527};
ContinuousActions[] = {231,182,176,169,189,160,108,225,226,234,106};
hiddenSelections[] = {"placing"};
hiddenSelectionsTextures[] = {"dz\gear\drinks\Data\Loot_WaterBottle_CA.paa"};
hiddenSelectionsMaterials[] = {"dz\gear\drinks\Data\Loot_WaterBottle.rvmat"};
hologramMaterial = "Loot_WaterBottle";
hologramMaterialPath = "dz\gear\drinks\data";
stackedUnit = "ml";
destroyOnEmpty = 0;
varQuantityDestroyOnMin = 0;
quantityBar = 1;
liquidContainerType = "1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 + 256 + 512 + 1024 + 2048 + 4096 + 8192 + 16384 + 32768 - (1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 + 256)";
varQuantityInit = 0.0;
varQuantityMin = 0.0;
varQuantityMax = 500.0;
class DamageSystem
{
class GlobalHealth
{
class Health
{
hitpoints = 100;
healthLevels[] = {{1.0,{"DZ\gear\drinks\data\Loot_WaterBottle.rvmat"}},{0.7,{}},{0.5,{"DZ\gear\drinks\data\Loot_WaterBottle_damage.rvmat"}},{0.3,{}},{0.0,{"DZ\gear\drinks\data\Loot_WaterBottle_destruct.rvmat"}}};
};
};
};
class AnimationSources
{
class inventory
{
source = "user";
animPeriod = 0.01;
initPhase = 0;
};
class placing
{
source = "user";
animPeriod = 0.01;
initPhase = 1;
};
};
};
class FishNetTrap: Trap_Base
{
scope = 2;
displayName = "$STR_CfgVehicles_FishNetTrap0";
descriptionShort = "$STR_CfgVehicles_FishNetTrap1";
model = "\dz\gear\traps\fishnettrap.p3d";
lootCategory = "Crafted";
weight = 60;
itemSize[] = {2,3};
itemsCargoSize[] = {2,3};
allowOwnedCargoManipulation = 1;
itemBehaviour = 1;
SingleUseActions[] = {527};
ContinuousActions[] = {231};
hiddenSelections[] = {"placing"};
hiddenSelectionsTextures[] = {"dz\gear\traps\data\fishnettrap_CO.paa"};
hiddenSelectionsMaterials[] = {"dz\gear\traps\data\fishnettrap.rvmat"};
hologramMaterial = "fishnettrap";
hologramMaterialPath = "dz\gear\traps\data";
class DamageSystem
{
class GlobalHealth
{
class Health
{
hitpoints = 100;
healthLevels[] = {{1.0,{"DZ\gear\drinks\data\Loot_WaterBottle.rvmat"}},{0.7,{}},{0.5,{"DZ\gear\drinks\data\Loot_WaterBottle_damage.rvmat"}},{0.3,{}},{0.0,{"DZ\gear\drinks\data\Loot_WaterBottle_destruct.rvmat"}}};
};
};
};
class AnimationSources
{
class inventory
{
source = "user";
animPeriod = 0.01;
initPhase = 0;
};
class placing
{
source = "user";
animPeriod = 0.01;
initPhase = 1;
};
};
};
class TripwireTrap: Trap_Base
{
scope = 2;
displayName = "$STR_CfgVehicles_TripwireTrap0";
descriptionShort = "$STR_CfgVehicles_TripwireTrap1";
model = "\dz\gear\traps\tripwire.p3d";
rotationFlags = 16;
lootCategory = "Crafted";
attachments[] = {"tripWireAttachment"};
weight = 60;
itemSize[] = {2,3};
itemBehaviour = 1;
SingleUseActions[] = {527};
ContinuousActions[] = {231};
hiddenSelections[] = {"placing"};
hiddenSelectionsTextures[] = {"dz\gear\crafting\data\rabbit_snare_co.paa"};
hiddenSelectionsMaterials[] = {"dz\gear\crafting\data\rabbit_snare.rvmat"};
hologramMaterial = "rabbit_snare";
hologramMaterialPath = "dz\gear\crafting\data";
class DamageSystem
{
class GlobalHealth
{
class Health
{
hitpoints = 100;
healthLevels[] = {{1.0,{"DZ\gear\crafting\data\rabbit_snare.rvmat"}},{0.7,{}},{0.5,{"DZ\gear\crafting\data\rabbit_snare_damage.rvmat"}},{0.3,{}},{0.0,{"DZ\gear\crafting\data\rabbit_snare_destruct.rvmat"}}};
};
};
};
class AnimationSources
{
class HiddenByDefault
{
source = "user";
animPeriod = 0.01;
initPhase = 1;
};
class ShownByDefault
{
source = "user";
animPeriod = 0.01;
initPhase = 0;
};
class inventory: ShownByDefault{};
class placing: HiddenByDefault{};
class TripWire_set_can: HiddenByDefault{};
class TripWire_set_grenade: HiddenByDefault{};
class TripWire_triggered: HiddenByDefault{};
class s1_flashbang: HiddenByDefault{};
class s1_frag_RGD5: HiddenByDefault{};
class s1_grenade: HiddenByDefault{};
class s1_Road_flare: HiddenByDefault{};
class s1_smokegrenade: HiddenByDefault{};
class s1_smokegrenade_rdg2: HiddenByDefault{};
class s1_SodaCan_Used: HiddenByDefault{};
class s2_flashbang: HiddenByDefault{};
class s2_frag_RGD5: HiddenByDefault{};
class s2_grenade: HiddenByDefault{};
class s2_Road_flare: HiddenByDefault{};
class s2_smokegrenade: HiddenByDefault{};
class s2_smokegrenade_rdg2: HiddenByDefault{};
class s2_SodaCan_Used: HiddenByDefault{};
class s3_flashbang: HiddenByDefault{};
class s3_frag_RGD5: HiddenByDefault{};
class s3_grenade: HiddenByDefault{};
class s3_Road_flare: HiddenByDefault{};
class s3_smokegrenade: HiddenByDefault{};
class s3_smokegrenade_rdg2: HiddenByDefault{};
class s3_SodaCan_Used: HiddenByDefault{};
};
};
class RabbitSnareTrap: Trap_Base
{
scope = 2;
displayName = "$STR_CfgVehicles_RabbitSnareTrap0";
descriptionShort = "$STR_CfgVehicles_RabbitSnareTrap1";
model = "\dz\gear\crafting\rabbit_snare.p3d";
rotationFlags = 16;
lootCategory = "Crafted";
weight = 240;
itemSize[] = {2,2};
itemBehaviour = 1;
SingleUseActions[] = {527};
ContinuousActions[] = {231};
hiddenSelections[] = {"placing"};
hiddenSelectionsTextures[] = {"dz\gear\crafting\data\rabbit_snare_co.paa"};
hiddenSelectionsMaterials[] = {"dz\gear\crafting\data\rabbit_snare.rvmat"};
hologramMaterial = "rabbit_snare";
hologramMaterialPath = "dz\gear\crafting\data";
class DamageSystem
{
class GlobalHealth
{
class Health
{
hitpoints = 100;
healthLevels[] = {{1.0,{"DZ\gear\crafting\data\rabbit_snare.rvmat"}},{0.7,{}},{0.5,{"DZ\gear\crafting\data\rabbit_snare_damage.rvmat"}},{0.3,{}},{0.0,{"DZ\gear\crafting\data\rabbit_snare_destruct.rvmat"}}};
};
};
};
class AnimationSources
{
class inventory
{
source = "user";
animPeriod = 0.01;
initPhase = 0;
};
class placing
{
source = "user";
animPeriod = 0.01;
initPhase = 1;
};
class rabbit_snare_used
{
source = "user";
animPeriod = 0.01;
initPhase = 1;
};
};
class MeleeModes
{
class Default
{
ammo = "MeleeLightBlunt";
range = 1.0;
};
class Heavy
{
ammo = "MeleeLightBlunt_Heavy";
range = 1.0;
};
class Sprint
{
ammo = "MeleeLightBlunt_Heavy";
range = 2.8;
};
};
};
};