Sign in to follow this  
downtime89

Adding vehicles

6 posts in this topic

Hey peeps simple question, just running a lan dedicated server for me and my friends, these servers that have all the extra stuff at traders like from the extended base mod and tanks, is there a way to make that auto populate into the traders or does each item have to be manually entered in? Looking to a few extra weapon mods, tanks and already have extended base mod. Thanks in advance. 

Share this post


Link to post
Share on other sites

@downtime89 Those have to be added in manually. It isn't that hard though. To have them spawn in at the beginning of the server only requires adding the CFGclass name to your spawn list in the config.sqf. Adding them to the trader requires you to add them into 2 places in the Exile.Altis config.

You can find all the class names HERE.

   
Edited by Fewture

Share this post


Link to post
Share on other sites
Advertisement

For the most part it's manual though you can make adding guns and vehicles to your server easy by using arma editor and regex + find & replace functions to generate categories for items and arsenal entries.

 

Makes it somewhat easy because you can choose what guns, ammo and cars you want.

 

For cars you place them in editor (I use VR) , select them -> right click -> Export class names or something along those lines and copy that into notepad and save.

For Guns, Ammo and Clothing i use multiple vehicles (1 per item category), populate their inventory with items i want and save the mission.

Then you'll need to open your saved mission.sqm in notepad++

Step1: Find your entry that you want to include (This is example of RHS guns)

		class Item0
		{
			dataType="Object";
			class PositionInfo
			{
				position[]={2615.2161,6.2427263,5512.1392};
			};
			side="Empty";
			flags=4;
			class Attributes
			{
			};
			id=1;
			type="I_Boat_Transport_01_F";
			class CustomAttributes
			{
				class Attribute0
				{
					property="ammoBox";
					expression="[_this,_value] call bis_fnc_initAmmoBox;";
					class Value
					{
						class data
						{
							class type
							{
								type[]=
								{
									"STRING"
								};
							};
							value="[[[[""arifle_AKM_F"",""arifle_AKS_F"",""rhs_weap_asval"",""rhs_weap_asval_grip"",""rhs_weap_pp2000"",""rhs_weap_svdp"",""rhs_weap_svdp_wd"",""rhs_weap_svds"",""rhs_weap_t5000"",""rhs_weap_vss"",""rhs_weap_vss_grip"",""rhs_weap_pya"",""rhs_weap_pkm"",""rhs_weap_pkp"",""rhs_weap_makarov_pm"",""hgun_Pistol_01_F"",""rhs_weap_pp2000_folded"",""rhs_weap_pm63""],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[[],[]],[[],[]],[[],[]]],false]";
						};
					};
				};
				nAttributes=1;
			};
		};

Step 2: Copy the right content and make sure it looks like this (for guns)

""arifle_AKM_F"",""arifle_AKS_F"",""rhs_weap_asval"",""rhs_weap_asval_grip"",""rhs_weap_pp2000"",""rhs_weap_svdp"",""rhs_weap_svdp_wd"",""rhs_weap_svds"",""rhs_weap_t5000"",""rhs_weap_vss"",""rhs_weap_vss_grip"",""rhs_weap_pya"",""rhs_weap_pkm"",""rhs_weap_pkp"",""rhs_weap_makarov_pm"",""hgun_Pistol_01_F"",""rhs_weap_pp2000_folded"",""rhs_weap_pm63""

Step 3: Replace each "" with "

Step 4: Use Replace function and replace this (Make sure you use regex)

","

With this

",\n"

And that will give you this to work with (see attachment

 

And now you have the guns ready to be included in categories for traders.

 

Step 5: To create cfgArsenal entries you copy your new content to a new notepad document, add a comma to the last entry and run Replace function again and replace this

",

with this (Normal mode)

		{ quality = MYQUALITY; price = MYPRICE; };

Step 6: Run replace function again and replace this

"

with this (make sure there's a space after class

class 

Step 7: Add correct header and footer for your category entries

// Header for hardware

	class Hardware
	{
		name = "Hardware";
		icon = "a3\ui_f\data\gui\Rsc\RscDisplayArsenal\itemacc_ca.paa";
		items[] =
		{


// Footer for hardware
		};
	};

And for these RHS Guns it would look like this

	class SomeWeapons
	{
		name = "My Fancy Custom Weapons";
		icon = "a3\ui_f\data\gui\Rsc\RscDisplayArsenal\itemacc_ca.paa";
		items[] =
		{
			"arifle_AKM_F",
			"arifle_AKS_F",
			"rhs_weap_asval",
			"rhs_weap_asval_grip",
			"rhs_weap_pp2000",
			"rhs_weap_svdp",
			"rhs_weap_svdp_wd",
			"rhs_weap_svds",
			"rhs_weap_t5000",
			"rhs_weap_vss",
			"rhs_weap_vss_grip",
			"rhs_weap_pya",
			"rhs_weap_pkm",
			"rhs_weap_pkp",
			"rhs_weap_makarov_pm",
			"hgun_Pistol_01_F",
			"rhs_weap_pp2000_folded",
			"rhs_weap_pm63"
		};
	};

 

Regex.jpg

Share this post


Link to post
Share on other sites
28 minutes ago, downtime89 said:

Thanks for that detailed answer. im used to running arma 2 epoch servers this is a bit diffrent from those.

Here is the easy way to do it:

 

  • Like 1

Share this post


Link to post
Share on other sites
Advertisement

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.