Jump to content
aviatormoser

Bon's Infantry Recruitment Redux

Recommended Posts

aviatormoser, I installed this script to use static list. With the default units you had in there of RHS and vanilla units. It was working.

When I edited the recruitable_units_static.sqf with the Unsung 3.0E units that I wanted, the recruit UI had a blank list.

Is there any issue with using Unsung and this script that you know of? Could you test? Any solution would be awesome.

Thank you sir.

 

bon_recruit_recruitableunits = [
"uns_men_USMC_68_AT",
"uns_men_USMC_68_MED",
"uns_men_USMC_68_DEM",
"uns_men_USMC_68_ENG",
"uns_men_USMC_68_GL",
"uns_men_USMC_68_TRI",
"uns_men_USMC_68_HMG",
"uns_men_USMC_68_AHMG",
"uns_men_USMC_68_MRK",
"uns_men_USMC_68_MRK2",
"uns_men_USMC_68_MGAASG",
"uns_men_USMC_68_MGSG",
"uns_men_USMC_68_MGSG2",
"uns_men_USMC_68_MGSG3",
"uns_men_USMC_68_MTSG",
"uns_men_USMC_68_SL",
"uns_men_USMC_68_RF1",
"uns_men_USMC_68_RF2",
"uns_men_USMC_68_RF3",
"uns_men_USMC_68_RF4",
"uns_men_USMC_68_RF5",
"uns_men_USMC_68_RF6",
"uns_men_USMC_68_RTO",
"uns_men_USMC_68_SAP",
"uns_men_USMC_68_SCT",
];

Share this post


Link to post
Share on other sites
On 2018-02-25 at 12:53 AM, Sgt L. Jessee said:

aviatormoser, I installed this script to use static list. With the default units you had in there of RHS and vanilla units. It was working.

When I edited the recruitable_units_static.sqf with the Unsung 3.0E units that I wanted, the recruit UI had a blank list.

Is there any issue with using Unsung and this script that you know of? Could you test? Any solution would be awesome.

Thank you sir.

 

bon_recruit_recruitableunits = [
"uns_men_USMC_68_AT",
"uns_men_USMC_68_MED",
"uns_men_USMC_68_DEM",
"uns_men_USMC_68_ENG",
"uns_men_USMC_68_GL",
"uns_men_USMC_68_TRI",
"uns_men_USMC_68_HMG",
"uns_men_USMC_68_AHMG",
"uns_men_USMC_68_MRK",
"uns_men_USMC_68_MRK2",
"uns_men_USMC_68_MGAASG",
"uns_men_USMC_68_MGSG",
"uns_men_USMC_68_MGSG2",
"uns_men_USMC_68_MGSG3",
"uns_men_USMC_68_MTSG",
"uns_men_USMC_68_SL",
"uns_men_USMC_68_RF1",
"uns_men_USMC_68_RF2",
"uns_men_USMC_68_RF3",
"uns_men_USMC_68_RF4",
"uns_men_USMC_68_RF5",
"uns_men_USMC_68_RF6",
"uns_men_USMC_68_RTO",
"uns_men_USMC_68_SAP",
"uns_men_USMC_68_SCT",
];

 

Remove the comma sign after the last entry at the very bottom

 

where it says

"uns_men_USMC_68_SCT",
];

 

it should say

"uns_men_USMC_68_SCT"
];

Share this post


Link to post
Share on other sites

Hi,

 I am not sure if you are still working on this at all but I have just used your script and it works great. I have however found one small bug.

 

I have added a Halo script to my mission and when I use it the AI get deleted. It is though they think I have left the server. Do you know of any way round this? Can be quite annoying when you get shot but your AI I still there. I respawn and they are still under my hot bar. When I hit halo and land they are gone.

 

I am not sure where to look to fix this.

Share this post


Link to post
Share on other sites

I remember I encountered the very same problem in the A2 OA version... 

 

I solved it by deleting the condition 'no player, AI dead' in the unit_lifecycle.fsm file... - I'm pretty sure that will work too in the A3 Redux version :-)
 

Share this post


Link to post
Share on other sites

I use HCC + Bon's and ACE. When I recruit them from the flag and assign them in HCC they die. Their a work around with this????

I place the init and description files into the .pbo for the mission im making in EDEN with pbo manager. When I upload the pbo to my decicated server they die when we set them in HCC. 

Share this post


Link to post
Share on other sites
On 4/11/2019 at 12:33 AM, Valour said:

Error:

RecruitsUnitDialogue not found....

 

Any ideas?

 

On 7/19/2019 at 6:15 PM, Michael Scarlatti said:

I use HCC + Bon's and ACE. When I recruit them from the flag and assign them in HCC they die. Their a work around with this????

I place the init and description files into the .pbo for the mission im making in EDEN with pbo manager. When I upload the pbo to my decicated server they die when we set them in HCC. 

 

Sounds like some code is broken.  May need someone to review and correct before getting it back up.  There have been a few updates since op last thread post. 

Share this post


Link to post
Share on other sites

Hi, this is a great script and I used it to death on Arma 2. Thanks for bringing it to A3 (a bit late yeah I know...)

I remember having a play with the script years ago to add empty vehicles to the list without it messing with the "init _newunit.sqf" part, which reverted any custom loadouts to default.

I altered the text for unit creation in Recruit.sqf to:

/********************* UNIT CREATION ********************/
if(_unittype isKindOf "Man") then {
   _unit = group player createUnit [_unittype, [(getPos bon_recruit_barracks select 0) + 20 - random 40,(getPos bon_recruit_barracks select 1) + 20 - random 40,0], [], 0, "FORM"];
;[_unit] execVM (BON_RECRUIT_PATH+"init_newunit.sqf");} else {
   _unit = _unittype createVehicle [(getPos bon_recruit_barracks select 0) + 20 - random 40,(getPos bon_recruit_barracks select 1) + 20 - random 40,0];
};
/*******************************************************/

It worked for me, but untested anywhere else. I'll leave it here in case anyone finds this helpful

 

Share this post


Link to post
Share on other sites

If anyone is still interested in this script; here's how you'd add Customized Loadouts for the spawned AI units (exported from Arsenal).

  • use a static list with known classes!
  • recruitable_units_static.sqf
  • bon_recruit_recruitableunits = ["B_Soldier_GL_F", "B_Patrol_Soldier_MG_F", ...];

     

init_newunit.sqf

/*****************************************************************
	Set Custom Loadout
******************************************************************/
_unit setUnitLoadout (configFile >> "EmptyLoadout");
			
switch (typeOf _unit) do
{
	case "B_Soldier_GL_F":
		{
			_unit addWeapon "arifle_MX_GL_F";
			_unit addPrimaryWeaponItem "muzzle_snds_H_snd_F";
			_unit addPrimaryWeaponItem "acc_pointer_IR";
			_unit addPrimaryWeaponItem "optic_Hamr";
			_unit addPrimaryWeaponItem "30Rnd_65x39_caseless_mag_Tracer";
			_unit addWeapon "hgun_P07_F";
			_unit addHandgunItem "16Rnd_9x21_Mag";

			_unit forceAddUniform "U_B_CombatUniform_mcam";
			_unit addVest "V_PlateCarrierSpec_mtp";
			_unit addBackpack "B_AssaultPack_mcamo";

			for "_i" from 1 to 2 do {_unit addItemToUniform "FirstAidKit";};
			for "_i" from 1 to 2 do {_unit addItemToUniform "HandGrenade";};
			_unit addItemToUniform "SmokeShellBlue";
			for "_i" from 1 to 9 do {_unit addItemToVest "30Rnd_65x39_caseless_mag_Tracer";};
			for "_i" from 1 to 2 do {_unit addItemToVest "SmokeShell";};
			for "_i" from 1 to 37 do {_unit addItemToBackpack "1Rnd_HE_Grenade_shell";};
			_unit addItemToBackpack "16Rnd_9x21_Mag";
			_unit addHeadgear "H_HelmetSpecB_snakeskin";
			_unit addGoggles "G_Tactical_Clear";

			_unit linkItem "ItemMap";
			_unit linkItem "ItemCompass";
			_unit linkItem "ItemWatch";
			_unit linkItem "ItemRadio";
			_unit linkItem "NVGoggles";
		};
	case "B_Patrol_Soldier_MG_F":
		{
			_unit addWeapon "LMG_Mk200_F";
			_unit addPrimaryWeaponItem "muzzle_snds_H_MG";
			_unit addPrimaryWeaponItem "acc_pointer_IR";
			_unit addPrimaryWeaponItem "optic_Hamr";
			_unit addPrimaryWeaponItem "200Rnd_65x39_cased_Box_Tracer_Red";
			_unit addPrimaryWeaponItem "bipod_01_F_snd";
			_unit addWeapon "hgun_P07_F";
			_unit addHandgunItem "16Rnd_9x21_Mag";

			_unit forceAddUniform "U_B_CombatUniform_mcam";
			_unit addVest "V_PlateCarrierSpec_mtp";
			_unit addBackpack "B_AssaultPack_mcamo";

			for "_i" from 1 to 2 do {_unit addItemToUniform "FirstAidKit";};
			for "_i" from 1 to 2 do {_unit addItemToUniform "HandGrenade";};
			_unit addItemToUniform "SmokeShellBlue";
			for "_i" from 1 to 2 do {_unit addItemToVest "200Rnd_65x39_cased_Box_Tracer_Red";};
			for "_i" from 1 to 2 do {_unit addItemToBackpack "SmokeShell";};
			for "_i" from 1 to 3 do {_unit addItemToBackpack "200Rnd_65x39_cased_Box_Tracer_Red";};
			_unit addHeadgear "H_HelmetB_light_snakeskin";
			_unit addGoggles "G_Tactical_Clear";

			_unit linkItem "ItemMap";
			_unit linkItem "ItemCompass";
			_unit linkItem "ItemWatch";
			_unit linkItem "ItemRadio";
			_unit linkItem "NVGoggles";
		};
};

 

cheers!

Share this post


Link to post
Share on other sites

And if you want custom names for those units, I did it this quick'n'easy way:

 

In recruitable_units_static.sqf I've created a new variable with the names of the soldier-classes defined before:

bon_recruit_recruitableunits_name = ["Grenadier", "Light MG", ...];

And then I replaced "_displname" in build_unitlist.sqf with this:

_displname = bon_recruit_recruitableunits_name select _forEachIndex;

 

Share this post


Link to post
Share on other sites

Anyway to get this to only work for only certain players and/or ranks not all players?

 

Found a solution for this on the Rock Paper Shotgun forum of all places posted by SvDvorak.

 

Only specific named players (rowdy) can see recruit action when this code is placed in an object like a flagpole. Works on dedicated server with respawn in place. No others will see the prompt unless they are named to see it.

 

this addAction["Recruit Infantry", "bon_recruit_units\open_dialog.sqf", nil, 6, True, True, "", "(_target distance _this) < 4 && _this == rowdy"]; 
 

Share this post


Link to post
Share on other sites
On 8/21/2021 at 6:55 AM, pognivet said:

can someone reupload this? was a good script.

You can find a version here, extracted from the ISIL Foothold missions. It only has two changes

  • Remove line of code explicitly referencing Hermes Air Services (HAS)
  • Prevent dismissing units in other groups than your own

https://drive.google.com/file/d/1aMG_h-ZlYDk3Ck9yri0POzl_FjIaJeOG/view?usp=sharing

 

Note that this isn't PvP safe but it should be easy to modify dismiss.sqf to also check the side or faction of the unit and caller.

Share this post


Link to post
Share on other sites
22 minutes ago, BL4CK_SP1DER said:

hello

since armaholic is down, is there any way i can download the bon recuit script?

 never mind i found it, i really need to read better, me and my AD/HD xD

Share this post


Link to post
Share on other sites
On 11/3/2021 at 12:18 AM, romabysen said:

You can find a version here, extracted from the ISIL Foothold missions. It only has two changes

  • Remove line of code explicitly referencing Hermes Air Services (HAS)
  • Prevent dismissing units in other groups than your own

https://drive.google.com/file/d/1aMG_h-ZlYDk3Ck9yri0POzl_FjIaJeOG/view?usp=sharing

 

Note that this isn't PvP safe but it should be easy to modify dismiss.sqf to also check the side or faction of the unit and caller.

Maybe just ask me in the future considering i spent 2yrs on and off on my ISIL Foothold missions, i could have just given everyone a direct link to

download Bon's Infantry Recruitment Redux script.

  Which i can do here:

From my google drive

https://drive.google.com/file/d/11_peKI50Etnz06T6nu3nzeRwsZUO47br/view?usp=sharing

This is the original file if you were to download from Armaholic its a demo mission set on stratis, you can get the script from the mission itself.

Look at the other files and basically replicate it in your own mission.

 

    In the future just ask unless your challenged, i'm always happy to help members of the Arma community.

  • Like 1

Share this post


Link to post
Share on other sites
16 hours ago, Gunter Severloh said:

Maybe just ask me in the future considering i spent 2yrs on and off on my ISIL Foothold missions, i could have just given everyone a direct link to

download Bon's Infantry Recruitment Redux script.

  Which i can do here:

From my google drive

https://drive.google.com/file/d/11_peKI50Etnz06T6nu3nzeRwsZUO47br/view?usp=sharing

This is the original file if you were to download from Armaholic its a demo mission set on stratis, you can get the script from the mission itself.

Look at the other files and basically replicate it in your own mission.

 

    In the future just ask unless your challenged, i'm always happy to help members of the Arma community.

 

Oops. Sorry, man. I was just trying to be helpful since no one seemed to know where to get it.

 

Cheers

Share this post


Link to post
Share on other sites

No worries, welcome to BI forums btw love your avatar, isn't that from The Good the bad and the ugly?

Share this post


Link to post
Share on other sites

Thanks! My avatar is Bud Spencer's character in "Who Finds a Friend Finds a Treasure"

 

  • Like 1

Share this post


Link to post
Share on other sites

Is there a way to have more than one recruit flag?

 

I tried to copy and paste the flag with addaction to have more than one but I don't see the addaction when in game on any of the extra flags.

 

Thanks.

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

×