Get ready for the release of Arma Reforger / Arma 4 with these resources.

Arma Reforger / Arma 4 is due to release sometime tomorrow I hope. There are quite a few resources around concerning the DayZ Enscript scripting language that is used by the Enfusiontm Engine. Here is the scripting guide for Dayz. https://community.bistudio.com/wiki/DayZ:Enforce_Script_Syntax. The syntax is rather like C# or C++, but it should not be too … Read more

Miscellaneous programming tricks with C.

This is a very simple Hello World program in C. int main() { write(1, "Hello World\n", 14); }int main() { write(1, "Hello World\n", 14); } Counting how long a text string is. #include <stdio.h> #include <string.h> #define MSG "Hello Doctor, let’s get back to the TARDIS!" int main() { int g; g = strlen(MSG); if … Read more

Very useful Arma 3 scripting samples for making a nice mission easily.

To set the arsenal action on all crates in your base, use this code. This will give the Arsenal action to the Cargo Net Box item. Put this in the initPlayerLocal.sqf file. { [_x, "Open the Arsenal", "a3\Ui_f\data\GUI\Cfg\RespawnRoles\assault_ca.paa", "a3\Ui_f\data\GUI\Cfg\RespawnRoles\assault_ca.paa", "(_this distance _target < 6) && (isNull (findDisplay 162))", "isNull (findDisplay 162)", {}, BIS_holdActionProgress, {["Open",true] call … Read more

Start a mortar strike on an enemy position in Arma 3.

This simple code will start a mortar strike on an enemy position when a vehicle is destroyed. car1 addEventHandler [ ‘Killed’, { _bombardment = [BIS_Mortar,getMarkerPos "mk2","8Rnd_82mm_Mo_shells",100,24,10] execVM "a3\missions_f_exp\showcases\showcase_endgame.tanoa\scripts\firesupport.sqf"; }];car1 addEventHandler [ ‘Killed’, { _bombardment = [BIS_Mortar,getMarkerPos "mk2","8Rnd_82mm_Mo_shells",100,24,10] execVM "a3\missions_f_exp\showcases\showcase_endgame.tanoa\scripts\firesupport.sqf"; }]; Name the mortar BIS_Mortar, then place a marker on the location to be shelled, named … Read more

Arma 3 scripting tricks and samples for making missions.

Detect if a player has the APEX DLC. if (395180 in getDLCs 1) then { (_this select 0) ctrlsettext ‘\a3\Ui_f\Data\Logos\arma3apex_white_ca.paa’; };if (395180 in getDLCs 1) then { (_this select 0) ctrlsettext ‘\a3\Ui_f\Data\Logos\arma3apex_white_ca.paa’; }; Remove all NVG goggles and weapons from enemies. { if (side _x == east) then { _x unassignItem "NVGoggles"; _x removeItem "NVGoggles"; … Read more

Very useful Arma 3 code for mods and missions.

A code sample that creates a weapon box with some ammo. Just change the class names to add a weapon of your choice to this box. class cfgVehicles { class Thing; class ThingX; class ReammoBox; class Strategic; class EAST_Box_Base; class NATO_Box_Base; class Railgun_Transport_Box: EAST_Box_Base { scope = 2; vehicleClass = "Ammo"; displayName = "Railgun Box"; … Read more

Very interesting and useful Arma 3 scripting commands for multiplayer missions.

Arma 3 scripting samples for creating MP missions This code sample inserted into the initServer.sqf will protect buildings 900m around your base from destruction by retards with a grudge against your server. { _x allowdamage false; } foreach (nearestTerrainObjects [crat99,["house"],900]);{ _x allowdamage false; } foreach (nearestTerrainObjects [crat99,["house"],900]); Name an object crat99 and then place this … Read more

Very useful C code samples. These might be very useful to someone.

Some very useful code samples for any C programmer. These might give you some new ideas. Print the time and date with C. #include <time.h> // For time function (random seed). #include <stdio.h> // For extra functions. printf(). #include <stdlib.h> // For getenv();   #define format "The time and date is: %A %d %B %Y. … Read more

Even more very useful Arma 3 script samples.

Some very good Arma 3 scripting samples Put this code into the init of a crate to create an Arsenal crate. this addaction ["Open Virtual Arsenal", { ["Open",true] call BIS_fnc_arsenal; }];this addaction ["Open Virtual Arsenal", { ["Open",true] call BIS_fnc_arsenal; }]; This code in the initPlayerLocal.sqf and onPlayerRespawn.sqf files will remove stamina and weapon sway. player … Read more

Iptables samples. Very good ways to filter network traffic.

Sample Iptables configurations A sample iptables output that I am using on an OpenVPN server to allow Internet traffic to be passed through it. ubuntu ~ $ sudo iptables-save # Generated by iptables-save v1.4.21 on Wed Aug 2 22:19:48 2017 *filter :INPUT ACCEPT [2654934:1228315333] :FORWARD ACCEPT [31023:17433690] :OUTPUT ACCEPT [2475842:555885003] COMMIT # Completed on Wed … Read more

Some useful bash shell scripts for the Linux user.

This function will allow your computer to speak. function shellspeak() { mplayer "http://translate.google.com/translate_tts?tl=en&q=$(echo $@ | sed ‘s/\s/+/’)" > /dev/null 2>&1; }function shellspeak() { mplayer "http://translate.google.com/translate_tts?tl=en&q=$(echo $@ | sed ‘s/\s/+/’)" > /dev/null 2>&1; } A script that will change all files in a directory to lowercase filenames. function lowercase() # move filenames to lowercase. { for … Read more

Wrapping the printf() statement onto multiple lines in C and some other useful samples.

This code sample shows how we are wrapping a printf() statement onto multiple lines using backslashes. #include "stdio.h"   #define hello "Hello World."   int main(int argc, char* argv[]) { printf("This is a very long sentence we are handing down\n"\ "Mr smith, do you have anything to say for yourself"\ "?");   printf("%s\n", hello);   … Read more

Miscellaneous Perl programming information. How to use for loops and printing HTML properly.

Opening a folder and listing the contents, and not listing certain files. This is the Perl code I was using on my very old Tripod.com website. opendir(DNAME, "$folder") || die "I cannot open the requested directory $folder \n $!"; @dirfiles2 = readdir (DNAME); @dirfiles2 = sort(@dirfiles2); foreach $x2 (@dirfiles2) { if ($x2 eq ".") { … Read more