Jump to content
tonic-_-

Virtual Ammobox System (VAS)

Recommended Posts

MK-L you will have to update the VAS_2 files to change the location in the function.hpp and vas_2\functions\fn_mainInit.sqf to update the location of config.sqf

what was the error? was it related to this? was it due to conflicts as you are defining the same dialog info and functions twice?

the other option is to use an if () then {} check and have different results inside the config.sqf. You shouldn't need to make two folders.

Tonic may have another option though.

Ok thank you, here are the changes I made ​​to the files that you cited :

xmissions.Altis/VAS >>>This is my 1 VAS (for alpha team by example)

xmissions.Altis/VAS_PATSAS >>> This is my secondary VAS (for bravo team by example)

xmission.Altis/VAS_PATSAS/cfgfunctions.hpp (line 6)

class VAS
{
tag = "VAS";
class functions
{
file = "VAS_PATSAS\functions";

Correct ?

Now in,

xmission.Altis/VAS_PATSAS/functions/fn_mainInit.sqf

/*
@version: 2.0
@file_name: fn_mainInit.sqf
@file_author: TAW_Tonic
@file_edit: 9/24/2013
@file_description: Only called once during the initialization of VAS and uses compileFinal on all VAS functions.
*/
[] spawn
{
if(isNil "VAS_init_complete") then
{
	private["_handle"];
	VAS_init_timeOnStart = time;
	VAS_init_complete = false;
	_handle = [] execVM "VAS_PATSAS\config.sqf";
	waitUntil {scriptDone _handle;};
	if(isNil "VAS_fnc_buildConfig") exitWith {diag_log "::VAS:: function VAS_fnc_buildConfig is nil"};
	["CfgWeapons"] call VAS_fnc_buildConfig;
	["CfgMagazines"] call VAS_fnc_buildConfig;
	["CfgVehicles"] call VAS_fnc_buildConfig;
	["CfgGlasses"] call VAS_fnc_buildConfig;
	VAS_init_complete = true;
}
	else
{
	VAS_init_timeOnStart = time;
	[] call compile PreprocessFileLineNumbers "VAS_PATSAS\config.sqf";
	["CfgWeapons"] call VAS_fnc_buildConfig;
	["CfgMagazines"] call VAS_fnc_buildConfig;
	["CfgVehicles"] call VAS_fnc_buildConfig;
	["CfgGlasses"] call VAS_fnc_buildConfig;

	sleep 2.5;
	if(!isNil "vas_r_weapons") then { VAS_init_complete = true; };
};

waitUntil {!isNull player && player == player};
if(player diarySubjectExists "VAS")exitwith{};
player createDiarySubject ["VAS","Virtual Ammobox System (VAS)"];
player createDiaryRecord["VAS",
	[
		"Virtual Ammobox System (VAS) v2.0",
			"
				Virtual Ammobox System (VAS) is a virtual ammobox inventory system created by Tonic AKA TAW_Tonic. If you have any problems with VAS please report them on the forums.<br/>
				<br/>
				Virtual Ammobox BIS Topic:
				http://forums.bistudio.com/showthread.php?149077-Virtual-Ammobox-System-%28VAS%29
				<br/>
				<br/>
				<p>
				<h1>
				Credits and Thanks:<br/>
				Kronzky - For his string function library<br/>
				SaMatra - For help with UI Resources and Russian Translation<br/>
				Dslyecxi - For his Paper doll giving insight on how to detect item types.<br/>
				Tyrghen on Armaholic - For giving me the tip about CfgFunctions<br/>
				naong - For his code tweaks to the Load / Save display.<br/>
				Coding from armaholic - Translation of VAS from English->German<br/>
				El nabot from Armaholic - Translation of VAS from English->French<br/>
				czesiek77 from Armaholic - Translation of VAS from English->Polish<br/>
				Ficc from BIS Forums - Translation of VAS from English->Portuguese<br/>
				ramius86 on BIS Forums - Translation of VAS from English->Italian<br/>
				RabsRincon on Armaholic - Translation of VAS from English->Spanish<br/>
				Bakarda on BIS/Armaholic - Translation of VAS from English->Czech<br/>
				</p>
				</h1>
			"
	]
];
};

Correct ?

But i get this error message (& return to desk immediatly) :

964846Sanstitre2.jpg

Thank for help :)

Share this post


Link to post
Share on other sites
Somebody know to use VAS in every mission in campaign mode? I want to have it in my menu, i downloaded a mission that VAS appear in red.

Thank you goodbye.

You'd have to open the campaign files on your computer, install VAS for each mission, and then repack those files back into a new pbo using the old name. Conventional wisdom says things go wrong when you mess with the files from Bohemia.

I tried doing that, but instead of VAS I placed a custom crate filled with the stuff I wanted to use. When I repacked the pbo I couldn't access the campaign.

So, if you don't know much about A3 modding, then you're not going to get very far. If you're mediocre (like me) when it comes to modding, then you might try things and maybe you can get something to work.

Share this post


Link to post
Share on other sites
You'd have to open the campaign files on your computer, install VAS for each mission, and then repack those files back into a new pbo using the old name. Conventional wisdom says things go wrong when you mess with the files from Bohemia.

I tried doing that, but instead of VAS I placed a custom crate filled with the stuff I wanted to use. When I repacked the pbo I couldn't access the campaign.

So, if you don't know much about A3 modding, then you're not going to get very far. If you're mediocre (like me) when it comes to modding, then you might try things and maybe you can get something to work.

Yep, i don't know almost nothing about A3 modding, i hope somebody can help us :)

The only way i find to have a lot of ammo is introducing by console.

PD: in some box/ammo crate the VAS appear so, its possible to spawn a ammo crate on player?

Share this post


Link to post
Share on other sites

You see VAS assigned to crates in certain missions, but any object in the game can have VAS assigned to it, but it has to be installed into the mission.

I sent you a PM to carry on our discussion, without derailing this thread any further.

Share this post


Link to post
Share on other sites

Does anyone know where the custom loadouts are physically saved on the hard drive? My custom loadouts do not load between different profiles and if I can copy them over versus re-creating them that would be preferable. I haven't been able to find anyone else with this question. Thanks in advance.

Figured it out. Just swapped my profile information inside the documents folder. For whatever reason the first time I tried that it didn't work. Anyways, it appears the loadouts are stored in NAME.ARMA3profile or NAME.vars.ARMA3profile.

Edited by AJYoung6

Share this post


Link to post
Share on other sites

Im sorry for my laziness, but i didnt really want to read through the 88 pages of answers to find this out and i realize its probably one of the stupidest questions, but is there a specific set of instructions to follow for adding custom content from other addons (eg weapons and clothes) into the VAS?

Share this post


Link to post
Share on other sites
Im sorry for my laziness, but i didnt really want to read through the 88 pages of answers to find this out and i realize its probably one of the stupidest questions, but is there a specific set of instructions to follow for adding custom content from other addons (eg weapons and clothes) into the VAS?

For adding custom content from other addons, we need the "ID" names of weapons/clothes or others, and put them in your config.cfg

==========================================================================================================

Please help if someone know how to add a second VAS in mission with specific "config.cfg"

All my work are here : http://forums.bistudio.com/showthread.php?149077-Virtual-Ammobox-System-%28VAS%29&p=2610725&viewfull=1#post2610725

Tonic help !:butbut:

Share this post


Link to post
Share on other sites
Im sorry for my laziness, but i didnt really want to read through the 88 pages of answers to find this out and i realize its probably one of the stupidest questions, but is there a specific set of instructions to follow for adding custom content from other addons (eg weapons and clothes) into the VAS?

Look in the init file in the VAS folder. There are areas to put lists of classnames to add/remove from VAS.

However, VAS. Will add all the content from extra mods to itself automatically as it scans and loads all classnames available while it initialises.

Share this post


Link to post
Share on other sites

2 questions:

1. when you save/load gear, where are these details saved? I lost for some reason my loadouts and moving forward want to backup this file to avoid in future.

2. Has anyone considered making this an addon? Would it even be possible?

Thanks all

Share this post


Link to post
Share on other sites
2 questions:

1. when you save/load gear, where are these details saved? I lost for some reason my loadouts and moving forward want to backup this file to avoid in future.

In your profilenamespace - in your Arma 3 folder there is a Vars.Arma3Profile with your player name at the front.

If you changed your player name in the configure settings area in game, then you will have a new file for your in game vars storage

2. Has anyone considered making this an addon? Would it even be possible?Thanks all

Yes its possible but there are issues with doing it this way e.g. in MP one can have the mod running and it will override the server mission settings and weapon restrictions.

Share this post


Link to post
Share on other sites

Hi, I would like to ask if it's possible to limit VAS only to loading up and displaying magazines and misc inventory items (map, gps, first aid, grenades, mines etc). I have quite a lot of item mods installed and loading times for VAS are atrocious and it happens every time I open the damn thing. Dslyecxi's Paper Doll script covers most of the stuff I want to do and I only need magazines and other misc items.

Share this post


Link to post
Share on other sites

@ KevsnoTrev; Thats exactly what happen! Anyway to get it transferred? Tried to open the file up but its bin'ed and cant read it with notepad++ At this point i've cahnged profiles and even edited existing profiles so i have no idea what name most of my stuff was under since this happened in the past. Thanks for the info

Share this post


Link to post
Share on other sites

Hello!

I've been messing about for a couple days trying to figure out how to add VAS to a vehicle on respawn.

I can add it fine using this code in the initialization field:

this addAction["<t color='#ff1111'>Virtual Ammobox</t>", "VAS\open.sqf"];

The problem is when the vehicle is destroyed, it does NOT respawn with VAS enabled.

I found a post over on Armaholic, but it didn't provide too many details and all my attempts have failed.

I'm new, so it won't let me post the link, but it said I should look in: x_client\x_f\fn_initvec.sqf

and that "this is the trick:"

if (_vec iskindof "B_Heli_Transport_01_F") then {
_vec addAction ["<t color='#c75806'>Virtual Ammobox</t>", 'VAS\open.sqf'];

I have a vehicle named "mhq_vec1" I'm trying to add VAS to.

I figured I should be able to substitute "B_Heli_Transport_01_F" with "mhq_vec1" yea?

However that doesn't seem to work.

Maybe I'm putting this code in the wrong place?

I apologize if the answer is already somewhere in this super long thread!

It did not come up in multiple searches.

Share this post


Link to post
Share on other sites

Is there a way to find out what version of VAS is being used on a mission?

Is the version # in the code of the VAS folder somewhere?

Share this post


Link to post
Share on other sites
Is there a way to find out what version of VAS is being used on a mission?

Is the version # in the code of the VAS folder somewhere?

Not specifically all files. Whatever file is last changed I note it down with the version number it was changed with and that is only with certain files..

I.e

@version: 2.2
@file_name: fn_handleItem.sqf
@file_author: TAW_Tonic
@file_edit: 12/7/2013
@file_description: Handles the incoming requests and adds or removes it.

Share this post


Link to post
Share on other sites
Not specifically all files. Whatever file is last changed I note it down with the version number it was changed with and that is only with certain files..

I.e

@version: 2.2
@file_name: fn_handleItem.sqf
@file_author: TAW_Tonic
@file_edit: 12/7/2013
@file_description: Handles the incoming requests and adds or removes it.

Thanks for the quick response, Tonic. Love this script.

With hundreds of missions and up to dozens of people working on each mission, and most of them using VAS, the ability to see the current working version of VAS would be a simple but tremendous help to many of us mission-fixers. I'm not a programmer by any means, but I'd like to be able to go to your website, see the latest version, and compare it with the version a mission is using so I know I'm up-to-date.

Any chance of including something like this with the next version of VAS?

Share this post


Link to post
Share on other sites
Thanks for the quick response, Tonic. Love this script.

With hundreds of missions and up to dozens of people working on each mission, and most of them using VAS, the ability to see the current working version of VAS would be a simple but tremendous help to many of us mission-fixers. I'm not a programmer by any means, but I'd like to be able to go to your website, see the latest version, and compare it with the version a mission is using so I know I'm up-to-date.

Any chance of including something like this with the next version of VAS?

Does seem like it'd be useful. I'm just used to updating VAS myself for any mission I play and same thing goes for any script resource. I don't trust other peoples missions to be up-to-date with shared scripts by other people. Not everyone can be bothered to keep up-to-date with stuff like that :P

At this point though with the most recent patch it should be easy to see if VAS is to out-dated with the weird looking scroll bar & popup errors about missing resources. The last 2 VAS versions should work just fine with ARMA 3 but anything before it will have issues.

Share this post


Link to post
Share on other sites
Does seem like it'd be useful. I'm just used to updating VAS myself for any mission I play and same thing goes for any script resource. I don't trust other peoples missions to be up-to-date with shared scripts by other people. Not everyone can be bothered to keep up-to-date with stuff like that :P

At this point though with the most recent patch it should be easy to see if VAS is to out-dated with the weird looking scroll bar & popup errors about missing resources. The last 2 VAS versions should work just fine with ARMA 3 but anything before it will have issues.

Good info, thank you.

Curious - how do you "update VAS myself for any mission I play"? Do you simply drag+drop+replace any mission's VAS folder with your latest VAS folder and re-pack it into a .pbo?

Share this post


Link to post
Share on other sites
Good info, thank you.

Curious - how do you "update VAS myself for any mission I play"? Do you simply drag+drop+replace any mission's VAS folder with your latest VAS folder and re-pack it into a .pbo?

Yeah pretty much.

Share this post


Link to post
Share on other sites
Hello!

I've been messing about for a couple days trying to figure out how to add VAS to a vehicle on respawn.

I can add it fine using this code in the initialization field:

........ snipped ............

I have a vehicle named "mhq_vec1" I'm trying to add VAS to.

I figured I should be able to substitute "B_Heli_Transport_01_F" with "mhq_vec1" yea?

However that doesn't seem to work.

Maybe I'm putting this code in the wrong place?

I apologize if the answer is already somewhere in this super long thread!

It did not come up in multiple searches.

Just added this to a mission I'm working on as well. However, I use btc revive and have the mobile headquarter enabled. So I can only show you how I've done it with btc.

In the file "=BTC=_revive\=BTC=_functions.sqf" look for the function "BTC_vehicle_mobile_respawn" somewhere around line 1517 in mine, at the end of the function, yours will vary as I've added a few comments in mine.

You'll need to add the code to =BTC=_functions.sqf

null = [_veh] execVM "Scripts\repair.sqf";

Changing "Scripts\repair.sqf" to whichever sqf you've created for adding actions. I should've named mine to vehicleActions.

I followed this thread for adding/removing actions to vehicles http://forums.bistudio.com/showthread.php?150882-addAction-and-removeAction-in-WHILE-loop

Here's my repair.sqf

_vehAction1 = 0;
_vehAction2 = 0;

_veh = _this select 0; //called by; null = [_veh] execVM "Scripts\repair.sqf"; OR null = [this] execVM "Scripts\repair.sqf"

while {true} do {
if (alive _veh && ((speed _veh)) == 0) then
	{
	_vehAction1 = _veh addAction ["Repair Vehicle","Scripts\repairABLE.sqf"];
	_vehAction2 = _veh addAction ["<t color='#ff1111'>Virtual Ammobox</t>", "VAS\open.sqf"];
	waitUntil {!alive _veh || ((speed _veh)) != 0};
	}
else
	{
	_veh removeAction _vehAction1;
	_veh removeAction _vehAction2;
	waitUntil {alive _veh && ((speed _veh)) == 0};
	};
};

_vehAction2 is for VAS.

I'm using this on a helicopter and the actions will be removed whenever the engine is on as well.

Now in the editor you'll have to add to your vehicle in the init

null = [this] execVM "Scripts\repair.sqf";

This will call the script when the mission first starts and =BTC=_functions will call the script whenever it respawns the vehicle.

I'm new to scripting in arma and I don't know off hand how you would call the script while using the respawn module. If that's the case, sorry I can't help with that.

And would like to thank the author of VAS, very useful.

Edited by King_Richard

Share this post


Link to post
Share on other sites

Hello,

I am looking for someone who could help me configure Virtual ammobox System.

I wish that civilians can not use, and the guns displayed according cop_level.

If it is possible, thank you for your help

thank you

Share this post


Link to post
Share on other sites

I wonder if there is a way to change the background of VAS to a lighter black or maybe even white of light grey, with all these black weapons. Or a change in the transparency could do the trick. What do I need to change in what file?

Share this post


Link to post
Share on other sites

Complete newbie here. I want to us VAS since it's obviously awesome mod, but... where should I extract all those files? I mean, there's no instruction in the readme, and I can't find anything online. Should I put the "Virtual Ammobox System" into both mission folders (mp and sp)? Help much appreciated.:confused:

Share this post


Link to post
Share on other sites
Does seem like it'd be useful. I'm just used to updating VAS myself for any mission I play and same thing goes for any script resource. I don't trust other peoples missions to be up-to-date with shared scripts by other people. Not everyone can be bothered to keep up-to-date with stuff like that :P

Version control might help with this. Github, Bitbucket, etc. It might also make it easier for people to post corrections/fixes.

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

×