Jump to content
arma3my

I&A 3.2.9 with ACE and TFAR

Recommended Posts

Hi,

I need help on editing I&A 3.2.9 by installing ACE on it. I'm not good with coding or scripting.

So far, I just edited the Arsenal Gear Limitation and Restrict TFAR Items and Backpacks with success.

 

 

Plan:

- Use most of ACE Modules

- Remove I&A Revive System

- Remove I&A Earplug Script

 

My intention for this purpose is to host the mission as private for my community to play.

Be advise, all the credits are unedited and it always goes to those who deserved it respectfully.

 

With this, I attached a file for anyone who's willing to assist/help.

 

Invade_&_Annex_3_2_9.Altis.rar

Share this post


Link to post
Share on other sites
20 hours ago, arma3my said:

- Use most of ACE Modules

This should be as simple as putting them down in the editor and selecting the options you want.

For TFAR plug this code in the init.sqf:
TF_terrain_interception_coefficient = 5;
TF_give_microdagr_to_soldier = false;
tf_give_personal_radio_to_regular_soldier = false;
tf_no_auto_long_range_radio = true;
tf_same_sw_frequencies_for_side = true;
tf_radio_channel_name = "Channel_Name_Here";
TFAR_fullDuplex = false;

 

Of course you can edit them to what you like, just don't use the TFAR modules in eden.

20 hours ago, arma3my said:

- Remove I&A Earplug Script

the earplugs are created in this file:
\Invade_&_Annex_3_2_10.altis\Scripts\misc\earplugs.sqf
Find all the places where this is called/spawned/executed/... remove them and you'll be good.
 

20 hours ago, arma3my said:

- Remove I&A Revive System

We use derp revive, not our own revive system.  All the actual files of derp revive can be found in this folder: \Invade_&_Annex_3_2_10.altis\Functions\revive

To get rid of it again find where any of those files are called/spawned/executed/... and remove these calls/spawns/execs/... 

That's the basics it might take some time because derp is pretty entangled with I&A.  For example the TK messages rely on derp-revive.

 

Share this post


Link to post
Share on other sites
40 minutes ago, arma3my said:

- CHVD can be access anywhere instead of Quartermaster.

Easiest way i can think of is grab the code from the addaction on the arsenals and put an addaction on the player himself.  So probably in the initplayer.sqf

 

41 minutes ago, arma3my said:

- Remove all derp script without breaking the mission.

You can't.  For the very simple reason that we use a modified version of derp main-AO spawn handler.  You can delete all the derp revive things tho.  

Share this post


Link to post
Share on other sites
4 hours ago, Stanhope said:

Easiest way i can think of is grab the code from the addaction on the arsenals and put an addaction on the player himself.  So probably in the initplayer.sqf

I don't get this one. Can you show me the code?

Share this post


Link to post
Share on other sites

Currently this is the code that spawns an arsenal at the FOBs, they also have that action on them.

 

[_arsenalBox, ("ArsenalFilter" call BIS_fnc_getParamValue)] call derp_fnc_VA_filter;
[]spawn {sleep 1;};

[_arsenalBox, ("ArsenalFilter" call BIS_fnc_getParamValue)] remoteExec ["derp_fnc_VA_filter",-2,true];
[_arsenal, ["<t color='#009ACD'>Teleport To Main Base</t>","cutText ['','BLACK OUT'];sleep 2;[player,'BASE'] remoteExec ['AW_fnc_baseTeleport',2];sleep 1; cutText ['','BLACK IN'];","",0,false,true,"","('BASE' in controlledZones)"]] remoteExec ["addAction", -2, true];
[_arsenal, ["View Distance Settings", CHVD_fnc_openDialog, [], -99, false, true]] remoteExec ["addAction", -2, true];
[_arsenal, ["<t color='#006bb3'>Save gear</t>",{player setVariable ["derp_savedGear", (getUnitLoadout player)]; systemChat "gear saved";}]] remoteExec ["addAction", -2, true];

 

Now just grab the view distance one, rewrite it to only have local effect instead of global and put it in the initplayer.sqf.  I'm about 95% sure that that will work, haven't tested it tho.

 

Share this post


Link to post
Share on other sites
14 hours ago, Stanhope said:

Now just grab the view distance one, rewrite it to only have local effect instead of global and put it in the initplayer.sqf.  I'm about 95% sure that that will work, haven't tested it tho.

You mean like this,

this addAction ["View Distance Settings", CHVD_fnc_openDialog, [], -99, false, true]] remoteExec ["addAction", -2, true];

Share this post


Link to post
Share on other sites

In \Invade_&_Annex_3_2_10.altis\Missions\Main\subobj.sqf

In the case RadioTower in the spawned code change the sleeps to change the frequency of the jets.

If you also want to change which vehicles are spawned by the RT just go to the AW_fnc_airfieldJet and add/remove the vehicles you like.

Share this post


Link to post
Share on other sites

Default is 12 minutes + random 8 minutes.

Spoiler

[_targetStartText] remoteExec ["AW_fnc_globalHint",0,false];
        [west,["SubAoTask"],["OPFOR have setup a radio communications tower in the AO. Take it out quickly or else they will use it to call in air strikes.","Radio Tower","radioCircle"],(getMarkerPos "radioCircle"),"Created",0,true,"destroy",true] call BIS_fnc_taskCreate;
        [] spawn {
            sleep (30 + (random 180));
            if (alive radioTower) then {
                while {(alive radioTower)} do {
                    if (jetCounter < 3) then {
                    [] call AW_fnc_airfieldJet;
                    sleep (720 + (random 480));
                    };
                };
            };
        };

 

Edited to 5 minutes + random 3 minutes. What is sleep (30 + (random 180)); and if (jetCounter < 3) then { do?

Spoiler

[_targetStartText] remoteExec ["AW_fnc_globalHint",0,false];
        [west,["SubAoTask"],["OPFOR have setup a radio communications tower in the AO. Take it out quickly or else they will use it to call in air strikes.","Radio Tower","radioCircle"],(getMarkerPos "radioCircle"),"Created",0,true,"destroy",true] call BIS_fnc_taskCreate;
        [] spawn {
            sleep (30 + (random 180));
            if (alive radioTower) then {
                while {(alive radioTower)} do {
                    if (jetCounter < 3) then {
                    [] call AW_fnc_airfieldJet;
                    sleep (300 + (random 180));
                    };
                };
            };
        };


For the Jet type this:

Spoiler

jetCounter = jetCounter + 1;
_accepted = false;
_casType = ["airfieldSpawn","gunStrike"];
_casCase = selectRandom _casType;
_jetlist = ["O_Plane_CAS_02_F","O_Plane_CAS_02_F","O_Plane_Fighter_02_F","O_Plane_Fighter_02_Stealth_F","I_Plane_Fighter_04_F","I_Plane_Fighter_04_F"];
_jettype = selectRandom _jetlist;

 

That's for the Jet to spawn base on SubObj. How to create a random Attack Chopper or Jets that isn't base on that. For example, the jet spawn from any airfield except base.

Share this post


Link to post
Share on other sites

What am i doing wrong here. The jet still not spawn randomly in the air as time set.
fn_airfieldJet.sqf

Spoiler

 

/*
  Author: BACONMOP
  Spawns CSAT JET to CAS strike
     O_Plane_CAS_02_F
  LaserTargetE
 
  _laser = "LaserTargetE" createVehicle (getPos player);
  _laser attachTo [player,[0,0,0]];
 
 plane doTarget Player;
 
 Last modified:
    19/08/2017 by stanhope, AW-member
    
 Modified:
updated some code, added a name to the jet group
 */
jetCounter = jetCounter + 1;
_accepted = false;
_casType = ["airfieldSpawn","gunStrike"];
_casCase = selectRandom _casType;
_jetlist = ["O_Plane_CAS_02_F","O_Plane_CAS_02_F","O_Plane_Fighter_02_F","O_Plane_Fighter_02_Stealth_F","I_Plane_Fighter_04_F","I_Plane_Fighter_04_F"];
_jettype = selectRandom _jetlist;

switch (_casCase) do {

    case "airfieldSpawn":{
        private ["_jet"];
        _airField = [
            "AAC_CAS_Spawn",
            "Airbase_CAS_Spawn",
            "SaltLake_CAS_Spawn",
            "Molos_CAS_Spawn"
        ];
        if ("AAC_Airfield" in controlledZones) then {
            _airField = _airField - ["AAC_CAS_Spawn"];
        };
        if ("Central_Airfield" in controlledZones) then {
            _airField = _airField - ["Airbase_CAS_Spawn"];
        };
        if ("Almyra_Saltflats" in controlledZones) then {
            _airField = _airField - ["SaltLake_CAS_Spawn"];
        };
        if ("Molos_Airfield" in controlledZones) then {
            _airField = _airField - ["Molos_CAS_Spawn"];
        };
        _jetGrp = createGroup east;
        _jetGrp setGroupIdGlobal [format ['RT-Jet-%1', jetCounter]];
        if ((count _airField) > 0) then {
            _jetSpawn = selectRandom _airField;
            _jet = _jettype createVehicle (getMarkerPos _jetSpawn);
            _jet setDir markerDir _jetSpawn;
            _jet flyInHeight 1000;
            _jet lock 2;
            [_jet,_jetGrp] call BIS_fnc_spawnCrew;
            {_x addCuratorEditableObjects [[_jet]+ (units _jetGrp), false];} foreach adminCurators;
        };
        if ((count _airField) <= 0) then {
            _spawnPos = [(random 30000),(random 30000),3000];
            _jet = _jettype createVehicle (getMarkerPos _spawnPos);
            waitUntil {!isNull _jet};
            [_jet,_jetGrp] call BIS_fnc_spawnCrew;
            _jet engineOn TRUE;
            _jet allowCrewInImmobile TRUE;
            _jet flyInHeight 1000;
            _jet lock 2;
            {_x addCuratorEditableObjects [[_jet]+ (units _jetGrp), false];} foreach adminCurators;
        };
        _jetWp = _jetGrp addWaypoint [getMArkerPos currentAO,0];
        _jetWp setWaypointType "LOITER";
        _jetWp setWaypointLoiterRadius 2000;
        _jetWp setWaypointCompletionRadius 50;
        _accepted = false;
        while {!_accepted} do {
            _target = objNull;
            _targetPos = [0,0,0];
            _playerCount = count playableUnits;
            if (_playerCount > 0) then {
                if (isMultiplayer) then {
                    _target = playableUnits select (floor (random (count playableUnits)));
                } else {
                    _target = switchableUnits select (floor (random (count switchableUnits)));
            };
            };
            
            if ((!isNull _target) && (_target distance (getMarkerPos currentAO)) < 1500 && (_target isKindOf "Man")) then {
                _laser = "LaserTargetE" createVehicle (getPos _target);
                _laser attachTo [_target,[0,0,0]];
                _accepted = true;
            };
            sleep 3;
            if ((_playerCount == 0) || !alive _jet) then {
                _accepted = true;
            };
        };
        hint str _jet;
        waitUntil {sleep 5; !alive _jet};
    };

    case "gunStrike":{
        _accepted = false;
        while {!_accepted} do {
            _target = objNull;
            _targetPos = [0,0,0];
            _playerCount = count playableUnits;
            if (_playerCount > 0) then {
                if (isMultiplayer) then {
                    _target = playableUnits select (floor (random (count playableUnits)));
                };
            };
            
            if ((!isNull _target)) then {
                if ((_target distance (getMarkerPos currentAO)) < 1500) then {
                    if (_target isKindOf "Man") then {
                        _targetPos = getPos _target;
                        _dir = random 360;
                        _strikeType = [0,1,2];
                        _run = _strikeType call BIS_fnc_selectRandom;
                        _randomPos = [[[_targetPos, 10],[]],[]] call BIS_fnc_randomPos;
                        _redSmoke = "SmokeShellRed" createVehicle _randomPos;
                        [_targetPos,_dir,_jettype,_run] call AW_fnc_createCas;
                        _accepted = true;
                    };
                    sleep 3;
                };
            };
        };
    };
};
jetCounter = jetCounter + 1;

 

 

Share this post


Link to post
Share on other sites

mmh, it only appears to have code for a gunstrike and for airfieldspawn.  If you want to have it randomly spawn you'll have to write that code yourself.

This is where it will randomly pick a type from: _casType = ["airfieldSpawn","gunStrike"];

Share this post


Link to post
Share on other sites
Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum 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...

  • Forum Statistics

    7,942
    Total Topics
    51,872
    Total Posts
×