Jump to content

[Release] Casca Vehicles Convoy for any Map


Donnovan

Recommended Posts

CASCA ANDRE CONVOYS - TAKELONG V1a:
V1a ON 01 of September of 2015
 

NEW ON TAKELONG V1:

New Skill Settings:

_generalSkill = 0.6; //All skills, except ain skill, for all AI
_driverManAin = 0.8; //Ain of the driver, from 0 to 1
_cargoMansAin = 0.5; //Ain of the cargo ocupants, from 0 to 1
_turretMansAin = 0.3; //Ain ot the turret operators, from 0 to 1

New Icon settings:

_showMapIcons = true; //Show spawn, convoy and AI icons on map?
_showMapIconsOnlyWhenNotInWar = true; //Hide convoy icons when they enter in war, so the fight is not spoted.
_showCrewNumber = true; //Show crew number on the vehicle icon on map? (runner bombers don't count as vehicle crew)
 
Special reward in coins (Zupa coins) or gold (normal Epoch):
_useCoinsReward = false; //Special kill (main char kill or combo kill) reward in gold or coins? Use false to gold / true to coins.
_coinRewards = [650,4000,650]; //Special Reward Array: _xxxxxRewards = [kill reward,son of general kill reward,extra for each combo kill];
_goldRewards = [["ItemSilverBar",0],["ItemGoldBar10oz",1],["ItemGoldBar",1]]; //Special Reward Array: _xxxxxRewards = [kill reward,son of general kill reward,extra for each combo kill];
Combo kill is when you kill more 2 AI in the space of 15 seconds. The level of the combo increase if you keep killing in less than 15 seconds (Combo Level 1, Combo Level 2, Combo Leve 3, and so on).
While the combo kill reward in coins goes direct to the player wallet, in gold, it goes in the AI dead body.
 
Humanity Gain Settings:
donn_humanityGainForKill = 65; //How much humnity to gain for each AI kill?
 
//Bellow this value you is in the Bandit Way so donn_humanityGainForKill will subtract to your humanity
//Above this value you is in the Hero Way so donn_humanityGainForKill will add to your humanity
donn_humanityZeroScale = 2500;
 
Other Settings:
_donn_delete_body_time = 2400; //Time in seconds to delete a dead AI body
donn_aiCarVulnerable = false;  //false or 0 is INVUNERABLE true or 1 is VULNERABLE

 

NEW ON TAKELONG V1a:

Bidirectional Humanity: Fixed bandit (or on the bandit way) players getting positive humanity from AI kill.

NEW ON TAKELONG V1b:

Coin rewards: Fixed coins rewards not happening due to a typo.

Manual fix if you have V1a: Inside andre_convoy.sqf change the configuration setting from _coinsRewards = [650,4000,650]; to _coinRewards = [650,4000,650];

 

If it works for you consider a donation. Thankyou.

btn_donate_LG.gif $USD
btn_donate_LG.gif $EURO

 

INSTALATION: TAKELONG V1b

Unzip this file into your mission folder: https://www.dropbox.com/s/wd4dyodm7prnu4d/arma2_epoch_andre_convoy_takelong_v1b.7z?dl=0

Look at init(example).sqf to see how to run Andre Convoy, and reproduce it in your init.sqf.
No BE filters tweak needed.
 
 

INFISTAR USERS:
If your infiStar have this option:

/*  EXPERIMENTAL CU FIX   */ _CUF = true; /* true or false */ /* *experimental* - will transfer serverside units (including mission AI) to clientside */

You need to turn it off setting _CUF to false, or AI will not work.

Link to comment
Share on other sites

@smokingred,

 

You can change those arrays, on the Extra Konfiguration Section:

//Simple loot, for car 1 of convoys with 1 car and for car 1 and 2 with convoys with 2 or 3 cars
//[command to add loot,the item to add as loot,[quantity of the item when in a convoy with 1 vehicle,2 vehicles,3 vehicles]]
_loot1 = [
	["addWeaponCargoGlobal","NVGoggles",[3,4,5]],
	["addWeaponCargoGlobal","ItemEtool",[3,4,5]],
	["addWeaponCargoGlobal","Binocular_Vector",[2,3,4]],
	["addMagazineCargoGlobal","ItemBloodBag",[8,12,16]],
	["addMagazineCargoGlobal","PartEngine",[5,7,9]],
	["addMagazineCargoGlobal","ItemBandage",[20,25,30]],
	["addMagazineCargoGlobal","HandGrenade_West",[6,10,14]],
	["addMagazineCargoGlobal","ItemBriefcase100oz",[1,1,2]],
	["addMagazineCargoGlobal","ItemBriefcase100oz",[1,1,1]]
];

//High loot, for car 3 of convoys with 3 cars
//[command to add loot,the item to add as loot,[quantity of the item when in a convoy with 1 vehicle,2 vehicles,3 vehicles]]
_loot2 = [
	["addMagazineCargoGlobal","ItemBriefcase100oz",[1,2,3]],
	["addMagazineCargoGlobal","ItemBriefcase100oz",[1,1,2]],
	["addMagazineCargoGlobal","ItemBriefcase100oz",[1,1,2]]
];
Link to comment
Share on other sites

Hi Donnovan,

 

First, thanks very much for the trouble you go through with your scripts for the community.

 

We really like this mod and want to add it to our epoch server.  However, we are quite new to scripting and I'm a bit stumped on some of your instructions.

 

I have done homework and attempted to understand what you mean exactly, but alas I am unsure still.  Could you be kind enough as to break things down a bit more for me please?  

Link to comment
Share on other sites

Hi Donnovan,

 

First, thanks very much for the trouble you go through with your scripts for the community.

 

We really like this mod and want to add it to our epoch server.  However, we are quite new to scripting and I'm a bit stumped on some of your instructions.

 

I have done homework and attempted to understand what you mean exactly, but alas I am unsure still.  Could you be kind enough as to break things down a bit more for me please?  

 

Put the first script in a folder in your dayz_server.pbo, perhaps in a new folder called custom and name it convoy.sqf. Then in the file dayz_server/init/server_functions.sqf, add :

[] ExecVM "\z\addons\dayz_server\custom\convoy.sqf";

to the bottom. (Above any AI files you might have there. WAI/DZMS etc)

 

Then put the second script in your mission file (dayz_epoch_11.Chernarus or whatever you are using), again perhaps in a folder called custom, name it clientconvoy.sqf and put this in the if (!isDedicated) then { section, before the last };

//Donnovans Convoy Script
execVM "custom\clientconvoy.sqf", 
Link to comment
Share on other sites

@ ElDubya,

Thanks for the tutorial!

@ CharlesDarwin,

ElDubya tutorial is nice. Try it please!

@ All,

The only problem left is that, i believe, DZMS makes AI and zombies enemyes, so the convoy can stop because of zombies.

If this happens, you can try to fix by making Zombies and AI friends with those lines:

 

//Bots Friend to Zombies
EAST setFriend [CIVILIAN,1];
CIVILIAN setFriend [EAST,1];
You must run this command on the server and it can be run at the end of the server file init/server_functions.sqf.

Some other script may also run this command, so if its not working, may be some other AI script is changing it.

Link to comment
Share on other sites

smokingred,

This require some aditional code that i can do in the future. For now each car can have only one item as loot, quantity can vary depending if it is a convoy of 1, 2 or 3 cars. you also have two types of loot, loot_1 and loot_2. The second only appears on the third car of a 3 cars convoy.

Bots weapons is part of the aquired loot.

Link to comment
Share on other sites

A small change in configuration:

_cascasToSpawn = 8; //Number of convoys to Spawn: default is 8
_convoyFormation = [1,1,1,2,2,2,3,3]; //number of cars in each convoy. Must have _cascasToSpawn numbers.
_cascasToSpawn: the number of convoys to spawn.

_convoyFormation: number of cars in each of the convoys set on _cascasToSpawn. Can be 1, 2 or 3.

So, the number of itens in _convoyFormation must be equal the number in _cascasToSpawn.

Example 1:

_cascasToSpawn = 10;

_convoyFormation = [1,1,2,2,2,2,3,3,3,3]; //10 numbers (must be 1, 2 or 3 only)

Example 2:

_cascasToSpawn = 10;

_convoyFormation = [1,1,1,1,1,1,1,1,1,1]; //10 single convoys (1 car only)

Example 2:

_cascasToSpawn = 5;

_convoyFormation = [3,3,3,3,3]; //5 convoys with 3 cars

Wrong Example 1:

_cascasToSpawn = 7;

_convoyFormation = [1,2,2,3]; //Wrong! The array must have 7 numbers!

Link to comment
Share on other sites

Thank you very much ElDubya for walking me through it.  It worked first time without a hitch.  

 

If you don't mind humoring me, why do you have to call the convoy before the wai/dzms?  Just trying to learn, obviously you are right! 

 

Also thank you Donnovan for confirming and for the awesome script!!  Excited to have this. :D

Link to comment
Share on other sites

If you don't mind humoring me, why do you have to call the convoy before the wai/dzms?  Just trying to learn, obviously you are right!

The script is completely stand alone, so there is no matter where or when you exec it.

The only thing i found that interfer with other AI scripts are zombies friendship with bots. For Casca cars, its desirable to make zombies as AI friends, so AI don't get distracted by zonbies and traders.

To do that, see post #13.

Link to comment
Share on other sites

Thanks for the explanation, I appreciate it a lot.  Trying to understand how you more experienced scripters think is helpful!

 

One issue: when the AI are dead and the player enters the vehicle, it explodes and the player is either killed or badly hurt.  We would love to be able to enter these and then sell them.

 

Would it be fine for me to edit the script a bit?  It seems readily customizable.  We love the script but after testing it for a few hours feel like having less convoys running, but having them be bigger/more aggressive, would suit us perfectly.

 

I can clearly see how to do some of this, but if it's not too much trouble can you point me in the right direction for adding more AI/difficulty?  I see the skill level max is 1 in the comments for that part of the config..

 

Anyway, I am sure you are quite busy so no worries if this is a bit afield of what you intended.  :)

Link to comment
Share on other sites

@ All,

 

The veicles explode because they are not listed in the safe vehicles variable:

 

I added this code in the main scrip (first post updated), this will hopefully fix the problem:

[] spawn {
	waitUntil {!isNil "DZE_safeVehicle"};
	sleep 5;
	_cascaVehicles = ["Lada2","UAZ_CDF","HMMWV_M1035_DES_EP1","Offroad_DSHKM_Gue","UAZ_MG_CDF","WMMWV_M998A2_SOV_DES_EP1"];
	DZE_safeVehicle = DZE_safeVehicle + _cascaVehicles;
};

This code must be run on the server, so if anyone is running the script in a Headless Client, copy this code and run it on the server. No need to remove it.

 

@ Charles,

 

I will love to help. You already helped me! But even if you had not helped.

 

You can edit anything you want.

 

About dificulty, you believe a vehicle with turret could help? This can be done really simple, since the code for it, and for bigger convoys (4, 5, 6 vehicles) is ready.

Link to comment
Share on other sites

I was trying to set this up so there's more randomization of loot, so I used the below code. When I check the vehicles, there's only one type of item in the vehicle, ie: 10 Blood Bags, instead of multiple amounts of multiple items. What am I doing wrong?

 

//Simple loot, for car 1 of convoys with 1 car and for car 1 and 2 with convoys with 2 or 3 cars
//[command to add loot,the item to add as loot,[quantity of the item when in a convoy with 1 vehicle,2 vehicles,3 vehicles]]
_toolsrand = ["NVGoggles","ItemEtool","Binocular_Vector","ItemFlashlight","ItemWatch","ItemKnife","ItemHatchet","ItemCompass","ItemMap","ItemToolbox","ItemMatchbox","ItemFlashlightRed","ItemGPS","ItemCrowbar"] call BIS_fnc_selectRandom;
_medicalrand = ["ItemPainkiller", "ItemMorphine", "ItemBandage", "ItemBloodbag", "ItemAntibiotic","ItemEpinephrine"] call BIS_fnc_selectRandom;
_foodrand = ["FoodCanBadguy", "FoodCanBoneboy", "FoodCanCorn", "FoodCanCurgon", "FoodCanDemon", "FoodCanFraggleos", "FoodCanGriff", "FoodCanHerpy", "FoodCanOrlok", "FoodCanPowell", "FoodCanTylers", "FoodCanSardines", "FoodCanBakedBeans", "FoodCanFrankBeans", "FoodCanPasta", "ItemWaterbottleUnfilled","ItemWaterbottleBoiled","FoodmuttonCooked","FoodchickenCooked","FoodBaconCooked","FoodRabbitCooked","FoodCanUnlabeled","FoodPistachio","FoodNutmix","FoodMRE"] call loadout_fnc_selectRandom;
_drinkrand = ["ItemSodaClays", "ItemSodaDrwaste", "ItemSodaLemonade", "ItemSodaLvg","ItemSodaMzly", "ItemSodaRabbit", "ItemSodaSmasht", "ItemSodaOrangeSherbet", "ItemSodaMdew", "ItemSodaRbull", "ItemSodaMtngreen", "ItemSodaCoke", "ItemSodaPepsi", "ItemWaterbottle"] call loadout_fnc_selectRandom;
_backpackrand = ["DZ_Patrol_Pack_EP1","DZ_Assault_Pack_EP1","DZ_Czech_Vest_Puch"] call loadout_fnc_selectRandom;
_partsrand = ["PartEngine","PartVRotor","PartWheel","PartGlass","PartFueltank","PartGeneric"] call loadout_fnc_selectRandom;
_buildingrand = ["ItemSandbag","ItemTankTrap","ItemTentOld","ItemWire","30m_plot_kit","ItemVault","ItemTentDomed","ItemTentDomed2","ItemLightBulb","ItemGenerator","ItemComboLock","ItemLockbox","ItemPole","ItemCorrugated","ItemMixOil","bulk_ItemSandbag","bulk_ItemTankTrap","bulk_ItemWire","PartPlywoodPack","CinderBlocks","MortarBucket","PartPlankPack"] call loadout_fnc_selectRandom;
_moneyrand = ["ItemSilverBar","ItemSilverBar","ItemSilverBar","ItemSilverBar","ItemSilverBar","ItemSilverBar","ItemSilverBar","ItemSilverBar10oz","ItemSilverBar10oz","ItemSilverBar10oz","ItemSilverBar10oz","ItemSilverBar10oz","ItemGoldBar","ItemGoldBar","ItemGoldBar","ItemGoldBar","ItemGoldBar10oz","ItemGoldBar10oz","ItemBriefcase10oz","ItemBriefcase50oz","ItemBriefcase100oz"] call loadout_fnc_selectRandom;
_rndnumber1 = (round(random 2) + 2);
_rndnumber2 = (round(random 16) + 5);
_loot1 = [
["addWeaponCargoGlobal",_toolsrand,[_rndnumber1,_rndnumber1,_rndnumber1]],
["addMagazineCargoGlobal",_medicalrand,[_rndnumber1,_rndnumber1,_rndnumber1]],
["addMagazineCargoGlobal",_foodrand,[_rndnumber1,_rndnumber1,_rndnumber1]],
["addBackpackCargoGlobal",_backpackrand,[_rndnumber1,_rndnumber1,_rndnumber1]],
["addMagazineCargoGlobal",_partsrand,[_rndnumber1,_rndnumber1,_rndnumber1]],
["addMagazineCargoGlobal",_drinkrand,[_rndnumber1,_rndnumber1,_rndnumber1]],
["addMagazineCargoGlobal",_moneyrand,[1,1,1]]
];
 
//High loot, for car 3 of convoys with 3 cars
//[command to add loot,the item to add as loot,[quantity of the item when in a convoy with 1 vehicle,2 vehicles,3 vehicles]]
_loot2 = [
["addMagazineCargoGlobal",_buildingrand,[_rndnumber2,_rndnumber2,_rndnumber2]],
["addMagazineCargoGlobal",_buildingrand,[_rndnumber2,_rndnumber2,_rndnumber2]],
["addMagazineCargoGlobal",_buildingrand,[_rndnumber2,_rndnumber2,_rndnumber2]]
];

Link to comment
Share on other sites

Every one of the _*rand variables (whether defined by BIS_fnc_selectRandom or by your loadout_fnc_selectRandom) contains exactly one item.  _rndnumber* are defined once and hold a constant number, so the randomization in the script,

		call compile format [
			"_motor %1 ['%2',%3];",
			_car select 3 select 0,
			_car select 3 select 1,
			_car select 3 select 2 select (_qtd - 1)
		];

will be for naught because every entry in [_rndnumber2, _rndnumber2, _rndnumber2]  is equal.

 

I assume you could do something like

_medicalrand = ["ItemPainkiller", "ItemMorphine", "ItemBandage", "ItemBloodbag", "ItemAntibiotic","ItemEpinephrine"];

[...]

["addMagazineCargoGlobal", (_medicalrand call BIS_fnc_selectRandom), [(round(random 2) + 2), (round(random 2) + 2), (round(random 2) + 2)]],

[...]

and repeat the last line a few times. Same for the other loot types. Note that the definition of _medicalrand now has no BIS_fnc_selectrandom, keeping the array intact for multiple choosing.

 

This way

  • there would be more lines generating medical loot in _loot1, each one picking randomly from _medicalrand and
  • each one generating a different set of numbers to be picked from.

When duplicating the lines in _loot you of course have to adjust the random number, that's lower (round(random 2)+2).

Link to comment
Share on other sites

Is there a way to add text to the script when each convoy spawns it comes up on screen like missions text blah blah is starting ?

Is there a way to have map markers attached to each convoy so if players want to hunt down convoy's they can ?

or make the waypoint markers only show 3 markers at a time in the convoy's route instead of every waypoint on the map like say the waypoint where the convoy spawned then the next 2 waypoint markers the convoy will travel? and make it always show the next 2 waypoint markers for the convoy path ?

at the moment its like the dzai vehicle patrols you never know when you will come across a convoy

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
×
×
  • Create New...