Jump to content
mudzereli

[release] 1.0.5.1 - Weapon Attachment Mod 1.1.0 - Remove/Add attachments to weapons

Recommended Posts

Hey guys,

 

I've been working on a script that allows players to take off weapon attachments from one weapon and put them on another.

 

Hopefully some other people also enjoy it or find it useful.

 

Weapon Attachment Mod 1.1.0

all of this information is available in an easier-to-read format on github pages >>

note: This addon has been thoroughly tested but only on a low population server. if you have any issues on a high population server, let me know and I will try to address them.

 

This addon lets players remove weapon mods from their weapons and apply them to other weapons.

For example, you can take an ACOG scope off of an M4A1 and put it on a SA58, or add Gold Paint to a revolver, etc.

It only works with existing weapon combos (you can't put a silencer on a DMR or anything like that)

For an example, check out this imgur gallery or this video on twitch.tv:

 

Features:

  • configurable so you set your own combinations
  • easy to use, just right click and remove or add the part
  • admin list for adding modifications without the item

note: Due to the way saving data works, unattached weapon modifications do not save across server restarts, so the player must attach the part to a weapon again before it will save. Players are notified of this whenever they remove a modification from a weapon or whenever they have their weapon mod inventory open.

 

Installation

  1. download the files
  2. extract the addons and overwrites folder from the downloaded zip file into your mission file root
  3. add this line to the end of your mission file init.sqf.
    • call compile preprocessFileLineNumbers "addons\wmod\init.sqf";
  4. edit addons\wmod\config.sqf if you want to configure some options such as what guns it works with etc.

Configuration

note: Configuration instructions are easier to read on github.

To edit the configuration options, open addons\wmod\conifg.sqf
Some of the more complex configuration options are shown below (others are in the config.sqf)

 

DZE_WEAPON_MODS array format

DZE_WEAPON_MODS = [
     [_attachment,_base,_upgrade],
     [_attachment,_base,_upgrade],
     [... more info here ...]
];

DZE_WEAPON_MODS array arguments

 parameter    | description                                                         |  type  | example
--------------|---------------------------------------------------------------------|--------|--------
_attachment   | the name of the weapon attachment                                   | string | "GP25 GL"
_base         | the classname that the attachment is put on to                      | string | "AK_74"
_upgrade      | the classname the item becomes after the attachment is put on       | string | "AK_74_GL"

DZE_WEAPON_MOD_COMBINE array format

DZE_WEAPON_MOD_COMBINE = [
    [_combined,_attachments],
    [_combined,_attachments],
    [... more info here ...]
];

DZE_WEAPON_MOD_COMBINE arguments

 parameter    | description                                                         |  type  | example
--------------|---------------------------------------------------------------------|--------|--------
_combined     | the name of the attachment to combine the other attachments into    | string | "CCO Sight"
_attachments  | array of attachments to combine into the combined attachment        | array  | ["Kobra Sight"]

Issues/FAQ

 

Users get kicked for publicvariable restriction #0

  1. find your battleye filter directory
  2. open publicvariable.txt
  3. the first line should say 5 "" (... other stuff ...)
  4. change it to 5 "" !"DZE_WMOD_INVENTORY" (... other stuff ...)

 

Change Log

version|change
-------|-------
1.1.0  | unused mods now persist after logout (but not server restart)
       | better inventory management system
       | more configurable options
1.0.1  | bug fix for removing attachments
1.0.0  | first release



			
		

Share this post


Link to post
Share on other sites

it only works with existing items/weapons.

 

For example you can build a plain M4A1 up to like a M4A1 Holo SD Camo, or take a silencer off a PP Bizon and put it on a Makarov, but not take the silencer off of a M9 and put it on a DMR or anything like that.

 

It does NOT give you any real items, this is why the users are warned that the attachments are not saved between logins/restarts.

 

If I could find a way to add this I would, but you can't add new items in a mission file.

 

The only other option would be to save it to the database (which would require more modification by server owners) or use some sort of placeholder item/cash out method.

Share this post


Link to post
Share on other sites

The saving would be possible with 500+ calls for sure.. not that easy but possible,

 

anyways a little suggestion :)

 

try to add some sort of scrollmenu to the traders to buy the attachments ;)

 

 

 

EDIT:

 

Iam constantly getting "weapon modification interrupted" have a clear install of yours like your instructions says..

 

any special reason forthis?

 

If I set myself to admin it actually works, but otherwise I cant add or remove anything

Share this post


Link to post
Share on other sites

I added only the "wmod" dir to addons folder since I already use your deploy bike 

I added the 

  • call compile preprocessFileLineNumbers "addons\wmod\init.sqf";  

but I too keep getting the "weapon modification interrupted" 

 

How would I add this to your deploy bike script ???

Share this post


Link to post
Share on other sites

I found the reason for the bug:

 
fnc_wmod_hasWeaponModInventory = {
    private["_inventory","_mod"];
    _mod = _this;
    _inventory = player getVariable["WeaponModInventory",[]];
    ((_mod in _inventory) ||  ((getPlayerUID player) in DZE_WEAPON_MOD_ADMINS)) <- this line is causing it
};
 
You need to do a check if the Weapon you want to detach a mod from is in your inventory

Share this post


Link to post
Share on other sites

Or you give them items like ItemGeneric that acts like a silencer?

 

If you are talking about giving  a variant of a base item then I did not know that was possible. I tried to do it and could not load an item from the missionConfigFile.

 

If you are talking about using placeholder items then yes it's possible but you would either need to count all the attachments as the same currency and add them to that item, or use 7-8 items as placeholders, which i don't think there are really enough free items to do that.

 

 

The saving would be possible with 500+ calls for sure.. not that easy but possible,

 

anyways a little suggestion :)

 

try to add some sort of scrollmenu to the traders to buy the attachments ;)

 

 

 

EDIT:

 

Iam constantly getting "weapon modification interrupted" have a clear install of yours like your instructions says..

 

any special reason forthis?

 

If I set myself to admin it actually works, but otherwise I cant add or remove anything

 

 

I added only the "wmod" dir to addons folder since I already use your deploy bike 

I added the 

  • call compile preprocessFileLineNumbers "addons\wmod\init.sqf";  

but I too keep getting the "weapon modification interrupted" 

 

How would I add this to your deploy bike script ???

 

 

I found the reason for the bug:

 
fnc_wmod_hasWeaponModInventory = {
    private["_inventory","_mod"];
    _mod = _this;
    _inventory = player getVariable["WeaponModInventory",[]];
    ((_mod in _inventory) ||  ((getPlayerUID player) in DZE_WEAPON_MOD_ADMINS)) <- this line is causing it
};
 
You need to do a check if the Weapon you want to detach a mod from is in your inventory

 

This script uses a new version of the click handler so most likely if you guys are having issues you need to update the overwrites folder too (and possibly the deploy / suicide script if you havent updated them in a few days). Were you getting any RPT errors?

 

I released 1.0.1 which fixes the removing bug. if you want to see the change you can see on github.  It was checking to see if you had the weapon mod in your "mod inventory" to do the removal of a weapon mods.

 

 

 

Hello Mudzereli,

I would like to make a request if I may.

That request being that you combine all 3 of the excellent addons that you have made [Deploy Bike/Suicide/Weapon Mod] into one script that works for all.

I will think about the best way to do this, but this may make it easier for everyone, including myself. The reason I didn't do that in the first place is that all the scripts are so different but I agree, it may be best to do this.

Share this post


Link to post
Share on other sites

There arent any RPT errors its the logic of the script itself

 

the overall function triggers if the animation is finished && the function for checking if the mod is in the inventory (or your are and admin)

 

the scriptslogic will also search for the mod you want want to detach, but you wont have it in your inventory if its the first use of the script

 

spawn -> no mods in inventory -> detach silencer -> script searches for (_mod in _inventory)  but there is no silencer yet -> finish script with else handling

 

its already fixxed in your new one as I can see so no worries

Share this post


Link to post
Share on other sites

The saving would be possible with 500+ calls for sure.. not that easy but possible,

 

Saving to db is not the hard part. I want to be able to do it with minimal modification from the server admin and without adding new fields to the DB.

 

I am working on a method that will save one of each weapon mod (but you will lose the rest) upon logout/restarts

Share this post


Link to post
Share on other sites

There arent any RPT errors its the logic of the script itself

 

the overall function triggers if the animation is finished && the function for checking if the mod is in the inventory (or your are and admin)

 

the scriptslogic will also search for the mod you want want to detach, but you wont have it in your inventory if its the first use of the script

 

spawn -> no mods in inventory -> detach silencer -> script searches for (_mod in _inventory)  but there is no silencer yet -> finish script with else handling

i responded to your earlier post above. It was bug that didn't handle removal properly. The function you are talking about is fine, but it was trying to check for the weapon mod even if you are removing a mod from another item (which it shouldnt have been doing). Thanks for pointing it out though, it helped me pinpoint the problem.

Share this post


Link to post
Share on other sites

Hi all,

I've updated the script to 1.1.0.

The inventory is now managed a bit better (optional display in the form of hint message which pauses infistar's debug while it's on).

Also the inventory saves across logouts (but NOT server restarts).

I can't find any way to make it save to DB without having a custom hiveext.dll.

500 calls only seem to be able to get data but not create it.



planned for future is some sort of trader-type feature

Share this post


Link to post
Share on other sites

The sd ammo is not added to certain weapons like pdw and m9 when you add silencer

I can see where you are coming from but I don't really have any plans to add this ATM because its more focused just around the weapons.

Share this post


Link to post
Share on other sites

Also, I think I am having a conflict with another mod that uses the same click code that you do. I am getting black screen where I can hear myself move around. 

 

The mod in question is 

 

Here is your code in ui_Select_slot.sqf

 

  {
        private["_classname","_text","_execute","_condition"];
        _classname   = _x select 0;
        _text        = _x select 1;
        _execute     = _x select 2;
        _condition   = _x select 3;
        // if the clicked item matches, then assign the script call and display text
        if(_item == _classname && (call compile _condition)) then {
            _menu = _parent displayCtrl (1600 + _numActions);
            _menu ctrlShow true;
            _height = _height + (0.025 * safezoneH);
            uiNamespace setVariable ['uiControl', _control];
            _menu ctrlSetText _text;
            _menu ctrlSetEventHandler ["ButtonClick",_execute];
            _numActions = _numActions + 1;
        };
    } forEach DZE_CLICK_ACTIONS;

and here is his in the same file

 

	_erc_cfgActions = (missionConfigFile >> "WaTd" >> _item);
	_erc_numActions = (count _erc_cfgActions);
if (isClass _erc_cfgActions) then {
    for "_j" from 0 to (_erc_numActions - 1) do 
    {
        _menu =  _parent displayCtrl (1600 + _j + _numActions);
        _menu ctrlShow true;
        _config =  (_erc_cfgActions select _j);
        _text =  getText (_config >> "text");
        _script =  getText (_config >> "script");
        _height = _height + (0.025 * safezoneH);
        uiNamespace setVariable ['uiControl', _control];
        _menu ctrlSetText _text;
        _menu ctrlSetEventHandler ["ButtonClick",_script];
    };
};

Share this post


Link to post
Share on other sites

 

Also, I think I am having a conflict with another mod that uses the same click code that you do. I am getting black screen where I can hear myself move around. 

 

The mod in question is 

 

Here is your code in ui_Select_slot.sqf

 

  {
        private["_classname","_text","_execute","_condition"];
        _classname   = _x select 0;
        _text        = _x select 1;
        _execute     = _x select 2;
        _condition   = _x select 3;
        // if the clicked item matches, then assign the script call and display text
        if(_item == _classname && (call compile _condition)) then {
            _menu = _parent displayCtrl (1600 + _numActions);
            _menu ctrlShow true;
            _height = _height + (0.025 * safezoneH);
            uiNamespace setVariable ['uiControl', _control];
            _menu ctrlSetText _text;
            _menu ctrlSetEventHandler ["ButtonClick",_execute];
            _numActions = _numActions + 1;
        };
    } forEach DZE_CLICK_ACTIONS;

and here is his in the same file

 

	_erc_cfgActions = (missionConfigFile >> "WaTd" >> _item);
	_erc_numActions = (count _erc_cfgActions);
if (isClass _erc_cfgActions) then {
    for "_j" from 0 to (_erc_numActions - 1) do 
    {
        _menu =  _parent displayCtrl (1600 + _j + _numActions);
        _menu ctrlShow true;
        _config =  (_erc_cfgActions select _j);
        _text =  getText (_config >> "text");
        _script =  getText (_config >> "script");
        _height = _height + (0.025 * safezoneH);
        uiNamespace setVariable ['uiControl', _control];
        _menu ctrlSetText _text;
        _menu ctrlSetEventHandler ["ButtonClick",_script];
    };
};

 

this should get it to work

 

1) don't modify my ui_selectSlot file at all (skip this part of WATD)

2) open overwrites\click_actions\config.sqf

3) put this in DZE_CLICK_ACTIONS array (so if it were the only thing in there it would look like this)

DZE_CLICK_ACTIONS = [
["ItemZombieParts","Smear Guts on you","[] execVM ""custom\walkamongstthedead\smear_guts.sqf"";","true"],
["ItemWaterbottle","Wash zombie guts","[] execVM ""custom\walkamongstthedead\usebottle.sqf"";","true"]
];

Share this post


Link to post
Share on other sites

 

Also, I think I am having a conflict with another mod that uses the same click code that you do. I am getting black screen where I can hear myself move around. 

 

The mod in question is 

 

Here is your code in ui_Select_slot.sqf

 

 

I just added them together like this works great....

 

 

    
} forEach DZE_CLICK_ACTIONS;
    //### END MODIFIED CODE: extra click actions
// Walking dead
_erc_cfgActions = (missionConfigFile >> "WaTd" >> _item);
_erc_numActions = (count _erc_cfgActions);
if (isClass _erc_cfgActions) then {
    for "_j" from 0 to (_erc_numActions - 1) do 
    {
        _menu =  _parent displayCtrl (1600 + _j + _numActions);
        _menu ctrlShow true;
        _config =  (_erc_cfgActions select _j);
        _text =  getText (_config >> "text");
        _script =  getText (_config >> "script");
        _height = _height + (0.025 * safezoneH);
        uiNamespace setVariable ['uiControl', _control];
        _menu ctrlSetText _text;
        _menu ctrlSetEventHandler ["ButtonClick",_script];
    };
};
// walking dead end
    _pos set [3,_height];
    //hint format["Obj: %1 \nHeight: %2\nPos: %3",_item,_height,_grpPos];       


    _group ctrlShow true;
    ctrlSetFocus _group;
    _group ctrlSetPosition _pos;
    _group ctrlCommit 0;
};
 

and add DZE_CLICK_ACTIONS = [

["ItemZombieParts","Smear Guts on you","[] execVM ""custom\walkamongstthedead\smear_guts.sqf"";","true"],
["ItemWaterbottle","Wash zombie guts","[] execVM ""custom\walkamongstthedead\usebottle.sqf"";","true"]
];

Share this post


Link to post
Share on other sites

 

I just added them together like this works great....

 

 

    } forEach DZE_CLICK_ACTIONS;
    //### END MODIFIED CODE: extra click actions
// Walking dead
_erc_cfgActions = (missionConfigFile >> "WaTd" >> _item);
_erc_numActions = (count _erc_cfgActions);
if (isClass _erc_cfgActions) then {
    for "_j" from 0 to (_erc_numActions - 1) do 
    {
        _menu =  _parent displayCtrl (1600 + _j + _numActions);
        _menu ctrlShow true;
        _config =  (_erc_cfgActions select _j);
        _text =  getText (_config >> "text");
        _script =  getText (_config >> "script");
        _height = _height + (0.025 * safezoneH);
        uiNamespace setVariable ['uiControl', _control];
        _menu ctrlSetText _text;
        _menu ctrlSetEventHandler ["ButtonClick",_script];
    };
};
// walking dead end
    _pos set [3,_height];
    //hint format["Obj: %1 \nHeight: %2\nPos: %3",_item,_height,_grpPos];       
 
    _group ctrlShow true;
    ctrlSetFocus _group;
    _group ctrlSetPosition _pos;
    _group ctrlCommit 0;
};
 

and add DZE_CLICK_ACTIONS = [

["ItemZombieParts","Smear Guts on you","[] execVM ""custom\walkamongstthedead\smear_guts.sqf"";","true"],

["ItemWaterbottle","Wash zombie guts","[] execVM ""custom\walkamongstthedead\usebottle.sqf"";","true"]

];

 

you should be able to skip the whole ui_selectSlot part and just do that bottom part

 

and add DZE_CLICK_ACTIONS = [

["ItemZombieParts","Smear Guts on you","[] execVM ""custom\walkamongstthedead\smear_guts.sqf"";","true"],

["ItemWaterbottle","Wash zombie guts","[] execVM ""custom\walkamongstthedead\usebottle.sqf"";","true"]

];

Share this post


Link to post
Share on other sites

Hi i have you blood / and build script working fine thank you for your work, but soon as i added this one i got kicked from my server,  

 

#0 "DZE_WMOD_INVENTORY" = [<null-object>,true]

 

Would you have any idea's.

 

many thanks keith

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By vbawol
      Open world survival mod set just two years after the mass extinction of billions of people. Those that remain are left with remnants of a once technological society. Try to survive, build, or explore your way through the harsh dynamic environment.
      Features
      Powerful persistence framework for Arma 3 with native Windows and Linux dedicated server support. Fully configurable script based security checks. Base Building re-envisioned for Arma 3 PhysX. Persistent secure and insecure storage devices. Upgradeable locking doors. Barter based economy and trading systems backed a single currency ¤ called "Krypto". Hostile Environment with several different types of antagonists, Air and Water temperature extremes, and Earthquakes. Hunting, Fishing, Tame Dogs, Explore & Loot: Wrecked ships, Abandoned vehicles and buildings, Perform task based missions and more! Open source APL-SA Epoch Survival MP gamemode. Open source APL-SA Modders resource configs and Class List. Assets can be used as a mod dependency on Steam workshop.
    • By Ghostrider-GRG
      For a while now I have wanted to put together an addon that makes available additional storage containers and, in the future, other craftable items like heli pads, additional lights and so forth. To that end, and with quite a lot of help from Grahame, I offer V 0.1 of Extended Base Objects for Epoch. It offers a variety of additional storage containers and an easy method for installation.
      Installation: download from my github here:  https://github.com/Ghostrider-DbD-/EB4E
      Subscribe on Steam here: https://steamcommunity.com/sharedfiles/filedetails/?id=1475332817
      Unpack your mission.pbo using PBO manager or its equivalent.
      Copy all files from the mapname.epoch folder to the folder created by unpacking your mission.
      Repack your mission.
      Copy @EB4E to the same folder containing @Epoch and @epochhive on your server. 
       Copy the key found in @EB4E\Key to the \keys folder on your server.
      Add "EB4E" to the -mods="@Epoch;blahblah;" parameter for server startup.
      Players can subscribe to the mod here: https://github.com/Ghostrider-DbD-/EB4E
    • By Grahame
      Another item added to EpochCore client-side in 1.1 is a Large Workbench - using the ARMA model for a steel work table with drawers and a vice. Here is the code for placing them and a suggestion (and code) for actually making use of them to provide greater flexibility in crafting for your players.
      Installation Instructions
      (1) Add the large workbench "kit" to your loot tables and trader price lists. The class name is KitWorkbenchLarge
      (2) Add the following to epoch_config/Configs/CfgItemInteractions.hpp:
      class KitWorkbenchLarge : Item_Build_base { buildClass = "WorkbenchLarge_SIM_EPOCH"; }; (3) Add the following to epoch_config/Configs/CfgBaseBuilding.hpp:
      class WorkbenchLarge_EPOCH : Default { removeParts[] = {{"KitWorkbenchLarge",1}}; GhostPreview = "WorkbenchLarge_Ghost_EPOCH"; staticClass = "WorkbenchLarge_EPOCH"; simulClass = "WorkbenchLarge_SIM_EPOCH"; }; class WorkbenchLarge_SIM_EPOCH : WorkbenchLarge_EPOCH { removeParts[] = {}; }; class WorkbenchLarge_Ghost_EPOCH : WorkbenchLarge_SIM_EPOCH {}; So, those minor changes will allow you to build a large workbench from a kit and then utilize it within Epoch's crafting system. All further changes will be made to epoch_config/Configs/CfgCrafting.hpp.
      Let's start our examination of that with the crafting of the large workbench itself. The crafting system in Epoch is really nice, quite simple (though it can look imposing at first glance) and very flexible. Basically it comprises parts and kits that are built from them and allows the specification of either things (water or fire) or objects to be nearby in order to build the kit. For the building of the large workbench you will need to add the following new entry:
      class KitWorkbenchLarge : Kit { recipe[] = {{"PartPlankPack",8},{"ItemCorrugatedLg",2},{"ItemPipe",2},{"ItemCorrugated",2},{"VehicleRepair",1}}; nearby[] = {{"Workbench","","workbench",{1,{"WorkBench_EPOCH","WorkbenchLarge_EPOCH"}},3,1,0,1}}; model = "\A3\Structures_F_Heli\Furniture\Workbench_01_F.p3d"; previewPosition[] = {0.8,1,0.27}; previewScale = 0.15; previewVector = 0; }; This entry illustrates nicely the configuration for a craftable item. Let's look at a few lines in it starting with the recipe[]. This specifies which items are needed to build the kit, in this case 8 lumber packs, 2 large salvage metal, two pipes, two small salvage metals and a vehicle repair parts (for the vice). In order to show the Large Workbench as a buildable from these individual items in the crafting menu you need to add the Large Workbench to their entries' usedin[] array, for example:
      Okay, at this point you can click on any of these parts and a Large Workbench will be shown as a possible recipe for the part. Now let's look at the nearby[] array in the Large Workbench's crafting definition. This specifies things that are needed nearby in order to complete the crafting, in this case:
      nearby[] = {{"Workbench","","workbench",{1,{"WorkBench_EPOCH","WorkbenchLarge_EPOCH"}},3,1,0,1}}; Now, reading the very handy comment at the head of CfgCrafting.hpp shows what each part of this line means:
      USAGE: nearby[] = { { "Fire", //Name of field, anything "", //image folder path (ie "\x\addons\a3_epoch_code\Data\UI\crafting\"), empty for Epoch default "fire", //image prefix, suffix will be added by code. 2 possible suffixes: [_true.paa, _false.paa] {1,{"ALL"}}, //ARRAY of p3D {0,{"filename.p3d","filename.p3d"}} or ARRAY of logic classes {1,{"AIR","LAND","className"}} or 2 WorldInteractions check {2,{"water"}} Integer to switch array mode 3, //distance to check in meters 1, //count 1, //BOOL: object has to be on fire 0 //BOOL: object has to be alive (not destroyed) }; }; So you can see in the nearby[] array for Large Workbenches that it needs either a standard Epoch workbench or a large workbench itself within 3m of the player in order to build one. You can have as many requirements as you want in that list including categories defined in epoch_config/Configs/CfgEpochClient/WorldInteractions.hpp like "Water" or "Tree" or ... "bankTerminal" 
      Now you can craft a Large Workbench and then build it, you can now use the fact you have one to make crafting just a little more immersive by, for example, only allowing small things to be crafted with a standard Epoch workbench and requiring a large workbench for more complicated or larger buildables. For example, let's say we leave buckets of mortar as being able to be crafted on a small one. You probably also want to allow your to craft them on a large one as well so you would have both items in the nearby[] array for them:
      class MortarBucket : Item { usedIn[] = {"KitFoundation","KitCinderWall","KitHesco3","KitCinderFloor","KitCinderHalfFloor","KitCinderQuarterFloor","KitCinderTower","KitSandbagWall","KitSandbagWallLong","KitBagBunker","KitWaterPump","KitWell"}; nearby[] = {{"Fire","","fire",{1,{"ALL"}},3,1,1,0},{"Workbench","","workbench",{1,{"WorkBench_EPOCH","WorkbenchLarge_EPOCH"}},3,1,0,1}}; recipe[] = {{"ItemRock",12},{"water_epoch",2}}; previewPosition[] = {0.799442,1,0.426761}; previewScale = 0.6; previewVector = 0; }; Now this is an interesting item (the reason I picked it...) because it demonstrates making a craftable dependent on multiple things nearby, in this case a burning fire and either a small or large workbench... cool huh?
      For the wooden buildables I like to allow a small workbench so each of their definitions would have both the large and small workbench in the nearby[] array like this:
      class KitStudWall : Kit { recipe[] = {{"PartPlankPack",4}}; model = "\x\addons\a3_epoch_assets\models\Wooden_Wall_SIM.p3d"; nearby[] = {{"Workbench","","workbench",{1,{"WorkBench_EPOCH","WorkbenchLarge_EPOCH"}},3,1,0,1}}; previewPosition[] = {0.797675,1,0.398882}; previewScale = 0.07; previewVector = 0; }; But for cinder buildables I think you need a more flexible work environment, thus the small workbench is removed from their nearby[] arrays, for example:
      class KitCinderFloor : Kit { usedIn[] = {"KitCinderTower"}; recipe[] = {{"CinderBlocks",4},{"MortarBucket",4}}; nearby[] = {{"Large Workbench","","workbench",{1,{"WorkbenchLarge_EPOCH"}},3,1,0,1}}; model = "\x\addons\a3_epoch_community\models\cinderfloor.p3d"; previewPosition[] = {0.800198,1,0.262418}; previewScale = 0.055; previewVector = 3.6; }; That's pretty much it. Now you can build a large workbench, craft one and make other items dependent on it - or indeed any other object in the game. As a final example here's a modified entry for an energy pack that relies on you having a power source within 30m, and a fire and a large workbench within 3m:
      class EnergyPack : Item { usedIn[] = {"EnergyPackLg"}; nearby[] = {{"Fire","","fire",{1,{"ALL"}},3,1,1,0},{"Large Workbench","","workbench",{1,{"WorkbenchLarge_EPOCH"}},3,1,0,1},{"Power Source","","electricity",{1,{"Land_spp_Tower_F","Land_wpp_Turbine_V2_F","Land_wpp_Turbine_V1_F","SolarGen_EPOCH","Land_Wreck_Satellite_EPOCH"}},30,1,0,1}}; recipe[] = {{"CircuitParts",1},{"ItemCopperBar",1},{"clean_water_epoch",1}}; previewPosition[] = {0.8,1,0.29}; previewScale = 1.75; previewVector = 2.8; }; Now let your imagination run wild!
    • By victorks
      my first work in editin :) https://uploaddeimagens.com.br/imagens/20180307202515_1-jpg https://uploaddeimagens.com.br/imagens/20180307202245_1-jpg DOWNLOAD: https://www.dropbox.com/s/oq97j7x59362kqe/CASTLEai.sqf?dl=0 AI M2 NEED WAI: https://pastebin.com/GJMnPvZP ON THE MAP: https://pastebin.com/cyqH9rNV  
       
      https://www.dropbox.com/s/oq97j7x59362kqe/CASTLEai.sqf?dl=0
       
       
       
       
       
       
       
       
       
    • By xDUKEx
      I was wondering if there was still a script going around to attach a chemlight to your character, by using a right click action, if you had chemlights in your inventory.
      I this script isn't a thing anymore, would it be hard to make?
       
      Thanks!
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...