Remove DayZ Mod crafting and replace it with epoch crafting

- All dayz mod recipe were moved to epoch crafting.
- This disables the craft dialog in the diary too.
- The player_craftitem got updated and can handle all dayz mod recipes now.
- A few wooden recipes got updated with an need nails now.
- player_craftitem shows all items that are needed for crafting now, no longer only one missing part.
- Add a systemchat text for missing tools, so it can be checked later in the chat.
This commit is contained in:
A Man
2020-05-11 19:55:28 +02:00
parent 9c19e13418
commit 8315d8999b
19 changed files with 419 additions and 183 deletions

View File

@@ -1,34 +1,3 @@
class CfgCrafting { class CfgCrafting {
class Recipe {
displayName = "Generic Recipe";
input[] = {}; //Items consumed during crafting
output[] = {}; //Items created from crafting
required[] = {}; //Items needed for but not consumed during crafting
failChance = 0;
};
//Completed
//Weapons
#include "Recipes\Weapons\NailedBaseballBat.hpp"
#include "Recipes\Weapons\BaseBallBatBarbed.hpp"
#include "Recipes\Weapons\Crossbow.hpp"
//Medical };
#include "Recipes\Medical\Bandage.hpp"
#include "Recipes\Medical\sepsisBandage.hpp"
#include "Recipes\Medical\woodensplint.hpp"
#include "Recipes\Medical\HerbalDrink.hpp"
//ammo
//#include "Recipes\Ammo\WoodenArrow.hpp"
//other
#include "Recipes\Other\woodencrate.hpp"
#include "Recipes\Other\nails.hpp"
#include "Recipes\Other\BackPack.hpp"
//#include "Recipes\Other\woodenCraftTable.hpp"
//Traps
#include "Recipes\Traps\TrapBearTrapFlare.hpp"
#include "Recipes\Traps\TrapBearTrapSmoke.hpp"
#include "Recipes\Traps\TrapTripwireCans.hpp"
#include "Recipes\Traps\TrapTripwireFlare.hpp"
#include "Recipes\Traps\TrapTripwireGrenade.hpp"
#include "Recipes\Traps\TrapTripwireSmoke.hpp"
};

View File

@@ -19,6 +19,24 @@ class TrapBear : CA_Magazine
consume[] = {"TrapBear"}; consume[] = {"TrapBear"};
create = "BearTrap_DZ"; create = "BearTrap_DZ";
}; };
class Crafting
{
text = $STR_ITEM_NAME_BEAR_TRAP_FLARE;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {{"ItemTrapBearTrapFlare",1}};
input[] = {{"equip_string",1},{"TrapBear",1},{"PartWoodPile",1},{"equip_duct_tape",1},{"HandRoadFlare",1}};
};
class Crafting1
{
text = $STR_ITEM_NAME_BEAR_TRAP_SMOKE;
script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {{"ItemTrapBearTrapSmoke",1}};
input[] = {{"equip_string",1},{"TrapBear",1},{"PartWoodPile",1},{"equip_duct_tape",1},{"SmokeShell",1}};
};
}; };
}; };

View File

@@ -93,7 +93,25 @@ class ItemPlasticWaterBottleBoiled : ItemWaterBottle
infectionChance = 0; infectionChance = 0;
consumeOutput = "ItemPlasticWaterbottleUnfilled"; consumeOutput = "ItemPlasticWaterbottleUnfilled";
containerEmpty = "ItemPlasticWaterbottleUnfilled"; containerEmpty = "ItemPlasticWaterbottleUnfilled";
};
class ItemActions
{
class Crafting
{
text = $STR_CRAFTING_HERBALDRINK;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {};
output[] = {{"ItemPlasticWaterBottleHerbal",1}};
input[] = {{"equip_herb_box",1},{"ItemPlasticWaterBottleBoiled",1}};
};
class Empty
{
text = $STR_EQUIP_NAME_13_EMPTY;
script = "spawn player_emptyContainer";
};
};
};
class ItemPlasticWaterBottleHerbal : ItemWaterBottle class ItemPlasticWaterBottleHerbal : ItemWaterBottle
{ {

View File

@@ -46,6 +46,24 @@ class ItemWaterBottleBoiled : ItemWaterBottle
descriptionShort = $STR_ITEMWATERBOTTLEBOILED_CODE_DESC; descriptionShort = $STR_ITEMWATERBOTTLEBOILED_CODE_DESC;
infectionChance = 0; infectionChance = 0;
class ItemActions
{
class Crafting
{
text = $STR_CRAFTING_HERBALDRINK;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {};
output[] = {{"ItemWaterBottleHerbal",1}};
input[] = {{"equip_herb_box",1},{"ItemWaterBottleBoiled",1}};
};
class Empty
{
text = $STR_EQUIP_NAME_13_EMPTY;
script = "spawn player_emptyContainer";
};
};
}; };
class ItemWaterBottleHerbal : ItemWaterBottle class ItemWaterBottleHerbal : ItemWaterBottle

View File

@@ -17,6 +17,14 @@ class PartGeneric : CA_Magazine
output[] = {{"ItemPole",1}}; output[] = {{"ItemPole",1}};
input[] = {{"PartGeneric",2}}; input[] = {{"PartGeneric",2}};
}; };
class Crafting1 {
text = $STR_CRAFTING_NAILS;
script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {"fire"};
requiretools[] = {"ItemToolbox"};
output[] = {{"equip_nails",4}};
input[] = {{"PartGeneric",2}};
};
}; };
}; };

View File

@@ -102,8 +102,8 @@ class equip_pvc_box : CA_Magazine {
count = 1; count = 1;
displayName = $STR_ITEM_NAME_equip_pvc_box; displayName = $STR_ITEM_NAME_equip_pvc_box;
descriptionShort = $STR_ITEM_DESC_equip_pvc_box; descriptionShort = $STR_ITEM_DESC_equip_pvc_box;
model = "\z\addons\dayz_communityassets\models\plastic_box.p3d"; model = "\z\addons\dayz_communityassets\models\plastic_box.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_plastic_box_ca.paa"; picture = "\z\addons\dayz_communityassets\pictures\equip_plastic_box_ca.paa";
type = 256; type = 256;
}; };

View File

@@ -3,7 +3,6 @@ class ItemFertilizer: CA_Magazine {
count = 1; count = 1;
displayName = $STR_CRAFT_NAME_FERTILIZER; displayName = $STR_CRAFT_NAME_FERTILIZER;
descriptionShort = $STR_CRAFT_DESC_FERTILIZER; descriptionShort = $STR_CRAFT_DESC_FERTILIZER;
weight = 0.1;
picture = "\z\addons\dayz_epoch_w\magazine\ui\m_fertilizer_ca.paa"; picture = "\z\addons\dayz_epoch_w\magazine\ui\m_fertilizer_ca.paa";
model = "\z\addons\dayz_epoch_w\magazine\dze_fertilizer.p3d"; model = "\z\addons\dayz_epoch_w\magazine\dze_fertilizer.p3d";
type = 256; type = 256;
@@ -14,7 +13,6 @@ class ItemPumpkinSeed: CA_Magazine {
count = 1; count = 1;
displayName = $STR_CRAFT_NAME_PUMPKIN_SEED; displayName = $STR_CRAFT_NAME_PUMPKIN_SEED;
descriptionShort = $STR_CRAFT_DESC_PUMPKIN_SEED; descriptionShort = $STR_CRAFT_DESC_PUMPKIN_SEED;
weight = 0.1;
model = "\z\addons\dayz_epoch\models\doc_child1.p3d"; // TODO: model + icon model = "\z\addons\dayz_epoch\models\doc_child1.p3d"; // TODO: model + icon
picture = "\z\addons\dayz_epoch\pictures\equip_child1_ca.paa"; picture = "\z\addons\dayz_epoch\pictures\equip_child1_ca.paa";
type = 256; type = 256;
@@ -36,7 +34,6 @@ class ItemPumpkinPlant: CA_Magazine {
count = 1; count = 1;
displayName = $STR_CRAFT_NAME_PUMPKIN_PLANT; displayName = $STR_CRAFT_NAME_PUMPKIN_PLANT;
descriptionShort = $STR_CRAFT_DESC_PUMPKIN_PLANT; descriptionShort = $STR_CRAFT_DESC_PUMPKIN_PLANT;
weight = 0.1;
model = "\z\addons\dayz_epoch\models\doc_child1.p3d"; // TODO: model + icon model = "\z\addons\dayz_epoch\models\doc_child1.p3d"; // TODO: model + icon
picture = "\z\addons\dayz_epoch\pictures\equip_child1_ca.paa"; picture = "\z\addons\dayz_epoch\pictures\equip_child1_ca.paa";
type = 256; type = 256;
@@ -56,7 +53,6 @@ class ItemHempSeed: CA_Magazine {
count = 1; count = 1;
displayName = $STR_CRAFT_NAME_HEMP_SEED; displayName = $STR_CRAFT_NAME_HEMP_SEED;
descriptionShort = $STR_CRAFT_DESC_HEMP_SEED; descriptionShort = $STR_CRAFT_DESC_HEMP_SEED;
weight = 0.1;
model = "\z\addons\dayz_epoch\models\doc_child2.p3d"; // TODO: model + icon model = "\z\addons\dayz_epoch\models\doc_child2.p3d"; // TODO: model + icon
picture = "\z\addons\dayz_epoch\pictures\equip_child2_ca.paa"; picture = "\z\addons\dayz_epoch\pictures\equip_child2_ca.paa";
type = 256; type = 256;
@@ -78,7 +74,6 @@ class ItemHempPlant: CA_Magazine {
count = 1; count = 1;
displayName = $STR_CRAFT_NAME_HEMP_PLANT; displayName = $STR_CRAFT_NAME_HEMP_PLANT;
descriptionShort = $STR_CRAFT_DESC_HEMP_PLANT; descriptionShort = $STR_CRAFT_DESC_HEMP_PLANT;
weight = 0.1;
model = "\z\addons\dayz_epoch\models\doc_child2.p3d"; // TODO: model + icon model = "\z\addons\dayz_epoch\models\doc_child2.p3d"; // TODO: model + icon
picture = "\z\addons\dayz_epoch\pictures\equip_child2_ca.paa"; picture = "\z\addons\dayz_epoch\pictures\equip_child2_ca.paa";
type = 256; type = 256;
@@ -99,7 +94,6 @@ class ItemKiloHemp : CA_Magazine
count = 1; count = 1;
displayName = $STR_EPOCH_KILOOFHEMP; displayName = $STR_EPOCH_KILOOFHEMP;
descriptionShort = $STR_EPOCH_KILOOFHEMP_DESC; descriptionShort = $STR_EPOCH_KILOOFHEMP_DESC;
weight = 1;
model = "z\addons\dayz_epoch\models\kilohemp.p3d"; model = "z\addons\dayz_epoch\models\kilohemp.p3d";
picture = "\z\addons\dayz_epoch\pictures\equip_kilohemp_CA.paa"; picture = "\z\addons\dayz_epoch\pictures\equip_kilohemp_CA.paa";
type = 256; type = 256;
@@ -132,7 +126,6 @@ class ItemKiloTobacco : CA_Magazine
count = 1; count = 1;
displayName = $STR_EPOCH_KILOTOBACCO; displayName = $STR_EPOCH_KILOTOBACCO;
descriptionShort = $STR_EPOCH_KILOTOBACCO_DESC; descriptionShort = $STR_EPOCH_KILOTOBACCO_DESC;
weight = 1;
model = "z\addons\dayz_epoch\models\kilohemp.p3d"; model = "z\addons\dayz_epoch\models\kilohemp.p3d";
picture = "\z\addons\dayz_epoch\pictures\equip_kilohemp_CA.paa"; picture = "\z\addons\dayz_epoch\pictures\equip_kilohemp_CA.paa";
type = 256; type = 256;

View File

@@ -7,6 +7,7 @@ class ItemCanvas: CA_Magazine
model = "\z\addons\dayz_epoch\models\canvas.p3d"; model = "\z\addons\dayz_epoch\models\canvas.p3d";
picture = "\z\addons\dayz_epoch\pictures\equip_canvas_ca.paa"; picture = "\z\addons\dayz_epoch\pictures\equip_canvas_ca.paa";
descriptionShort = $STR_EPOCH_CANVAS_DESC; descriptionShort = $STR_EPOCH_CANVAS_DESC;
class ItemActions class ItemActions
{ {
class Crafting class Crafting
@@ -56,6 +57,7 @@ class ItemCanvas: CA_Magazine
}; };
}; };
}; };
class ItemBurlap: CA_Magazine class ItemBurlap: CA_Magazine
{ {
scope = public; scope = public;
@@ -65,13 +67,14 @@ class ItemBurlap: CA_Magazine
model = "\z\addons\dayz_epoch\models\burlap.p3d"; model = "\z\addons\dayz_epoch\models\burlap.p3d";
picture = "\z\addons\dayz_epoch\pictures\equip_burlap_ca.paa"; picture = "\z\addons\dayz_epoch\pictures\equip_burlap_ca.paa";
descriptionShort = $STR_EPOCH_BURLAP_DESC; descriptionShort = $STR_EPOCH_BURLAP_DESC;
class ItemActions class ItemActions
{ {
class Crafting class Crafting
{ {
text = $STR_EPOCH_PLAYER_195; text = $STR_EPOCH_PLAYER_195;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {"sand"}; // todo add sand requirement neednearby[] = {};
requiretools[] = {"ItemEtool","ItemToolbox"}; requiretools[] = {"ItemEtool","ItemToolbox"};
output[] = {{"ItemSandbag",1}}; output[] = {{"ItemSandbag",1}};
input[] = {{"ItemBurlap",3}}; input[] = {{"ItemBurlap",3}};
@@ -87,6 +90,20 @@ class equip_rag : CA_Magazine {
model = "\z\addons\dayz_communityassets\models\rag_clean.p3d"; model = "\z\addons\dayz_communityassets\models\rag_clean.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_rag_clean_ca.paa"; picture = "\z\addons\dayz_communityassets\pictures\equip_rag_clean_ca.paa";
type = 256; type = 256;
class ItemActions
{
class Crafting
{
text = $STR_EPOCH_PLAYER_269;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemKnife"};
output[] = {{"ItemBandage",2}};
outputweapons[] = {};
input[] = {{"equip_gauze",2},{"equip_rag",1},{"equip_string",1}};
};
};
}; };
class equip_string : CA_Magazine { class equip_string : CA_Magazine {
@@ -94,9 +111,59 @@ class equip_string : CA_Magazine {
count = 1; count = 1;
displayName = $STR_ITEM_NAME_equip_string; displayName = $STR_ITEM_NAME_equip_string;
descriptionShort = $STR_ITEM_DESC_equip_string; descriptionShort = $STR_ITEM_DESC_equip_string;
model = "\z\addons\dayz_communityassets\models\string.p3d"; model = "\z\addons\dayz_communityassets\models\string.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_string_ca.paa"; picture = "\z\addons\dayz_communityassets\pictures\equip_string_ca.paa";
type = 256; type = 256;
class ItemActions
{
class Crafting
{
text = $STR_EPOCH_PLAYER_269;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemKnife"};
output[] = {{"ItemBandage",2}};
outputweapons[] = {};
input[] = {{"equip_gauze",2},{"equip_rag",1},{"equip_string",1}};
};
class Crafting1
{
text = $STR_ITEM_NAME_TRIPWIRE_CANS;
script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {{"ItemTrapTripwireCans",1}};
input[] = {{"equip_string",1},{"TrashTinCan",1},{"PartWoodPile",1},{"equip_duct_tape",1}};
};
class Crafting2
{
text = $STR_ITEM_NAME_TRIPWIRE_FLARE;
script = ";['Crafting2','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {{"ItemTrapTripwireFlare",1}};
input[] = {{"equip_string",1},{"HandRoadFlare",1},{"PartWoodPile",1},{"equip_duct_tape",1}};
};
class Crafting3
{
text = $STR_ITEM_NAME_TRIPWIRE_GRENADE;
script = ";['Crafting3','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {{"ItemTrapTripwireGrenade",1}};
input[] = {{"equip_string",1},{"HandGrenade_West",1},{"PartWoodPile",1},{"equip_duct_tape",1}};
};
class Crafting4
{
text = $STR_ITEM_NAME_TRIPWIRE_SMOKE;
script = ";['Crafting4','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {{"ItemTrapTripwireSmoke",1}};
input[] = {{"equip_string",1},{"SmokeShell",1},{"PartWoodPile",1},{"equip_duct_tape",1}};
};
};
}; };
class equip_rope : CA_Magazine { class equip_rope : CA_Magazine {
@@ -107,6 +174,7 @@ class equip_rope : CA_Magazine {
model = "\z\addons\dayz_communityassets\models\rope.p3d"; model = "\z\addons\dayz_communityassets\models\rope.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_rope_ca.paa"; picture = "\z\addons\dayz_communityassets\pictures\equip_rope_ca.paa";
type = 256; type = 256;
class ItemActions class ItemActions
{ {
class Crafting class Crafting

View File

@@ -18,7 +18,7 @@ class ItemSledgeHead : CA_Magazine
model = "\z\addons\dayz_epoch\models\sledge_head.p3d"; model = "\z\addons\dayz_epoch\models\sledge_head.p3d";
picture = "\z\addons\dayz_epoch\pictures\equip_sledge_head_ca.paa"; picture = "\z\addons\dayz_epoch\pictures\equip_sledge_head_ca.paa";
descriptionShort = $STR_EPOCH_SLEDGEHAMMERHEAD_DESC; descriptionShort = $STR_EPOCH_SLEDGEHAMMERHEAD_DESC;
weight = 9;
class ItemActions class ItemActions
{ {
class Crafting class Crafting
@@ -43,7 +43,7 @@ class ItemSledgeHandle : CA_Magazine
model = "\z\addons\dayz_epoch\models\sledge_handle.p3d"; model = "\z\addons\dayz_epoch\models\sledge_handle.p3d";
picture = "\z\addons\dayz_epoch\pictures\equip_sledge_handle_ca.paa"; picture = "\z\addons\dayz_epoch\pictures\equip_sledge_handle_ca.paa";
descriptionShort = $STR_EPOCH_SLEDGEHAMMERHANDLE_DESC; descriptionShort = $STR_EPOCH_SLEDGEHAMMERHANDLE_DESC;
weight = 1;
class ItemActions class ItemActions
{ {
class Crafting class Crafting
@@ -59,7 +59,8 @@ class ItemSledgeHandle : CA_Magazine
}; };
}; };
class equip_Crossbow_Kit : CA_Magazine { class equip_Crossbow_Kit : CA_Magazine
{
scope = public; scope = public;
count = 1; count = 1;
displayName = $STR_ITEM_NAME_CROSSBOW_KIT; displayName = $STR_ITEM_NAME_CROSSBOW_KIT;
@@ -67,14 +68,43 @@ class equip_Crossbow_Kit : CA_Magazine {
model = "\z\addons\community_crossbow\models\Crossbow_kit.p3d"; model = "\z\addons\community_crossbow\models\Crossbow_kit.p3d";
picture = "\z\addons\community_crossbow\textures\Crossbow_kit.paa"; picture = "\z\addons\community_crossbow\textures\Crossbow_kit.paa";
type = 256; type = 256;
class ItemActions
{
class Crafting
{
text = $STR_CRAFTING_CROSSBOW;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {"workshop"};
requiretools[] = {"ItemToolbox","ItemKnife"};
output[] = {};
outputweapons[] = {"Crossbow_DZ"};
input[] = {{"equip_Crossbow_Kit",1},{"equip_crossbow_stock",1}};
};
};
}; };
class equip_crossbow_stock : CA_Magazine { class equip_crossbow_stock : CA_Magazine
{
scope = public; scope = public;
count = 1; count = 1;
displayName = "Crossbow (Stock)"; displayName = $STR_ITEM_NAME_CROSSBOW_STOCK;
descriptionShort="You require a Crossbow String kit to craft this weapon"; descriptionShort = $STR_ITEM_DESC_CROSSBOW_STOCK;
model = "z\addons\community_crossbow\models\crossbow_stock.p3d"; model = "z\addons\community_crossbow\models\crossbow_stock.p3d";
picture = "\z\addons\community_crossbow\icons\crossbow_stock.paa"; picture = "\z\addons\community_crossbow\icons\crossbow_stock.paa";
type = 256; type = 256;
class ItemActions
{
class Crafting
{
text = $STR_CRAFTING_CROSSBOW;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {"workshop"};
requiretools[] = {"ItemToolbox","ItemKnife"};
output[] = {};
outputweapons[] = {"Crossbow_DZ"};
input[] = {{"equip_Crossbow_Kit",1},{"equip_crossbow_stock",1}};
};
};
}; };

View File

@@ -58,6 +58,15 @@ class ItemPlank : CA_Magazine
output[] = {{"PartWoodPile",2}}; output[] = {{"PartWoodPile",2}};
input[] = {{"ItemPlank",1}}; input[] = {{"ItemPlank",1}};
}; };
class Crafting1
{
text = $STR_CRAFTING_SPLINT;
Script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemKnife"};
output[] = {{"equip_woodensplint",1}};
input[] = {{"ItemPlank",1},{"equip_duct_tape",1},{"equip_string",1}};
};
}; };
}; };
@@ -82,7 +91,7 @@ class PartWoodPile : CA_Magazine
{ {
text = $STR_EPOCH_PLAYER_242; text = $STR_EPOCH_PLAYER_242;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {"sawmill"}; neednearby[] = {};
requiretools[] = {"ItemToolbox","ItemKnife"}; requiretools[] = {"ItemToolbox","ItemKnife"};
output[] = {{"PartWoodLumber",1}}; output[] = {{"PartWoodLumber",1}};
input[] = {{"PartWoodPile",2}}; input[] = {{"PartWoodPile",2}};
@@ -107,6 +116,15 @@ class PartWoodPile : CA_Magazine
input[] = {{"PartWoodPile",6}}; input[] = {{"PartWoodPile",6}};
}; };
class Crafting3
{
text = $STR_CRAFTING_SPLINT;
Script = ";['Crafting3','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemKnife"};
output[] = {{"equip_woodensplint",1}};
input[] = {{"PartWoodPile",1},{"equip_duct_tape",1},{"equip_string",1}};
};
}; };
}; };
@@ -126,7 +144,7 @@ class PartPlankPack: CA_Magazine
{ {
text = $STR_EPOCH_PLAYER_251; text = $STR_EPOCH_PLAYER_251;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {"sawmill"}; neednearby[] = {};
requiretools[] = {"ItemToolbox","ItemKnife"}; requiretools[] = {"ItemToolbox","ItemKnife"};
output[] = {{"PartWoodLumber",3}}; output[] = {{"PartWoodLumber",3}};
input[] = {{"PartPlankPack",1}}; input[] = {{"PartPlankPack",1}};
@@ -150,7 +168,7 @@ class PartPlywoodPack: CA_Magazine
{ {
text = $STR_EPOCH_PLAYER_251; text = $STR_EPOCH_PLAYER_251;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {"sawmill"}; neednearby[] = {};
requiretools[] = {"ItemToolbox","ItemKnife"}; requiretools[] = {"ItemToolbox","ItemKnife"};
output[] = {{"PartWoodPlywood",3}}; output[] = {{"PartWoodPlywood",3}};
input[] = {{"PartPlywoodPack",1}}; input[] = {{"PartPlywoodPack",1}};
@@ -173,7 +191,7 @@ class PartWoodLumber: CA_Magazine
{ {
text = $STR_EPOCH_PLAYER_254; text = $STR_EPOCH_PLAYER_254;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {"sawmill"}; neednearby[] = {};
requiretools[] = {"ItemToolbox"}; requiretools[] = {"ItemToolbox"};
output[] = {{"PartWoodPlywood",1}}; output[] = {{"PartWoodPlywood",1}};
input[] = {{"PartWoodLumber",2}}; input[] = {{"PartWoodLumber",2}};
@@ -196,7 +214,7 @@ class PartWoodLumber: CA_Magazine
neednearby[] = {"workshop"}; neednearby[] = {"workshop"};
requiretools[] = {"ItemToolbox","ItemCrowbar"}; requiretools[] = {"ItemToolbox","ItemCrowbar"};
output[] = {{"deer_stand_kit",1}}; output[] = {{"deer_stand_kit",1}};
input[] = {{"PartWoodLumber",8},{"PartWoodPile",2}}; input[] = {{"PartWoodLumber",8},{"PartWoodPile",2},{"equip_nails",2}};
}; };
class Crafting3 class Crafting3
@@ -206,7 +224,7 @@ class PartWoodLumber: CA_Magazine
neednearby[] = {"workshop"}; neednearby[] = {"workshop"};
requiretools[] = {"ItemToolbox"}; requiretools[] = {"ItemToolbox"};
output[] = {{"ItemWoodStairs",1}}; output[] = {{"ItemWoodStairs",1}};
input[] = {{"PartWoodLumber",8}}; input[] = {{"PartWoodLumber",8},{"equip_nails",2}};
}; };
class Crafting4 class Crafting4
@@ -216,14 +234,14 @@ class PartWoodLumber: CA_Magazine
neednearby[] = {"workshop"}; neednearby[] = {"workshop"};
requiretools[] = {"ItemToolbox"}; requiretools[] = {"ItemToolbox"};
output[] = {{"ItemWoodLadder",1}}; output[] = {{"ItemWoodLadder",1}};
input[] = {{"PartWoodLumber",8}}; input[] = {{"PartWoodLumber",8},{"equip_nails",2}};
}; };
class Crafting5 class Crafting5
{ {
text = $STR_EPOCH_PLAYER_259; text = $STR_EPOCH_PLAYER_259;
Script = ";['Crafting5','CfgMagazines', _id] spawn player_craftItem;"; Script = ";['Crafting5','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {"sawmill"}; neednearby[] = {};
requiretools[] = {"ItemToolbox"}; requiretools[] = {"ItemToolbox"};
output[] = {{"PartPlankPack",1}}; output[] = {{"PartPlankPack",1}};
input[] = {{"PartWoodLumber",3}}; input[] = {{"PartWoodLumber",3}};
@@ -235,16 +253,16 @@ class PartWoodLumber: CA_Magazine
neednearby[] = {"workshop"}; neednearby[] = {"workshop"};
requiretools[] = {"ItemToolbox"}; requiretools[] = {"ItemToolbox"};
output[] = {{"ItemGunRackKit",1}}; output[] = {{"ItemGunRackKit",1}};
input[] = {{"PartWoodLumber",6}}; input[] = {{"PartWoodPlywood",1},{"PartWoodLumber",4},{"equip_nails",1}};
}; };
class Crafting7 class Crafting7
{ {
text = $STR_EPOCH_PLAYER_304; text = $STR_CRAFTING_SPLINT;
Script = ";['Crafting7','CfgMagazines', _id] spawn player_craftItem;"; Script = ";['Crafting7','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {}; neednearby[] = {};
requiretools[] = {"ItemToolbox"}; requiretools[] = {"ItemKnife"};
output[] = {{"ItemWoodCrateKit",1}}; output[] = {{"equip_woodensplint",1}};
input[] = {{"PartWoodLumber",6}}; input[] = {{"PartWoodLumber",1},{"equip_duct_tape",1},{"equip_string",1}};
}; };
}; };
}; };
@@ -276,7 +294,7 @@ class PartWoodPlywood: CA_Magazine
neednearby[] = {}; neednearby[] = {};
requiretools[] = {"ItemToolbox"}; requiretools[] = {"ItemToolbox"};
output[] = {{"wood_shack_kit",1}}; output[] = {{"wood_shack_kit",1}};
input[] = {{"PartWoodPlywood",4},{"PartWoodLumber",4}}; input[] = {{"PartWoodPlywood",4},{"PartWoodLumber",4},{"equip_nails",2}};
}; };
class Crafting2 class Crafting2
{ {
@@ -300,11 +318,20 @@ class PartWoodPlywood: CA_Magazine
{ {
text = $STR_EPOCH_PLAYER_264; text = $STR_EPOCH_PLAYER_264;
Script = ";['Crafting4','CfgMagazines', _id] spawn player_craftItem;"; Script = ";['Crafting4','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {"sawmill"}; neednearby[] = {};
requiretools[] = {"ItemToolbox"}; requiretools[] = {"ItemToolbox"};
output[] = {{"PartPlywoodPack",1}}; output[] = {{"PartPlywoodPack",1}};
input[] = {{"PartWoodPlywood",3}}; input[] = {{"PartWoodPlywood",3}};
}; };
class Crafting5
{
text = $STR_EPOCH_PLAYER_304;
Script = ";['Crafting5','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {{"ItemWoodCrateKit",1}};
input[] = {{"PartWoodPlywood",4},{"PartWoodLumber",2},{"equip_nails",1}};
};
}; };
}; };

View File

@@ -41,6 +41,16 @@ class ItemBandage : CA_Magazine
text = $STR_BANDAGE_SELF; text = $STR_BANDAGE_SELF;
script = "spawn player_useMeds;"; script = "spawn player_useMeds;";
}; };
class Crafting
{
text = $STR_CRAFTING_SEPSISBANDAGE;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {};
output[] = {{"ItemSepsisBandage",1}};
outputweapons[] = {};
input[] = {{"ItemBandage",1},{"equip_comfreyleafs",1}};
};
}; };
}; };
@@ -127,6 +137,7 @@ class equip_woodensplint : CA_Magazine {
model = "\z\addons\dayz_communityassets\models\woodensplint.p3d"; model = "\z\addons\dayz_communityassets\models\woodensplint.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_woodensplint_ca.paa"; picture = "\z\addons\dayz_communityassets\pictures\equip_woodensplint_ca.paa";
type = 256; type = 256;
class ItemActions { class ItemActions {
class Use { class Use {
text = $STR_ACTIONS_BRACE_LEG; text = $STR_ACTIONS_BRACE_LEG;
@@ -143,6 +154,20 @@ class equip_gauze : CA_Magazine {
model = "\z\addons\dayz_communityassets\models\gauze.p3d"; model = "\z\addons\dayz_communityassets\models\gauze.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_gauze_ca.paa"; picture = "\z\addons\dayz_communityassets\pictures\equip_gauze_ca.paa";
type = 256; type = 256;
class ItemActions
{
class Crafting
{
text = $STR_EPOCH_PLAYER_269;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemKnife"};
output[] = {{"ItemBandage",2}};
outputweapons[] = {};
input[] = {{"equip_gauze",2},{"equip_rag",1},{"equip_string",1}};
};
};
}; };
class equip_gauzepackaged : CA_Magazine { class equip_gauzepackaged : CA_Magazine {
@@ -153,6 +178,20 @@ class equip_gauzepackaged : CA_Magazine {
model = "\z\addons\dayz_communityassets\models\gauze_package.p3d"; model = "\z\addons\dayz_communityassets\models\gauze_package.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_gauze_package_ca.paa"; picture = "\z\addons\dayz_communityassets\pictures\equip_gauze_package_ca.paa";
type = 256; type = 256;
class ItemActions
{
class Crafting
{
text = $STR_CRAFTING_PACKAGEGAUZE;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {};
output[] = {{"equip_gauze",3}};
outputweapons[] = {};
input[] = {{"equip_gauzepackaged",1}};
};
};
}; };
class equip_herb_box : CA_Magazine { class equip_herb_box : CA_Magazine {
@@ -161,5 +200,5 @@ class equip_herb_box : CA_Magazine {
displayName = $STR_EQUIP_NAME_HERBBOX; displayName = $STR_EQUIP_NAME_HERBBOX;
descriptionShort = $STR_EQUIP_DESC_HERBBOX; descriptionShort = $STR_EQUIP_DESC_HERBBOX;
model = "\z\addons\dayz_communityassets\models\herb_box.p3d"; model = "\z\addons\dayz_communityassets\models\herb_box.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_herb_box_ca.paa"; picture = "\z\addons\dayz_communityassets\pictures\equip_herb_box_ca.paa";
}; };

View File

@@ -18,7 +18,7 @@ class horde_journal_front_cover
controls[] = controls[] =
{ {
"book_page_image", "book_page_image",
"open_craft", //"open_craft",
"open_book", "open_book",
"click_here_to_close_book_1", "click_here_to_close_book_1",
"click_here_to_close_book_2", "click_here_to_close_book_2",
@@ -40,7 +40,7 @@ class horde_journal_front_cover
}; };
// buttons // buttons
/*
class open_craft: RscIGUIShortcutButton { class open_craft: RscIGUIShortcutButton {
idc = -1; idc = -1;
x = 0.48 * safezoneW + safezoneX; x = 0.48 * safezoneW + safezoneX;
@@ -48,7 +48,7 @@ class horde_journal_front_cover
text = $STR_UI_CRAFT_OPEN; text = $STR_UI_CRAFT_OPEN;
action = "closeDialog 0; createDialog 'RscDisplayCraftingMenu';"; action = "closeDialog 0; createDialog 'RscDisplayCraftingMenu';";
}; };
/*
class open_Construction: RscIGUIShortcutButton { class open_Construction: RscIGUIShortcutButton {
idc = -1; idc = -1;
x = 0.48 * safezoneW + safezoneX; x = 0.48 * safezoneW + safezoneX;

View File

@@ -297,11 +297,7 @@ class CfgWeapons
#include "Melee\Machete.hpp" #include "Melee\Machete.hpp"
#include "Melee\BaseballBat.hpp" #include "Melee\BaseballBat.hpp"
#include "Melee\FishingPole.hpp" #include "Melee\FishingPole.hpp"
#include "Melee\MeleeSledgehammer.hpp" #include "Melee\MeleeSledgehammer.hpp"
/* TOOLS */ /* TOOLS */
@@ -340,54 +336,4 @@ class CfgWeapons
#include "Item\ItemKeys.hpp" #include "Item\ItemKeys.hpp"
#include "Item\Documents.hpp" #include "Item\Documents.hpp"
/* OTHER */
/*class ItemFlashlightEmpty : ItemCore
{
scope = public;
displayName = $STR_EQUIP_NAME_5;
model = "\dayz_equip\models\flashlight.p3d";
picture = "\dayz_equip\textures\equip_flashlight_ca.paa";
descriptionShort = $STR_EQUIP_DESC_5;
};
class ItemSodaEmpty : HandGrenade
{
scope = public;
displayName = $STR_EQUIP_NAME_35;
model = "\dayz_equip\models\soda_coke_e.p3d";
picture = "\dayz_equip\textures\equip_soda_empty_ca.paa";
descriptionShort = $STR_EQUIP_DESC_35;
ammo = "SodaCan";
class ItemActions
{
class Drink
{
text = $STR_ACTIONS_DRINK2;
script = ";[_id] spawn player_fillWater;";
};
};
};
class TrashTinCan : HandGrenade
{
scope = public;
displayName = $STR_EQUIP_NAME_33;
model = "\dayz_equip\models\trash_tincan.p3d";
picture = "\dayz_equip\textures\equip_tincan_ca.paa";
descriptionShort = $STR_EQUIP_DESC_33;
ammo = "TinCan";
class ItemActions
{
class Drink
{
text = $STR_ACTIONS_DRINK2;
script = ";[_id] spawn player_fillWater;";
};
};
};*/
}; };

View File

@@ -15,6 +15,32 @@ class MeleeBaseBallBat : MeleeWeapon
{ {
libTextDesc = $STR_EQUIP_DESC_BASEBALLBAT; libTextDesc = $STR_EQUIP_DESC_BASEBALLBAT;
}; };
class ItemActions
{
class Crafting
{
text = $STR_CRAFTING_NAILEDBASEBALLBAT;
script = ";['Crafting','CfgWeapons', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {};
outputweapons[] = {"MeleeBaseBallBatNails"};
input[] = {{"equip_nails",1}};
inputweapons[] = {"MeleeBaseBallBat"};
};
class Crafting1
{
text = $STR_CRAFTING_BASEBALLBATBARBED;
script = ";['Crafting1','CfgWeapons', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {};
outputweapons[] = {"MeleeBaseBallBatBarbed"};
input[] = {{"equip_nails",1},{"ItemWire",1}};
inputweapons[] = {"MeleeBaseBallBat"};
};
};
}; };
class MeleeBaseBallBatBarbed : MeleeWeapon class MeleeBaseBallBatBarbed : MeleeWeapon

View File

@@ -1,5 +1,5 @@
#include "RscGroups.hpp" #include "RscGroups.hpp"
#include "RscDisplayCraftingMenu.hpp" //#include "RscDisplayCraftingMenu.hpp"
#include "RscDisplayGear.hpp" #include "RscDisplayGear.hpp"
#include "RscDisplayGearMinimal.hpp" #include "RscDisplayGearMinimal.hpp"
#include "RscDisplayGenderSelect.hpp" #include "RscDisplayGenderSelect.hpp"

View File

@@ -1,6 +1,3 @@
// If a string was passed redirect to vanilla player_craftItem (Epoch items always pass an array)
if (typeName _this == "STRING") exitWith {_this spawn player_craftItemVanilla;};
/* /*
DayZ Epoch Crafting 0.3 DayZ Epoch Crafting 0.3
Made for DayZ Epoch && Unleashed by [VB]AWOL please ask permission to use/edit/distrubute email vbawol@veteranbastards.com. Made for DayZ Epoch && Unleashed by [VB]AWOL please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
@@ -26,16 +23,13 @@ class ItemActions
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;}; if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
dayz_actionInProgress = true; dayz_actionInProgress = true;
private ["_tradeComplete","_onLadder","_canDo","_selectedRecipeOutput","_boiled","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_finished","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_selectedRecipeInputStrict","_num_removed","_removed_total","_temp_removed_array","_abort","_waterLevel","_waterLevel_lowest","_reason","_isNear","_selectedRecipeTools","_distance","_crafting","_needNear","_item","_baseClass","_num_removed_weapons","_outputWeapons","_inputWeapons","_randomOutput","_craft_doLoop","_selectedWeapon","_selectedMag","_sfx","_configParent","_pPos"]; private ["_tradeComplete","_onLadder","_canDo","_selectedRecipeOutput","_boiled","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_finished","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_selectedRecipeInputStrict","_num_removed","_removed_total","_temp_removed_array","_abort","_waterLevel","_waterLevel_lowest","_reason","_isNear","_selectedRecipeTools","_distance","_crafting","_needNear","_item","_baseClass","_num_removed_weapons","_outputWeapons","_inputWeapons","_randomOutput","_craft_doLoop","_selectedWeapon","_selectedMag","_sfx","_configParent","_pPos","_text"];
// This is used to find correct recipe based what itemaction was click allows multiple recipes per item. // This is used to find correct recipe based what itemaction was click allows multiple recipes per item.
_crafting = _this select 0; _crafting = _this select 0;
// This tells the script what type of item we are clicking on // This tells the script what type of item we are clicking on
_baseClass = _this select 1; _baseClass = _this select 1;
_item = _this select 2; _item = _this select 2;
_abort = false; _abort = false;
_distance = 3; _distance = 3;
_reason = ""; _reason = "";
@@ -43,7 +37,7 @@ _waterLevel = 0;
_outputWeapons = []; _outputWeapons = [];
_selectedRecipeOutput = []; _selectedRecipeOutput = [];
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
_canDo = (!r_drag_sqf && !r_player_unconscious && !_onLadder); _canDo = (!r_player_unconscious && {!r_drag_sqf} && {!_onLadder});
_boiled = false; _boiled = false;
// Need Near Requirements // Need Near Requirements
@@ -68,13 +62,11 @@ if (_abort) exitWith {
dayz_actionInProgress = false; dayz_actionInProgress = false;
}; };
// diag_log format["Checking for fire: %1", _isFireNear];
if (_canDo) then { if (_canDo) then {
_selectedRecipeTools = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "requiretools"); _selectedRecipeTools = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "requiretools");
_selectedRecipeOutput = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "output"); _selectedRecipeOutput = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "output");
_selectedRecipeInput = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "input"); _selectedRecipeInput = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "input");
_selectedRecipeInputStrict = ((isNumber (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "inputstrict")) && (getNumber (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "inputstrict") > 0)); _selectedRecipeInputStrict = ((isNumber (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "inputstrict")) && {getNumber (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "inputstrict") > 0});
_outputWeapons = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "outputweapons"); _outputWeapons = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "outputweapons");
_inputWeapons = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "inputweapons"); _inputWeapons = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "inputweapons");
@@ -102,9 +94,27 @@ if (_canDo) then {
_itemIn = _x select 0; _itemIn = _x select 0;
_countIn = _x select 1; _countIn = _x select 1;
_qty = { (_x == _itemIn) || (!_selectedRecipeInputStrict && configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)} count magazines player; _qty = { (_x == _itemIn) || (!_selectedRecipeInputStrict && {configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn})} count magazines player;
if (_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; }; if (_qty < _countIn) exitWith {
} forEach _selectedRecipeInput; _missing = _itemIn;
_missingQty = (_countIn - _qty);
_proceed = false;
};
} count _selectedRecipeInput;
};
if (count _inputWeapons > 0 && {_proceed}) then {
{
_itemIn = _x;
_countIn = 1;
_qty = { (_x == _itemIn) || (!_selectedRecipeInputStrict && {configName(inheritsFrom(configFile >> "cfgWeapons" >> _x)) == _itemIn})} count weapons player;
if (_qty < _countIn) exitWith {
_missing = _itemIn;
_missingQty = (_countIn - _qty);
_proceed = false;
};
} count _inputWeapons;
}; };
// If all parts proceed // If all parts proceed
@@ -131,7 +141,7 @@ if (_canDo) then {
// Preselect the item // Preselect the item
{ {
_configParent = configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)); _configParent = configName(inheritsFrom(configFile >> "cfgMagazines" >> _x));
if ((_x == _itemIn) || (!_selectedRecipeInputStrict && _configParent == _itemIn)) then { if ((_x == _itemIn) || (!_selectedRecipeInputStrict && {_configParent == _itemIn})) then {
// Get lowest waterlevel // Get lowest waterlevel
if ((_x == "ItemWaterbottle") || (_configParent == "ItemWaterbottle")) then { if ((_x == "ItemWaterbottle") || (_configParent == "ItemWaterbottle")) then {
_waterLevel = getNumber(configFile >> "CfgMagazines" >> _x >> "wateroz"); _waterLevel = getNumber(configFile >> "CfgMagazines" >> _x >> "wateroz");
@@ -140,15 +150,14 @@ if (_canDo) then {
}; };
}; };
}; };
} forEach (magazines player); } count (magazines player);
{ {
_configParent = configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)); _configParent = configName(inheritsFrom(configFile >> "cfgMagazines" >> _x));
if ((_removed < _countIn) && ((_x == _itemIn) || (!_selectedRecipeInputStrict && _configParent == _itemIn))) then { if ((_removed < _countIn) && {(_x == _itemIn) || (!_selectedRecipeInputStrict && {_configParent == _itemIn})}) then {
if ((_waterLevel_lowest == 0) || ((_waterLevel_lowest > 0) && (getNumber(configFile >> "CfgMagazines" >> _x >> "wateroz") == _waterLevel_lowest))) then { if ((_waterLevel_lowest == 0) || ((_waterLevel_lowest > 0) && {getNumber(configFile >> "CfgMagazines" >> _x >> "wateroz") == _waterLevel_lowest})) then {
_num_removed = ([player,_x] call BIS_fnc_invRemove); _num_removed = ([player,_x] call BIS_fnc_invRemove);
} } else {
else {
_num_removed = 0; _num_removed = 0;
}; };
_removed = _removed + _num_removed; _removed = _removed + _num_removed;
@@ -164,9 +173,8 @@ if (_canDo) then {
_temp_removed_array set [count _temp_removed_array,_x]; _temp_removed_array set [count _temp_removed_array,_x];
}; };
}; };
} forEach (magazines player); } foreach (magazines player);
} count _selectedRecipeInput;
} forEach _selectedRecipeInput;
//diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total]; //diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total];
@@ -175,27 +183,33 @@ if (_canDo) then {
_num_removed_weapons = 0; _num_removed_weapons = 0;
{ {
_num_removed_weapons = _num_removed_weapons + ([player,_x] call BIS_fnc_invRemove); _num_removed_weapons = _num_removed_weapons + ([player,_x] call BIS_fnc_invRemove);
} forEach _inputWeapons; } count _inputWeapons;
if (_num_removed_weapons == (count _inputWeapons)) then { if (_num_removed_weapons == (count _inputWeapons)) then {
if (_randomOutput == 1) then { if (_randomOutput == 1) then {
if (!isNil "_outputWeapons" && count _outputWeapons > 0) then { if (!isNil "_outputWeapons" && {count _outputWeapons > 0}) then {
_selectedWeapon = _outputWeapons call BIS_fnc_selectRandom; _selectedWeapon = _outputWeapons call BIS_fnc_selectRandom;
_outputWeapons = [_selectedWeapon]; _outputWeapons = [_selectedWeapon];
}; };
if (!isNil "_selectedRecipeOutput" && count _selectedRecipeOutput > 0) then { if (!isNil "_selectedRecipeOutput" && {count _selectedRecipeOutput > 0}) then {
_selectedMag = _selectedRecipeOutput call BIS_fnc_selectRandom; _selectedMag = _selectedRecipeOutput call BIS_fnc_selectRandom;
_selectedRecipeOutput = [_selectedMag]; _selectedRecipeOutput = [_selectedMag];
}; };
// exit loop // exit loop
_craft_doLoop = false; _craft_doLoop = false;
}; };
{ {
if (_x == "ItemSledge") then { if (_x in weapons player) then {
_x call player_addDuplicateTool; _x call player_addDuplicateTool;
} else { } else {
player addWeapon _x; if (getNumber(configFile >> "CfgWeapons" >> _x >> "type") == 256) then {
player addWeapon _x;
} else {
_x call player_addDuplicateTool;
};
}; };
} forEach _outputWeapons; } count _outputWeapons;
{ {
_itemOut = _x select 0; _itemOut = _x select 0;
_countOut = _x select 1; _countOut = _x select 1;
@@ -219,7 +233,7 @@ if (_canDo) then {
}; };
}; };
}; };
} foreach _temp_removed_array; } count _temp_removed_array;
}; };
// diag_log format["Checking for water level: %1", _waterLevel]; // diag_log format["Checking for water level: %1", _waterLevel];
@@ -231,25 +245,45 @@ if (_canDo) then {
format[localize "str_epoch_player_150",_textCreate,_countOut] call dayz_rollingMessages; format[localize "str_epoch_player_150",_textCreate,_countOut] call dayz_rollingMessages;
// sleep here // sleep here
uiSleep 1; uiSleep 1;
} forEach _selectedRecipeOutput; } count _selectedRecipeOutput;
_tradeComplete = _tradeComplete+1; _tradeComplete = _tradeComplete + 1;
}; };
} else { } else {
// Refund parts since we failed // Refund parts since we failed
{player addMagazine _x; } forEach _temp_removed_array; {player addMagazine _x; } count _temp_removed_array;
format[localize "STR_EPOCH_PLAYER_145",_removed_total,_tobe_removed_total] call dayz_rollingMessages; format[localize "STR_EPOCH_PLAYER_145",_removed_total,_tobe_removed_total] call dayz_rollingMessages;
}; };
} else { } else {
localize "str_epoch_player_64" call dayz_rollingMessages; localize "str_epoch_player_64" call dayz_rollingMessages;
_craft_doLoop = false; _craft_doLoop = false;
}; };
} else { } else {
_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName"); if (isClass (configFile >> "CfgMagazines" >> _missing)) then {
_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName");
} else {
if (isClass (configFile >> "CfgWeapons" >> _missing)) then {
_textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName");
} else {
_textMissing = getText(configFile >> "CfgVehicles" >> _missing >> "displayName");
};
};
format[localize "str_epoch_player_152",_missingQty, _textMissing,_tradeComplete] call dayz_rollingMessages; format[localize "str_epoch_player_152",_missingQty, _textMissing,_tradeComplete] call dayz_rollingMessages;
systemchat localize "STR_CRAFTING_NEEDED_ITEMS";
if (count _selectedRecipeInput > 0) then {
{
_text = getText(configFile >> "CfgMagazines" >> (_x select 0) >> "displayName");
systemchat format ["%2x %1",_text,(_x select 1)];
} count _selectedRecipeInput;
};
if (count _inputWeapons > 0) then {
{
_text = getText(configFile >> "CfgWeapons" >> _x >> "displayName");
systemchat format ["1x %1",_text];
} count _inputWeapons;
};
_craft_doLoop = false; _craft_doLoop = false;
}; };
} else { } else {

View File

@@ -44,7 +44,7 @@ _missingText = "";
_missingText = _x; _missingText = _x;
} else { } else {
if (_forEachIndex == ((count _missing) - 1)) then { if (_forEachIndex == ((count _missing) - 1)) then {
_missingText = _missingText + " and " + _x; _missingText = _missingText + ", " + _x;
} else { } else {
_missingText = _missingText + ", " + _x; _missingText = _missingText + ", " + _x;
}; };
@@ -53,7 +53,12 @@ _missingText = "";
_hasbuilditem = _item in magazines player; _hasbuilditem = _item in magazines player;
if (!_hasbuilditem && {_text != ""}) exitWith {dayz_actionInProgress = false; format[localize "str_player_31",_text,"build"] call dayz_rollingMessages; false;}; if (!_hasbuilditem && {_text != ""}) exitWith {dayz_actionInProgress = false; format[localize "str_player_31",_text,"build"] call dayz_rollingMessages; false;};
if (!_hasrequireditem) exitWith {dayz_actionInProgress = false; format[localize "str_epoch_player_137",_missingText] call dayz_rollingMessages; false;}; if (!_hasrequireditem) exitWith {
dayz_actionInProgress = false;
systemChat format[localize "str_epoch_player_137",_missingText];
format[localize "str_epoch_player_137",_missingText] call dayz_rollingMessages;
false;
};
//When calling this function in another script use a silent exitWith, unless you have something special to say. i.e. if (!_hasrequireditem) exitWith{}; //When calling this function in another script use a silent exitWith, unless you have something special to say. i.e. if (!_hasrequireditem) exitWith{};
_hasrequireditem; _hasrequireditem;

View File

@@ -157,11 +157,11 @@ if (!isDedicated) then {
player_spawn_2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\player_spawn_2.sqf"; player_spawn_2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\player_spawn_2.sqf";
//Crafting //Crafting
fn_updateCraftUI = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_updateCraftUI.sqf";
player_craftItem = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItem.sqf"; player_craftItem = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItem.sqf";
player_craftItemVanilla = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItemVanilla.sqf"; //fn_updateCraftUI = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_updateCraftUI.sqf";
player_craftItemGUI = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItemGUI.sqf"; //player_craftItemVanilla = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItemVanilla.sqf";
player_checkRecipe = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_checkRecipe.sqf"; //player_craftItemGUI = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItemGUI.sqf";
//player_checkRecipe = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_checkRecipe.sqf";
// EPOCH ADDITIONS // EPOCH ADDITIONS
dayz_autoRunOff = {dayz_autoRun = false; terminate dayz_autoRunThread; if (speed player > 0) then {player playActionNow "Stop"};}; dayz_autoRunOff = {dayz_autoRun = false; terminate dayz_autoRunThread; if (speed player > 0) then {player playActionNow "Stop"};};
@@ -515,9 +515,9 @@ if (!isDedicated) then {
dz_fn_meleeMagazines = { dz_fn_meleeMagazines = {
if (_this) then { if (_this) then {
{ player addMagazine _x } count MeleeMagazines; { player addMagazine _x } foreach MeleeMagazines;
} else { } else {
{ player removeMagazines _x } count MeleeMagazines; { player removeMagazines _x } foreach MeleeMagazines;
}; };
}; };

View File

@@ -4219,14 +4219,6 @@
<Russian>Картонная коробка</Russian> <Russian>Картонная коробка</Russian>
<German>Kartonschachtel</German> <German>Kartonschachtel</German>
</Key> </Key>
<Key ID="STR_WPN_NAME_4">
<English>Compound Crossbow</English>
<German>Kompositarmbrust</German>
<Russian>Составной арбалет</Russian>
<Spanish>Ballesta Compuesta</Spanish>
<French>Arbalète composite</French>
<Czech>Kuše</Czech>
</Key>
<Key ID="STR_WPN_DESC_4"> <Key ID="STR_WPN_DESC_4">
<English>The compound crossbow is, once the aim is mastered, a powerful short-range single-shot weapon with a long reload time.</English> <English>The compound crossbow is, once the aim is mastered, a powerful short-range single-shot weapon with a long reload time.</English>
<German>Die Kompositarmbrust ist, wenn man das Zielen beherrscht, eine starke und lautlose Waffe - allerdings mit kurzer Reichweite und langer Nachladezeit.</German> <German>Die Kompositarmbrust ist, wenn man das Zielen beherrscht, eine starke und lautlose Waffe - allerdings mit kurzer Reichweite und langer Nachladezeit.</German>
@@ -25368,7 +25360,55 @@
<English>Green Borders</English> <English>Green Borders</English>
<German>Grüne Umrandung</German> <German>Grüne Umrandung</German>
</Key> </Key>
<Key ID="str_player_fail_wear4">
<English>You cannot change clothes when you are being targeted by NPCs!</English>
<German>Du kannst deine Kleidung nicht wechseln, wenn du dich in einem Gefecht mit NPCs befindest!</German>
</Key>
<Key ID="STR_ITEM_NAME_CROSSBOW_STOCK">
<English>Crossbow Stock</English>
<German>Armbrustschaft</German>
</Key>
<Key ID="STR_ITEM_DESC_CROSSBOW_STOCK">
<English>You require a Crossbow String kit to craft this weapon.</English>
<German>Zum Herstellen einer Armbrust wird ein Armbrust-Selbstbau-Kit benötigt.</German>
</Key>
<Key ID="STR_CRAFTING_CROSSBOW">
<English>Craft Crossbow</English>
<German>Armbrust herstellen</German>
</Key>
<Key ID="STR_CRAFTING_NAILEDBASEBALLBAT">
<English>Craft Nailed Baseball Bat</English>
<German>Nagelkeule herstellen</German>
</Key>
<Key ID="STR_CRAFTING_BASEBALLBATBARBED">
<English>Craft Baseball Bat Barbed</English>
<German>Stacheldrahtkeule herstellen</German>
</Key>
<Key ID="STR_CRAFTING_HERBALDRINK">
<English>Mix Herbal Drink</English>
<German>Kräutertrunk mixen</German>
</Key>
<Key ID="STR_CRAFTING_SEPSISBANDAGE">
<English>Craft Sepsis Bandage</English>
<German>Sepsisbandage herstellen</German>
</Key>
<Key ID="STR_CRAFTING_PACKAGEGAUZE">
<English>Unpack Gauze Packaged</English>
<German>Mullbindenpackung entpacken</German>
</Key>
<Key ID="STR_CRAFTING_SPLINT">
<English>Craft Wooden Splint</English>
<German>Holzschiene herstellen</German>
</Key>
<Key ID="STR_CRAFTING_NAILS">
<English>Craft Nails</English>
<German>Nägel herstellen</German>
</Key>
<Key ID="STR_CRAFTING_NEEDED_ITEMS">
<English>Needed items:</English>
<German>Benötigte Gegenstände:</German>
</Key>
<!--Fix for missing strings from the buildings3.pbo, this is just a placeholder--> <!--Fix for missing strings from the buildings3.pbo, this is just a placeholder-->
<Key ID="STR_FAL_Street_Sign"> <Key ID="STR_FAL_Street_Sign">
<English>Street Sign</English> <English>Street Sign</English>
@@ -25387,9 +25427,6 @@
<Czech>Maskovací oblečení vytvořeno speciálně pro použítí v lesních oblestech. Lze rozbalit a obléknout.</Czech> <Czech>Maskovací oblečení vytvořeno speciálně pro použítí v lesních oblestech. Lze rozbalit a obléknout.</Czech>
<French>Une tenue de camouflage spécialement étudiée pour se fondre dans la végétation. Peut être porté.</French> <French>Une tenue de camouflage spécialement étudiée pour se fondre dans la végétation. Peut être porté.</French>
<German>Schwere Tarnkleidung, die dichtes Unterholz simuliert. Kann ausgepackt und getragen werden.</German> <German>Schwere Tarnkleidung, die dichtes Unterholz simuliert. Kann ausgepackt und getragen werden.</German>
</Key> </Key>
<Key ID="str_player_fail_wear4">
<English>You cannot change clothes when you are being targeted by NPCs</English>
</Key>
</Package> </Package>
</Project> </Project>