Jump to content
Zenophon

[COOP-8] Black Ops

Recommended Posts

Ok Zen I found Zen_ConfigGetVehicleClasses file and see that you have

switch (_side) do {

case West: {

_sideString = "nato";

};

case East: {

_sideString = "east";

};

case Resistance: {

_sideString = "ind";

};

case "all": {

_sideString = "#";

};

};

Do I add "OPF_G_F" to

case East: {

_sideString = "east", "OPF_G_F";

};

??

to have guerrilla units randomly spawn in also? TBO I only want guerrilla units patrolling on foot and offroad veh's.

This will not work, as that variable is only used to filter ammo boxes. In general, I do not recommend editing the framework source code unless you are 100% sure what you are doing. The point of using a function library is that you can use the functions the way you want without having to change internal code.

Zen_ConfigGetVehicleClasses will not return anything that is not visible in the editor (scope = 2 in the config); this is to filter out base classes. The only framework function that will let you spawn hidden units is Zen_SpawnGroup. For example:

_group = [_pos, ["O_G_Soldier_F", "O_G_Soldier_F"]] call Zen_SpawnGroup;

If you want to change the mission to be FIA enemies only, this is what I recommend:

First, make sure you have the original init.sqf from the last release of the mission. You also want the original code to spawn vehicles, not what I posted previously.

Replace this (very top):

#define OPFOR_LOADOUTS ["Rifleman", "Rifleman", "AssistantAA", "AssistantAT", "AssistantAR", "Recon", "TeamLeader", "Grenadier", "Autorifleman", "Marksman", "Medic"]
#define OPFOR_VEHICLES ["O_MRAP_02_gmg_F", "O_MRAP_02_hmg_F", "O_MRAP_02_hmg_F"]

with:

#define OPFOR_LOADOUTS ["Guerrilla"]
#define OPFOR_VEHICLES ["B_G_Offroad_01_armed_F"]

Replace this (line 203):

_reinforcements = [[0,0,0], ENEMY_SIDE, _AISkill, [4, 6]] call Zen_SpawnInfantry;

with (I forgot to give these guys loadouts):

_reinforcements = [[0,0,0], ENEMY_SIDE, _AISkill, [4, 6]] call Zen_SpawnInfantry;
0 = [_reinforcements, ENEMY_SIDE, OPFOR_LOADOUTS] call Zen_GiveLoadout;

I have tested this, and everything works fine. Every time units spawn, they are given a loadout from the list at the top of the init. By changing the loadouts and vehicle list, you are changing everything that spawns for the entire mission. The enemy will look like FIA and drive their offroad, but will attack you the same as if they were Opfor.

You can also use my custom loadout system and put those loadouts in there, as Zen_GiveLoadout handles both built-in loadouts and custom ones.

Share this post


Link to post
Share on other sites

Zen, first off thanks for your time and efforts. I really understand everyone's time is valuable and I am just a noob looking for little stuff. Nonetheless thanks.

I probably confused you. See what I was looking for was to have both Opfor and FIA on same side and by random have units spawned from each, including vehicles. I did add "Guerrilla"

#define OPFOR_LOADOUTS ["Rifleman", "Rifleman", "AssistantAA", "AssistantAT", "AssistantAR", "Recon", "TeamLeader", "Grenadier", "Autorifleman", "Marksman", "Medic","Guerrilla"]

and

#define OPFOR_VEHICLES ["O_MRAP_02_gmg_F", "O_MRAP_02_hmg_F", "O_MRAP_02_hmg_F","B_G_Offroad_01_armed_F"]

I also changed that line of code at the end. I will test and see what happens. Of course I have another request.

Could I enable an ammo supply drop once nato forces have set down. I added more items to ammo drop for players to have different loadouts and medikit for medic with Far_revive system.

I will go back and look at the supply stuff and attempt to get some knowledge.:)

Share this post


Link to post
Share on other sites
Zen, first off thanks for your time and efforts. I really understand everyone's time is valuable and I am just a noob looking for little stuff. Nonetheless thanks.

I probably confused you. See what I was looking for was to have both Opfor and FIA on same side and by random have units spawned from each, including vehicles. I did add "Guerrilla"

#define OPFOR_LOADOUTS ["Rifleman", "Rifleman", "AssistantAA", "AssistantAT", "AssistantAR", "Recon", "TeamLeader", "Grenadier", "Autorifleman", "Marksman", "Medic","Guerrilla"]

and

#define OPFOR_VEHICLES ["O_MRAP_02_gmg_F", "O_MRAP_02_hmg_F", "O_MRAP_02_hmg_F","B_G_Offroad_01_armed_F"]

I also changed that line of code at the end. I will test and see what happens. Of course I have another request.

Could I enable an ammo supply drop once nato forces have set down. I added more items to ammo drop for players to have different loadouts and medikit for medic with Far_revive system.

I will go back and look at the supply stuff and attempt to get some knowledge.:)

The supply drop itself is set up as functions near the top of the init. You just need to put the code that uses them in the right place. Find this code (line 650):

sleep 5;
_exfilTask = [_rangers, "When all objectives are completed, the extraction point will appear on your map.", "Move to Extraction"] call Zen_InvokeTask;

sleep 45;
{
   deleteVehicle _x;
} forEach (crew _infilHeli + [_infilHeli]);

and replace it with:

sleep 5;
_exfilTask = [_rangers, "When all objectives are completed, the extraction point will appear on your map.", "Move to Extraction"] call Zen_InvokeTask;

_playerGroups = [_rangers] call Zen_ConvertToGroupArray;
{
   _playerGroups set [_forEachIndex, leader _x];
} forEach _playerGroups;

if !(isDedicated) then {
   0 = [_playerGroups, "Zen_SupplyDrop", "Ammo Drop", "[_pos, 'Ammo Drop'] call f_SupplyDrop"] call f_GiveSupport;
};

Zen_MP_Closure_Packet = ["f_GiveSupport", [_playerGroups, "Zen_SupplyDrop", "Ammo Drop", "[_pos, 'Ammo Drop'] call f_SupplyDrop"]];
publicVariable "Zen_MP_Closure_Packet";

sleep 45;
{
   deleteVehicle _x;
} forEach (crew _infilHeli + [_infilHeli]);

This will assign the leader of each Blufor group a support drop request immediately after all the Opfor and objectives have spawned.

Share this post


Link to post
Share on other sites

#define OPFOR_LOADOUTS ["Rifleman", "Rifleman", "AssistantAA", "AssistantAT", "AssistantAR", "Recon", "TeamLeader", "Grenadier", "Autorifleman", "Marksman", "Medic","Guerrilla"]

and

#define OPFOR_VEHICLES ["O_MRAP_02_gmg_F", "O_MRAP_02_hmg_F", "O_MRAP_02_hmg_F","B_G_Offroad_01_armed_F"]

Thanks for your reponse and help. Does this ^^ look ok?

Share this post


Link to post
Share on other sites
#define OPFOR_LOADOUTS ["Rifleman", "Rifleman", "AssistantAA", "AssistantAT", "AssistantAR", "Recon", "TeamLeader", "Grenadier", "Autorifleman", "Marksman", "Medic","Guerrilla"]

and

#define OPFOR_VEHICLES ["O_MRAP_02_gmg_F", "O_MRAP_02_hmg_F", "O_MRAP_02_hmg_F","B_G_Offroad_01_armed_F"]

Thanks for your reponse and help. Does this ^^ look ok?

Yes that will work. However, the loadouts are selected at random, so units would have a 1/12 chance of getting it. If you duplicated 'Guerrilla' 11 times, you would have a 1/2 chance, and so on. You will still get groups that are part Opfor and part FIA though. In order to make the groups homogeneous you would need to modify the spawning code to give the entire squad either a standard or FIA loadout.

Share this post


Link to post
Share on other sites

We played your mission last night and i have to say, thx that you fixed all problems, because the mission is worth it.

I especialy like how the KI reacts, i dont know what you done but really cool.

Can you tell me how to use your Ki script as a standard for selfmade missions ?

I like the randomness of your mission, the task are fine too, the only thing i`m not quit happy with is that some tasks spawn sometimes on weird positions. Is it possible that you only let some tasks spawn on a flat ground ?

And its really cool how easy it is to customize your mission for his needs and how easy it is to port it to other maps.

Tanks Zenophon nice work!

Share this post


Link to post
Share on other sites
thanks man. I will give these updates a try and let you know.

Great job so far. Only able to complete a few tasks but no issues thus far. nice job.

Share this post


Link to post
Share on other sites
We played your mission last night and i have to say, thx that you fixed all problems, because the mission is worth it.

I especialy like how the KI reacts, i dont know what you done but really cool.

Can you tell me how to use your Ki script as a standard for selfmade missions ?

I like the randomness of your mission, the task are fine too, the only thing i`m not quit happy with is that some tasks spawn sometimes on weird positions. Is it possible that you only let some tasks spawn on a flat ground ?

And its really cool how easy it is to customize your mission for his needs and how easy it is to port it to other maps.

Tanks Zenophon nice work!

I does seem like the AI hearing feature would be good idea for a standalone script. Until I do that though, I will just go through how to set it up manually. The AI hearing feature uses a 'fired' eventhandler on the clients, which sends a request to the server to inform the AI (as the AI are local to the server). The first step is defining the EH code on all clients and the server:

Last_Fire_Event_Time_Local = 0;
f_HandleFire = {
   if (time > (Last_Fire_Event_Time_Local + 5)) then {
       0 = [(_this select 0), "f_AlertPatrols", false] call BIS_fnc_MP;
   };

   Last_Fire_Event_Time_Local = time;
};

That will send a remote execution request to the server to run f_AlertPatrols with the unit that fired as the only argument. In my mission, I don't use BIS_fnc_MP, but it should achieve that same effect as my method. Then you must define f_AlertPatrols for the server:

f_AlertPatrols = {
   {
       if (!(isNull (leader _x)) && {(side leader _x) == east}) then {
           _distance = (leader _x) distance _this;
           if (_distance < 700) then {
               if ((vehicle leader _x) == leader _x) then {
                   _x reveal [_this, (200 / _distance) min 2];
               };
           };
       };
   } forEach allGroups;
};

This function is entirely automatic, once the unit fires, this function takes over on the server and gives information to the AI. You never need to call this function directly from your code. You can also tweak the max range (700 here) and the reveal coefficient (200) for different results. The range is based upon a reasonable distance a rifle shot is clearly audible, accounting for different terrain, ambient noise, etc. The coefficient is arbitrary, increasing it will give the AI more information at longer range.

Finally, you have to assign the EH itself to the units you want. I use this code in the mission, but you can get the objects any way you want.

_rangers = [west] call Zen_ConvertToObjectArray;
{
   _x addEventHandler ["Fired", f_HandleFire];
} forEach _rangers;

It is possible to limit where the objectives spawn to more reasonable areas. I think I will soon release an update of the mission using the latest version of my framework, as there are a lot of indirect bugfixes and improvements that will make the mission smoother. I can also improve the objectives and anything else I can think of.

Share this post


Link to post
Share on other sites

Congratulations Zenophon by its mission, is very good.

Today I tried it on a dedicated server and I had problems, we were two players, each leader of each team and the AI, but the transport helicopter was standing on the site without moving the insertion point.

Tested from my computer, gave me two errors missions:

1. Could not destroy the mortars, I caught two explosive load and a concentrated load of ammo box and placed the two mortars and not destroyed.

2. The officer is removed, but not gives the mission as accomplished.

Thank.

Share this post


Link to post
Share on other sites
Congratulations Zenophon by its mission, is very good.

Today I tried it on a dedicated server and I had problems, we were two players, each leader of each team and the AI, but the transport helicopter was standing on the site without moving the insertion point.

Tested from my computer, gave me two errors missions:

1. Could not destroy the mortars, I caught two explosive load and a concentrated load of ammo box and placed the two mortars and not destroyed.

2. The officer is removed, but not gives the mission as accomplished.

Thank.

I cannot reproduce this issue with the current mission source code. Make sure you are not running any mods, and see if it works then. Also, try the version on Altis in case it's an issue with one of the addon maps.

I will probably be releasing a small update soon, with a few fixes and improvements, to keep the mission 100% up to date and working with the latest version of ArmA.

Share this post


Link to post
Share on other sites

The proven dedicated server version is the co08_black-ops.altis, the other two missions Takistan and Chernarus, I can not try them on our server, because it is a clean server without mod.

See if another player can check on the other islands.

Share this post


Link to post
Share on other sites

Overview

Greeting fellow Armaholics, this is a minor update to ensure the that the mission remains working smoothly. By user request, the positions of the objectives now prefer to be away from houses and dense forests. There is also a tiny fix to the color of one objective's marker.

As always the mission has been briefly tested on a dedicated server, but that does not preclude the existence of bugs. Although the mission has changed very little, it indirectly benefits from all the improvements to my framework over the past few weeks.

Changelog

9/10/14

  1. Fixed: HQ steal intel task marker appeared in purple
  2. Improved: Objective locations now avoid houses and ambient clutter

Share this post


Link to post
Share on other sites
Nice will try it out. Is the udated version for all maps you offer ? Or only Altis version ?

Both the Chernarus and Takistan versions have been updated as well. Those versions differ by literally one line of code, so there was no reason not to.

Share this post


Link to post
Share on other sites

Thanks for the mission Zen, it's what introduced me to your fabulous framework.

However this mission fails when I updated the folder with your latest version.

REST OF POST DELETED. Zenophon has updated mission.

Edited by Beerkan

Share this post


Link to post
Share on other sites

Overview

Greetings fellow Armaholics, by user request I have updated this mission to use my latest framework. There are only two direct changes to the mission. All three map versions have been updated.

Changelog

10/16/14

  1. Improved: Insertion helicopter now starts with a reasonable velocity
  2. Tweaked: Crash site objective timing

Share this post


Link to post
Share on other sites

Overview

Greetings fellow Armaholics, by user request I have updated this mission to use my latest framework. There are no direct changes to the mission. All of the improvements are the result of changes in my framework. In addition, the mission uses the my internal version of the framework, which includes a few simple fixes that are not in the latest public release. All three map version have been updated.

Changelog

11/17/14

  1. Improved: Various improvements and fixes included in my latest framework

Share this post


Link to post
Share on other sites

Overview

Greetings fellow Armaholics, by user request I have updated this mission to use my latest framework. There are no direct changes to the mission. All of the improvements are the result of changes in my framework. All three map versions have been updated.

Changelog

12/10/14

  1. Improved: Various improvements and fixes included in my latest framework

Share this post


Link to post
Share on other sites

Overview

Greetings fellow Armaholics and happy New Year, I have updated this mission to use my latest framework. There are no direct changes to the mission. All of the improvements are the result of changes in my framework. Most significantly, a major bug with multiplayer synch'ing is fixed. All three map versions have been updated.

Changelog

12/31/14

  1. Improved: Various improvements and fixes included in my latest framework

Share this post


Link to post
Share on other sites

Hey Zen just wanted to thank you for this. The style and portability is awesome. Tried porting this over to the Denmark map and working awesome even changing the faction to IND.

Thanks again

---------- Post added at 03:38 ---------- Previous post was at 03:25 ----------

Just wanted to add, for those having issues where the heli never makes it to the insertion point and circles around, this could be related to certain AI MODS. I had issues with my game because of this. As soon as the AI MOD was disabled (AISS), the heli dropped off the units no problem. This was in SP mode however.... Hope this helps others

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×