Jump to content

Dayz style heli crash sites


Richie

Recommended Posts

7 hours ago, rvg?! said:

can't see any typos yet.

which editor and pbo packer you used?

I use NotePad++ and Eliteness.

Just checked my config.cpp against the original. Mine's slightly different:

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

class CfgFunctions {
    class helicrash {
        class A3CCustom {
            file = "helicrash"; // *** NOTE THAT THE ORIGINAL HAS helicrash/init in this line
            class init {
                postInit = 1;
            };
        };
    };
};

I also moved the fn_init.sqf file to the same folder as the other files and removed the init folder. Can't remember why I did that now but it works and I assume that I was having problems before doing so...

FYI, $PBOPREFIX$ is:

///////<HEADER>///////
prefix=helicrash

//////</HEADER>//////

EDIT: and thinking about it I think the problem was the lack of a $PBOPREFIX$ in the downloaded PBO with Eliteness (but I flailed around for a bit back when I was first starting with server admin - a lot of trial and error and searching these forums and Google).

Link to comment
Share on other sites

At the time I was a n00b to all of this server, SQF and PBO stuff (some would say that's still the case), I think I was just trying to replicate the file structure of a PBO that worked. As mentioned in my edit above I'm pretty sure that creating the $PBOPREFIX$ was what got it working for me. For example, when creating the PBO from the current download without the PBO prefix defined Eliteness creates this:

///////<HEADER>///////
prefix=Users\Grahame Curtis\EpochZ\helicrash
Mikero=DePbo.dll
Pbo Type is: Arma Addon
Sha: 'DCC97A8D289C53BB78BCC3E3D48BF07E9AE6B278'
//////</HEADER>//////

And the prefix looks wrong. Creating a $PBOPREFIX$ with just "prefix=helicrash" in it I believe fixed the problem? At least, mine does indeed work. From my RPT I get the following lines and the helo crashes are present on the map:

 8:56:17 "Loading Heli Crashes"
 8:56:18 "[HSBlackmarket]: Found position for a HSBlackmarket ... (120207) [12017.7,20772.3]"
 8:56:18 No speaker given for Panagiotis Dimitriadis
 8:56:18 [SDROP]: Starting Supply Drop Mission Framework.
 8:56:18 [SDROP]: Functions loaded. Starting supply drop timer.
 8:56:20 "[HSBlackmarket]: HSBlackmarket Creating a Marker"
 8:56:21 "[HSBlackmarket]: Found position for a HSBlackmarket ... (138062) [13861.7,6233.61]"
 8:56:21 No speaker given for Michalis Nicolau
 8:56:22 "[HSBlackmarket]: HSBlackmarket Creating a Marker"
 8:56:23 "Heli Crashes Loaded"

I'd send you my PBO but I've replaced all weapon loot (except Marksman DLC) with CUP weapon loot

EDIT: Can you see an error like this in your RPT?

 8:55:26 Warning Message: Script \<some path>\helicrash\init\fn_init.sqf not found

Would be just after installation of your server MODS early in the RPT

Link to comment
Share on other sites

change your config.cpp to the original:

 

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

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

because with your edit:

    file = "helicrash";

it searches for the init file in a folder called "helicrash"  that would be the root of your addon and the fn_init.sqf isnt there. (except you moved it to the dir)

The init file is in this case in the "init" folder. (magic isnt it? ;)

Then create the file $PBOPREFIX$ in the root of your unpacked helicrash.pbo

and just put this into the file

x\addons\helicrash

after that pack the pbo with eliteness.

 

then you dont get this error:

 8:55:26 Warning Message: Script \<some path>\helicrash\init\fn_init.sqf not found

anymore.

 

 

Link to comment
Share on other sites

No, put

prefix=helicrash

into the $PBOPREFIX$.txt file and MakePBO in Eliteness. Otherwise, as far as I know you would have to change the line

call compile preprocessFileLineNumbers "helicrash\HeliCrashes.sqf";

in the fn_init.sqf.

So, to summarize

Download the helicrash.pbo. DePBO it and you'll have a file structure like this:

helicrash/
	config.cpp
	HeliCrashes.sqf
    init/
		fn_init.sqf

Make your changes to HeliCrashes.sqf. Don't change config.cpp

Create the file $PBOPREFIX$.txt with the line above and MakePBO in Eliteness

There'll be a helicrash.pbo in the directory above that you upload to @EpochHive/AddOns

You should be good to go.

Link to comment
Share on other sites

Sorry about that - the forum software didn't expand your code boxes so I thought you were asking how to do it :ph34r:

I'll probably fix up the file structure when I do another update (works fine for me because I did move the file), but that's why I did the summary.

Quick question though: so it doesn't matter whether the prefix is x\addons\helicrash or helicrash then with no changes in fn_init? Just trying to get more understanding of how things work

Link to comment
Share on other sites

Thanks.

Quote

Also its a common sense to use init scripts and not to call it straight away. But as i said, several ways for one goal.

Oh, I use the init - I just moved it...

Quote

And i dont know how far you "modified" your helicrash pbo

All I did was reduce number of loot piles and took out almost all ARMA 3 weapons and replaced with CUP. (Did that for BlackEagl's, WAI, SEM, LootSpawner, Epoch traders, HSTrader and loots.h too)

Link to comment
Share on other sites

Yes. Sorry for the confusion in the thread. I did that because (and this was when I'd just started bringing a server online) I didn't really understand the system. Not one of the other add-on PBOs I was looking at had an init folder so (not knowing about PBOPREFIX and finding no one else with the same issue) I first assumed that that was a problem. Was sort of soon after everything moved to server side PBOs too rather than folders in AddOns so I was guessing that directory structure was the problem. I was wrong but I did work it out and move on to bigger and better things.

Link to comment
Share on other sites

  • 2 months later...
On 4/20/2015 at 5:49 PM, Richie said:

 

Put any item you want inside the array, weapons added will automatically add between 1 and 3 mags.

Great addon Richie thx.

And second_coming for the A3EAI input too.

Running default from link in post 1 - No ammo is spawning at all, everything in the loot list spawns.

happening to anyone else? No errors in the .RPT

I just put the ammo in the loot list as a workaround for now.

added a side of the hill shot

cheers

natoed

 

 

20160627190613_1.jpg

Link to comment
Share on other sites

On 6/27/2016 at 5:28 AM, natoed said:

Running default from link in post 1 - No ammo is spawning at all, everything in the loot list spawns.

Nato, exact same thing on our server.  Everything else spawns in just fine, but zero ammo.

Link to comment
Share on other sites

Same with the Ammo..... I fix it with new Loot params....

 

Spoiler

_loot = [
    "ItemCompass","ItemGPS","ItemWatch","FAK","Rangefinder","Binocular","NVG_EPOCH","acc_flashlight","acc_pointer_IR",
    "20Rnd_762x51_Mag","SniperRifleAmmo_5Rnd_127x108_Mag","srifle_DMR_02_F","M14_EPOCH","7Rnd_408_Mag","ItemDocument","CircuitParts",
    "VehicleRepair","Towelette","HotColdPacks","lighter_epoch","ItemSodaOrangeSherbet","ItemSodaAlpineDude",
    "ItemLockbox","ItemBattery","jerrycan_epoch","JackKit","AKM_EPOCH","sr25_epoch","Rifle_arifle_Katiba_F","Rifle_arifle_MX_GL_F",
    "Rifle_l85a2_epoch","m4a3_EPOCH","Rifle_m16_EPOCH","Rifle_arifle_Mk20_F","RifleAmmo_30Rnd_556x45_Stanag","30Rnd_762x39_Mag","30Rnd_556x45_Stanag","MachinegunAmmo_200Rnd_65x39_cased_Box","arifle_MX_SW_F",
    "hgun_P07_F","30Rnd_9x21_Mag","optic_Arco","optic_MRCO","optic_Holosight","EnergyPack",
    "SatchelCharge_Remote_Mag","B_AssaultPack_cbr","B_Carryall_khk",
    "B_FieldPack_cbr","B_Kitbag_sgg","U_O_CombatUniform_ocamo","U_O_PilotCoveralls","MaleUniforms_OG_Guerilla","U_CamoRed_uniform","V_1_EPOCH","V_26_EPOCH","V_38_EPOCH","H_6_EPOCH","H_23_EPOCH",
    "H_98_EPOCH"
];

 

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 months later...

@vaxoiva

depbo your helicrash.pbo in your @epochhive\addons folder

find file named HeliCrashes.sqf

with notepad ++ line 29 (in my helicrash.pbo)

_spawnCenter = [14939.934,0.053499073,15083.272]; //Center of your map (usually in mission.sqm)
_min = 0; // minimum distance from the center position (Number) in meters
_max = 20000; // maximum distance from the center position (Number) in meters

note the

 //Center of your map (usually in mission.sqm)

open your mission.sqm find , this is the center coordinates from the default epoch.Chernarus.pbo

		items=103;
		class Item0
		{
			dataType="Marker";
			position[]={6968.658,0,8345.914};
			name="center";
			type="Empty";
			id=0;

change the _spawnCenter coordinates if you have not already do so.

dont forget to change the

_max = 20000; // maximum distance from the center position (Number) in meters

reduce the _max = 20000; // maximum distance from the center position (Number) in meters

from memory I use to have my set at 14000 so the crashes didn't spawn in the debug zone

that's it, now repbo and drop back in your @epochhive\addons folder

Link to comment
Share on other sites

  • 2 months later...
10 hours ago, Drokz said:

Anyone got the Ammo thing working?

something got changed/broken due to A3 updates I think, the only workaround is to put ammo in the loot list, scroll a couple post up.

Its hit and miss as to weapons and ammo that spawn, keeps it interesting thou.

also if running A3EAI try second_comings AI @ crashsites.

Spoiler

//Infantry spawns using the A3EAI thx second_coming
        _CrashName = format ["Crashsite_%1",_j];
        [_CrashName,_posOfCrash,75,5,2,false,300] call A3EAI_createCustomInfantryQueue;     //[_CrashName,_posOfCrash,75,XXX,2,false,300] change XXX to the number of AI you want to spawn
        diag_log text format ["[HeliCrash]: Creating AI at %1 (%2)",_CrashName,_posOfCrash];

the code in the spoiler get inserted between

_posOfCrash = [_spawnCenter,_min,_max,_mindist,_water,20,_shoremode] call BIS_fnc_findSafePos; // find a random loc

insert here //Infantry spawns using the A3EAI thx second_coming

_helicopters = ["Land_UWreck_MV22_F","Land_Wreck_Hunter_F","Land_Wreck_Plane_Transport_01_F","Land_Wreck_Offroad_F","Land_Wreck_BRDM2_F"]; //Add Heli classnames here

 

hope this helps.

Link to comment
Share on other sites

  • 2 weeks later...

We rewrote Richies script some time ago when the ammo bug came up.

Might be usefull for some of you.

//#################################################
//### UKGZ 2016 by rvg?! & TheStainlessSteelRat ###
//#################################################

rms_crashsite_amount = [8,15];			// Amount of crashsites
rms_crashsite_loot_amount = [2,5];		// Amount of lootpiles close to each crashsite

rms_wrecks = ["Land_Wreck_BMP2_F","Land_Wreck_BRDM2_F","Land_Wreck_HMMWV_F","Land_Wreck_Skodovka_F","Land_Wreck_CarDismantled_F","Land_Wreck_Truck_F","Land_Wreck_Car2_F",
"Land_Wreck_Car_F","Land_Wreck_Car3_F","Land_Wreck_Hunter_F","Land_Wreck_Offroad_F","Land_Wreck_Offroad2_F","Land_Wreck_UAZ_F","Land_Wreck_Truck_dropside_F",
"Land_Wreck_Van_F","Land_Wreck_Heli_Attack_01_F"];

rms_guns =  ["ruger_pistol_epoch","ruger_pistol_epoch_snds_F","ruger_pistol_epoch_pointer_F","1911_pistol_epoch","hgun_ACPC2_F","hgun_ACPC2_snds_F","hgun_P07_F",
"hgun_P07_snds_F","hgun_Pistol_heavy_01_F","hgun_Pistol_heavy_01_snds_F","hgun_Pistol_heavy_01_MRD_F","hgun_Pistol_heavy_02_F","hgun_Pistol_heavy_02_Yorris_F",
"hgun_Rook40_F","hgun_Rook40_snds_F","hgun_Pistol_Signal_F","hgun_P07_khk_F","hgun_Pistol_01_F","Hatchet","CrudeHatchet","MultiGun",
"arifle_Mk20_F","arifle_Mk20_plain_F","arifle_Mk20C_F","arifle_Mk20C_plain_F","arifle_Mk20_GL_F","arifle_Mk20_GL_plain_F","arifle_Mk20C_ACO_F","arifle_Mk20C_ACO_pointer_F",
"arifle_Mk20_pointer_F","arifle_Mk20_Holo_F","arifle_Mk20_ACO_F","arifle_Mk20_ACO_pointer_F","arifle_Mk20_MRCO_F","arifle_Mk20_MRCO_plain_F","arifle_Mk20_MRCO_pointer_F",
"arifle_Mk20_GL_MRCO_pointer_F","arifle_Mk20_GL_ACO_F","arifle_SDAR_F","arifle_TRG21_F","arifle_TRG20_F","arifle_TRG21_GL_F","arifle_TRG20_Holo_F","arifle_TRG20_ACO_pointer_F",
"arifle_TRG20_ACO_Flash_F","arifle_TRG20_ACO_F","arifle_TRG21_ACO_pointer_F","arifle_TRG21_ARCO_pointer_F","arifle_TRG21_MRCO_F","arifle_TRG21_GL_MRCO_F",
"arifle_TRG21_GL_ACO_pointer_F","hgun_PDW2000_F","hgun_PDW2000_snds_F","hgun_PDW2000_Holo_F","hgun_PDW2000_Holo_snds_F","SMG_01_F","SMG_01_Holo_F","SMG_01_Holo_pointer_snds_F",
"SMG_01_ACO_F","SMG_02_F","SMG_02_ACO_F","SMG_02_ARCO_pointg_F","m4a3_EPOCH","m16_EPOCH","m16Red_EPOCH","m249_EPOCH","m249Tan_EPOCH","LMG_03_F","arifle_AKS_F","arifle_CTAR_blk_F",
"arifle_CTAR_hex_F","arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTAR_GL_hex_F","arifle_CTAR_GL_ghex_F","arifle_CTAR_blk_ACO_Pointer_F","arifle_CTAR_blk_Pointer_F",
"arifle_CTAR_blk_ACO_F","arifle_CTAR_GL_blk_ACO_F","arifle_CTAR_blk_ARCO_Pointer_F","arifle_CTAR_blk_ACO_Pointer_Snds_F","arifle_CTAR_GL_blk_ACO_Pointer_Snds_F","arifle_CTAR_blk_ARCO_Pointer_Snds_F",
"arifle_CTAR_blk_ARCO_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_CTARS_blk_Pointer_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F",
"arifle_SPAR_01_snd_F","arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F",
"SMG_05_F","ChainSaw","ChainSawB","ChainSawG","ChainSawP","ChainSawR","l85a2_epoch","l85a2_ris_epoch","l85a2_ris_ng_epoch","l85a2_pink_epoch","l85a2_ugl_epoch",
"LMG_Mk200_F","LMG_Mk200_MRCO_F","LMG_Mk200_pointer_F","arifle_Katiba_F","arifle_Katiba_C_F","arifle_Katiba_GL_F","arifle_Katiba_C_ACO_pointer_F","arifle_Katiba_C_ACO_F",
"arifle_Katiba_ACO_F","arifle_Katiba_pointer_F","arifle_Katiba_ACO_pointer_F","arifle_Katiba_ARCO_F","arifle_Katiba_ARCO_pointer_F","arifle_Katiba_GL_ACO_F",
"arifle_Katiba_GL_ARCO_pointer_F","arifle_Katiba_GL_ACO_pointer_F","arifle_Katiba_GL_Nstalker_pointer_F","arifle_Katiba_GL_ACO_pointer_snds_F",
"arifle_Katiba_C_ACO_pointer_snds_F","arifle_Katiba_ACO_pointer_snds_F","arifle_Katiba_ARCO_pointer_snds_F","arifle_MXC_F","arifle_MX_F","arifle_MX_GL_F",
"arifle_MX_SW_F","arifle_MXM_F","arifle_MX_pointer_F","arifle_MX_Holo_pointer_F","arifle_MX_Hamr_pointer_F","arifle_MX_ACO_pointer_F","arifle_MX_ACO_F",
"arifle_MX_GL_ACO_F","arifle_MX_GL_ACO_pointer_F","arifle_MX_GL_Hamr_pointer_F","arifle_MXC_Holo_F","arifle_MXC_Holo_pointer_F","arifle_MX_SW_pointer_F",
"arifle_MX_SW_Hamr_pointer_F","arifle_MXM_Hamr_pointer_F","arifle_MXC_ACO_F","arifle_MXC_Holo_pointer_snds_F","arifle_MXC_SOS_point_snds_F",
"arifle_MXC_ACO_pointer_snds_F","arifle_MXC_ACO_pointer_F","arifle_MX_ACO_pointer_snds_F","arifle_MX_RCO_pointer_snds_F","arifle_MX_GL_Holo_pointer_snds_F",
"arifle_MXM_SOS_pointer_F","arifle_MXM_RCO_pointer_snds_F","arifle_MXM_DMS_F","arifle_MXC_Black_F","arifle_MX_Black_F","arifle_MX_GL_Black_F",
"arifle_MX_SW_Black_F","arifle_MXM_Black_F","arifle_MX_GL_Black_Hamr_pointer_F","arifle_MX_Black_Hamr_pointer_F","arifle_MX_SW_Black_Hamr_pointer_F",
"LMG_Mk200_LP_BI_F","LMG_Mk200_BI_F"];

fn_rnd_num = {

_low = _this select 0;
_high = _this select 1; 
_calc = _high - _low;
_rnd_num = round(random _calc) + _low;

_rnd_num

};

_size = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize");

rms_mapcenter_pos = [_size/2,_size/2,0];

_crash_amount = rms_crashsite_amount call fn_rnd_num;



for "_crashsites" from 1 to _crash_amount do {

		_loot_amount = rms_crashsite_loot_amount call fn_rnd_num;
		
		_crashpos = [rms_mapcenter_pos, 100, 15000,15,0,30,0] call BIS_fnc_findSafePos;
		
		rms_wrecks call BIS_fnc_arrayshuffle;
		_crashObj = rms_wrecks call BIS_fnc_SelectRandom;
		
		_crashObj_final = _crashObj createVehicle _crashpos;
		
		_fire = "test_EmptyObjectForFireBig" createVehicle _crashpos;
		_fire attachto [_crashObj_final, [0,0,-1]];  
		
		_crashObj_final setVariable ["LAST_CHECK", (diag_tickTime + 14400)];
		
		for "_crashloot" from 1 to _loot_amount do {
		
			_lootpos = [_crashpos,2,10,0,0,30,0] call BIS_fnc_findSafePos;
			
			_crate0 = createVehicle ["groundWeaponHolder", _lootpos, [], 0, "can_collide"];
					
			rms_guns call BIS_fnc_arrayshuffle;
			_lootObj = rms_guns call BIS_fnc_SelectRandom;
			
			_ammo = getarray(configFile >> "cfgWeapons" >> _lootObj >> "magazines" );
						
			_crate0 addItemCargoGlobal [_lootobj, 1]; 
			_crate0 addItemCargoGlobal [_ammo select 0, 3];
			
			_crate0 setVariable ["LAST_CHECK", (diag_tickTime + 14400)];
		
		};
		
		diag_log format ["[RMS] Crashsite at %1 with %2 lootpiles ",_crashpos,_loot_amount];
};

 

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...