falconx1 13 Posted July 24, 2013 (edited) Works in preview test and i think LAN but definitely, absolutely not in dedicated the scripts are set up as follows. Init.sqf code: if (isServer) then {ExecVM "server.sqf"}; then server.sqf code: {ExecVM "AI_4X_Infantry_Camp_Tempest.sqf";}; //which contains RandomDirection = ["Camp Tempest1","Camp Tempest2","Camp Tempest3","Camp Tempest4","Camp Tempest5","Camp Tempest6","Camp Tempest7","Camp Tempest8"] select floor(random 8); _grp1 = createGroup east; _grp1 = [markerPos RandomDirection, EAST, ["O_Soldier_F", "O_Soldier_GL_F", "O_Soldier_AR_F"], [], [], [0.10, 0.10]] call BIS_fnc_spawnGroup; //or 0.25 -1 { _x allowFleeing 0} forEach units _grp1; _wp0 = _grp1 addWaypoint [AttackMarkerLocation,0]; _wp0 setWaypointType "SAD"; _wp0 setWaypointFormation "LINE"; _wp0 setWaypointBehaviour "AWARE"; _wp0 setwaypointcombatmode "YELLOW"; _wp0 setWaypointSpeed "NORMAL"; Would really appreciate help on getting AI SKill adjusted for Dedicated play. Sick of being head shot every time on AI SKill 0.25 and lower. I know for a fact its not setting the skill right Edited July 24, 2013 by Foxhound Share this post Link to post Share on other sites
WildFire6 10 Posted July 24, 2013 I dont see setskill anywhere in your script, so im calling thread fail. After you use spawngroup use this: { _x setBehaviour "AWARE"; _x setSkill ["aimingAccuracy", 0.3]; _x setSkill ["aimingShake", 0.8]; _x setSkill ["aimingSpeed", 0.6]; _x setSkill ["endurance", 0.6]; _x setSkill ["spotDistance", 0.2]; _x setSkill ["spotTime", 0.25]; _x setSkill ["courage", 0.5]; _x setSkill ["reloadSpeed", 0.1]; _x setSkill ["commanding", 0.8]; _x setSkill ["general", 0.4]; } foreach units _grp; Adjust values as needed. Shake affects machine gunners heavily, accuracy is pretty exact meaning .3 so around 3 out of 10 shots are pretty accuracte, its pretty close too. Spot time is the time within view they will actually see you, anything above .3 is really fast even at 200+ meters. Spotdistance has no effect so far ive seen. General affects everything and ramps up everything else very fast. Share this post Link to post Share on other sites
falconx1 13 Posted July 24, 2013 it's here in this array: [0.10, 0.10] _grp1 = [markerPos RandomDirection, EAST, ["O_Soldier_F", "O_Soldier_GL_F", "O_Soldier_AR_F"], [], [], [0.10, 0.10]] call BIS_fnc_spawnGroup; //or 0.25 -1 http://community.bistudio.com/wiki/BIS_fnc_spawnGroup Share this post Link to post Share on other sites
1para{god-father} 105 Posted July 24, 2013 I would still go with WildFire6 suggestion as that will solve your issue as never had any luck setting there skill that way, Share this post Link to post Share on other sites
Larrow 2820 Posted July 24, 2013 bis_fnc_spawnGroup uses the setUnitAbility command to set those values. From the BIKI Syntax: unit setUnitAbility skill Parameters: unit: Object skill: Number Range 0.2 to 1.0 Return Value: Nothing And from the spawnGroup function. //If a range was given, set a random skill. if ((count _skillRange) > 0) then { private ["_minSkill", "_maxSkill", "_diff"]; _minSkill = _skillRange select 0; _maxSkill = _skillRange select 1; _diff = _maxSkill - _minSkill; _unit setUnitAbility (_minSkill + (random _diff)); }; So basically using [0.1, 0.1] relates to _unit setUnitAbility (0.1 + (random 0)) so 0.1 What happens? does it get ignored as its not atleast the minimum of 0.2? I havent tested to find out but maybe somethig to look at. Agree with the others though either use WildFire6 example instead or put ZEU_serverSkill in your servers mods. Share this post Link to post Share on other sites
mikie boy 18 Posted July 24, 2013 Again just to confirm wildfire6 methods does work. And a reliable means. Share this post Link to post Share on other sites
falconx1 13 Posted July 24, 2013 (edited) http://community.bistudio.com/wiki/setUnitAbility it appears to be ignored when i set range to 0.25 - 0.30 or 0.25 - 0.25 which would just set it at 0.25 but is ignored as i can tell would hate to have to mod all the AI Code.. the way im doing it, is much cleaner if it would freaking work on dedicated :( i could be implementing the code wrong that's why i posted how it's being ran script wise in the first post above Edit: I was just testing all this again with various methods to set skill of the AI. i used the one above that wildfireposted , and it don't work: the reason i believe is because during mission selection if veteran mode was chosen, this is over writing server side Scripted AI Setskill. can someone confirm this is correct? if that's the case i think it should be changed because i only load missions on veteran mode just to get rid of the unit/player markers. not to play against godlike AI !!! here is the tested code: let me know if u think it's incorrect _grp1 = createGroup east; _grp1 = [markerPos RandomDirection, EAST, ["O_Soldier_F", "O_Soldier_GL_F", "O_Soldier_AR_F"], [], [], [AICurrentSkill, AICurrentSkill]] call BIS_fnc_spawnGroup; { _x allowFleeing 0; _x setskill ["aimingAccuracy",AICurrentSkill]; _x setskill ["aimingShake",AICurrentSkill]; _x setskill ["aimingSpeed",AICurrentSkill]; _x setskill ["commanding",AICurrentSkill]; _x setskill ["courage",AICurrentSkill]; _x setskill ["spotDistance",AICurrentSkill]; _x setskill ["spotTime",AICurrentSkill]; } forEach units _grp1; _wp0 = _grp1 addWaypoint [AttackMarkerLocation,0]; _wp0 setWaypointType "SAD"; _wp0 setWaypointFormation "LINE"; _wp0 setWaypointBehaviour "AWARE"; _wp0 setwaypointcombatmode "YELLOW"; _wp0 setWaypointSpeed "NORMAL"; _wp0 setWaypointCompletionRadius 20; diag_log format ["LOG: Wave: {%1} AI Spawned: {%2} AI Skill: {%3}", waves_east, RandomDirection, AICurrentSkill]; Edited July 24, 2013 by falconx1 Share this post Link to post Share on other sites
1para{god-father} 105 Posted July 25, 2013 We only run our Dedi server in Vet mode and it always works fine for us You are using "AICurrentSkill" try the code that he posted as that 100% works Just change your code to this and look at the logs { _x setSkill ["aimingAccuracy", 0.3]; _x setSkill ["aimingShake", 0.8]; _x setSkill ["aimingSpeed", 0.6]; _x setSkill ["endurance", 0.6]; _x setSkill ["spotDistance", 0.2]; _x setSkill ["spotTime", 0.25]; _x setSkill ["courage", 0.5]; _x setSkill ["reloadSpeed", 0.1]; _x setSkill ["commanding", 0.8]; _x setSkill ["general", 0.4]; //////DEBUG/////////////////////// _aA = _x skill "aimingAccuracy"; _aS = _x skill "aimingShake"; _aSp = _x skill "aimingSpeed"; _e = _x skill "Endurance"; _sD = _x skill "spotDistance"; _sT = _x skill "spotTime"; _c = _x skill "courage"; _rS =_x skill "reloadSpeed"; diag_log format [ "unit: %1\naimingAccuracy: %2\naimingShake: %3 \naimingSpeed: %4\nEndurance: %5\nspotDistance: %6 \nspotTime: %7\ncourage: %8\nreloadSpeed: %9" ,_x,_aA,_aS,_aSp,_e,_sD,_sT,_c,_rS]; } foreach units _grp1; Also just make a Functions that way you can just change the skill in 1 place INIT.sqf [] execvm "functions.sqf"; Functions.sqf God_fnc_Skill ={ _groupnamed = _this select 0; _leaderguy = leader _groupnamed; _leaderguy setskill 0.50; { _x setskill ["aimingAccuracy",0.30]; _x setskill ["spotDistance",0.50]; _x setskill ["spotTime",0.55]; _x setskill ["courage",0.55]; _x setskill ["commanding",0.50]; _x setskill ["aimingShake",0.50]; _x setskill ["aimingSpeed",0.55]; } foreach units _groupnamed ; }; then just call it on the group i.e _grp1 = [markerPos RandomDirection, EAST, (configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfTeam")] call BIS_fnc_spawnGroup; [_grp1] call God_fnc_Skill; Share this post Link to post Share on other sites
falconx1 13 Posted July 28, 2013 (edited) We only run our Dedi server in Vet mode and it always works fine for usYou are using "AICurrentSkill" try the code that he posted as that 100% works i like that method you posted, i adapted it. but i would like to use the variable to SetSkill. based on the skill level param. Can someone please download my mission and take a look at it for me? . the AI are still godlike. i have no idea why they are still elite AI. the Skill var is set in init.sqf and i believe is legit. I really want to finish this mission. but im reluctant to finish it if the AI can't be set properly. Run your dedicated server leave the start location PARAM on kamino since i havn't got the other AI code added ATM . http://www.filedropper.com/firefight-beta-v1stratis_1 Be sure to host the mission on veteran mode files of interest: Functions_AI.sqf AI_4X_Infantry_Kamino.sqf server.sqf Init.sqf Parameters.hpp Edited July 28, 2013 by falconx1 Share this post Link to post Share on other sites