• 0
Sign in to follow this  

[Help needed] Adding custom usable Items to Exile-System


Hi guys,

I'm playing around with some new Items for my roleplay ideas. So I looked around and learned by other existing addons and create my owen Addon with Items. They are all usable and I implementet them to Exile-usables like Instadoc and other healingstuff. Figured out how the "effects" line is working, but now I'm stuck.

Either I find out how to call a script within this config.cpp of my mod if someone uses my Item or I will find a way to create a complete new effect in the exile files.

But for both of my possibilities I don't know how to do this :bandit:

What I have done so far:

Tried to execute a sqf from a init-line inside my config.cpp within the Class of the Item. Therefore I added the "class EventHandlers". But I think this is maybe not possible, cause my Item has the Baseclass CfgMagazines and I have read somewhere in the BisWiki that this line only exist in CfgVehicles.

Tried to find out where the effects from usable Exile-Items is configured but I don't know much about "this select 0" and codes like that in SQFs. So at some point I was completely lost, somewhere deep in Exile O.o


It wood be great if someone can have a look to my config.cpp and maybe give me a hint how I could do my dream come true and get this sh... working...


How can I execute a script from inside the config.cpp i.e. only at the point, a player use the Item?

Optional where / how can I create my owen effects for "class Consuming: Exile_AbstractItem_Interaction_Consuming_Healing"?


class CfgPatches {

    class ACME_DEA {
        requiredVersion = 0.100000;
        requiredAddons[] = {};
        units[] = {};
        weapons[] = {"DEA_Base_Item", "DEA_Dummy", "DEA_Weed", "DEA_Cocaine", "DEA_Crack", "DEA_Meth", "DEA_Chemical"};
        magazines[] = {};
        ammo[] = {};

class CfgMagazines
    class CA_Magazine;
    class HandGrenade;
    class EventHandlers;
    class Exile_AbstractItem_Interaction_Consuming;
    class Exile_AbstractItem_Interaction_Drinking;
    class Exile_AbstractItem_Interaction_Eating;
    class Exile_AbstractItem_Interaction_Consuming_Healing;
    class Exile_AbstractItem_Interaction_Constructing { scope=1; };
    class Exile_AbstractItem_Interaction_Using;
    class Exile_AbstractItem: CA_Magazine {
        scope = 1;
        descriptionShort = "Dummy";
        displayName = "Dummy";
        count = 1;
        mass = 1;
        picture = "\exile_assets\texture\item\Dummy.paa";
        model = "\exile_assets\model\Dummy.p3d";

        class Interactions {
        class EventHandlers {

    class DEA_Weed: Exile_AbstractItem
        scope = 2;
        displayName = "Bag of Weed";
        descriptionShort = "A dime bag of weed. Best before 420... or after, anyway.<br/>Health: +25%/60s<br/>Hunger: -25%/60s<br/>Thirst: -25%/60s<br/>Alc. Vol.: 3,5‰";
        mass = 15;
        picture = "\ACME_DEA\data\dimebag.paa";
        vehicleClass = "small_items";
        class Interactions

            class Consuming: Exile_AbstractItem_Interaction_Consuming_Healing
                stopBleeding = 1;
                effects[] = {{0,25,60},{2,-25,60 },{3,-25,60},{4,0.200000,0}};
        /*class EventHandlers           // doesn't work

             init = "(_this select 0) execVM ""\ACME_DEA\script.sqf""";

// script.sqf is also in @ACME_DEA\addons\ACME_DEA.pbo rootfolder and in the mission.pbo rootfolder and I tried also the path .....execVM ""ACME_DEA\script.sqf"""; and .....execVM ""script.sqf""";

// in script.sqf i write this for testing if it works or not: hint format ["Player %1 is a weedhead now",player]

To explain a little bit of my idea, like in A2 DayzEpoch times a Script named "Harvesteble Hemp" there shuold spawn some "Weedfarms" on the Map. Player can go for it, strike the AIs down and harvest Hemp. If they use/consume this, I wanna execute a Script of mine that reduces the damage a player get for x%, cause hemp is medical narcotic drug.

I could do all this stuff with addAction and scrollmenu, that is working without any problems, but scrollmenu sucks and I just wanna have this working exile-style :rock:

Edited by CH!LL3R

Share this post

Link to post
Share on other sites

0 answers to this question

There have been no answers to this question yet


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.