Results 1 to 7 of 7

Thread: ArmA2 Extended Dll

  1. #1

    Lightbulb ArmA2 Extended Dll

    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.
    Download
    http://game.vgrsoft.com/download

    Features
    • 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


    Syntax
    Code:
     string = "ArmA2Ext" callExtension "Command";
     object = call compile ("ArmA2Ext" callExtension "Command");
    
     Recommended Command format:
     Namespace.FunctionWithArgs
    Args passed to the Call function and can be parsed as you want.

    ArmA2Ext commands
    Code:
     "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 Lazy initialization)
    Install

    ArmA2Ext installs as Addon Mod. Copy @ArmA2Ext into your ArmA 2 installation directory. Add @ArmA2Ext mod folder into startup parameter "-mod":
    Code:
     "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

    Structure
    ".\@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
    Requirements

    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.

    Changelog
    Spoiler:


    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\".

    Examples

    See Missions folder in ArmA2Ext.zip.

    Licensing

    ArmA2Ext is a closed source project. See License.txt for details.
    Last edited by Voyager[NO]; Jul 13 2012 at 11:16.

  2. #2
    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
    Code:
    _initialized = ("ArmA2Ext" callExtension "init");
    hint format ["Init: %1",_initialized];
    Next, somewhere in the script call
    Code:
    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:
    Code:
    //@ArmA2Ext\Sources\SavePath.cs
    
    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]]"
    			builder.Append(";\n\n");
    			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
    Last edited by YSandro; Jul 11 2012 at 16:01.

  3. #3
    Gunnery Sergeant armatech's Avatar
    Join Date
    Jan 11 2007
    Location
    United Kingdom
    Posts
    505
    any chance of getting a Open Source version of the dll

  4. #4
    YSandro, thx for example!

    Quote Originally Posted by armatech View Post
    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.
    Last edited by Voyager[NO]; Jul 13 2012 at 11:54.

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

  6. #6
    First Lieutenant Kremator's Avatar
    Join Date
    Jun 8 2007
    Location
    Cambridge, UK
    Posts
    5,076
    Unfortunately I'm not skilled enough to use it! I'm certainly watching it closely however to see what you coding gurus can do !

  7. #7
    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?

Similar Threads

  1. Arma2 OA CO Server always shut down (ntdll.dll error)
    By Crunch07 in forum ARMA 2 & OA - TROUBLESHOOTING
    Replies: 1
    Last Post: Feb 4 2012, 10:49
  2. ARMA2 Demo working fine, then suddenly crashes with a nvidia dll error.
    By zeep in forum ARMA 2 & OA - TROUBLESHOOTING
    Replies: 3
    Last Post: Jul 1 2009, 14:29
  3. ArmA Extended Dll
    By Voyager[NO] in forum ARMA - ADDONS & MODS: COMPLETE
    Replies: 30
    Last Post: Oct 16 2007, 18:35

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •