smacker909 3 Posted September 16, 2013 I'm trying this with "random" patrols. If I add a third patrol to use UPSMON, the mission freezes. Share this post Link to post Share on other sites
1para{god-father} 105 Posted September 16, 2013 I'm trying this with "random" patrols. If I add a third patrol to use UPSMON, the mission freezes. Ahhhhhhhhhhh I am glad you posted that as I am having the same issue more than 2 groups it freezes and you have to shutdown A3 ! So at least i know it's not just me ! Share this post Link to post Share on other sites
bardosy 158 Posted September 17, 2013 Last time, I used UPSMON script found in this topic in Beta, it works. But now, in the final Arma3 it won't. I got error messages _x variable is not found in a forEach block what is nonsence, because _X is the variable in a forEach block. And of course, when this error occurs, upsmon exited and the soldiers just act like in basic game. Any solution? Or where did you download the UPSMON working on Arma3 ? Share this post Link to post Share on other sites
1para{god-father} 105 Posted September 17, 2013 I got it from here:- https://dl.dropboxusercontent.com/u/...SMON_520b1.zip But like i reported it Freezes Share this post Link to post Share on other sites
bardosy 158 Posted September 17, 2013 Thanks! Did you checked your arma3.PRT file? (I'm not sure it's exits in arma3, but earlier it was a handful help to find problems). Share this post Link to post Share on other sites
phoenix_za 23 Posted September 18, 2013 Hello I would like to report that I have the same problem with 5.1.0 beta 1, where the "random" function and its derivatives causes the game to freeze for several minutes and then resumes. One of our mission makers however, discovered that UPS's "random" function works fine and so I tested it with UPS 2.1.2 and it indeed works fine with dozens of groups over a large area. So I believe that may be a good starting point, at least for me if I try to fix it. Share this post Link to post Share on other sites
matte54 10 Posted September 18, 2013 Last time, I used UPSMON script found in this topic in Beta, it works. But now, in the final Arma3 it won't. I got error messages _x variable is not found in a forEach block what is nonsence, because _X is the variable in a forEach block. And of course, when this error occurs, upsmon exited and the soldiers just act like in basic game. Any solution? Or where did you download the UPSMON working on Arma3 ? I had this problem aswell, all scripts just one day stopped working and a day ago it was working. Turns out i still was in "development mode" in steam from the beta period, so i got the development patch downloaded over night, and it broke absolutley everything. i just set development beta to none and it changed the files around and everything was back to normal, hope it helps! Share this post Link to post Share on other sites
phoenix_za 23 Posted September 18, 2013 I believe I found the solution (or at least a temporary one) and potential cause to the freeze problem I mentioned above. What I did is I changed the function call from KRON_posInfo3 to KRON_posInfo at line 674 (for my UPSMON version) in upsmon.sqf, in the loop under: // make start position random It seems like that or KRON_BldPos2 that it calls caused the problem. I also updated many of those functions with the latest stable UPS. I don't know if that will make it worse though. Share this post Link to post Share on other sites
Vigil Vindex 64 Posted September 20, 2013 I believe I found the solution (or at least a temporary one) and potential cause to the freeze problem I mentioned above.What I did is I changed the function call from KRON_posInfo3 to KRON_posInfo at line 674 (for my UPSMON version) in upsmon.sqf, in the loop under: It seems like that or KRON_BldPos2 that it calls caused the problem. I also updated many of those functions with the latest stable UPS. I don't know if that will make it worse though. Can you share any updated version? Share this post Link to post Share on other sites
phoenix_za 23 Posted September 20, 2013 (edited) I can, but it isnt as up to date in other areas, as I just personally hacked it and updated it in isolation since A3 alpha launch and it may have dependancies from my own mission framework. Plus, im not sure if im allowed to distribute it, as I dont see any permission anywhere, so if anyone can halp me out with that, then that would help a lot. But it's a really simple fix, so I don't think anyone else will have a problem replicating it. Edited September 20, 2013 by Phoenix_ZA Share this post Link to post Share on other sites
p1nga 23 Posted September 22, 2013 might i suggest that since UPSMON seems to have become a community project, that we get permission from the original devs (Monsada, Rafalsky), and place a repo on GitHUB or dev:heaven and go about tracking bugs and changes so that we can have a single stable build with everyone's updates and fixes. Share this post Link to post Share on other sites
bardosy 158 Posted September 23, 2013 I just want to add an issue report: In Arma2 this script force the AI units to use any static weapon or empty, unlocked fighting vehicle to use in the designated area. But in arma3 they left the static MGs and IFVs alone and fight only in foot. Did I missed something? I guess somehow it's hardcoded some vehicle class to occupy, what is not exists in arma3. Share this post Link to post Share on other sites
Pac Man 10 Posted September 23, 2013 Can someone (the new UPSMON author(s)?) start a new thread and put the most current, working version in the OP & also keep the OP updated with any changes? This thread is all over the place :p. Thanks. Kind Regards, Isaac Share this post Link to post Share on other sites
p1nga 23 Posted September 23, 2013 Can someone (the new UPSMON author(s)?) start a new thread and put the most current, working version in the OP & also keep the OP updated with any changes? This thread is all over the place :p. Thanks.Kind Regards, Isaac I have started a GitHUB repository to store UPSMON_A3, track changes and issues. Hopefully we can get a the script up to date with everyone's fixes, and improvements. I also have some ideas for features that can be added and ways to improve the script as a complete package. https://github.com/pastor399/UPSMON_A3 At the time of writing this post i had not uploaded the master branch, the master branch will be UPSMON_A3 as i got it from the latest dropbox link in this thread, Just got to work and looking to get it committed in the next hour or so. Once the Master branch is working, we might make a new thread. Share this post Link to post Share on other sites
Pac Man 10 Posted September 23, 2013 (edited) Sounds great. Shoot us the details when you can. Edited September 23, 2013 by Pac Man Share this post Link to post Share on other sites
p1nga 23 Posted September 24, 2013 (edited) Sounds great. Shoot us the details when you can. I have updated UPSMON on GitHub, i made these changes at work though, and do not have access to ARMA 3 to run the game and make sure it is working. The changes were the same as i had done for a mission i completed last night using UPSMON so i have no reason to believe that it wont work, i had 250+ AI on 30 different markers, maybe 50% of which were using Random Spawn, and i was not getting any errors. GitHUB - https://github.com/pastor399/UPSMON_A3/tree/0.1a GitHUB Download - https://github.com/pastor399/UPSMON_A3/archive/0.1a.zip Once i get word, or test it myself that it is working as expected i will push it to the Master Branch and Create a release, and then we will have UPSMON_A3 0.1a Edited September 24, 2013 by pastor399 grammar Share this post Link to post Share on other sites
ligthert 21 Posted September 24, 2013 might i suggest that since UPSMON seems to have become a community project, that we get permission from the original devs (Monsada, Rafalsky), and place a repo on GitHUB or dev:heaven and go about tracking bugs and changes so that we can have a single stable build with everyone's updates and fixes. I've spoken with FoxHound in the past about this and he contacted Monsada about this. This was basically his response: Ik heb net antwoord gekregen van Monsada (de maker van UPS) en hij heeft er geen probleem mee als je een fixed versie voor Arma 3 uitbrengt.Quote : “Sorry but i had no time to play for long time, you have all right to edit upsmon to your needs. I congratulate people like to use it in new version of arma 3.†In short: Go Mental! Share this post Link to post Share on other sites
cool=azroul13 14 Posted September 24, 2013 (edited) I found a problem about the surrending system: Error in expression <%1]", KRON_NPCs]; }; { if ( !isnull _x && {alive _x} && {!captive _x} ) then> Error position: <_x && {alive _x} && {!captive _x} ) then> Error Undefined variable in expression: _x File E:\Mes Documents\Arma 3 - Other Profiles\Cool=Azroul13\missions\testUPSMON.Stratis\scripts\Init_UPSMON.sqf, line 328 Error in expression <%1]", KRON_NPCs]; }; { if ( !isnull _x && {alive _x} && {!captive _x} ) then> Error position: <_x && {alive _x} && {!captive _x} ) then> Error Undefined variable in expression: _x File E:\Mes Documents\Arma 3 - Other Profiles\Cool=Azroul13\missions\testUPSMON.Stratis\scripts\Init_UPSMON.sqf, line 328 I think I found the error, it was a "{" which missing. // *********************************************************************************************************** // MAIN UPSMON SERVER FUNCTION // *********************************************************************************************************** MON_MAIN_server = { private["_obj","_trg","_l","_pos","_countWestSur","_countEastSur","_countResSur","_WestSur","_EastSur","_ResSur","_target","_targets","_targets0","_targets1","_targets2","_npc","_cycle" ,"_arti","_side","_range","_rounds","_area","_maxcadence","_mincadence","_bullet","_fire","_knownpos","_sharedenemy","_enemyside","_timeout"]; _cycle = 10; //Time to do a call to commander // ToDo make server FPS agile _arti = objnull; _side = ""; _range = 0; _rounds = 0; _area = 0; _maxcadence = 0; _mincadence = 0; _bullet = ""; _fire = false; _target = objnull; _knownpos =[0,0,0]; _enemyside = []; _WestSur = KRON_UPS_WEST_SURRENDED; _EastSur = KRON_UPS_EAST_SURRENDED; _ResSur = KRON_UPS_GUER_SURRENDED; //Main loop while {true} do { _countWestSur = round ( KRON_UPS_West_Total * KRON_UPS_WEST_SURRENDER / 100); _countEastSur = round ( KRON_UPS_East_Total * KRON_UPS_EAST_SURRENDER / 100); _countResSur = round ( KRON_UPS_Guer_Total * KRON_UPS_GUER_SURRENDER / 100); //Checks for WEST surrender if (KRON_UPS_WEST_SURRENDER > 0 && !KRON_UPS_WEST_SURRENDED ) then { { if (!alive _x || !canmove _x) then {KRON_AllWest = KRON_AllWest-[_x]}; }foreach KRON_AllWest; if ( count KRON_AllWest <= _countWestSur ) then { KRON_UPS_WEST_SURRENDED = true; publicvariable "KRON_AllWest"; publicvariable "KRON_UPS_WEST_SURRENDED"; }; }; //Checks for EAST surrender if (KRON_UPS_EAST_SURRENDER > 0 && !KRON_UPS_EAST_SURRENDED ) then { { if (!alive _x || !canmove _x) then {KRON_AllEast = KRON_AllEast-[_x]}; }foreach KRON_AllEast; if ( count KRON_AllEast <= _countEastSur ) then { KRON_UPS_EAST_SURRENDED = true; publicvariable "KRON_AllEast"; publicvariable "KRON_UPS_EAST_SURRENDED"; }; }; //Checks for RESISTANCE surrender if (KRON_UPS_GUER_SURRENDER > 0 && !KRON_UPS_GUER_SURRENDED ) then { { if (!alive _x || !canmove _x) then {KRON_AllRes = KRON_AllRes-[_x]}; }foreach KRON_AllRes; if ( count KRON_AllRes <= _countResSur ) then { KRON_UPS_GUER_SURRENDED = true; publicvariable "KRON_AllRes"; publicvariable "KRON_UPS_GUER_SURRENDED"; }; }; //Exec surrended script if (KRON_UPS_WEST_SURRENDED && !_WestSur ) then { _WestSur = true; [west] spawn UPSMON_surrended; }; if (KRON_UPS_EAST_SURRENDED && !_EastSur ) then { _EastSur = true; [east] spawn UPSMON_surrended; }; if (KRON_UPS_GUER_SURRENDED && !_ResSur ) then { _ResSur = true; [Resistance] spawn UPSMON_surrended; }; sleep 0.5; _sharedenemy = 0; _targets0 = []; _targets1 = []; _targets2 = []; if (KRON_UPS_Debug>0) then { diag_log format ["KRON_NPCs: [%1]", KRON_NPCs]; }; { if ( !isnull _x && {alive _x} && {!captive _x} ) then { _npc = _x; _targets = []; switch (side _npc) do { //West targets case west: { _sharedenemy = 0; _enemyside = [east]; }; //East targets case east: { _sharedenemy = 1; _enemyside = [west]; }; //Resistance targets case resistance: { _sharedenemy = 2; _enemyside = KRON_UPS_Res_enemy; }; }; if (side _npc in KRON_UPS_Res_enemy) then { _enemyside = _enemyside + [resistance]; }; //Gets known targets on each leader for comunicating enemy position //Has better performance with targetsquery //_targets = _npc nearTargets KRON_UPS_sharedist; _targets = _npc targetsQuery ["","","","",""]; { //_target = _x select 4; //Neartargets _target = _x select 1; //Targetsquery if ( side _target in _enemyside ) then { if (KRON_UPS_Debug>0) then {diag_log format["UPSMON: [%1] knows about [%2]: [%3], enemies=[%4] (index: %5)",_npc getVariable ("UPSMON_grpid"),_target, _npc knowsabout _target, _npc countEnemy _targets, _forEachIndex]}; if (!isnull _target && { alive _target } && { canmove _target } && { !captive _target } && { _npc knowsabout _target > R_knowsAboutEnemy } && { ( _target iskindof "Land" || _target iskindof "Air" || _target iskindof "Ship" ) } && { !( _target iskindof "Animal") } && { ( _target emptyPositions "Gunner" == 0 && _target emptyPositions "Driver" == 0 || (!isnull (gunner _target) && canmove (gunner _target)) || (!isnull (driver _target) && canmove (driver _target))) } ) then { //Saves last known position //_knownpos = _x select 0; //Neartargets _knownpos = _x select 4;//Targetsquery _target setvariable ["UPSMON_lastknownpos", _knownpos, false]; // _npc setVariable ["R_knowsAboutTarget", true, false]; // !R call (compile format ["_targets%1 = _targets%1 - [_target]",_sharedenemy]); call (compile format ["_targets%1 = _targets%1 + [_target]",_sharedenemy]); }; }; sleep 0.01; }foreach _targets; }; sleep 0.01; } foreach KRON_NPCs; //Share targets KRON_targets0 = _targets0; KRON_targets1 = _targets1; KRON_targets2 = _targets2; //Target debug console if (KRON_UPS_Debug>0) then {hintsilent parseText format["%1<br/>--------------------------<br/><t color='#33CC00'>West(A=%2 C=%3 T=%4)</t><br/><t color='#FF0000'>East(A=%5 C=%6 T=%7)</t><br/><t color='#00CCFF'>Res(A=%8 C=%9 T=%10)</t><br/>" ,UPSMON_Version ,KRON_UPS_West_Total, count KRON_AllWest, count KRON_targets0 ,KRON_UPS_East_Total, count KRON_AllEast, count KRON_targets1 ,KRON_UPS_Guer_Total, count KRON_AllRes, count KRON_targets2 ]}; sleep 0.5; //Artillery module control { _arti = _x select 0; _rounds = _x select 1; _range = _x select 2; _area = _x select 3; _maxcadence = _x select 4; _mincadence = _x select 5; _bullet = _x select 6; _salvobreak = _x select 7; if (isnil{_arti getVariable ("timeout")}) then { _arti setVariable ["timeout", time, false]; sleep 0.1; }; //_timeout = _arti getVariable ("timeout"); //if (isnil "_timeout") then {_timeout = 0}; _timeout = _arti getVariable ["timeout", 0]; if (!isnull (gunner _arti) && canmove (gunner _arti) && (time >= _timeout)) then { _side = side gunner _arti; _fire = call (compile format ["KRON_UPS_ARTILLERY_%1_FIRE",_side]); //If fire enabled gets a known target pos for doing fire if no friendly squads near. if (_fire) then { _target = call (compile format ["KRON_UPS_ARTILLERY_%1_TARGET",_side]); if (isnil "_target" ) then {_target = objnull;}; switch (_side) do { //West targets case west: { _targets = KRON_targets0; }; //East targets case east: { _targets = KRON_targets1; }; //Resistance targets case resistance: { _targets = KRON_targets2; }; }; //Check if has a target if (!(_target in _targets ) || isnull _target || !alive _target) then { _target = objnull; { _auxtarget = _x; _targetPos = _auxtarget getvariable ("UPSMON_lastknownpos"); if (!isnil "_targetPos") then { //If target in range check no friendly squad near if (alive _auxtarget && !(_auxtarget iskindof "Air") && (round([position _arti,_targetPos] call KRON_distancePosSqr)) <= _range) then { _target = _auxtarget; //Must check if no friendly squad near fire position { if (!isnull _x && _side == side _x) then { if ((round([position _x,_targetPos] call KRON_distancePosSqr)) < (KRON_UPS_safedist * 0.7)) exitwith {_target = objnull;}; }; } foreach KRON_NPCs; }; }; //If target found exit if (!isnull _target) exitwith {}; } foreach _targets; }; //If target fires artillery if (!isnull _target) then { //Fix current target call (compile format ["KRON_UPS_ARTILLERY_%1_TARGET = _target",_side]); _targetPos = _target getvariable ("UPSMON_lastknownpos"); if (!isnil "_targetPos") then { _arti removeAllEventHandlers "fired"; sleep 0.01; // chatch the bullet in the air and delete it _arti addeventhandler["fired", {deletevehicle (nearestobject[_this select 0, _this select 4])}]; [_arti,_targetPos,_rounds,_area,_maxcadence,_mincadence,_bullet,_salvobreak] spawn MON_artillery_dofire; }; }; }; }; sleep 0.5; } foreach KRON_UPS_ARTILLERY_UNITS; // if (KRON_UPS_Debug>0) then {player globalchat format["Init_upsmon artillery=%1",count KRON_UPS_ARTILLERY_UNITS]}; sleep _cycle; }; }; }; Edited September 24, 2013 by Cool=Azroul13 Share this post Link to post Share on other sites
tmp95 16 Posted September 25, 2013 Really hope we can get a working / effective UPSMON for A3! There really is no feel to A3 right now for me without the ability to make missions in which effective OPFOR patrols are taking place (with smoke and all the rest that UPSMON did / does for A2). Share this post Link to post Share on other sites
p1nga 23 Posted September 25, 2013 Really hope we can get a working / effective UPSMON for A3! There really is no feel to A3 right now for me without the ability to make missions in which effective OPFOR patrols are taking place (with smoke and all the rest that UPSMON did / does for A2). If you download the zip from GitHub as mentioned above, it does work. I have made, tested and played a mission last night that used UPSMON, the units Fortified buildings, setup ambushes, laid mines, started in random locations. There are a couple of known bugs with Reinforcements and Surrender as mentioned above, but for the most part you can make a successful mission using UPSMON_A3 and you will get units flanking your position and all that cool stuff that makes UPSMON, UPSMON. https://github.com/pastor399/UPSMON_A3/archive/0.1a.zip I will look into the surrender bug tonight (Australia time) and include that fix from Cool=Azroul13. I'm hoping that towards the future additional features will be added, the first on my list is to have AI closing doors when they enter buildings, seeing open doors just gives away the fact there are enemy inside :( In my opionion the Ambush functions need to be improved, sometimes they work great, but when there are roads and forests around and you see an ambush in the middle of a open field...... :s Share this post Link to post Share on other sites
bardosy 158 Posted September 25, 2013 (edited) pastor: did your version use the empty static weapons and vehicles? I mean, if there are empty weapons or armed vehicles in the zone, the UPSMON driven units take it and use it. EDIT: Nope. I tested it. Your UPSMON still don't use static weapons and vehicles. But I found a framerate drop with your script. If I use the earlier version from this topic (sorry, I don't remember who did this) no framerate issues in the same test mission. Edited September 25, 2013 by bardosy Share this post Link to post Share on other sites
tmp95 16 Posted September 25, 2013 pastor: did your version use the empty static weapons and vehicles? I mean, if there are empty weapons or armed vehicles in the zone, the UPSMON driven units take it and use it.EDIT: Nope. I tested it. Your UPSMON still don't use static weapons and vehicles. But I found a framerate drop with your script. If I use the earlier version from this topic (sorry, I don't remember who did this) no framerate issues in the same test mission. Is this FPS rate drop confirmed? Have never really seen an FPS hit from UPSMON before (at least in A2, perhaps once it did happend and was fixed). Share this post Link to post Share on other sites
Valixx 11 Posted September 25, 2013 I have no drop while using the version 5.0.9. // UPSMON - Urban Patrol Script Mon // Version: 5.0.9 // Author: Monsada (chs.monsada@gmail.com) Share this post Link to post Share on other sites
cool=azroul13 14 Posted September 25, 2013 The command nearestObjects [p1, ["StaticWeapon"] , 50]; , use in MON_NearestsStaticWeapons, seems broken. When I try these command I have this result : [RD000 some numbers:nameoftheobject.p3d,etc..]. Share this post Link to post Share on other sites
tmp95 16 Posted September 26, 2013 The lastest UPSMON A3 3.01 - Needs to have all text formated - It is hardly readable and even harder to edit / adjust as it is now. All just word wrapped in continuous lines of text. UPSMON for A2 was formatted for ease of editing / reading. Share this post Link to post Share on other sites