Jump to content

Trying to make map addon pbo.


MrEnzO

Recommended Posts

I am trying to make a pbo with diffrent map addons I have made, mainly new tradercitys, but also AI bases.. And I don't wan't to add them in the altis.h because they have vectors in them.

 

Gdur8jJ.jpg

 

CxZsnS4.jpg

 

But I am can't get it to work. Do I need to call it from somewhere? What I understand of it is just to add it. I have tried to make one from scratch like this. 

I have even taken that one, renamed my addons and put them in, but nothing......

I have tested to put them in the mission pbo called them from the init file, that works, the only thing is that everything is dubble.

 

Anyone have a idea why it dosen't work?

Link to comment
Share on other sites

Checked that link to Darth_Rogue's post, he mentions adding them to mission.sqm. That file is a snowflake and unique in it's own way. If map additions were created in there, that's the only place you can use them.

 

Alternatively (my preferred) method would be using scripts to add content using some proper tools like x-cam. In this case I would be able to do both - add my own custom map additions and have them inside separate .pbo server side. Xcam also exports ready SQF scripts that are ready to go on server.

From this point i'd have 2 choices:

1) execute these scrips from anywhere server side

2) make new a new folder, add prefix file, config.cpp and exported sqf files. Edit config file and add exports there as functions to cfgFunctions with preinit values. Create PBO and throw it anywhere server side, done.

 

Does that make any sense?

 

Now, onto your issue with items doubling - reason that happens is that both server and ALL clients, each spawns an instance of an object. Only server should do that. add isDedicated check to your code if using mpmissions. But I would strongly suggest putting files server side, there is no good reason for clients to download extra junk.

if (isDedicated) then {
execVM "path\to\my\addons\file.sqf";
}
Link to comment
Share on other sites

What I understand of it is that what he did in the mission.sqm is just the markers. I have made this 

2) make new a new folder, add prefix file, config.cpp and exported sqf files.

 

 and put it under @epochhive/addons and nothing happens. I have taken his a3_custom.pbo.replace his sqf with mine(exported sqf), just too test. And still no go. I have even taken just my objects and pasted it in his file. And the server goes nope, don't want to do it. It starts and run but no new trader citys.

private ["_objs"];
_objs = [
["Land_MilOffices_V1_F",[18295.6,14226.4,0.590851],167.472,[[0.216916,-0.97619,0],[0,-0,1]],false],
["Land_CncWall4_F",[18226.3,14212.6,-0.451051],111.861,[[0.92809,-0.372356,0],[0,-0,1]],false],
..............
..............
And so on.
];


{
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;

So I am at a lost here. And I uses Mecas Editor 

X-cam is just a little too big, it's greate tool, but it feels like using a shotgun to kill a fly. I gone use it in the future I think, but for now mecas editor is good.

Yes, I just put them in the mission.pbo to see if they worked at all, so the pbo server side is the way I am doing it.

So I don't know what to do.

 
Link to comment
Share on other sites

PBO is loaded by the server either way, the question is - are you asking server to read these scripts correctly. If it's a pbo only method, then as I said earlier, you'll need to edit config.cpp file and add your scripts to cfgFunctions, otherwise if accessing scripts from elsewhere, you need to make sure that prefix is set up correctly for files to be found. If all of this makes no sense to you, just PM me your pbo, i'll look into it, will reply in public here.

Link to comment
Share on other sites

In hive/server_settings, in atlis.h

 

look for this

staticNpcPos[] = {
// tradercity 1
{ "C_man_w_worker_F", { 13323.1, 14527.3, 0.00144649 }, 201.163 },
{ "C_man_w_worker_F", { 13331.2, 14524.6, 0.00144362 }, 182.606 },
{ "C_Orestes", { 13318, 14518.3, 0 }, 173.189 },
{ "C_man_shorts_4_F_asia", { 13349.9, 14490.7, 0.750791 }, 339.975 },
// tradercity 2
{ "C_man_hunter_1_F", { 6177.13, 16835.1, 0.0014267 }, 66.2026 },
{ "C_man_p_fugitive_F_afro", { 6196.01, 16833, 0.00157166 }, 310.814 },
// tradercity 3
{ "C_journalist_F", { 18460.6, 14259.6, 0.00160599 }, 317.76 },
{ "C_scientist_F", { 18441.7, 14271.7, 0.00142479 }, 49.9898 }
};

replace cords where you want AI to stand

Link to comment
Share on other sites

PBO is loaded by the server either way, the question is - are you asking server to read these scripts correctly. If it's a pbo only method, then as I said earlier, you'll need to edit config.cpp file and add your scripts to cfgFunctions, otherwise if accessing scripts from elsewhere, you need to make sure that prefix is set up correctly for files to be found. If all of this makes no sense to you, just PM me your pbo, i'll look into it, will reply in public here.

I sent you pm.

Link to comment
Share on other sites

In hive/server_settings, in atlis.h

 

look for this

staticNpcPos[] = {
// tradercity 1
{ "C_man_w_worker_F", { 13323.1, 14527.3, 0.00144649 }, 201.163 },
{ "C_man_w_worker_F", { 13331.2, 14524.6, 0.00144362 }, 182.606 },
{ "C_Orestes", { 13318, 14518.3, 0 }, 173.189 },
{ "C_man_shorts_4_F_asia", { 13349.9, 14490.7, 0.750791 }, 339.975 },
// tradercity 2
{ "C_man_hunter_1_F", { 6177.13, 16835.1, 0.0014267 }, 66.2026 },
{ "C_man_p_fugitive_F_afro", { 6196.01, 16833, 0.00157166 }, 310.814 },
// tradercity 3
{ "C_journalist_F", { 18460.6, 14259.6, 0.00160599 }, 317.76 },
{ "C_scientist_F", { 18441.7, 14271.7, 0.00142479 }, 49.9898 }
};

replace cords where you want AI to stand

This I know. I have made trader citys before, for my Bornholm server. But this time they have objects with vectors in them (objects that are laying down, leaning against the wall). But thanks anyway. If I can figure this out, I can release them so people can use them if they want to.  

Link to comment
Share on other sites

Hey ya sorry for late response, files in your pbo looks fine and dandy except your prefix does not work correctly, to fix that simply rename your PboPrefix.txt to $pboprefix$ (exactly like that, no extension). Some PBO packaging tools require % used instead of $.

You can check if prefix was added correctly by opening your .pbo file with PBOManager and clicking blue cog icon, it should appear in one of those tabs.

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
  • Discord

×
×
  • Create New...