Arma2NET is a wrapper used for communicating between managed code and SQF code used in the game Arma 2, adding significant functionality to SQF scripting.
Arma2NET gives you the ability to use the .NET Framework from Arma 2. It is designed to be an alternative for those who don't want to use C or C++ with callExtension or Java and the JVM.
There is a wide range of language implementations that target the Common Language Runtime, so you can use C#, Python, VB.NET, F#, Ruby code and more, directly from Arma 2.
A list of languages that you can use can be found here.
- Call managed functions and manipulate the return value from SQF.
- Check the status of long-running managed functions from SQF using callbacks.
- Convert SQF literals (lists, strings, numbers etc) to .NET objects and back.
- Extend the functionality of Arma2NET by writing plugins written in any language that compiles to .NET bytecode, such as C#, F# or VB.NET.
- CommandLine (get command line used to start Arma 2)
- DateTime (get system time/UTC time)
- IronPython code executor/evaluator. Run .py script files and more from your system.
public class MyPlugin : MethodAddIn
public string Hello()
return "Hello world!";
_result = call compile ("Arma2Net.Unmanaged" callExtension "MyPlugin [Hello]");
Arma2NET 2.2 (23 Aug 2012):
- Arma2NET will now gracefully handle appdomain errors, adding partial support for .NET 4.5 and Windows 8 as a result.
- Added support for the Mono runtime as an alternative to .NET entirely.
- Improved logging functionality.
Arma2NET 2.1.1 (7 Aug 2012):
- Fixed an issue with Utils.FileVersion and Utils.Version throwing a FileNotFoundException.
- Improved the behaviour of the plugin system, and added a new Reload command.
- Improved the responsiveness of Arma2NET Explorer.
Arma2NET 2.1 (28 Jul 2012):
- Fixed an issue where addin dependencies were not loading correctly.
- Fixed a non-fatal error sometimes caused when retrieving the list of loaded addins.
- Improved the appearance of Arma2NET Explorer, and added a "Run History" feature.
- Improved the log files - addin details are now in a nice table.
- Added XML documentation file for use with IntelliSense, to make addin development easier.
Arma2NET 2.0 (22 Jul 2012):
- Performance boost, including an improvement in startup time.
- Removed sandboxing because people just override it with -arma2netdev anyway, defeating the purpose of having it.
- Plugins can now be updated and reloaded at runtime with the new custom plugin system. This should also work with .NET 4.5 RC.
- Removed scripting system for now because of issues with resolving external references.
- Removed Settings.yaml and files and folders which are no longer needed.
- Fixed culture issues - Format.ObjectAsSqf was not using the invariant culture properly.
- PythonPlugin now targets IronPython 2.7.3, from 2.7.2.
- These are breaking changes - all plugins will need to retarget Arma2NET.
Arma2NET 1.13 (17 Jul 2012):
- Explorer was wrongly displaying an error box when an evaluator result returned null.
- Improved the accessibility of Explorer - added the ability to cycle through the command history using the up/down arrow keys, and the command history is now persistent.
- Format class fixes - fixed some issues with TrySqfAsString.
- Improved stability and crash prevention - Arma2NET will no longer die if Settings.yaml can't be loaded or if NLog.dll.nlog can't be loaded.
Arma2NET 1.12 (11 Jul 2012):
- Some public API changes and design improvements. The old API is now deprecated.
- Added code inclusion support to the scripting system, and environment variables are now expanded in //reference.
- Functions and IsFunction behaviour improved.
- Arma2NET Explorer Evaluator tab now emulates Arma2Net.Unmanaged.dll.
- Arma2NET Explorer Evaluator tab results are now selectable and copyable.
Arma2NET 1.11.1 (26 Jun 2012):
- Fixed issue where script files were being read wrongly.
- Renamed #r directive to //reference so that files can compile normally.
Arma2NET 1.11 (25 Jun 2012):
- Added a scripting system, allowing C# code to be modified at runtime. Errors and warnings are stored in the Arma2NET log.
- Overhauled the Arma2Net.Managed.Expressions namespace.
- Format.SqfAsDouble now uses an invariant culture to improve portability.
- Improved readability of logs and added additional information.
Arma2NET 1.10 (6 Jun 2012):
- Settings.yaml is now created by the installer.
- Log configuration file option added to Settings.yaml.
- Arma2NET evaluator added to Arma2NET Explorer, providing the ability to test code without needing to start the game.
- Fixed an issue where Arma2NetMethodAddIn methods with UnformattedResultAttribute were sometimes causing a NullReferenceException.
- "<NULL-object>" from the game is now treated as null by Arma2NET.
- Improved error messages for plugins using Arma2NetMethodAddIn.
Arma2NET 1.9 (21 May 2012):
- New alternative function call syntax, e.g. ["DateTime", ["now", "HH:mm:ss"]]
- Added outputSize support to Arma2NetMethodAddIn and friends.
- Arma2NetMethodAddIn now optionally formats results as SQF.
- New YAML settings file that can be used to configure Arma2NET.
- The list of plugins to automatically activate on Arma2NET startup can now be configured through YAML.
- The Arma2NET plugin whitelist can now be configured through YAML.
- Added the ability to play a beep sound when Arma2NET is activated. This can be configured through YAML.
- Sharpened text in Arma2NetExplorer.
- Dropped installer banner images to reduce file size.
- Improved return result logic further from version 1.8.
- UtilitiesPlugin and WeatherPlugin dropped from Arma2NET and are now auxiliary plugins.
- Dropped FunctionArgumentsInvalidException in favour of the standard .NET exceptions.
- Error messages vastly improved.
Arma2NET 1.8 (9 May 2012):
- Added a utility application which can be used to explore addins.
- New function 'VersionOfAddIn' which will return the version of the specified addin.
- Logging directory moved to AppData/Local/Arma2NET by suggestion.
- Improved PythonPlugin to use the standard library and user-provided .py files. See the wiki for more details.
- Fixed a minor logic error in returning the result back to Arma 2.
- Fixed an issue where SQF arrays inside other SQF arrays weren't being converted properly.
- Fixed an issue where the 'Functions' function wasn't actually returning a list of functions.
Arma2NET 1.7.1 (1 May 2012):
- Fixed bug where all auto-activated plugins were ignoring Developer mode.
Arma2NET 1.7 (30 Apr 2012):
- New function CompareVersion to compare versions, e.g. is version 18.104.22.168 higher than 22.214.171.124?
- Improved the plugin activation/deactivation system, where only one plugin is activated as needed.
- Overhauled SQF/object formatting.
- Fixed a couple of bugs related to sandboxed plugins.
- Internal code and design improvements.
Arma2NET 1.6 (21 Apr 2012):
- Arma2NET consolidated into a single modfolder, improving portability and allowing Arma2NET to be used with Arma 2 1.61 stable. arma2oa.exe.config and arma2oaserver.exe.config removed.
Arma2NET 1.5 (19 Apr 2012):
- Arma2NET log now displays the correct version.
- Arma2NET will now return its version if an empty string is passed to it via callExtension.
- New Bridge.GetDeveloperMode() and Bridge.GetVersion() methods.
- New plugin type Arma2NetLongOutputAddIn.
- Installer now checks for an installation of the .NET 4 Client Profile before continuing.
- Arma2NetMethodAddIn now throws the correct exception if matching parameters can't be found.
- Added arma2oaserver.exe.config for use with servers.
Arma2NET 1.4 (10 Apr 2012):
- New command-line parameter "-arma2netdev" can be used to disable sandboxing for development purposes.
- Arma2NET Logs are now stored with the main ArmA 2 logs, in the AppData\Local\ArmA 2 OA\Arma2NET Logs folder.
- Improved input checking for DateTimePlugin and WeatherPlugin.
- Internal Arma2NET improvements.
Arma2NET 1.3 (30 Mar 2012):
- Small string formatting changes.
- Finalised the Arma2NET API.
- Plugins can now have code execute when they are deactivated.
- Logs are now archived into a Logs folder after they reach a day old. Logs are stored for 7 days. This behaviour can be changed by editing NLog.config. Some minor logging performance improvements.
Arma2NET 1.2 (14 Mar 2012):
- Added the ability to cancel long-running functions.
- Added the ability to start the CLR without calling an Arma2NET function at the same time, to allow the CLR to be started during mission loading etc.
- Added the ability to reactivate plugins, so missions for example will be able to start cleanly, without interference from the previous mission.
- Added a SQF code/expression generator.
- SQF arrays are now represented as a ReadOnlyCollection rather than a List.
Arma2NET 1.1 (2 Mar 2012):
- Arma2NET now runs foreign/untrusted plugins in a sandboxed environment.
- PythonPlugin now runs all Python code in a sandboxed environment.
- String manipulation functions have been added.
- The plugin-writing API has been simplified.
Interesting! So could this be used to do something like have a dedicated map interface, or integrate with working gauges in the vehicles (like Flight Sim)?
Yeah, you could create an Arma2NET plugin with a GUI and a map of the terrain on a second monitor using WPF. Arma 2 would simply call the plugin's function with the map data and the data would be plotted on the second monitor.
If the MFDs have an interface an Arma2NET plugin could connect to, it could marshal data back and forth between Arma 2 and the MFDs. Arma2NET/callExtension are very powerful but are hindered by the fact you can only send/receive text data at the moment. That said, I haven't tried anything of this nature yet so the only real way to know is to try it...