Skip to content

Instantly share code, notes, and snippets.

@Drofseh
Drofseh / icon_viewer.sqf
Created April 10, 2025 17:07 — forked from HallyG/icon_viewer.sqf
Arma 3 Icon Viewer
fn_iconViewer = {
params [
["_mode", "", [""]],
["_args", [], [[]]]
];
if (!hasInterface) exitWith {};
disableSerialization;
private _fnc_GRID_X = {
@Drofseh
Drofseh / familar_weapons.sqf
Last active March 23, 2025 01:19
This script gives a penalty when using unfamiliar weapons which goes away with enough use
// ====== About ======//
/*
This script gives various penalties when using unfamiliar weapons which goes away with enough use.
Copy and paste everything here into your init.sqf file.
*/
//====== General Settings ======//
/*
Accuracy penalty represents how unfamiliar the character is with aiming the weapon.
Each shot fired reduces the effect of the accuracy penalty.
@Drofseh
Drofseh / debug_reticle.sqf
Created February 23, 2025 00:54
Debug Reticle, Zoom, Magnification, Man Height
// Debug Reticle, Zoom, Magnification, Man Height
// This script can be used from debug console to draw a reticle with correct mildots depending on the current magnification
// Also displays magnification level as well as bars for man height at 200, 400, 600, and 1000m
// Originally by Commy2
private _debugReticle = uiNamespace getVariable ["CBA_debugReticle", displayNull];
if (!isNull _debugReticle) exitWith {
"CBA_debugReticle" cutText ["", "PLAIN"];
false
@Drofseh
Drofseh / init.sqf
Last active January 11, 2024 06:47
Random Arty Barrages
supportFire_numberOfBatteries = 1;
supportFire_numberOfGunsPerBattery = 5;
supportFire_shotsPerBatteryPerBarrage = 10;
supportFire_timeBetweenBarrages = 30;
supportFire_shellsHE_Type = "Sh_155mm_AMOS";
supportFire_shellDispersion = 100;
supportFire_randomPositions = [
getMarkerPos "marker_randomArty_1",
getMarkerPos "marker_randomArty_2",
@Drofseh
Drofseh / dro_FNC_Bleedout_Prevention.sqf
Last active September 5, 2023 01:00
Prevent a Unit from Bleeding Out in Ace Medical
dro_FNC_Bleedout_Prevention = {
params ["_unit", ["_wakeup", false, [true]]];
if (!alive _unit || {_unit getVariable ["dro_endBleedoutPrevention", false]}) exitWith {false};
if (_unit getVariable ["ACE_isUnconscious",false]) then {
private _bloodVolume = _unit getVariable ["ace_medical_bloodVolume", 6];
if (_bloodVolume < 3.5) then {
[_unit, false] call ace_medical_fnc_setUnconscious;
_unit setVariable ["ace_medical_bloodVolume", ([3.5, 5.2] select _wakeup)];
@Drofseh
Drofseh / add ace medical action to draw blood.sqf
Last active September 5, 2023 01:05
Draw 250 mL of blood from a target and place a 250 mL bag of blood in the player's inventory.
//Put this code in the unit's init box in the editor, you will have to remove the comments
private _statementDrawBlood = {
if (!alive this) exitWith {
[
["You can't draw blood from a corpse."],
true
] call CBA_fnc_notify;
};
@Drofseh
Drofseh / Normalize Arma3 headless client positionsqf
Last active September 5, 2023 01:25
Normalize Arma3 headless client position
/*
* Author: Mark Ruffner (AACO)
* Shamelessly stolen from Bourbon Warfare
* https://github.com/BourbonWarfare/POTATO/blob/master/addons/miscFixes/XEH_serverPostInit.sqf#L13-L73
*
* Recursive function to normalize the position of the HC modules in a mission.
* This improved the performace of the AI, as the farther away the modules are from the players the fewer updates they get about the players.
* missionNamespace setVariable ["dro_updateHCPosition", true] to stop the function from continuing to run
*
@Drofseh
Drofseh / init.sqf
Last active February 28, 2022 01:50
Add ARCOMM chat commands to briefing
player createDiarySubject ["Chat Commands","Chat Commands"];
private _ARCOMM_Chat_Commands = ["Chat Commands", ["ARCOMM Default Commands","
<br/><font color='#70db70' size='16'>#loadout</font>
<br/>Syntax 1
<br/><font color='#FF8C00'>#loadout &lt;role&gt;</font>
<br/>
<br/>Applies the given role loadout to the local player. Roles are the names of loadouts in the player's faction's loadout file. Eg. #loadout aar for assistant automatic rifleman.
<br/>
<br/>Syntax 2
@Drofseh
Drofseh / dro_FNC_respawnVehicle.sqf
Last active September 5, 2023 01:32
Vehicle Respawn function to replace BI Vehicle Respawn Module
/*
* Author: Drofseh & Karel Moricky
*
* Description:
* Set vehicle respawn, compatible both with SP and MP.
* Rewrite of buggy BI Vehicle Respawn Module
*
* Parameter(s):
* 0: OBJECT - vehicle
* 1: NUMBER - respawn delay in seconds (default is 0)
@Drofseh
Drofseh / dro_FNC_checkVehicleAmmo.sqf
Last active September 5, 2023 01:39
Add action to check remaining ammunition in vehicle
/*
Function is listed first here, adding the action to all vehicles is at the bottom.
This can all just go in init.sqf
*/
/*
* Author: Drofseh
*
* Description:
* Add an ACE action to check the amount of ammo in a vehicle's magazines.