Jump to content

AI recruitment for epoch


Lacost

Recommended Posts

the menu appears and disappears immediately, there is something to put in infistar ??

First, you should be using this version from Halvhjearne that does need any infistar additions and WAY easier to install. If you feel you must use the original posters version then your answer I'm pretty sure is in this forum somewhere.

 

All you need with Halvhjearne's version is this added the end of the second line in Publicvariable.txt!="bon_recruit_newunit"

Link to comment
Share on other sites

First, you should be using this version from Halvhjearne that does need any infistar additions and WAY easier to install. If you feel you must use the original posters version then your answer I'm pretty sure is in this forum somewhere.

 

All you need with Halvhjearne's version is this added the end of the second line in Publicvariable.txt!="bon_recruit_newunit"

 

I tried that only, and ive tried this:

 

//new
5 "" !"PVDZE_" !"norrn" !"usec" !="remExField" !="remExFP" !="drn_AskServerDynamicWeatherEventArgs" !="BIS_effects_gepv" !="PVDZ_Server_Simulation" !="toClient" !="usageLogger" !="useBroadcaster" !="baseExporter"
5 "remExFP" !="\"remExFP\" = \[,,\"per\",\"execVM\",\"ca\\Modules\\Functions\\init.sqf\"\]" !"\[,,\"per\",\"execVM\",\"ca\\Modules\\Functions\\init.sqf\"\]" !="PVAH_WriteLogReq" !="bon_recruit_newunit" !="PV_requestServerunit"
 
Still kicks me out :( Any clues?
 
Edit: Fixed it by putting ( !="PVAH_WriteLogReq" !="bon_recruit_newunit" !="PV_requestServerunit" ) on the first row instead (5 """)
Link to comment
Share on other sites

 

I tried that only, and ive tried this:

 

//new
5 "" !"PVDZE_" !"norrn" !"usec" !="remExField" !="remExFP" !="drn_AskServerDynamicWeatherEventArgs" !="BIS_effects_gepv" !="PVDZ_Server_Simulation" !="toClient" !="usageLogger" !="useBroadcaster" !="baseExporter"
5 "remExFP" !="\"remExFP\" = \[,,\"per\",\"execVM\",\"ca\\Modules\\Functions\\init.sqf\"\]" !"\[,,\"per\",\"execVM\",\"ca\\Modules\\Functions\\init.sqf\"\]" !="PVAH_WriteLogReq" !="bon_recruit_newunit" !="PV_requestServerunit"
 
Still kicks me out :( Any clues?
 
Edit: Fixed it by putting ( !="PVAH_WriteLogReq" !="bon_recruit_newunit" !="PV_requestServerunit" ) on the first row instead (5 """)

 

Good to hear, was jsut coming on here to tell you to do that ;)

Link to comment
Share on other sites

To adjust the AI so that they work correctly, or how they are supposed to work in my book, is adjust their behaviour.

Find the "Recruit.sqf" and open it, then find the 'Unit Creation' section. Adjust the combat mode and behaviour to the following:
(DO NOT COPY AND PASTE THIS)

/********************* UNIT CREATION ********************/
_unit = group player createUnit [_unittype, position player, [], 0, "FORM"];
_unit setRank "PRIVATE";
_unit setCombatMode "YELLOW";
_unit setskill 1;
_unit enableAI "TARGET";
_unit enableAI "AUTOTARGET";
_unit enableAI "MOVE";
_unit enableAI "ANIM";
_unit enableAI "FSM";
_unit setBehaviour "AWARE";
_unit setFormation "WEDGE";
[_unit] execVM (BON_RECRUIT_PATH+"init_newunit.sqf");
/*******************************************************/

This will ensure they fire at will without breaking formation and will look for enemies. You shouldn't have to command them to 'engage' anything hostile.

 

Link to comment
Share on other sites

  • 5 weeks later...

I was wanting to add more then one trader with mercs to hire but have different types of options   like on the coast having civilians you hire with low end weapons   then another merc recruit trader in middle with medium weapons and then up north one with the experts guys   also different pricing    anyone know how I can create this?

Link to comment
Share on other sites

I have an issue with getting booted with restriction #5   with this in the be log file

 

_unit addAction ["<t color=#949494'>" + localize "STR_SA_AI"+ "</t>",BON_RECRUIT_PATH+"dismiss.sqf",[],-10,false,true,"];

 

 

I added the !="PVAH_AdminReq" !="PVAH_WriteLogReq" !="bon_recruit_newunit"       

 

Used to work but now have Overpochins servers will that make a difference?

Link to comment
Share on other sites

  • 2 weeks later...

AI Recruitment for Soul's Single Currency:
 
Do double-check your prices. On my server 2000 coins is equivalent to 2 10z gold.
 
open_dialog.sqf:

//recruit menu by HALV

recruit_spawn_menu =
[
["",true],
["Recruit menu:", [-1], "", -5, [["expression", ""]], "1", "0"],
["Recruit Pilot (2000 coins)", [2], "", -5, [["expression", "['Pilot_EP1_DZ'] execVM (BON_RECRUIT_PATH + 'recruit_new.sqf');"]], "1", "1"],
["Recruit Marksman (4000 coins)", [3], "", -5, [["expression", "['Soldier_Sniper_PMC_DZ'] execVM (BON_RECRUIT_PATH + 'recruit_new.sqf');"]], "1", "1"],
["Recruit Soldier (6000 coins)", [4], "", -5, [["expression", "['Soldier_Crew_PMC'] execVM (BON_RECRUIT_PATH + 'recruit_new.sqf');"]], "1", "1"],
["Recruit Policeman (4000 coins)", [5], "", -5, [["expression", "['RU_Policeman_DZ'] execVM (BON_RECRUIT_PATH + 'recruit_new.sqf');"]], "1", "1"],
["Recruit Sniper (5000 coins)", [6], "", -5, [["expression", "['Sniper1_DZ'] execVM (BON_RECRUIT_PATH + 'recruit_new.sqf');"]], "1", "1"],
["", [-1], "", -5, [["expression", ""]], "1", "0"],
["Exit", [-1], "", -3, [["expression", ""]], "1", "1"]
];

showCommandingMenu '#USER:recruit_spawn_menu';

 

 

recruit_new.sqf:


//Created by HALV
//Idea from Bon_Inf*

_unittype = _this select 0;
if(isNil "HALV_unitprocessing")then{HALV_unitprocessing = false;};
if(HALV_unitprocessing)exitWith{_msg = "<System>: You already have a Recruit processing ...";hint _msg;systemChat _msg;};
if((count (units group player)) > (bon_max_units_allowed)) exitWith {hint "You can not hire more mercenaries";systemChat "<System>: You can not hire more mercenaries";};
showCommandingMenu '';

/********************* AI PRICE ********************/
_UNIT1_PRICE = 2000;
_UNIT2_PRICE = 4000;
_UNIT3_PRICE = 6000;
_UNIT4_PRICE = 4000;
_UNIT5_PRICE = 5000;
/*******************************************************/

_fixedscore = 10000;

_create_queue = {
HALV_unitprocessing = true;

closeDialog 0;
//disableUserInput true;
player playActionNow "Medic";
_displname = getText (configFile >> "CfgVehicles" >> _unittype >> "displayName");

hint parseText format["<t size='1.0' font='Zeppelin33' color='#ef2525'>%1</t> " + " added to queue.",_displname];

_score = rating player;

/*
_msg = format["Player rating before check: %1",_score];
systemChat _msg;
diag_log _msg;
*/
if(_score < _fixedscore)then{
	player addRating ((_score*-1) + _fixedscore);
};
/*
_score = rating player;
_msg = format["Player rating after check: %1",_score];
systemChat _msg;
diag_log _msg;
*/
sleep 1.5;
hint parseText format["Processing your" + " <t size='1.0' font='Zeppelin33' color='#ffd800'>%1</t>.",_displname];
sleep 4.5;
player playActionNow "Medic";
sleep 4;

PV_requestServerunit = [true,player,_unittype];
publicVariableServer "PV_requestServerunit";

hint parseText format["<t size='1.0' font='Zeppelin33' color='#008aff'>%1</t>" + " has arrived.",_displname];

//disableUserInput false;
titleText ["WARNING:\nALL Recruits Ammunition is Removed Near SafeZone Areas!","PLAIN DOWN",10];
HALV_unitprocessing = false;
};

switch(_unittype)do
{
	case "Pilot_EP1_DZ":
	{
		if (!([player, _UNIT1_PRICE] call SC_fnc_removeCoins)) then 
		{
			systemChat(format["Recruiting this unit costs %1 %2. You have insufficient funds.", _UNIT1_PRICE, CurrencyName ]);
		}else
		{
			systemChat(format["Thank you for your payment!", _UNIT1_PRICE, CurrencyName]);
			call _create_queue;	
		};
	};
	case "Soldier_Sniper_PMC_DZ":
	{
		if (!([player, _UNIT2_PRICE] call SC_fnc_removeCoins)) then 
		{
			systemChat(format["Recruiting this unit costs %1 %2. You have insufficient funds.", _UNIT2_PRICE, CurrencyName ]);
		}else
		{
			systemChat(format["Thank you for your payment!", _UNIT2_PRICE, CurrencyName]);
			call _create_queue;	
		};
	};
	case "Soldier_Crew_PMC":
	{
		if (!([player, _UNIT3_PRICE] call SC_fnc_removeCoins)) then 
		{
			systemChat(format["Recruiting this unit costs %1 %2. You have insufficient funds.", _UNIT3_PRICE, CurrencyName ]);
		}else
		{
			systemChat(format["Thank you for your payment!", _UNIT3_PRICE, CurrencyName]);
			call _create_queue;	
		};
	};
	case "RU_Policeman_DZ":
	{
		if (!([player, _UNIT4_PRICE] call SC_fnc_removeCoins)) then 
		{
			systemChat(format["Recruiting this unit costs %1 %2. You have insufficient funds.", _UNIT4_PRICE, CurrencyName ]);
		}else
		{
			systemChat(format["Thank you for your payment!", _UNIT4_PRICE, CurrencyName]);
			call _create_queue;	
		};
	};
	case "Sniper1_DZ":
	{
		if (!([player, _UNIT5_PRICE] call SC_fnc_removeCoins)) then 
		{
			systemChat(format["Recruiting this unit costs %1 %2. You have insufficient funds.", _UNIT5_PRICE, CurrencyName ]);
		}else
		{
			systemChat(format["Thank you for your payment!", _UNIT5_PRICE, CurrencyName]);
			call _create_queue;	
		};
	};
};

Link to comment
Share on other sites

  • 5 weeks later...

I have an agent already at a trader that I want to use for AI recruitment. I need a bit of help figuring out what to comment out or remove from the init.sqf for this to work. I already have the agent's location and skin, just need to remove the marker, all objects, etc from this init.

 

Thanks.

Link to comment
Share on other sites

I have an issue with getting booted with restriction #5   with this in the be log file

 

_unit addAction ["<t color=#949494'>" + localize "STR_SA_AI"+ "</t>",BON_RECRUIT_PATH+"dismiss.sqf",[],-10,false,true,"];

 

 

I added the !="PVAH_AdminReq" !="PVAH_WriteLogReq" !="bon_recruit_newunit"       

 

Used to work but now have Overpochins servers will that make a difference?

 

 

Im having the same problem but mine says script restriction #4   Soon as the ai spawns it kicks me.

 

 

15.12.2014 16:30:38: zedophile (98.88.65.66:53724) 87a1c5c76cee88f8b97eef04f82a006f - #4 "

 

 

_unit addAction ["<t color=#949494'>" + localize "STR_SA_AI"+ "</t>",BON_RECRUIT_PATH+"dismiss.sqf",[],-10,false,true,"];

Link to comment
Share on other sites

Is it possible to change the unit models?

 

Or better yet add more variety of units?

 

I was looking in the files and see loadouts for units, I assume I can change the loadout to whatever I want like adding NVG for example?

 

 

Thank you.

Link to comment
Share on other sites

Is it possible to change the unit models?

 

Or better yet add more variety of units?

 

I was looking in the files and see loadouts for units, I assume I can change the loadout to whatever I want like adding NVG for example?

 

 

Thank you.

Edit Recruitable_units.sqf And yes you can set each loadout and price of Ai

 

bon_recruit_recruitableunits = [

    "Soldier_Sniper_PMC_DZ",

    "Soldier_Bodyguard_AA12_PMC_DZ",

    "RU_Policeman_DZ",

    "Survivor2_DZ",

    "Sniper1_DZ"

];

Link to comment
Share on other sites

Edit Recruitable_units.sqf And yes you can set each loadout and price of Ai

 

bon_recruit_recruitableunits = [

    "Soldier_Sniper_PMC_DZ",

    "Soldier_Bodyguard_AA12_PMC_DZ",

    "RU_Policeman_DZ",

    "Survivor2_DZ",

    "Sniper1_DZ"

];

 

Thank you.

 

I was also wondering about the AI skill?

 

I see it's set to 1 in recruit.sqf     _unit setskill 1;

 

Is that the highest skill level?

Link to comment
Share on other sites

  • 1 month later...

this works for any map and will place a trader randomly each restart, has a scroll menu compared to the display menu and spawns the ai serverside so players are not spawning the ai and their weapons/ammo:

 

https://docs.google.com/file/d/0B8fUlKbv9mi2OU5adnNZOGFvcXM/edit

I installed AI Recruit with this method because I prefer to run it server side. After the server restart there is no map marker for the AI trader. I checked the RPT and there are no errors for it either. It's a very simple script to install. I simply added the bon_recruit_units folder to the root of my mission.pbo and the call to the init.sqf, but I'm not sure if it is running or not. Thanks for your work on this Halvhjearne.

Link to comment
Share on other sites

  • 4 weeks later...

i still get Battleeye kicked.

 

my publicvariable.txt

 

I put it in the first line at the end

 

 

ERROR: Battleye script restriction #4

//new
5 "" !"PVDZE_" !"norrn" !"usec" !="remExField" !="remExFP" !="currentInvites" !="drn_AskServerDynamicWeatherEventArgs" !="norrinRAlie" !="BIS_effects_gepv" !="dayzPlayerLogin" !="dayzPlayerLogin2" !"PVAHR_" !="PVAH_AdminReq" !="PVAH_WriteLogReq" !="bon_recruit_newunit" !="PV_requestServerunit"
5 "norrn" !="norrnRACarUp" !="norrnRAPicUp" !="norrnRaDrag" !="norrnR180" !="norrnRalie" !="norrnRLact" !="norrnRALW" !="norrnRDead" 
5 "usec" !="usecMorphine" !="usecBandage" !="usecBleed"
5 "PVDZE_" !"PVDZE_player" !="PVDZE_send" !="PVDZE_log_lockUnlock" !="PVDZE_Server_Simulation" !="PVDZE_veh_Update" !="PVDZE_plr_GutBody" !="PVDZE_plr_GutBodyZ" !="PVDZE_veh_Lock" !="PVDZE_plr_DeathB" !="PVDZE_maintainArea" !="PVDZE_obj_Publish" !="PVDZE_obj_Swap" !="PVDZE_plr_Save" !="PVDZE_obj_Delete" !="PVDZE_obj_Trade" !="PVDZE_veh_Publish2" !="PVDZE_zed_Spawn" !="PVDZE_plr_Died" !="PVDZE_plr_TradeMenu" !="PVDZE_veh_Upgrade" !="PVDZE_atp" !="PVDZE_plr_Login" !="PVDZE_plr_Login2" !="PVDZE_plr_LoginRecord" !="PVDZE_plr_DeathBResult" !="PVDZE_veh_SFix" !="PVDZE_plr_Hit" !="PVDZE_plr_HitV" !="PVDZE_veh_SFuel" !="PVDZE_plr_HideBody" !="PVDZE_plr_Morph" !="PVDZE_veh_Publish" !="PVDZE_plr_Characters" !="PVDZE_lockVault" !="PVDZE_EvacChopperFieldsUpdate" !="PVDZE_obj_setlocalVars" !="PVDZE_obj_getlocalVars" !="PVDZE_bank_Save" !="PVDZE_account_Doublecheck"
5 "PVAHR_" !"PVAHR_0_"
1 "PVAH"
5 "remExFP" !="\"remExFP\" = \[,,\"per\",\"execVM\",\"ca\\Modules\\Functions\\init.sqf\"\]" !"\[,,\"per\",\"execVM\",\"ca\\Modules\\Functions\\init.sqf\"\]"
5="player"
5="server"
5 "fnc_plyrHit"
5 "AntiHack"
1 "Delete"
03.03.2015 17:39:32: Chong (88.134.173.97:2304) 6a9c1f0a180a3267e7ef - #4 "

_unit addAction ["<t color='#949494'>" + localize "STR_SA_AI"+ "</t>",BON_RECRUIT_PATH+"dismiss.sqf",[],-10,false,true,""];

script.txt

//new
5 "dedicatedServerInterface"
5 "_unit createUnit"
5 "_unit action"
5 "createUnit _array"
5 "[_pos, _grp, \";\" +"
5 "\"+ \""
5 "\" +\""
5 "\"+  \""
5 "\"  +\""
Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...