Tuesday, April 28, 2009

Delays

Sorry for the update delays, a combination of work taskings and personal projects has taken over my time. I'm working on expanding the topographical map tutorial with information on a new feature that I will make available from here. It should be a much needed addition to those of you looking to use topographical maps due to end-user criticism of the "cartoonish" game map.

I also have another work in progress that should set topographical maps to the default viewing mode when a user starts VBS2 as this has been identified by some as preferred, as in most cases there really is only one topographical map for each terrain. This is also to counter the issues you may experience when introducing individual soldiers to useage of the topo maps (toggle of sat image/default map).

On top of that I'm also not far off releasing a new menu screen, which rolls mantis #0001945 into an updated user interface that is more customisable in that it allows site administrators to change the background, their "unit" logo and also add their own message to the main menu, NB: Images will need to be converted to paa format and be of certain dimensions, all I'm doing is making a template that puts the image files in an external location to be easily modified.

All addons released from here will be EBO'd, standard release will be YYMEA, all other customers, e-mail jamie dot coombs at gmail dot com . I will then make arrangements to provide the addons in your customer key, in rare cases this may not be possible.

Once again my apologies, but it will be well worth the wait. Additionally I'm polishing off a tutorial scenario I was to release last week, this got delayed because it wasn't playing out properly for one of the testers yet on other machines it was fine, I think I've found the problem and I'll throw it out to the public for a look.

Jamie.

Wednesday, April 15, 2009

VBS2Fusion, another look at the API

Previously on this blog, I covered the VBS2 Application Scripting Interface, or ASI (here). As identified in the paper listed there, there was a need for a proper API to allow a C++ Developer more access and control over VBS2. While details are sketchy, there are a few things we know for certain, one of those being that VBS2Fusion is a separate module that may be purchased by those looking to gain more control over the simulation. Additionally version 1.0 is set to give us an extension to the ASI, with version 2.0 delivering even greater control beyond that.

So what is the benefit to the end-user? it simply allows the decision makers a greater choice when outsourcing development. The API requires less of an understanding of the VBS2 scripting language, instead requiring someone with a sound knowledge of C++. This may sound like a negative, in some respects it may be, but for the most part it allows almost any C++ developer to get in the guts of the simulation. The limitation in the ASI is that, while it allowed the interface between external applications and the simulation, it required that the programmer know and understand the VBS2 scripting language. ASI applications had to use simple script commands, and generally to get more bang for your buck, a script in the scenario or in an addon was required to back up the ASI functionality.

The API now allows the extension of VBS2 through various C++ libraries (some of which opensource), to deliver more functionality. Additionally there also seems to be the implication that VBS2Fusion will allow a greater degree of control over VBS2 Agents adressing a shortcoming in the ASI, which relied on scripted move/doMove commands. A perfect example of what can be done with the API is VBS2 Fires, effectively a heavyweight desktop based call-for fire trainer, which is extensible through hardware as seen in the full-blown call-for fire trainer. VBS2Fires offers an external interface to the instructor allowing them to provide cost effective desktop based training to trainees. The module provides highly detailed exterior and terminal ballistics models, that weren't as easy to simulate until the API came about. This allows you to put the FO into play in the combined arms environment, providing them more opportunity to work directly with units they may be embedded with.

Other possibilities include greater potential for external hardware interfaces that interact directly with the simulation. There would be very few reasons that many crew procedural trainers on the market aren't capable of running VBS2 for visualisation, and as a result allowing direct integration into the combined arms environment VBS2 provides. This goes well beyond even the AVRS capability which has seen success in the Australian Army. Beyond the hardware I'll borrow one example from the flight simulator community, VBS2Fusion may allow access to external weather data to update conditions seen on the ground in VBS2 itself.

To the soldier, and their instructors, this just means that simulation has a chance to have a greater share of the pie in the training continuum. Higher up, VBS2 will have more capability through the API and to organisations with C++ Developers or capable of outsourcing their development, there will be potential there to expand the functionality well beyond what has been seen so far. VBS2Fires is literally just the tip of the iceberg, yet having said that, it is quite an impressive demonstration of the ability of simulation to satisfy a training need.

Jamie.

Tuesday, April 14, 2009

Traffic Script Revisited

Well this following script may be considered flogging a dead horse, but it illustrates a few key points about using the format command together with iteration. Below is the script, and the init.sqf, both of which intended to be saved to your PC.

//init.sqf
sleep 0.1; // wait until the sim is really started (post-brief)
[car1, "M", "NOCYCLE"] execVM "PathA.sqf"; // exec script for car1 on path M (e.g. m1, m2 , m3, m4), no cycle.


// PathA.sqf
// Version 1.01a (31 OCT 08)
// by Jamie Coombs
// Purpose: To facilitate vehicle movement by markers on various terrains, allows ability to cycle.
// Useage: [car, prefix, "NOCYCLE"] execVM "PathA.sqf";
// car - the name of the car as it is in the OME/RTE
// prefix - the marker prefix for the pre-set track, e.g. if your marker series is named A1 thru A20 the prefix is "A". The vehicle will cycle through all 20 markers
// "NOCYCLE" - Optional switch, stops vehicles cycling through markers once the end is reached, by default the vehicles cycle the waypoints.
// TODO: Add further error handling, with hint and warning messages.

_car = _this select 0; // select the first index as the car name.
_track = _this select 1; // Marker track prefix e.g. "A"

_markArr = markers; // All markers in current scenario returned assigned to var as array (_markArr)

// Don't allow damage, just in case, to ensure that civilian cars keep moving to maintain density.
_car allowDammage false;

_i = 1;

// always loop through the following.
while {true} do {
_car setSpeedMode "NORMAL"; // set the speed mode to normal to prevent bad driving.
_wp = format ["%1%2", _track, _i]; // put _track and _i together to create our next WP name
// if the waypoint marker is in the scenario, then go to it!
if (_wp in _markArr) then {

//DEBUG?
if ("DEBUG" in _this) then { hint _wp;};

// Check car distance to waypoint Assign to a variable.
_cond = {(_car distance (getMarkerPos _wp)) <= 80}; // Move to the waypoint.
 _car Move (getMarkerPos _wp); // Wait for the condition to be true/satisfied (car within 80m of _wp) 
waituntil _cond; // Check distance again, reassign the variable 
_cond = {(_car distance (getMarkerPos _wp)) <= 10};
 // Slow down to take the turn! 
// TODO: judge angle between car, _wp and (_wp+1) and determine if slowing down is necessary 
_car setSpeedMode "LIMITED"; 
// Wait for the condition to be true. 
waitUntil _cond; 
// increase _i by one 
_i = _i+1; 
// sleep a bit 
sleep 0.1; 
// cycle again 
} else {
 // _wp is not in the mission as a marker 
if (_i == 1 || "NOCYCLE" in _this) then { exitWith {};}; // Exit, we're done for now. No next _wp OR potential error, but I'm a script, what do I know? 
_i = 1; // if no problems and we're cycling, start the path again! from M1 
};
 }; // EOF

You can get the associated documentation for this here: PDF . To test the script, create a new scenario with a car and four markers, named A1, A2, A3 and A4. Name the car as you wish, put down a separate player unit (to be you viewing the scenario). Alter the supplied init.sqf above as appropriate.

Questions? Please use the comment feature, all responses will be via the comment feature so anyone else having trouble may get their solution there as well.

Jamie.

VBS2 Online Help

In response to the repetition of queries on the official forums I've decided to create a set of videos on how to use the online help facilities provided by BIA to easily find the documentation you're looking for. This is the first such video, please ignore the background audio, my lounge room isn't exactly a recording facility!

What I will cover very briefly is how to use the onlinehelp search function, because 50% of forum queries can be answered by searching this documentation, and other provided documentation with VBS2.






Below is a list of documentation on VBS2 as well as Armed Assault that may prove helpful to newcomers and veterans alike, in addition I've included a list of hardware vendor websites that include drivers, as well as a download location for DirectX 9.0c straight from Microsoft, these drivers should only be used in the event that the VBS2 driver install fails, or you experience graphical issues with your nVidia or ATi graphics card. I have not included any resource that is restricted by forum access rights.

Homepage/News:
http://www.vbs2.com

Official Support Page:
http://virtualbattlespace.vbs2.com/inde ... &Itemid=77 -- Contains most of the links you see here, the ones I've omitted are not available to Serious Gamers due to forum access restrictions.

Online User, Editor, Administrator and other manuals (latest versions):
http://developer.vbs2.com/manuals

Online Developer Manuals (latest versions):
http://developer.vbs2.com/onlinehelp

If the manuals fail 
SEARCH the forums!:
http://support.vbs2.com/phpbb3/search.php -- e.g. "VBS2 Crashes to Desktop"

Resource sites/useful stuff:
http://www.ofpec.com/ -- General Editing, geared towards ArmA, however applicable to VBS2
http://www.kronzky.info/ -- Utility scripts for ArmA and VBS2 from BIA's own Kronzky
http://www.armaholic.com/ -- Armed Assault oriented content, however a useful reference that applies to VBS2
http://www.armedassault.info/ -- As per armaholic.
http://community.bistudio.com/wiki/ -- The official BiStudio wiki
http://community.bistudio.com/wiki/Cate ... g_Commands -- ArmA scripting commands
http://community.bistudio.com/wiki/Cate ... mands_VBS2 -- VBS2 Scripting Commands
http://www.armaholic.com/page.php?id=3782 -- Mr. Murray ArmA Editing Guide - applies mostly to VBS2 old editor [German/PDF]
http://www.armaholic.com/page.php?id=4847 -- As above [English/PDF]

Hardware Drivers (if the VBS2 supplied driver install doesn't work):
http://www.microsoft.com/downloads/deta ... laylang=en -- DirectX 9.0c Web Installer
http://www.aladdin.com/support/hasp/enduser.aspx -- HASP Drivers, you'd be after the HASP HL Device Drivers
http://www.nvidia.com/Download/index.aspx?lang=en-us -- nVidia Display drivers
http://support.amd.com/us/gpudownload/Pages/index.aspx -- ATi Display drivers


I will probably add to this list as time goes on, so expect occasional updates.

Jamie.

Thursday, April 9, 2009

News from BIA

Checking the VBS2.com site this morning I noticed with the assistance of a well placed individual the announcement of some very exciting enhancements coming our way. All of which appear to be collaborations between BISim, Virtual Integrated Simulation and SimCentric. What's on the way you ask?

VBS2Fusion:
Finally an API allowing programmatic access to the VBS2 core, allowing a C++ programmer to influence scenarios in real time beyond the scope of the ASI. This will hopefully provide other AI solutions in particular, SimCentric is working on Kynapse integration (search on google, there's a search bar to the right if you CBF browsing away manually :) ).

VBS2Fires:
A software based module allowing call for fire training on various levels in the training continuum, appears to be "all arms" capable. Put your JTAC into action supporting your team, and gain a further advantage over the OPFOR, while refining your drills at the sharp end.

VBS2 Marksman MK1:
Been to the WTSS? Hate shooting pixels? Get an updated virtual range using VBS2 for visuals!

VBS2 CFFT:
Effectively VBS2Fires combined with the setup seen with the VBS2 Marksman kit giving you a 360 degree view of the battlefield, could have the potential to replace the IFOT.

For more information check here.

Keep in mind that additional license fees may apply, and obviously you'll be expected to fork out some cash for hardware, and by some cash I mean a lot of cash!

Those who are in a position to nag the movers and shakers would have probably stopped reading by this point to go start agitating to provide more options to the troops, so I'll finish up here and go continue working on the upcoming tutorials.

Jamie.

Monday, April 6, 2009

Looking toward the future

Well folks, there's one thing google's webmaster tools are telling me and that is, you're after FSM tutorials. The good news is I have one planned for release after the topographical map tutorial goes live. I will cover as much as I possibly can from basic concepts right through to the head spinning implications for useage within VBS2. Unfortunately BIA haven't released their FSM editor so at this stage it looks like it'll be a double shot of FSM learning fun. The purpose of this post simply is to say quite literally, watch this space!

As for the topographical map tutorial I'm working on final sound recording for the walk-through video, you'll get to hear my fantastic Aussie accent and perhaps some background noise (not really, I'm no voice actor!). Also I'll be putting up a number of example scenarios to compliment the standard VBS2 ones supplied by BIA to demonstrate a number of things, like how to handle dismounts and their parent vehicles, these will be fully documented to outline the key points as well.

Currently my biggest challenge is sourcing a PDF printer app, I may have to install openoffice to achieve this, once that's done there may be a flood of documents explaining all sorts of things.

Cheers for the patience, it's a busy week again, I will post new content as I get the articles to an appropriate standard.

Jamie.

Struggling to keep up to date?

If you're like a lot of people out there you find a site you like, you bookmark it and occassionally you get back to that site a few weeks later, or you completely forget about it. For this particular blog that may prove fatal, in that you may miss something important. I know a lot of the content doesn't apply to each and every one of you, however, there may from time to time be things you don't want to miss.

For the above reason I've provided the tools to help you keep up to date with this blog. Filling the sidebar are these tools to not only share this blog with others, but also to tie yourself in. The first button up top is a share link which will enable you to tell others about this blog through various social networking applications including e-mail and facebook. Below is a ticker which links to an RSS Feed which you can use an application like Mozilla Thunderbird, or Google Reader to get updates from. Finally below the clustrmap is the follower panel, an integrated Blogger widget that will enable blogger users to keep up to date with new posts on this site.

Unfortunately I don't have an update timeline, I'm not a professional blogger and updates come between work and life commitments, however I hope the content on this blog is seen as useful, and not such a pain in the rear to keep up with. It is for those very reasons I'm working hard to deliver quality content, but also making sure it's easily accessible for all.

EDIT: Almost forgot, below the blog ticker for those of you who can't use RSS, I've provided a system to subscribe via e-mail, get all the updates you need, right in your inbox!

Cheers,

Jamie.

Sunday, April 5, 2009

Application Scripting Interface

For the boss men out there, understanding the worth of a particular aspect of a simulation requires a functioning example and generally some text in the form of a paper. One particular aspect I'll highlight in this article is VBS2's Application Scripting Interface or ASI. In particular I'll move around the domain of Agents or AI actors and this paper here. 

Basically the paper is the result of research into populating VBS2 with realistic virtual actors that are controlled through the ASI. To summarise the goals there was intent to improve behaviour of the agents (non-player characters) through a third party model. Essentially through a plug-in DLL, the context the agent finds themselves in is evaluated, that information is then sent through a model internal to the DLL to formulate a response to that context. The response is generally a combination of commands including doMove, used to move the agent to a particular location that is deemed advantageous given their current role. In one example the objective of an agent was as a suicide bomber to move themselves to a position where they'd cause maximum casualties with their payload.

This however is not the only purpose for the ASI, other examples include improving interaction with other HLA/DIS simulations, or influencing VBS2 based on information from a separate program. The possibilities are almost limitless as the ASI is a direct line into the VBS2 scripting language. However it must be noted that a lot of things possible in the ASI are also possible in plain scripting with no DLLs, unless you're looking to talk to something externally.

Over time as more ASI examples come to light and they're documented I will post the document links here. There is a lot of potential in this that is yet to be explored.

For those of you interested in exploring CoJACK (mentioned in the paper), there is a site here.

Jamie.

Wednesday, April 1, 2009

VBS2 Internal Function Library

Some of you may not be aware of the Function Library internal to VBS2, it is a set of scripts that perform certain tasks that have been developed by BIA/BISim to help content developers simplify their tasks by using a few parameters with a call to a function name to get a result, instead of having to solve the most common problems themselves in their own script.

The reason I am bringing this up is the reference for the functions as far as I'm aware isn't in any standard documentation, you either have to dig on the forums or through the biki, so instead I'm posting a quick intro here, with links. Keep in mind that these functions can only be used inside SQF files, they can't be used directly in the editor or in SQS (another reason not to use it).

To use this library, put the following in the top of any SQF using the functions:
#include "\vbs2\headers\function_library.hpp"
Then to use a specific function from the library, add a line like this:
_returnValue = [parameters] call fn_vbs_exampleFunction;

A full list of functions by category can be found here. Keep in mind that function names are case sensitive, so use their names exactly as you see in the reference. Also, check the version number for the functions as you would a normal command, as if you try to use a function not available in your version, you will probably be disappointed by errors. As for VBS2 Lite, I have no idea what functions do and don't work, so that will largely be a trial and error thing.

If anyone is a keen scripter, yet doesn't know how to create their own function library, please post a comment, if there's enough demand to learn how to do something in particular that will guide the path of this blog, assuming the requests are reasonable in scope and the topic can be covered in a handful of posts!

Cheers,

Jamie.

BIA Part-Time Position, and Other Stuff

For those of you looking to fill around 25 hours per week working with a particular simulation we all know and love, there's a part-time position with BIA for a particle scripter. If you don't know what a particle is, you're off to a bad start! Position is said to be working on both VBS2 and ArmA II, I would assume this is your typical work from home arrangement.

Interested parties should check here.


Get in fast, and don't tell the HR person I said hello!

In other news I've just returned to work, hobbling around the office. I'm currently working on polishing the topographic map tutorial, once it's fully ready to go and has been looked over by a proof reader I'll post it here.

For those of you keeping an eye on ArmA II (or ArmA 2 for those not familiar with roman numerals), there's a new video getting about from GC08 on youtube, you will find it here.

Expect more updates during the week! Just keep in mind my post rate will depend on work load, for those of you who don't like bookmarking, there is an RSS feed you can subscribe to (top right).

Cheers,

Jamie.