Jump to content

[RELEASE] VASP - Vehicle and Skin preview on Traders v1.2 (Updated 06/18/2014)


Recommended Posts

Hey folks,
 
some time ago i pushed something to the public, but here is next!
 
 
"Damn which Truck was the open Camouflage one?"
"Bah cant remember which of the Vehicles holds the most amount of Magazines and Weapons..."
"How many Players can Drive in XYZ Vehicle?"
"How fast can that Vehicle go?"
 
"What the hell a 'Donald' skin look like?"
"'Rocker 1 2 3 whats the difference?"
 
Ever had such questions?
 
 
Here you go - VASP - Vehicle and Skin Preview
 
 
This little Mod let you Preview any Vehicle or Skin in the TraderMenu.
Vehicles will show additional Infos like:

  • Max Speed
  • Max Seats
  • Max Cargo Weapons
  • Max Cargo Magazines
  • Max Cargo Backpacks
  • Max Fuel
  • Max Armor

All stuff is totally client side spawned and will not be visible to any other Player on Server!
 
The Player clicks in the Tradermenu on a Vehicle or a Skin and he will get a hint message to press F5 for a preview of it.
 
While in preview, you can use these Hotkeys:
Zoom in/out:       Arrowkeys up/down
Rotate left/right: Arrowkeys left/right
Close preview:   F5
 
After preview the Tradermenu will open again on the same spot the Player left it for the preview.
Just hit Buy and the last previewed item get bought.
 
Easy as Pie.

 
Demo Video
  http://youtu.be/KN8MAEpTC8I
 
Download:
https://www.dropbox.com/s/a2ziauc6rudqk97/VASP_v1.2.zip
 
Install instructions:
1. Download und unzip VASP_v1.2.zip
2. unpbo MPMissions\YOURMISSIONNAME.pbo (If your hoster has just folders you can skip this obviously ^^)
3. Copy the custom folder from unziped VASP_v1.2.zip to MPMissions\YOURMISSIONNAME\
4. open MPMissions\YOURMISSIONNAME\init.sqf
 
Find this block:

if (!isDedicated) then {
	0 fadeSound 0;
	waitUntil {!isNil "dayz_loadScreenMsg"};
	dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
	_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];

};

And insert this line above the last closing bracket };

       _nil = [] execVM "custom\VASP\VASP_init.sqf";

If you dont have already a custom pulicEH.sqf continue on 5a) else continue on 5b)
 
5a)
Still in the init.sqf Find this line:

call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf";

and replace with:

call compile preprocessFileLineNumbers "custom\VASP\publicEH.sqf";

5b)
open your custom publicEH.sqf and find this line:


"PVDZE_plr_SetDate"		addPublicVariableEventHandler {setDate (_this select 1);};

and replace with:

"PVDZE_plr_SetDate"		addPublicVariableEventHandler {if (!(player getVariable["Preview",false])) then {setDate (_this select 1);};};

If you dont have already a custom compiles.sqf continue on 6a) else continue on 6b)
 
6a)
Still in the init.sqf Find this line:

call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";

and replace with:

call compile preprocessFileLineNumbers "custom\VASP\compiles.sqf";                //Compile regular functions

6b)
Open your custom compiles.sqf and find this block:


	// trader menu code
	if (DZE_ConfigTrader) then {
		call compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_traderMenuConfig.sqf";
	}else{
		call compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_traderMenuHive.sqf";
	};

and replace with:

	// trader menu code
	if (DZE_ConfigTrader) then {
		call compile preprocessFileLineNumbers "custom\VASP\player_traderMenuConfig.sqf";
	}else{
		call compile preprocessFileLineNumbers "custom\VASP\player_traderMenuHive.sqf";
	};

Find this line:

	fnc_usec_selfActions =			compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_selfActions.sqf";		//Checks which actions for self

and replace with:

	fnc_usec_selfActions =			compile preprocessFileLineNumbers "custom\VASP\fn_selfActions.sqf";		//Checks which actions for self

If you already use a custom fn_selfActions.sqf open it and find this line:

				_buy = player addAction [localize "STR_EPOCH_PLAYER_289", "\z\addons\dayz_code\actions\show_dialog.sqf",(_traderMenu select 0), 999, true, false, "",""];

and add ABOVE:

				LastTraderMenu = (_traderMenu select 0);

7. repbo MPMissions\YOURMISSIONNAME\ - upload - restart server - enjoy!
 
 

- Configuration -

Open VASP_init.sqf and edit this block to your liking:

	/****************************/
	/*      Configuration       */
	/****************************/
	/*  Vehicle Preview on/off  */
	/* true = ON / false = OFF  */
	VASP_VehiclePreview = true;
	/****************************/
	/*    Skin Preview on/off   */
	/* true = ON / false = OFF  */
	VASP_SkinPreview = true;
	/****************************/
	/* !!! DONT EDIT BELOW !!!  */

 
- Additional Information -
 
For those who have MORE then the standard Epoch Skins buyable at the Traders you would need to open MPMissions\YOURMISSIONNAME\custom\VASP\VASP_init.sqf
 
and add them to this block:


    AllAllowedSkins = [
        "Skin_Survivor2_DZ","Skin_SurvivorWcombat_DZ","Skin_SurvivorWdesert_DZ",
        "Skin_SurvivorWurban_DZ","Skin_SurvivorWsequishaD_DZ","Skin_SurvivorWsequisha_DZ",
        "Skin_SurvivorWpink_DZ","Skin_SurvivorW3_DZ","Skin_SurvivorW2_DZ",
        "Skin_Bandit1_DZ","Skin_Bandit2_DZ","Skin_BanditW1_DZ",
        "Skin_BanditW2_DZ","Skin_Soldier_Crew_PMC","Skin_Sniper1_DZ",
        "Skin_Camo1_DZ","Skin_Soldier1_DZ","Skin_Rocket_DZ",
        "Skin_Rocker1_DZ","Skin_Rocker2_DZ","Skin_Rocker3_DZ",
        "Skin_Rocker4_DZ","Skin_Priest_DZ","Skin_Functionary1_EP1_DZ",
        "Skin_GUE_Commander_DZ","Skin_Ins_Soldier_GL_DZ","Skin_Haris_Press_EP1_DZ",
        "Skin_Pilot_EP1_DZ","Skin_RU_Policeman_DZ","Skin_Soldier_TL_PMC_DZ",
        "Skin_Soldier_Sniper_PMC_DZ","Skin_Soldier_Bodyguard_AA12_PMC_DZ","Skin_Drake_Light_DZ",
        "Skin_CZ_Special_Forces_GL_DES_EP1_DZ","Skin_TK_INS_Soldier_EP1_DZ","Skin_TK_INS_Warlord_EP1_DZ",
        "Skin_FR_OHara_DZ","Skin_FR_Rodriguez_DZ","Skin_CZ_Soldier_Sniper_EP1_DZ",
        "Skin_GUE_Soldier_MG_DZ","Skin_GUE_Soldier_Sniper_DZ","Skin_GUE_Soldier_Crew_DZ",
        "Skin_GUE_Soldier_CO_DZ","Skin_GUE_Soldier_2_DZ","Skin_TK_Special_Forces_MG_EP1_DZ",
        "Skin_TK_Soldier_Sniper_EP1_DZ","Skin_TK_Commander_EP1_DZ","Skin_RU_Soldier_Crew_DZ",
        "Skin_INS_Lopotev_DZ","Skin_INS_Soldier_AR_DZ","Skin_INS_Soldier_CO_DZ",
        "Skin_INS_Bardak_DZ","Skin_INS_Worker2_DZ"
    ];

This is ONLY needed if you have custom Skins that are buyable on the Traders!

 


 
~ Have fun with it ~
 
Questions - Bugs - Tell me!
 
- If you like it - Like it - So I can count Downloads - I like that
 

#####################################

#                      Support my work                      #

#                                    &                                #

#                                Donate                           #

#####################################

btn_donate_LG.gif

Link to comment
Share on other sites

Vehicles work great, but when I try to preview a skin, I get kicked for a remote exec violation.

 

#2 "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this forceSpeed 0;"

 

I still don't understand how to write battleEye filters for something like this.

Link to comment
Share on other sites

1) Works great with antihack disabled, can't get things working with it enabled. I think F5 is one of the banned keys.

 

2) Am also getting the same remote exec kick as above.

 

3) After closing the preview, is the trade window supposed to be closed? Mine pops back up but it's blank:

 

blanktrade.jpg

Link to comment
Share on other sites

Would be great if there was just an option to preview vehicles only.

 

How would I go about disabling the skin preview part of it?

 

Also only problem I see is when you exit the preview you have to shut the trader window then re open it to do anything else.

 

Great work.

Link to comment
Share on other sites

Update v1.1

 

See first post.

 

Changelog:

Fixed the BE-Filter kick, removed some code that was not needed anyway.

The Tradermenu should now popup where you left, on ALL Maps and all custom Traders, if they use the Traderdialog from Epoch!

A config block in the VASP_init.sqf aloows you to turn Vehicle/Skin preview On/Off

 

For the F5 Hotkey problem with Infistar:

I'm not familiar with making GUI's so i used a Hotkey for it. If u use Infistar you would need to remove the F5 block from his files.

Dont ask me how to, if someone know how, please tell!

 

 

Moo,

Otter

Link to comment
Share on other sites

Just checked in the VASP_init.sqf

 

For those who dont want skin preview.

 

/****************************/
/*    Skin Preview on/off   */
/* true = ON / false = OFF  */
VASP_SkinPreview = false;
/****************************/
/* !!! DONT EDIT BELOW !!!  */
Link to comment
Share on other sites

 

Just checked in the VASP_init.sqf

 

For those who dont want skin preview.

 

/****************************/
/*    Skin Preview on/off   */
/* true = ON / false = OFF  */
VASP_SkinPreview = false;
/****************************/
/* !!! DONT EDIT BELOW !!!  */

 

 

Man, that was fast, not even had a chance to modify my first post with the information in it ^^

 

 

Moo,

Otter

Link to comment
Share on other sites

For the F5 Hotkey problem with Infistar:

I'm not familiar with making GUI's so i used a Hotkey for it. If u use Infistar you would need to remove the F5 block from his files.

Dont ask me how to, if someone know how, please tell!

 

 

/*  Enable BadKey Kick    */ _BKK =  false; /* true or false */ /* recommended:  true */ /* If people press a forbidden Key twice, they get kicked! */

Link to comment
Share on other sites

/*  Enable BadKey Kick    */ _BKK =  false; /* true or false */ /* recommended:  true */ /* If people press a forbidden Key twice, they get kicked! */

 

I would not recommend this as it looks like it will allow ANY Hotkey again!

Maybe there is a way to just remove the F5 from the code?

Dont have the infistar files so cant peek in for it.

Link to comment
Share on other sites

I'm not familiar with making GUI's so i used a Hotkey for it. If u use Infistar you would need to remove the F5 block from his files.

Dont ask me how to, if someone know how, please tell!

 

 

F5 is used for base destruction, so the only (easy) solution would be option to remap to another function key, shouldn't be hard to override using values present in your config.

 

Very good job on the script, btw. Awesome idea!

Link to comment
Share on other sites

F5 is used for base destruction, so the only (easy) solution would be option to remap to another function key, shouldn't be hard to override using values present in your config.

 

Very good job on the script, btw. Awesome idea!

 

A friend of mine said one Day: "How cool would it be to have a preview of the Vehicles cause i cant ffs remember what the Vehicle's are look like"

So i made one and decided to put some infos also in the preview, to inform the Player about some features of it.

 

So credits for the idea goes to him ^^

 

Moo,

Otter

Link to comment
Share on other sites

This is such a nice script, thank you soo much for that.

 

This is my rpt after previewing a vehicle, am i the only one getting this ? The script is working just fine, but trader list is empty as mentionned before after a preview of vehicles/skins.

 

10:42:01 Error in expression <ServerTcache_<null>;>
10:42:01   Error position: <;>
10:42:01   Error Invalid number in expression

 

Thank you again!!

Link to comment
Share on other sites

This is such a nice script, thank you soo much for that.

 

This is my rpt after previewing a vehicle, am i the only one getting this ? The script is working just fine, but trader list is empty as mentionned before after a preview of vehicles/skins.

 

10:42:01 Error in expression <ServerTcache_<null>;>

10:42:01   Error position: <;>

10:42:01   Error Invalid number in expression

 

Thank you again!!

 

ServerTcache_ doesnt say anything to me, never seen that in the files this Mod uses?

 

Tested this Mod now on Sauerland, Chernarus, and Napf and Tradermenu was working fine after preview. Weird.

Which map your server is running on?

Link to comment
Share on other sites

ServerTcache_ doesnt say anything to me, never seen that in the files this Mod uses?

 

Tested this Mod now on Sauerland, Chernarus, and Napf and Tradermenu was working fine after preview. Weird.

Which map your server is running on?

 

I am currently running it on Chernarus map "overpoch" server. Tested on home server. Will be able to test it on my live server in like 20 minutes.

Link to comment
Share on other sites

UPDATE v1.2

 

Changelog:

  • Changed code for Tradermenu reopen after preview

This should now fix the reopen of the Tradermenu for all circumstances!

For all that update, see install instructions again! Step 6b) changed!

 

Please gimme a feedback if, for whatever reason now, it not work for you!

 

I cant test it right now, as im not on my testbox, but it should do his Job!

 

 

 

Moo,

Otter

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...