Jump to content
BetterDeadThanZed

Put your server addons in a server side pbo

Recommended Posts

I can't take credit for creating this method. I found it here in the forums but I really don't remember where. It was included with some addon I was looking at. This will allow you to create a pbo of your map addons that you can put into your addons folder. You won't need to edit any default epoch files and it can be easily re-inserted into your server files when there's an update. I will not explain how to made map addons. There are other tutorials/topics about that. This assumes you've made addons and exported them to sqf format. For example, the addon's sqf should look similar to this:

 

private ["_objs"];
_objs = [
	["Hhedgehog_concrete",[5877.36,9122.8,0],14.1429,[0,0,1],true]
];

{
	private ["_obj"];
	_obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
	if (_x select 4) then {
		_obj setDir (_x select 2);
		_obj setPos (_x select 1);
	} else {
		_obj setPosATL (_x select 1);
		_obj setVectorDirAndUp (_x select 3);
	};
} foreach _objs;

 

Now on to the instructions.

 

1. Download this pbo: https://www.dropbox.com/s/32v7i81loel8l2m/a3_custom.pbo?dl=0

2. Extract it into your server's addons folder.

3. In the mapcontent folder, place all of your custom addon sqf files.

4. Open init\fn_init.sqf.

5. Edit the lines to include each addon name. An example is included in the fn_init.sqf:

[] execVM "a3_custom\mapcontent\yourcustom.sqf";

Repack it and upload it to your server's addons folder.

Share this post


Link to post
Share on other sites

You sace this from 3d editor ? export.sqf ? My server dosent load the file :(

private ["_objs"];

_objs = [

["Land_Net_Fence_Gate_F",[21929.1,25025.3,-4.76837e-005],29.2397,[[0.488464,0.872584,0],[0,0,1]],false], ---- must set true ?

["Land_New_WiredFence_5m_F",[21937.8,25032.1,-3.24249e-005],29.2397,[[0.488464,0.872584,0],[0,0,1]],false],

];

{

private ["_obj"];

_obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];

if (_x select 4) then {

_obj setDir (_x select 2);

_obj setPos (_x select 1);

} else {

_obj setPosATL (_x select 1);

_obj setVectorDirAndUp (_x select 3);

};

} foreach _objs;

Share this post


Link to post
Share on other sites

I can't take credit for creating this method. I found it here in the forums but I really don't remember where. It was included with some addon I was looking at. This will allow you to create a pbo of your map addons that you can put into your addons folder. You won't need to edit any default epoch files and it can be easily re-inserted into your server files when there's an update. I will not explain how to made map addons. There are other tutorials/topics about that. This assumes you've made addons and exported them to sqf format. For example, the addon's sqf should look similar to this:

 

 

 

Hidden Content

 

 

Now on to the instructions.

 

1. Download this pbo: https://www.dropbox.com/s/32v7i81loel8l2m/a3_custom.pbo?dl=0

2. Extract it into your server's addons folder.

3. In the mapcontent folder, place all of your custom addon sqf files.

4. Open init\fn_init.sqf.

5. Edit the lines to include each addon name. An example is included in the fn_init.sqf:

[] execVM "a3_custom\mapcontent\yourcustom.sqf";

Repack it and upload it to your server's addons folder.



THanks Man .. that was so easy !! 

Share this post


Link to post
Share on other sites

Howdy People,

I've been doing a lot of this type of coding. I have pretty much everything I have added to the two servers I work on, in a single PBO.

I have markers identifying the three trader cities, a custom trader ATM script, a battle zone in Kavala on Altis full of AI and loot crates I wrote custom functions to load.

One big difference. I do not need the fn_init file. I call the maps to all be loaded exactly the same way you call the init in the config.

Here is an example of my config in the pbo:

class CfgPatches {
	class RAGE_ADDON {
		units[] = {};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {"A3_server_settings"};
		fileName = "RAGE_ADDON.pbo";
		author[]= {"Redbeard Actual"};
	};
};
class CfgFunctions {
	class RAGE_ADDON {
		class RAGE_TRADE_MARKERS {
			file = "RAGE_ADDON\RAGE_TRADE_MARKERS" // This is the file path to the map addon.
			class RAGE_PT_Markers{postInit = 1;}; // This is the name of the SQF file to load from that folder.add fn_ in front of your file names.
		};
		class RAGE_KAVALA_HOSPITAL {
			file = "RAGE_ADDON\RAGE_KAVALA_HOSPITAL" // This is the file path to the map addon.
			class RAGE_Kavala_Hospital{postInit = 1;}; // This is the name of the SQF file to load from that folder.add fn_ in front of your file names.
		};
		class RAGE_INT_AIRPORT {
			file = "RAGE_ADDON\RAGE_INT_AIRPORT" // This is the file path to the map addon.
			class RAGE_Int_Airport{postInit = 1;}; // This is the name of the SQF file to load from that folder.add fn_ in front of your file names.
		};
	};
};

Basically, instead of calling an init from my config, I just call the map adds directly from the config and have them load at server start. This is just a small chunk of my addon's config.hpp that loads the map adds. It also loads a ton of functions for spawning AI and loot crates for missions. But you should get the idea of what I am doing with the map adds.

Instead of loading a file that then loads the map adds, I just load the map adds directly. No muss, no fuss.

Share this post


Link to post
Share on other sites
On 7/19/2015 at 2:34 PM, BetterDeadThanZed said:

I can't take credit for creating this method. I found it here in the forums but I really don't remember where. It was included with some addon I was looking at. This will allow you to create a pbo of your map addons that you can put into your addons folder. You won't need to edit any default epoch files and it can be easily re-inserted into your server files when there's an update. I will not explain how to made map addons. There are other tutorials/topics about that. This assumes you've made addons and exported them to sqf format. For example, the addon's sqf should look similar to this:

 

 

 

Hidden Content

 

 

Now on to the instructions.

 

1. Download this pbo: https://www.dropbox.com/s/32v7i81loel8l2m/a3_custom.pbo?dl=0

2. Extract it into your server's addons folder.

3. In the mapcontent folder, place all of your custom addon sqf files.

4. Open init\fn_init.sqf.

5. Edit the lines to include each addon name. An example is included in the fn_init.sqf:

[] execVM "a3_custom\mapcontent\yourcustom.sqf";

Repack it and upload it to your server's addons folder.

Long shot, you don't still have that download do you, I'm making map content but cant test it on my test server and need that PBO :)

If you have it I would love you for ever and ever!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...