Jump to content
Sign in to follow this  

ArmA2 Extended Dll

Recommended Posts

ArmA2Ext 1.0.1

Extends standard ArmA2 scripting capabilities. See callExtension and Extensions for details.

ArmA2Ext is an engine that will allow you to develop your own extensions and create derivative works.




  • Allows to create custom extensions that you need
  • High performance of ArmA2Ext's engine
  • Developing on the fly without ArmA2 restarting
  • Supports .NET Framework 2.0/3.0/3.5/4.0


 string = "ArmA2Ext" callExtension "Command";
object = call compile ("ArmA2Ext" callExtension "Command");

Recommended Command format:

Args passed to the Call function and can be parsed as you want.

ArmA2Ext commands

 "Reset" - reloads all ArmA2Ext extensions on the fly
"Version" - returns ArmA2Ext version
"Clr" - returns the CLR version
"Init" - initializes the library (optional, first initialization can be used in init.sqf for preventing [url="http://en.wikipedia.org/wiki/Lazy_initialization"]Lazy initialization[/url])


ArmA2Ext installs as Addon Mod. Copy @ArmA2Ext into your ArmA 2 installation directory. Add @ArmA2Ext mod folder into startup parameter "-mod":

 "C:\Program Files\Bohemia Interactive\ArmA 2 Operation Arrowhead\Expansion\beta\arma2oa.exe" -beta=Expansion\beta;Expansion\beta\Expansion -mod=@ArmA2Ext -showscripterrors 

You can enable .NET 4.0 support in ArmA2Ext.ini


".\@ArmA2Ext\ArmA2Ext.ini" - configuration file for ArmA2Ext

".\@ArmA2Ext\Bin\" - binary assemblies

".\@ArmA2Ext\Sources\" - source code

".\@ArmA2Ext\SDK\" - files used to compile assemblies

"c:\Users\<user>\Documents\ArmA 2\ArmA2Ext\Cache\" - cache folder for assemblies compiled from sources

"c:\Users\<user>\Documents\ArmA 2\ArmA2Ext\Logs\" - logs folder


Requires .NET Framework 3.5 Service Pack 1 or .NET Framework 4, ArmA2 1.61.

You can download ArmA2 latest beta patch, I used 91138.

Microsoft Visual C++ Redistributables are not needed.



* New: Added support for .NET Framework 4.0

* New: Configuration file ArmA2Ext.ini

* New: Commands: "CLR"


* First public release

Information for developers

Extensions can be developed in Notepad or in Visual Studio (you must include files from ".\@ArmA2Ext\SDK\"), ArmA2Ext supports both variants of use. Binary assemblies should be placed into ".\@ArmA2Ext\Bin\" directory, source codes into ".\@ArmA2Ext\Sources\".


See Missions folder in ArmA2Ext.zip.


ArmA2Ext is a closed source project. See License.txt for details.

Edited by Voyager[NO]

Share this post

Link to post
Share on other sites

Cool tool, Voyager!

One example of use.

Suppose I want to record the coordinates of the unit.

Initially, when you load the mission in the file Init.sqf (Init.sqs), write

_initialized = ("ArmA2Ext" callExtension "init");
hint format ["Init: %1",_initialized];

Next, somewhere in the script call

a=call compile ("ArmA2Ext" callExtension format["MyExample.SavePath %1",_path]);

where in _path - point array (formatted looks like "[[1,2,3],[1,2,4]]").

MyExample.SavePath looks like this:


using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using ArmA2;

namespace MyExample {
public class SavePath: IExtension {
	public string Call(string args) {
		StringBuilder builder = new StringBuilder();
		builder.Append(args.Trim());// trim whitespaces from " [[1,2,3],[1,2,4]]"
		File.AppendAllText(@"e:\temp\path.txt", builder.ToString());// @ needed or write double slash "e:\\temp\\path.txt"
		return builder.ToString().Length.ToString();

File SavePath.cs may lie in any folder inside the @ArmA2Ext\Sources\ - engine will find it by namespace in file (MyExample).

Arrays of coordinates will be found in the file e:\temp\path.txt

Edited by YSandro

Share this post

Link to post
Share on other sites

YSandro, thx for example!

any chance of getting a Open Source version of the dll

ArmA2Ext is a closed source project (I use some technologies in my other projects). For more information about syntax and using see callExtension and examples.

Edited by Voyager[NO]

Share this post

Link to post
Share on other sites

Great work. It will be very useful while developing addons. I'm surprised that Extended Dll miss interested by community.

Share this post

Link to post
Share on other sites

Unfortunately I'm not skilled enough to use it! I'm certainly watching it closely however to see what you coding gurus can do !

Share this post

Link to post
Share on other sites

Good tools! But if I run thread or realtime function in constructor class - arma 2 is freezing. Because of this, I can not keep a constant connection to the database in the class.:( How fixed it?

Share this post

Link to post
Share on other sites

Awesome! Works even with the newest frameworks and os unlike Arma2NET :) thanks a lot!

Share this post

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now
Sign in to follow this