BetterDeadThanZed

Include your custom objects and buildings in a server addon

160 posts in this topic

Credits: The original PBO used for this post was obtained from someplace that I don't recall. I simply created the tutorial to make it easy for everyone to understand.

This method lets you create custom content in the editor and make it into a server side pbo. All items can have simulation enabled on them.

  • Make sure you have the Exile Eden plugin from the Exile Downloads page in your @Exile\addons folder. Personally, I created an @Exile_Edit folder and put it in the addons folder of that so I could just load that instead of moving that Exile Eden plugin every time I wanted to play.
  • Start the editor and create your addons. I won't go into how to place objects and move them around, etc. You should know how to do that. Please don't ask how to do that. Create a new thread for that.
  • Once you're happy with what you've designed, go to the File menu up top and save your creation so you can edit it later.
  • Go to the "Exile" drop down menu and select "Save initServer.sqf":

20161107142707_1.jpg

  • On the window that pops up on your screen, click on Copy:

20161107144717_1.jpg

 

  • On your desktop, create a blank file and paste the contents that were copied to your clipboard.
  • Save that file as yourcustom.sqf (Pick an appropriate name for your content).
  • Download this pbo: https://www.dropbox.com/s/32v7i81loel8l2m/a3_custom.pbo?dl=0 and extract it to your desktop.
  • Copy yourcustom.sqf to the pbo's a3_custom\mapcontent folder.
  • Open fn_init.sqf, found in the pbo's "init" folder.
  • 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 @ExileServer\addons folder.

This puts your addons serverside to players don't have to download as much and it protects what you've created. You can also do the items around your traders this way too.

NOTE: If you want simulation enabled (ie: you want a working light), the double click on the item you place and select "Enable Simulation". Be sure to enable simulation on any buildings you place or else you won't be able to open the doors. Enabling simulation lets flags flutter in the wind, lamps work, gates open, etc.

 

  • Like 24

Share this post


Link to post
Share on other sites
Advertisement

heh :)

Not sure if I'm allowed to link to epoch forums, but here it goes :)

http://epochmod.com/forum/index.php?/topic/32780-community-server-side-mod/

This does what Betterdead posted, and explains a bit what's going on. And yeah, this way of adding your own stuff like in the OP really makes things easy.

 

Yeah, that's my post on the Epoch forums. I wasn't going to just post a link and tell people to go read it there.

Share this post


Link to post
Share on other sites

I don't want to muddy this thread up so if this is an inappropriate place to ask this please tell me. 

Would anyone know why I get createvehicle kicks upon loading in? Is anyone here using infistar and using this method? 

Share this post


Link to post
Share on other sites

I don't want to muddy this thread up so if this is an inappropriate place to ask this please tell me. 

Would anyone know why I get createvehicle kicks upon loading in? Is anyone here using infistar and using this method? 

I've used Infistar with this method. You'll need to check to see exactly what you are being kicked for and just add an exemption for it. It may be something like a smoke or fire effect, as that is a common one to be kicked for when it comes to custom server addons.

Share this post


Link to post
Share on other sites

I've used Infistar with this method. You'll need to check to see exactly what you are being kicked for and just add an exemption for it. It may be something like a smoke or fire effect, as that is a common one to be kicked for when it comes to custom server addons.

Darn I am getting create vehicle kicks and I have gone through about 25-50 objects before I thought to myself this probably is not right/not how I am suppose to do it. Well looks like ill be sorting out the filters for a while haha, Thank you for the reply! 

Edited by Nakama

Share this post


Link to post
Share on other sites

Darn I am getting create vehicle kicks and I have gone through about 25-50 objects before I thought to myself this probably is not right/not how I am suppose to do it. Well looks like ill be sorting out the filters for a while haha, Thank you for the reply! 

If you're getting that many kicks, there's definitely something wrong. Did you only start getting those kicks after following this post?

Share this post


Link to post
Share on other sites

No not just this method. i've followed a few diff tutorials for adding things server side and both results are the same. I've looked at this tutorial and this one.

I also tried my best took a look at how others have set up their server scripts as well i.e A3XAI. I am pretty sure I have everything set correctly, I might just try to make a new server and install the a3_custom.pbo first before anything else and see if anything changes. 

Folder structure for the a3_custom.pbo is as follow

init (Folder)
fn_init.sqf

diag_log "Starting Custom Content PBO";

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


mapcontent (Folder)
example.sqf

_objects = 
[
	["Land_CarService_F",[14618.7,16877.4,0.900759],131.363,0,0,false],
	["Misc_cargo_cont_small2",[6780.3555,2807.3757,7.1525574e-006],-14.890921,0,0,false],
	["Land_Misc_Cargo1E_EP1",[6777.2798,2807.8171,1.2874603e-005],91.827599,0,0,false],
	["Land_Misc_Cargo2E",[6744.5732,2805.3057,1.0967255e-005],6.6880774,0,0,false],
	["Land_Misc_Cargo2E_EP1",[6771.2139,2807.8926,-2.3841858e-006],91.39473,0,0,false],
	["Misc_Cargo1B_military",[6749.2212,2806.9519,6.8664551e-005],89.712852,0,0,false],
	["Land_Misc_Cargo2E",[6755.5225,2806.6729,0.00020170212],118.14823,0,0,false],
	["Land_Misc_Cargo1E_EP1",[6764.8555,2807.6887,0.00018835068],52.166279,0,0,false],
	["Misc_Cargo1Bo_military",[6759.564,2805.1318,0.00012731552],23.360346,0,0,false],
	["Misc_cargo_cont_small2",[6754.9175,2809.5032,0.00033521652],32.005573,0,0,false],
	["Misc_Cargo1B_military",[6761.6563,2813.7161,0.00032949448],103.0162,0,0,false],
	["Land_Misc_Cargo1E_EP1",[6764.3335,2810.7808,2.5458691],-23.45541,0,0,false],
	["Misc_Cargo1B_military",[6757.2568,2811.7756,-4.7683716e-007],-10.225335,0,0,false],
	["Land_Misc_Cargo1Eo_EP1",[6756.9878,2812.2039,2.63357],-11.321586,0,0,false],
	["Land_Misc_ConcPipeline_EP1",[6768.5649,2705.6323,-7.2240829e-005],168.2023,0,0,false],
	["Land_Misc_ConcPipeline_EP1",[6773.8457,2704.2361,-0.00010108948],166.65631,0,0,false],
	["Misc_Cargo1B_military",[6786.9912,2819.4714,2.8133392e-005],78.002739,0,0,false],
	["Land_Misc_Cargo2E",[6781.0386,2814.1069,5.2452087e-006],19.749371,0,0,false],
	["Land_Misc_Cargo2E_EP1",[6778.7676,2762.7783,6.6757202e-006],180.29004,0,0,false],
	["Land_Misc_Cargo2E_EP1",[6793.5586,2820.7507,-3.528595e-005],94.576622,0,0,false],
	["Land_Misc_Cargo2E",[6768.8887,2767.8315,9.5367432e-007],87.045898,0,0,false],
	["Land_Misc_Cargo1E_EP1",[6763.7686,2764.657,1.4305115e-005],91.178627,0,0,false],
	["Misc_Cargo1B_military",[6771.3901,2755.8689,-2.1457672e-005],1.2002251,0,0,false],
	["Land_Misc_Cargo1Eo_EP1",[6775.0601,2755.7698,0.024542771],1.2002251,0,0,false],
	["Land_Misc_IronPipes_EP1",[6768.502,2706.7974,-0.47789973],260.81033,0,0,false],
	["Land_Misc_GContainer_Big",[6764.7158,2707.2998,1.2874603e-005],448.39688,0,0,false],
	["Land_Misc_Cargo2E",[6745.9902,2751.679,4.7683716e-006],101.32362,0,0,false],
	["Land_Misc_Cargo1E_EP1",[6744.6172,2747.5835,3.4332275e-005],13.476638,0,0,false],
	["Misc_Cargo1B_military",[6743.5425,2741.2937,1.7642975e-005],174.82036,0,0,false],
	["Land_Misc_Cargo2E_EP1",[6742.5259,2735.3108,6.7710876e-005],48.144806,0,0,false],
	["Land_Misc_Cargo2E_EP1",[6793.9424,2703.7856,-4.4345856e-005],80.485435,0,0,false],
	["Misc_Cargo1B_military",[6786.8105,2703.8745,2.6226044e-005],91.440681,0,0,false],
	["Land_Misc_Cargo1E_EP1",[6780.8506,2706.1816,6.1988831e-006],149.70676,0,0,false],
	["Misc_cargo_cont_small2",[6778.5288,2709.1165,4.3392181e-005],76.14901,0,0,false],
	["Land_Misc_Cargo2E_EP1",[6763.9155,2701.5349,5.3882599e-005],92.404015,0,0,false],
	["Misc_Cargo1B_military",[6769.7495,2702.8052,-0.1365574],71.107567,0,0,false],
	["Land_Misc_Cargo1Eo_EP1",[6773.353,2706.186,2.9737029],31.207632,0,0,false],
	["Misc_concrete_High",[6776.4443,2706.6309,-4.7683716e-007],38.687588,0,0,false],
	["Land_Misc_Cargo2E",[6742.3735,2726.5974,-7.6293945e-006],15.058854,0,0,false],
	["Misc_cargo_cont_small2",[6743.3438,2722.2666,3.3378601e-005],-3.0948071,0,0,false],
	["Misc_Cargo1B_military",[6745.0737,2709.137,-4.7683716e-007],-41.001125,0,0,false],
	["Land_Misc_Cargo1E_EP1",[6748.0415,2704.9697,3.0040741e-005],-95.540245,0,0,false],
	["Land_Misc_Cargo2E",[6753.2568,2705.0522,2.6226044e-005],-30.795647,0,0,false],
	["Misc_cargo_cont_small_EP1",[6759.9678,2703.9717,4.4345856e-005],-27.205614,0,0,false],
	["UAZWreck",[6741.1147,2738.2437,3.0994415e-005],-47.987186,0,0,false],
	["datsun01Wreck",[6741.6357,2749.3491,2.8610229e-006],-100.42702,0,0,false],
	["UralWreck",[6741.9463,2705.6619,5.197525e-005],-123.90734,0,0,false],
	["T72Wreck",[6750.9609,2810.9475,5.0067902e-005],-40.11972,0,0,false],
	["T72WreckTurret",[6752.6021,2815.5972,-0.23512141],388.14938,0,0,false],
	["SKODAWreck",[6777.8872,2810.926,0.00013685226],-70.44593,0,0,false],
	["datsun01Wreck",[6768.4507,2812.2268,0.00010061264],27.79188,0,0,false],
	["datsun02Wreck",[6755.9575,2816.1379,2.5272369e-005],-60.097233,0,0,false],
	["Fence_corrugated_plate",[6745.2095,2732.5356,3.3378601e-005],5.5201635,0,0,false],
	["Fence_corrugated_plate",[6765.3032,2748.5046,-9.5367432e-007],179.90446,0,0,false],
	["Fence_corrugated_plate",[6761.3315,2748.5864,6.1988831e-006],181.31631,0,0,false],
	["Fence_corrugated_plate",[6757.3447,2748.675,2.1457672e-005],181.31631,0,0,false],
	["Fence_corrugated_plate",[6753.3716,2748.7573,4.2915344e-006],181.31631,0,0,false],
	["Fence_corrugated_plate",[6749.4517,2749.395],197.47295,0,0,false],
	["Fence_corrugated_plate",[6766.9644,2734.2146,3.8146973e-006],-91.346359,0,0,false],
	["Fence_corrugated_plate",[6767.291,2746.5354,3.3378601e-006],-90.294914,0,0,false],
	["Land_Ind_BoardsPack1",[6745.3989,2762.8679,3.7193298e-005],-92.73687,0,0,false],
	["Land_Ind_BoardsPack2",[6744.6758,2765.3784,8.2969666e-005],-1.7900879,0,0,false],
	["Barrels",[6744.8169,2754.5864,1.6212463e-005],-0.99772179,0,0,false],
	["Misc_palletsfoiled_heap",[6746.6294,2784.4421,6.3896179e-005],88.16346,0,0,false],
	["Land_Ind_BoardsPack1",[6745.4282,2768.2644,9.5367432e-006],-92.73687,0,0,false],
	["Misc_palletsfoiled_heap",[6744.8506,2771.7681,1.5258789e-005],-2.5730023,0,0,false],
	["Barrels",[6744.8125,2756.0532,1.8596649e-005],-0.99772179,0,0,false],
	["Barrels",[6746.9531,2754.6094,3.528595e-005],-0.99772179,0,0,false],
	["Barrels",[6746.9487,2756.0762,3.7670135e-005],-0.99772179,0,0,false],
	["Misc_palletsfoiled",[6744.7271,2775.4255,3.4809113e-005],-2.307152,0,0,false],
	["Misc_palletsfoiled",[6745.5098,2787.6616,-6.1988831e-006],30.265751,0,0,false],
	["Misc_palletsfoiled",[6748.0898,2787.4392,-1.335144e-005],-15.138939,0,0,false]
];

{
    private ["_object"];

    _object = (_x select 0) createVehicle [0,0,0];
    _object setDir (_x select 2);
    _object setPosATL (_x select 1);
    _object allowDamage false;
    _object enableSimulationGlobal false; // 
}
forEach _objects;


$PREFIX$

config.cpp

class CfgPatches {
	class A3_custom {
		units[] = {};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {};
	};
};

class CfgFunctions {
	class A3C {
		class A3CCustom {
			file = "a3_custom\init";
			class init {
				postInit = 1;
			};
		};
	};
};

 

Edited by Nakama

Share this post


Link to post
Share on other sites

I know it's kind of a silly question, but you ARE using the BE filters from Infistar, right?

Yes I am and no worries, any suggestion is appreciated I should have already stated I was using the proper filters.

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

  • Recently Browsing   0 members

    No registered users viewing this page.