Jump to content
aviatormoser

Bon's Infantry Recruitment Redux

Recommended Posts

Bon's Infantry Recruitment Redux -- by Bon_Inf* and Moser

2bcy8gI.jpg

Full Size (1950 kB)

DL: http://www.armaholic.com/page.php?id=26312

About:

V. 1

The original script by Bon_Inf* was a priceless asset to COOP type missions such as Takistan Force, and is still regarded as one of the best AI recruitment scripts ever released. This port to Arma 3 uses the original scripts written by Bon_Inf*, albeit with small modifications and enhancements. The main change is a switch from static unit lists to dynamic unit lists. The script will detect your unit's vehicleClass and build the list with units from your vehicleClass. No longer will you have to manually build your own unit list; however, that legacy option is still available for mission designers who want to customize the list of recruitable units.

For example, Massi's desert Rangers will only be able to recruit other desert Rangers. Other subfactions in the same faction class, such as SEAL or DELTA, will not be recruitable if the player is a Ranger. This is solely a design choice, and in my opinion, an improvement in realism from similar recruitment scripts, such as Rommel's excellent MSO recruitment script, which included the entire faction in the recruitment lists. In the future, I will include an option to allow for the entire faction to be available in the recruitment lists.

Features:

- Recruitment lists are dynamically built by the subfaction of the player by default

- Static, customizable lists of units are now optional

- Multiplayer cleanup of player's AI on disconnect

- "Dismiss" action for each AI infantry unit

Installation:

The installation procedure remains identical to the original version.

Place the folder bon_recruit_units in your root mission folder.

For the init.sqf, place the following line to initialize the server and client scripts:

[] execVM "bon_recruit_units\init.sqf";

For the description.ext, place the following lines for the recruitment GUI.

#include "bon_recruit_units\dialog\common.hpp"

#include "bon_recruit_units\dialog\recruitment.hpp"

In an object's initialization field (such as a flag), add:

this addAction["<t color=#ff9900'>Recruit Infantry</t>", "bon_recruit_units\open_dialog.sqf];

Customizing unit lists:

To switch from dynamic recruitment lists to static recruitment lists, change

bon_dynamic_list = true to bon_dynamic_list = false in bon_recruit_units\init.sqf

To customize the static recruitment list, modify bon_recruit_units\recruitable_units_static.sqf.

--------------------------------------------------------------------------------------------------

Credits:

- Bon_Inf* for his excellent A2 AI recruitment script

- Sa-Matra for allowing me to use and modify his GUI dialogs code

- Zonekiller for his extremely useful array builder script

- The guys at Task Force Rattler for helping me test the script out

--------------------------------------------------------------------------------------------------

Edited by AviatorMoser

Share this post


Link to post
Share on other sites

Thanks for sending us the release :cool:

Release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

First I want to say hello all! Long time lurker :icon_redface: I also want to thank Bon and Moser for this real nice script.

Now, for my question. How can I make the units I recruit spawn in a different location than of on the player?

Share this post


Link to post
Share on other sites
looks great! :D
Great to see this in A3 thanks.
Thanks for sending us the release :cool:
Thank you! This is great! That is what I need.

Much appreciated! Yes, Bon's script is fantastic.

First I want to say hello all! Long time lurker :icon_redface: I also want to thank Bon and Moser for this real nice script.

Now, for my question. How can I make the units I recruit spawn in a different location than of on the player?

Hello to you! Yes, you can make them spawn in a different location. You just need to reference another object for bon_recruit_barracks in bon_recruit_units\open_dialog.sqf. At the moment it selects the player initializing the recruitment script, but you set it to another editor unit that has a name.

For instance, I can set bon_recruit_barracks = barracks;, where barracks is the name of a tent. You can fine-tune more control over the spawns on line 46 of bon_recruit_units\recruit.sqf.

_unit = group player createUnit [_unittype, [(getPos bon_recruit_barracks select 0) + 10 - random 20,(getPos bon_recruit_barracks select 1) + 10 - random 20,0], [], 0, "FORM"];

For instance, I can use getMarkerPos instead of getPos if I want to reference a marker position.

Share this post


Link to post
Share on other sites

Hi, great script you have here. A question, is there any way to have the units that you recruit spawn as a "playable" unit so they can be switched to by the player? if so how would I go about this. Thanks.

Share this post


Link to post
Share on other sites
Hi, great script you have here. A question, is there any way to have the units that you recruit spawn as a "playable" unit so they can be switched to by the player? if so how would I go about this. Thanks.

Inside bon_recruit_units\init_newunit.sqf add the following at the bottom of the file :

addSwitchableUnit _unit;

Share this post


Link to post
Share on other sites
Inside bon_recruit_units\init_newunit.sqf add the following at the bottom of the file :

addSwitchableUnit _unit;

Thanks mate, most appreciated. Will add it in. Thanks again.

Share this post


Link to post
Share on other sites
Inside bon_recruit_units\init_newunit.sqf add the following at the bottom of the file :

addSwitchableUnit _unit;

Looks like someone beat me to it. Thank you!

Share this post


Link to post
Share on other sites

I cant seem to get this script to work?

when i open the dialog it doesn't show any recruit-able units and says units queued:Scalar?

any chance that someone knows how to fix this?

Share this post


Link to post
Share on other sites

I'll take a look to see if the new updates have broken the script. BI is notorious for doing such things.

Update: It's working fine for me in the recruit test scenario. Which units are you using? Did the script fail with or without mods?

Edited by AviatorMoser

Share this post


Link to post
Share on other sites

I had Alive, RHS, MCC and USAF mod enabled. Do I need to define which units are recruitable? Or will it just list all units? It was also on a dedicated server.

Share this post


Link to post
Share on other sites
I had Alive, RHS, MCC and USAF mod enabled. Do I need to define which units are recruitable? Or will it just list all units? It was also on a dedicated server.

It should automatically generate a list of units based on the unit you are playing as. Which unit were you playing so I can try to recreate the bug?

Share this post


Link to post
Share on other sites

some ai don't fall into group, there on your team as in your group but wont listen.

the only thing to do is dismiss them and build a new ai...

anyone know what is causing this?

Edited by Dr Death JM
fixed ai dieing when player respawns

Share this post


Link to post
Share on other sites

Hi Dr. Death JM,

Are you using vanilla units? Or modded? Do you have a scenario I can look at?

In general, the script shouldn't affect AI behavior. It just manages the recruitment process.

Edited by AviatorMoser

Share this post


Link to post
Share on other sites

Just wanted to drop by and say thank you for this awesome script. Use it all the time and for my missions i share. Thanks!

Share this post


Link to post
Share on other sites
Hi Dr. Death JM,

Are you using vanilla units? Or modded? Do you have a scenario I can look at?

In general, the script shouldn't affect AI behavior. It just manages the recruitment process.

I fixed my issue and added to drop box link AviatorMoser,.(in pm)

Edited by Dr Death JM
fixed my issue

Share this post


Link to post
Share on other sites
Just wanted to drop by and say thank you for this awesome script. Use it all the time and for my missions i share. Thanks!

Thanks! Bon's original script was a must have!

I fixed my issue and added to drop box link AviatorMoser,.(in pm)

Thanks!

Share this post


Link to post
Share on other sites

If Dr Deaths issue has been fixed, could we receive that updated version of the script (if anything was actually wrong with it). Thanks!

Share this post


Link to post
Share on other sites

Just wanted to drop by and say thank you for this awesome script.

---------- Post added at 11:03 ---------- Previous post was at 10:57 ----------

Can I ask if its possible to add also high command squads ?

Share this post


Link to post
Share on other sites
Just wanted to drop by and say thank you for this awesome script.

---------- Post added at 11:03 ---------- Previous post was at 10:57 ----------

Can I ask if its possible to add also high command squads ?

You're welcome! Um, I'll look into it if its possible. Usually anything is possible in Arma. I'll look into it, and see if it's doable without rewriting the entire script!

If Dr Deaths issue has been fixed, could we receive that updated version of the script (if anything was actually wrong with it). Thanks!

Hi pero2589,

Nothing was actually wrong with the script. He did make a suggestion of toggling AI cleanup after player death on/off in the params, which I'll probably do once I get to it, of course!

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

×