npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

grad-advancedlockpicking

v0.0.2

Published

a continuation of ACE-vehiclelock's lockpicking functionality

Downloads

18

Readme

GRAD Advanced Lockpicking

License GitHub release

An continuation of ACE-vehiclelock's lockpicking functionality in a modular package for your mission. Adds possibility for lockpicking to fail and trigger an alarm. Gives player (e.g. "Police" faction) a wanted list dialog listing all reported vehicle thefts. Comes with more detailed configurability.

Dependencies

Credits

Credits go to PabstMirror and the ACE Team. This script module builds upon ACE's vehiclelock component and uses some of its code.

Usage

Interact with a locked vehicle like you would with ACE. Select unlock vehicle action and wait for the progress bar to complete. Your progress may fail at any time and trigger the vehicle's alarm. Specialists will have a higher chance of success. Different vehicle types will be harder to lockpick.

Players that have been configured the ability to open the wanted list will get a notification whenever a vehicle theft has been reported. They may open the wanted list dialog with ACE-Selfinteraction >> Equipment >> Wanted List. When selecting a vehicle from the list on the left, additional info will be displayed in the middle of the dialog. The map on the right will move to the selected vehicle. This works backwards as well by selecting a vehicle from the map.

By hitting the Mark as Solved button, the case will be marked as solved globally (for all players). The name of the unit who closed the case will be added to the case's info text.

Installation

Add the following lines to your description.ext. Use #define MODULES_DIRECTORY <your path> if you want to use your own folder structure instead of the node_modules folder.

#include "node_modules\grad-advancedLockpicking\grad_advancedLockpicking.hpp"

class CfgFunctions {
    #include "node_modules\grad-advancedLockpicking\cfgFunctions.hpp"
};

class CfgNotifications {
    #include "node_modules\grad-advancedLockpicking\cfgNotifications.hpp"
};

Via npm

for details about what npm is and how to use it, look it up on npmjs.com

Install package grad-advancedlockpicking : npm install --save grad-advancedlockpicking.

Manually

Download the latest release from the releases page. Place the grad-advancedLockpicking folder in your mission's root folder.

Configuration

You can optionally configure grad-advancedLockpicking to your liking by adding the following config to your description.ext. The values listed here are the default value.

Every config entry has a correspoding global variable that can be set in a running mission at any point after preInit. All variables have the prefix grad_advancedLockpicking_. E.g. if I wanted to allow a single unit to lockpick tanks, I would change the variable grad_advancedLockpicking_canPickTank on his machine to 1.

class CfgGradAdvancedLockpicking {
    canLockpickDefault = 1;                         // can all units lockpick by default? 0/1
    needLockpickSet = 1;                            // do units need ACE's lockpick set item in inventory to be able to pick locks? 0/1

    canUseWantedListCondition = "true";             // condition for ability to use the wantedList; passed params are [unit]; condition and sides are logically connected by OR
    canUseWantedListSides[] = {};                   // sides that can use the wanted list by default; e.g. {"WEST","EAST","INDEPENDENT","CIVILIAN"}; condition and sides are logically connected by OR
    wantedListTitle = "GRAD-advancedLockpicking";   // title of wantedList dialog; e.g. "Tanoa Police Theft Tracker"

    baseLockpickTimeDefault = 10;                   // base time in seconds for picking locks; time factors are applied to this; -1 to make locks unpickable
    baseSuccessProbabilityDefault = 75;             // base probability in percent for successfully picking locks; success factors are applied to this

    alarmOnSuccessProbabilityDefault = 10;          // probability in percent for vehicle alarm to trigger even when lockpicking was successful; -1 to disable
    wantedListOnSuccessProbabilityDefault = 50;     // probability in percent for theft to be added to wanted list even when lockpicking was successful; -1 to disable

    wantedListDelayOnFailure[] = {0,0};             // min and max delay in seconds for failed thefts to be added to wanted list
    wantedListDelayOnSuccess[] = {10,60};           // min and max delay in seconds for successful thefts to be added to wanted list

    suspectNameProbabilityOnAlarm = 10;             // probability in percent for thief's name to be added to wanted list if vehicle alarm was triggered
    suspectNameProbabilityOnNoAlarm = 1;            // probability in percent for thief's name to be added to wanted list if vehicle alarm was not triggered

    plateNumberProbability = 90;                    // probability for plate number to be added to wanted list

    alarmDurationMinMax[] = {10,30};                // min and max duration in seconds for alarm

    specialistTimeFactor = 0.7;                     // time factor for specialists, lower means faster
    specialistSuccessFactor = 1.5;                  // probability factor for success for specialists

    canPickCar = 1;                                 // make car locks pickable; 0/1
    carTimeFactor = 1;                              // time factor for picking car locks, higher means lockpicking takes longer
    carSuccessFactor = 1;                           // probability factor for successfully picking car locks, higher means more likely to succeed

    canPickMotorcycle = 1;
    motorcycleTimeFactor = 0.7;
    motorcycleSuccessFactor = 1.5;

    canPickBoat = 1;
    boatTimeFactor = 1;
    boatSuccessFactor = 1;

    canPickTank = 0;
    tankTimeFactor = 5;
    tankSuccessFactor = 0.5;

    canPickHelicopter = 0;
    helicopterTimeFactor = 2;
    helicopterSuccessFactor = 0.9;

    canPickPlane = 0;
    planeTimeFactor = 3;
    planeSuccessFactor = 0.7;
};

Object Variables

Additionally to the aforementioned global settings, there are some variables that you can set on objects to configure how they interact with this module. All variables have the prefix grad_advancedLockpicking.

(unit namespace) canLockpick

Allows a unit to lockpick even when canLockpickDefault is set to false.

_unit setVariable ["grad_advancedLockpicking_canLockpick",true];

(unit namespace) isSpecialist

Sets a unit to specialist who uses specialistTimeFactor and specialistSuccessFactor.

_unit setVariable ["grad_advancedLockpicking_isSpecialist",true];

(vehicle namespace) baseLockpickTime

Sets base lockpicking time value in seconds for specific vehicle. Overrides baseLockpickTimeDefault. Type based time factors (car, boat, ...) no longer apply.

_vehicle setVariable ["grad_advancedLockpicking_baseLockpickTime",20];

(vehicle namespace) baseSuccessProbability

Sets base success probability value in percent for specific vehicle. Overrides baseSuccessProbabilityDefault. Type based success factors (car, boat, ...) no longer apply.

_vehicle setVariable ["grad_advancedLockpicking_baseSuccessProbability",50];

(vehicle namespace) alarmOnSuccessProbability

Sets base alarm probability value in percent for specific vehicle. Overrides alarmOnSuccessProbabilityDefault.

_vehicle setVariable ["grad_advancedLockpicking_alarmOnSuccessProbability",80];

(vehicle namespace) wantedListOnSuccessProbability

Sets adding to wanted list on success probability value in percent for specific vehicle. Overrides wantedListOnSuccessProbabilityDefault.

_vehicle setVariable ["grad_advancedLockpicking_alarmOnSuccessProbability",80];