Crafting System V2

15,99

VAT exempted according to UStG §19
Delivery Time: no delivery time (e.g. download)

Craft like mad

Description

You want to offer your players a new challange? The crafting system is the right system for your server! You can craft all you want: Clothing, items, weapons and vehicles.

The crafting system V2 has some important innovations:

  • Integration to locker
  • Blueprints
  • Level
  • Code renewed from scratch

Features

  • Craft ArmA Items, Y-Items and Vehicles
  • Connected with locker: Items are automatically taken from locker inventory to be processed and in the end items can be crafted directly to locker inventory
  • Configurable level: Players can only craft items if certain crafting level is reached
  • Blueprints: Collect and learn blueprints to craft specific items
  • Rarity: Some blueprints can be rarer than others
  • Level and blueprints are saved to database
  • It’s up to you how you categorize and group the items
  • Add nick names for your items. The nick names are display in the crafting menu instead of the item name
  • Create diffrent crafting stations and select which groups of items are craftable at each station
  • Additional check: Add an addition condition that must be true to be able to craft item (e.g. player side, license or level)
  • Set crafting process duration for each item
  • Multilingual
  • Headless client support
  • Protected against duping
  • Source code completely commented

Additional information

ArmA RPG Life Version

4.4x, 5.0

Requirements

cationstudio core system

Versions

04.11.2020

  • Bugfix: Sometimes items in selection list on the left of the menu are wrong colored
  • Enhancement: Define in the configuration for each item how many experience points (ep) a player receives when finishing crafting an item.

For updating please replace functions/fn_onDropdownChanged.sqf, functions/fn_processItems.sqf and config/language.cpp.

To define the experience points (ep) edit your config/categories.cpp and add a new entry to each item name “ep” and as value the number of ep a player should receive for crafting the item. If now value is defined, the default value of 1 ep is used. For example:

...
class weapon {
    displayName = "STR_WEAPON"; // defined in language.cpp
        class hgun_P07_F {
            itemsReq[] = { // required items as list {"ITEMNAME",AMOUNT}, {"ITEMNAME",AMOUNT}
                {"diamond_cut",2}
            };
            conditions = ""; // enter conditions
            minlevel = "noob"; // defined in levels.cpp: enter classname
            plan = ""; // defined in plans.cpp: enter classname
            skin = ""; // skin (defined in Config_Vehicles.hpp) - only used for vehicles
            skinSide = ""; // skinSide eg. civ, cop, reb etc. (defined in Config_Vehicles.hpp) - only used for vehicles
            vItem = false; // if is vItem
            time = 30; // time to craft item - must be positive
            nickName = ""; // nickName of item: Leave blank ("") if you want to use the default display name. Translations are defined in <mission>/stringtable.xml
            ep = 3; // experience points player receives when item was crafted successfully - must be positive
        };
        class arifle_ARX_blk_F {
            itemsReq[] =
...

02.10.2020

  • Bugfix: Do not craft if entered amount is negative
  • Bugfix: In some edge cases wrong amount of items was seized
  • Bugfix: Backpacks not crafted
  • Enhancement: Close menu and move around while carfting

Please replace functions/fn_onProcessButtonClicked.sqf, functions/fn_processItems.sqf, functions/fn_seizeItems.sqf, functions/fn_canStorePlayer.sqf, functions/fn_getLockerItemType.sqf and config/language.cpp

03.08.2020

  • Bugfix: Show name of item in progress bar. Please replace
    • fn_processItems.qf

22.04.2020

Enhancement

  • Added: If plan is already used, don’t use it again. Please replace
    • fn_handlePlan.sqf
    • language.cpp

In <mission>/core/pmenu/fn_useItem.sqf replace

[_item,true] call cat_craftingV2_fnc_handlePlan;

with

if (!([_item,true] call cat_craftingV2_fnc_handlePlan)) then {
    [true,_item,1] call life_fnc_handleInv;
};

15.04.2020

New Feature

  • Added: Nick names for crafting items (edit display name of crafting items)
    Please replace

    • fn_processItems.sqf
    • fn_onItemListChanged.sqf
    • fn_onDropdownChanged.sqf
  • In the categories.cpp add the line
nickName = "";
  • to each item. For example:
class item {
    displayName = "STR_ITEM";
    class copper_refined {
        itemsReq[] = {
            {"iron_refined",2}
        };
        conditions = "";
        minlevel = "noob";
        plan = "copper_refined_plan";
        skin = "";
        skinSide = "";
        vItem = true;
        time = 30;
        nickName = "";
    };
    class diamond_cut {
        itemsReq[] = {
            {"copper_refined",1},
            {"iron_refined",1}
        };
        conditions = "";
        minlevel = "apprentice";
        plan = "diamond_cut_plan";
        skin = "";
        skinSide = "";
        vItem = true;
        time = 45;
        nickName = "";
    };
};
  • If you want to use nick names then add a localization key to your stringtable.xml and add the id of the key as nickName to the item.
  • For example add new key to your stringtable.xml: Paste under
<Key ID="STR_PLAN_DIAMOND">
    <Original>Diamond Blueprint</Original>
    <German>Bauplan für Diamant</German>
</Key>
  • the following lines:
<Key ID="STR_Item_SuperCrazyWeapon">
    <Original>Super Crazy Weapon</Original>
    <German>Super verrückte Waffe</German>
</Key>
  • And add a new item to categories.cpp:
class arifle_ARX_blk_F {
    itemsReq[] = {
        {"diamond_cut",4},
        {"copper_refined",1}
    };
    conditions = "";
    minlevel = "noob";
    plan = "";
    skin = "";
    skinSide = "";
    vItem = false;
    time = 60;
    nickName = "STR_Item_SuperCrazyWeapon"; // example for overriding displayname of item. 
};

27.03.2020

Fix for version 5 (from 25.12.2019 and newer) of framework: add attribute

 drinkable = -1;

in plans.cpp.

04.03.2020

Bugfix

  • Crafting plans for each playerside. Please replace
    • fn_add.sqf
    • fn_addHC.sqf
    • fn_query.sqf
    • fn_queryHC.sqf
    • fn_updatePlans.sqf
    • fn_updatePlansClient.sqf
    • fn_updatePlansHC.sqf
  • If you haven’t updated to 1.0.1 yet also replace
    • fn_processItems.sqf
    • fn_seizeItems.sqf
  • On top execute this SQL statement in the database:
ALTER TABLE crafting ADD civ_plans TEXT NOT NULL;
ALTER TABLE crafting ADD cop_plans TEXT NOT NULL;
ALTER TABLE crafting ADD med_plans TEXT NOT NULL;
ALTER TABLE crafting ADD east_plans TEXT NOT NULL;
SET SQL_SAFE_UPDATES = 0;
UPDATE crafting SET civ_plans=plans WHERE plans LIKE '%cat_crafting_plan_civ%';
UPDATE crafting SET cop_plans=plans WHERE plans LIKE '%cat_crafting_plan_cop%';
UPDATE crafting SET med_plans=plans WHERE plans LIKE '%cat_crafting_plan_med%';
UPDATE crafting SET east_plans=plans WHERE plans LIKE '%cat_crafting_plan_east%';
UPDATE crafting SET civ_plans='"[]"' WHERE civ_plans LIKE '';
UPDATE crafting SET cop_plans='"[]"' WHERE cop_plans LIKE '';
UPDATE crafting SET med_plans='"[]"' WHERE med_plans LIKE '';
UPDATE crafting SET east_plans='"[]"' WHERE east_plans LIKE '';
  • If this was executed without any error message, run this last sql statement:
ALTER TABLE crafting DROP plans;

03.03.2020

Bugfix

  • Craft multiple items (seize right amount of items if multiple items a crafted). Please replace
    • fn_processItems.sqf
    • fn_seizeItems.sqf