Apoc's Airdrop Assistance - v1.4 Release

Apoc's Airdrop Assistance - v1.4 Release

« posted: Apr 18, 2015, 11:37 PM »
Sorry this took longer to get out than I wanted, ran into a few bugs that I needed to kill!

So here is my take on Cre4mpie's Airdrop system that he has posted.  Chunks and methods were taken from that for portions of this version, so props to Cre4mpie for all the work he had put forth.  I've also stripped some methods from base A3W, so due credit to AgentRev and the other devs there.

So how is this different than Cre4mpie's?  Here:
1) Object Spawning has been moved Server Side, so no BE filter nonsense.
2) Airdropped objects are delivered by AI controlled Huron
3) Command Menu code generation is handled automatically, so no tedious config there.

LouD was good enough to do a quick Youtube Vid!

Notes:
1) To add new crates you need to modify the fn_refillbox on the server scripts to have the matching crateNames.
-------> See This Post  <-------
2) The heli and carried objects are not damageable while being transported.  You can change this within the script if you want.
3) Money is taken from players' bank accounts
4) There is a 60 second cooldown timer
5) Persistence is active, so if you want to kill that you'll need to comment a couple lines

Install Instructions:
So we need to edit a few files to get this addon to work:
1) init.sqf  -- Add the following line under 3rd Party Scripts
Code: [Select]
[] execVM "addons\APOC_Airdrop_Assistance\init.sqf";

2) client\functions\playerActions.sqf   Add this to the first block with all of the fn_addManagedAction chunks
Code: [Select]
[format ["<img image='\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\supplydrop_ca.paa' color='%1'/> <t color='%1'>[</t>Airdrop Menu<t color='%1'>]</t>", "#FF0000"],"addons\APOC_Airdrop_Assistance\APOC_cli_menu.sqf",[], -100, false, false]

3) server\functions\fn_refillbox.sqf      Add these two additional cases to have the boxes shown in my config
Code: [Select]
case "airdrop_DLC_Rifles":
{
_boxItems =
[
// Item type, Item class(es), # of items, # of magazines per weapon
["wep", ["srifle_DMR_03_multicam_F", "srifle_DMR_02_sniper_F", "srifle_DMR_05_hex_F", "srifle_DMR_04_Tan_F"], 2,4],
["itm", ["V_RebreatherB", "V_PlateCarrierIAGL_dgtl", "V_TacVest_camo", "V_PlateCarrierGL_rgr"], RANDOM_BETWEEN(1,8)],
["itm", ["B_Carryall_mcamo", "B_Kitbag_mcamo"], RANDOM_BETWEEN(2,5)],
["itm", ["bipod_01_F_blk", "bipod_02_F_hex"], 3]
];
};
case "airdrop_DLC_LMGs":
{
_boxItems =
[
// Item type, Item class(es), # of items, # of magazines per weapon
["wep", ["MMG_02_black_F", "MMG_01_hex_F"], 2,5],
["itm", ["V_RebreatherB", "V_PlateCarrierIAGL_dgtl", "V_TacVest_camo", "V_PlateCarrierGL_rgr"], RANDOM_BETWEEN(1,8)],
["itm", ["B_Carryall_mcamo", "B_Kitbag_mcamo"], RANDOM_BETWEEN(2,5)],
["itm", ["bipod_01_F_blk", "bipod_02_F_hex"], 2]
];
};

4) server\antihack\filterExecAttempt.sqf     Need to add this to the list of "!_whitelisted then..." in the forEach
Code: [Select]
"APOC_srv_"

That should be all of the things that need changed!

Then you'll just need to drop the APOC_Airdrop_Assistance folder into your addons folder in your mission.

With the V1.25 zip, you can extract that to the root of your mission, and the folder structure will match the instructions above.  There will be a warning about overwriting fn_refillbox.sqf and processItems.sqf.  This is normal.  These two functions have been updated to correct backpack add functionality.  Be cautious of fn_refillbox, as it could overwrite any custom mission crates you might have created.

My Github commit:
V1:
https://github.com/MayhemServers/MAYHEM_A3Wasteland.Altis/commit/2aee85eb48ab8df5a094baa5d94b6b99106b4898
V1.1:
Firing Flares
Spawn Helo 5k from Player
Box Tweaks

V1.2:
Vehicles Drop Further Out, Land closer to player (yay Creampie!)

V1.25
Update A3W Functions to handle backpack additions to crates

V1.3
Food/Water spawned on ground after crate lands

V1.35
Fix for Flybys without Drop
V1.355 
Little Tweak, hopefully works better!  ZIP FILES NOT UPDATED FOR THIS YET

V1.4
Commit 1
Commit 2 - Github & Sourcetree are out to get me
Commit 3
Final Commit - Multiple Changes to Airdrop System; New Attempt at Heli Flyaway Bug; Player money taken after heli reaches drop point and is confirmed to be there

V1.45
Commit 1  Using a proper method to save player bank data on the server.
Commit 2  So this was some ugly github work.  Be careful!

Changelog:
v1          18APR2015 - Initial Public Unleashing.  I apologize...
v1.1       18APR2015 - Heli Spawns Near Player, Fires Flares when crate drops, changed box contents
v1.2       19APR2015 - Heli Drops vehicles further out, should land closer to player
v1.25     25APR2015 - Backpacks will now add to crates properly. 
v1.3       02MAY2015 - Food/Water appear after reg. crate hits ground.  Bypasses problem of food not falling.
v1.35     05MAY2015 - Fix for flybys without drop.  Obj. will detach when helo switches to Waypoint 2
v1.4       12MAY2015 - Another Attmept at the flybys.  Player money taken when drop should happen.
v1.45     12MAY2015 - Whoa!  Tweaks to the money saving routine, finally. 
  • Offline CREAMPIE
  • Armaholic
  • Veteran
  • ******
  • Posts: 1077
  • ^_^;;

Re: Apoc's Airdrop Assistance - v1 Release

« Reply #1 posted: Apr 19, 2015, 01:20 AM »
excellent !

Look forward to adding this in and testing tomorrow :)

Sleep for now ;)

- from the grassy knoll -

Re: Apoc's Airdrop Assistance - v1 Release

« Reply #2 posted: Apr 19, 2015, 04:53 AM »
Updated to V1.1.

I've included my copy fn_refillbox.sqf for easy use by those with less customized servers.

server\functions\  is the location that file needs dropped in (overwrite your standard one if you've not modified it from stock)

Re: Apoc's Airdrop Assistance - v1 Release

« Reply #3 posted: Apr 19, 2015, 05:45 PM »
Seem to be working, I been testing Loud R3F 3.1 on our servers so I need to figure out how to unlock the crates with out unlocking all mission crates.

Re: Apoc's Airdrop Assistance - v1 Release

« Reply #4 posted: Apr 19, 2015, 06:04 PM »
Well, I'm not familiar with that update, myself.

Where are the lock functions being set?

You can reverse whatever variable is being set after the crate is dropped, or within the switch structure where the item is being created. 
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: Apoc's Airdrop Assistance - v1 Release

« Reply #5 posted: Apr 19, 2015, 06:11 PM »
Add this variable to the object where _object is the name of the crate ofcourse

_object setVariable ["R3F_Log_Disabled", false, true];
  • Offline CREAMPIE
  • Armaholic
  • Veteran
  • ******
  • Posts: 1077
  • ^_^;;

Re: Apoc's Airdrop Assistance - v1 Release

« Reply #6 posted: Apr 19, 2015, 06:13 PM »
Excellent work ! Airdrop is working great ;)

- from the grassy knoll -

Re: Apoc's Airdrop Assistance - v1 Release

« Reply #7 posted: Apr 19, 2015, 06:15 PM »
Thanks Loud and thanks all for great addon

Re: Apoc's Airdrop Assistance - v1 Release

« Reply #8 posted: Apr 19, 2015, 07:53 PM »
v1.2 Posted.  Should make vehicles land closer to player.  Though I've noticed in high winds you may have a vehicle end up further out.

If anyone is slick with marker scripting, I think it'd be neat to put a flag on the map where the vehicle lands for the requester.

  • Offline bolox
  • Mercenary
  • *****
  • Posts: 276

Re: Apoc's Airdrop Assistance - v1 Release

« Reply #9 posted: Apr 20, 2015, 02:46 AM »
Will this work with Stratis v1.0b?
I dont see no airdrops and money is not deducted from the atm.
In v1.0b we are not using agents built in atm which is included in v1.1,ATMs have been added manually on our crrent old mission(V.1.0b).

Do you think thats my issue here?
Our 250 popular player rust server 1rule- Dont be a dick
www.nomercykillers.com

Re: Apoc's Airdrop Assistance - v1 Release

« Reply #10 posted: Apr 20, 2015, 03:18 AM »
Well, I'm not super familiar now with the older system.  What are the logs crashing on?  You'll need to also check client logs, as half of the script runs client side.  Attach those here, and I'll take a look at them for you.  Is your Mission File on Github?  I can take a look at it there and see how it looks, too.

Re: Apoc's Airdrop Assistance - v1 Release

« Reply #11 posted: Apr 20, 2015, 06:54 AM »
Thx alot, this is awsome !!

Can you give a step by step guide to how do i make a "soldier kit" ? i mean, setting a crate to spawn things that i want to spawn, for exemple:

Sniper kit: Ghillie suit, Lynx, ammo, LRPS,  Laser designator
Infantry: Zafir, ammo, RCO, Bipod, Anti Tank, AT ammo

Thx for the help
  • Offline CREAMPIE
  • Armaholic
  • Veteran
  • ******
  • Posts: 1077
  • ^_^;;

Re: Apoc's Airdrop Assistance - v1 Release

« Reply #12 posted: Apr 20, 2015, 08:41 AM »
Tested and Working on Stratis yes  =)


- from the grassy knoll -
  • Offline bolox
  • Mercenary
  • *****
  • Posts: 276

Re: Apoc's Airdrop Assistance - v1 Release

« Reply #13 posted: Apr 20, 2015, 01:42 PM »
Well, I'm not super familiar now with the older system.  What are the logs crashing on?  You'll need to also check client logs, as half of the script runs client side.  Attach those here, and I'll take a look at them for you.  Is your Mission File on Github?  I can take a look at it there and see how it looks, too.

hi osu_apoc,
I dont have it in github,But i can share it here.

I know creampies airdrop works,Im trying to get yours to work.
Thanks for looking into this.

https://drive.google.com/file/d/0BzwLnyxj2ggaRHNGMFVuZjBJLWM/view?usp=sharing
Our 250 popular player rust server 1rule- Dont be a dick
www.nomercykillers.com

Re: Apoc's Airdrop Assistance - v1 Release

« Reply #14 posted: Apr 20, 2015, 06:36 PM »
bolox, I'm going to need Server .RPT and Client .RPT to find the problem for you. 

If you're getting the confirm message when you call for a drop, you're likely doing OK client side, so the issue will likely be on the server .RPT.

What persistence method are you using?  I don't believe that will make a difference, but it is good to note, nevertheless. 

Your setup look OK in terms of all of the required things, but short of digging through every mod/script, I'm just not seeing an obvious issue so far.