Jump to content

genesis92x

Member
  • Content Count

    941
  • Joined

  • Last visited

  • Medals

Everything posted by genesis92x

  1. genesis92x

    Vcom AI V2.0 - AI Overhaul

    A quick update for everyone, I have been gone for the past several weeks due to important life stuff. I am going to be working on my Dissension project 'full-speed', and since it also includes Vcom AI, I will most likely be working on both projects. Which just means slower updates for Vcom. I appreciate everyone posting bugs and will be going back in the thread to add every bug/requested feature to a list. Thank you! Thank you Envakeo! Let me know if you have any further ideas or find any bugs. Oh wow! Thanks for the specific times, this is something I can test once I get back to it...In the mean time I would suggest double checking the server setting (Or you local computer's) difficulty settings and see what the AI skill is at. It may need to be bumped up. After that you can try messing with the VcomAI difficulty settings found in the userconfig folder - or the defaultsettings.sqf. I would give you the exact code but I am not at my desk to look into it... You may want to increase their spotting distance/spotting time and general skill level to see if that helps at all. Keep in mind the mod and script versions will require slightly different filepaths to look into. If you are using the mod version, you NEED to enable file-patching if you want the userconfig settings to work (Otherwise it uses default settings). Thanks fideco! Let me know if you can come up with any interesting ideas, improvements, or find any bugs. What an interesting idea celludriel. Could you expand on this for me? Would this be mod specific only? I have encountered this. I had this same issue with Vanilla AI as well. It has something to do with waypoints... Is this video below a similar issue? I found out it had something to do with how waypoints were being generated and assigned to units. The below video is Vanilla AI, the exact bug is ~3:30 in I believe. Rizla, could you try changing _x setvariable ["VCOM_NOPATHING_Unit",1, false]; to _x setvariable ["VCOM_NOPATHING_Unit",false]; and (Driver _x) setvariable ["VCOM_NOPATHING_Unit",1, false]; to (Driver _x) setvariable ["VCOM_NOPATHING_Unit",false]; Let me know if that removes the error - I am not in a position to look directly at the code so I can NOT remember how I had that variable setup anymore :<
  2. Hello everyone, I have a question that sounds rather straight forward but...now I am not sure. I have written a function that is supposed to find the furthest or closest pair of things from two arrays. I have not tested this at all, I just wrote it up now. Dis_AComp //This function will compare two arrays and find the objects that are closest to one another. //This function will aim to be as optimized as possible but should not be over-utilized as it will do MANY calculations in a short period of time. //For the return variable _this select 0 will be the distance, _this select 1 will be the object from array1, and _this select 2 will be the object from array 2. private ["_List1", "_List2", "_Array1", "_Array2", "_Order", "_Array1L", "_O", "_object", "_pos2", "_ND", "_DistanceArray", "_order"]; //[_List1,_List2,false] call dis_ADistC; _Array1 = _this select 1; _Array2 = _this select 2; _Order = _this select 3; _Array1L = []; { //Pull and remember the first object from array1 _O = _x; //Find out if the object in the array is an OBJECT, STRING, or ARRAY. Then grab its position if (TypeName _O isEqualTo "OBJECT") then {_pos = getposWorld _object;} else { if (TypeName _O isEqualTo "STRING") then {_pos = getMarkerPos _O} else {_pos = _O}; }; //Now we need to check EVERY OTHER OBJECT in the 2nd array. { //Find out if the object in the array is an OBJECT, STRING, or ARRAY. Then grab its position if (TypeName _x isEqualTo "OBJECT") then {_pos2 = getposWorld _object;} else { if (TypeName _x isEqualTo "STRING") then {_pos2 = getMarkerPos _x} else {_pos2 = _x}; }; //Find the distance between the 2 points _ND = _pos distance _pos2; //Put them into an array 0 = _Array1L pushback [_ND,_O,_x]; } count _Array2; } count _Array1; //Since the distance is the first in the array, it will sort based on that. False = shortest on top. True = furthest on top. _DistanceArray sort _order; //Finally lets spit out the final array. With this, we will return the whole array. This may be useful in the future for finding "close enough" targets or groups. _DistanceArray It is not the lightest of functions as it needs to figure out if what in the array is a marker, object, or something else... and it does the dreaded { {} foreach X } foreach X I have two main questions: 1) Do you see anyway to make this faster/more optimized? 2) For my mission I will be using this function to figure out which blufor unit/building/marker is closest to which opfor unit/building/marker. Instead of having me execute the function every time I need it like... _Rawr = [_Array1,_Array2,false] call Dis_AComp; So maybe, on the heavy side, the function gets ran 4-5 times every 60 seconds as scripts needs it. Would it be better to make it non-broadcasted global variable instead? Like creating a loop that runs every 30 seconds or so (it does not need to be precise). Rawr = [_Array1,_Array2,false] call Dis_AComp; So then every time a script needed that information they could just pull the variable "Rawr" instead of computing the function again? I am actually unaware of how demanding it is to constantly be re-writing a global variable with an array that could be potentially...huge. Summed up: Is it better/faster to have a function run _locally several times, or as needed. Or to have it be a non-broadcasted global variable that gets redefined every 30 seconds or so. It seems like it would actually be more FPS saving to have it ran only once every 30 seconds and be set to a global variable than to run it as needed _locally. Thoughts?
  3. genesis92x

    CH View Distance Addon

    What an awesome addon. I am going to check this out.
  4. genesis92x

    Optimization Question

    Oh! You are just a troll. My bad - I won't respond anymore. Have a nice weekend!
  5. genesis92x

    Optimization Question

    I am sorry, you might be misunderstanding. I am just communicating that learning OOP is not something essential to my life nor my hobby, and is not what I asked in the thread. I am not asking you to explain it to me, I am asking you to actually post helpful information or post nothing at all. I was looking for a helpful and friendly lesson/discussion...not to be told to go learn something that people spend their own careers learning.
  6. genesis92x

    Optimization Question

    I can probably learn a few basic things...but I am not a programmer, I do this in my spare time. So I will have to pass for now. That's like me asking my clients to learn the entirety of developmental therapy before I can help them.
  7. genesis92x

    Optimization Question

    Oh wow, that's new. Thank you! That's one way to optimize it :) My original question still stands :< I wonder how you could get it to work with objects though... Edit: Oh wait. Objnull works for testing if an object is an object. Man I don't understand that.
  8. genesis92x

    Vcom AI V2.0 - AI Overhaul

    Well that is good to know. I will favorite this so I can remember this for later...
  9. genesis92x

    Vcom AI V2.0 - AI Overhaul

    Hm, this looks like the config file did not get updated properly. Would you double check that you installed the userconfig from the most recent update? If you are running the script version check in the "VCOMAI_DefaultSettings.sqf" and look for the line "VCOM_CurrentlyMovingLimit" and make sure it is defined in there. Vcom does not interact with Zeus directly anymore...however it does not mean that it isn't doing something. I have not noticed this yet, I will keep an eye on it. If you have a mission that makes it easy to reproduce it (Or have the steps to reproduce it) that would be extremely helpful. Thank you! This does NOT include the AI driving script. I have not updated the driving AI for months so it probably does not work any better. Bohemia apparently improved the driving AI since then so I am not sure how bad it exactly is. The only AI mod I would recommend using with Vcom would be ALIVE. The way to think about is... Vcom AI really Micro's group/individual movement. So it does not go well with other mods that Micro manage the units. Alive really focuses on Macro. So, deployment of troops and the virtualization of the battlefield but does not directly micro any of the AI. So you can mix Micro/Macro mods, but NOT Micro/Micro. I really appreciate that baermitumlaut! I would love to get help for that. It might take me a little while, but after I finish a few things I will be focusing on optimizing Vcom AI again. Sorry that I did not respond sooner! I am glad you figured it out. I wish there was an easier way to do configs that did NOT require file-patching. And thank you, I try to think outside of the box from time to time. Sometimes it pays off!
  10. genesis92x

    [CTI-COOP] Dissension

    Yes I am designing it to work with Vcom out of the gate. The reason for this is not to just promote Vcom but also to help me debug and work on Vcom at the same time. The next goal I have for Vcom will be optimization, optimization, optimization. That will be after I get a early release of Dissension up and running. Thank you! I can't wait to get an initial test version up.
  11. genesis92x

    [CTI-COOP] Dissension

    In terms of learning to code for ArmA...
  12. genesis92x

    Vcom AI V2.0 - AI Overhaul

    Yeah, Vcom is setup to support caching, so I hope that helps. Now I will admit that Vcom is about due for another pass of optimizations - so after my Dissension project I will be visiting Vcom again for just optimization improvements. Thank you for the nice report :) It runs MUCH better, and I am excited to take another look at it to optimize it further. Regarding the show/hide module...I do not know much about that module, but I assume it might use hideobjectglobal or disablesimulation commands. AI with disabled simulation will also have their VcomAI FSM's frozen until they are shown/unfrozen again. They may take a few seconds to reconnect with the world again... Setting AI to respond in a 3000 meter radius should not heavily impact performance. I do a simplified distance check to all friendly groups and just filter out the ones not inside the call radius. Larger distance just means more units responding at once. Now this has me thinking about having a max group responder limit in the config...
  13. genesis92x

    [CTI-COOP] Dissension

    Yeah, I am starting to get that itch to work on it again. I have a feeling it will be much better once I get back to it. Thank you. I am not working on any other project at the moment. So this is coming out as fast as I can handle. I am now working on creating the unique commander personalities...which is the last mountain to hurdle.
  14. genesis92x

    Vcom AI V2.0 - AI Overhaul

    Yeah. I learned this valuable lesson in optimizing Vcom. There needs to be a fine balance. A very fine balance. No problem! Unfortunately, advanced AI comes at a cost. If you are generating a mission with 250+ AI you are going to have a bad time. Keep in mind with ArmA (And especially Vcom AI) a lot of units with FEWER groups is better than a lot of units with MORE groups. Group leader AI is more demanding and will cause more scheduler lag. So if possible have your mission operate with bigger squads and fewer groups. I am curious...if you have time...can you do a simple hint format ["%1 --- %2",count allunits, count allgroups]; and tell me the numbers? I know all machines are different but I was able to get ~200 AI, in groups of 8, all in combat to have an FPS drop of ~10 and scheduler lag of about .5 seconds. I am just curious about other missions and etc and one of the biggest things I am finding is that missions with MORE groups (Even if they have less AI) perform far worse than missions with MORE AI but LESS groups.
  15. genesis92x

    Vcom AI V2.0 - AI Overhaul

    This. I would have Vcom execute AFTER the units are spawned. Vcom puts units in a queue so it won't activate all the AI at once. This should help FPS/script lag The best way to see if Vcom is even running is to create a trigger activated by radio with this in its activation field: hint format ["Where is Vcom: %1",VCOM_AIConfig]; If this comes back NULL or NIL then Vcom is NOT running. Another way to tell is to put a squad inside a town, give them 15 seconds or so, and if they don't change formations then VCOM is not running. So. This is what I am thinking. In late February or March I will sit down and take a look at converting Vcom to use CBA. It feels like converting Vcom to CBA will not be speedy and more difficult than starting a project from scratch, but what a fantastic way to learn how to use CBA. You have convinced me to try it.
  16. Hey everyone! I have ran into a rather interesting bug(?) when utilizing Vanilla AI and boats... Skip to ~3:00 to see the exact bug. I started recording from the beginning of the video to show context. As you can see, the AI seem to start dancing due to the "SAFE" waypoint. Even when deleting their waypoints, switching them to "AWARE" or "COMBAT" does not seem to resolve the issue. Using a command like {_x setbehaviour "AWARE"} foreach allgroups; did not seem to resolve the issue either. I will be digging into this a little more...but I was curious if anyone else has ran into this and knew what I was doing wrong? Important bits of code I use that might be interacting oddly below: First chunk of the function that detects if boat transport is needed *SNIP* _WpArrayCheck = []; _Unit = _this select 0; _Group = group _Unit; _WayPointPosition = _this select 1; _UnitPos = getpos (leader _Unit); _direction = [_UnitPos,_WayPointPosition] call BIS_fnc_dirTo; _MovementDistance = 15; _LetsCount = true; //Lets collect many points along the waypoint route. While {_LetsCount && {{alive _x} count (units _Group) > 0}} do { _NewPosition = [_UnitPos,_MovementDistance,_direction] call BIS_fnc_relPos; if (surfaceIsWater _NewPosition) then {_WpArrayCheck pushback [true,_NewPosition]} else {_WpArrayCheck pushback [false,_NewPosition]}; _MovementDistance = _MovementDistance + 50; if (_NewPosition distance _WaypointPosition < 100) then {_LetsCount = false}; }; //Now lets check to see if at least 2 of those points are in water. _WaterCount = 0; _WaterArray = []; _BoatNeeded = false; { _WaterCheck = _x select 0; _Pos = _x select 1; if (_WaterCheck) then {_WaterCount = _WaterCount + 1;_WaterArray pushback (_x select 1);}; if (_WaterCount >= 2) exitWith {_BoatNeeded = true;}; } foreach _WpArrayCheck; //If a boat is needed then lets add a waypoint next to the shore if (_BoatNeeded) then { _group setVariable ["DIS_BoatN",true]; _FirstWaterPos = _WaterArray select 0; _MoveToPosition = [_FirstWaterPos, 0, 250, 1, 0, 1, 1] call BIS_fnc_findSafePos; //(leader _group) doMove _MoveToPosition; _waypoint = _Group addwaypoint[_MoveToPosition,50,1]; _waypoint setwaypointtype "MOVE"; _waypoint setWaypointSpeed "NORMAL"; _waypoint setWaypointBehaviour "SAFE"; *SNIP* To disembark and throw the crew to the closest land location {unassignVehicle _x; doGetOut _x;_x setpos _positions;} forEach units (_group); Edit: Of course after posting this I find a solution - which I did not expect: Code for spawning and putting units in EMPTY vehicle _veh = "B_Boat_Armed_01_minigun_F" createVehicle [0,0,0]; _veh spawn dis_UnitStuck; _veh allowdamage false; _LeaderPos = getpos (leader _Group); _Leaderdir = getdir (leader _Group); { _x moveInAny _veh; } foreach (units _Group); _veh setBehaviour "AWARE"; What resolved the issue for me, was to add the line _veh setBehaviour "AWARE"; I was unaware, but even though the boat spawns empty the group still takes their Behaviour from the vehicle. Then deleting the vehicle so quickly was probably causing some interesting confusion for the AI.
  17. genesis92x

    [AI BUG - VIDEO] Dancing AI

    It is such a funny bug. The best I could find is that it has something to do with the "SAFE" waypoint and being moved to and from vehicles willy nilly via scripting.
  18. Hey everyone. Just wanted to say how awesome the Alive project is. I am the creator of Vcom AI and am constantly updating it to fix bugs/optimizations/etc. I am constantly getting questions about Alive & Vcom and I was curious if I could get a few responses of some of the most common bugs/problems Alive users face. Currently I was messaged that support vehicles in alive, such as transport aircraft, get marked with the variable "ALIVE_CombatSupport". So I can have Vcom run a simple check for this variable and exit if the variable returns true. I am rather busy currently so I just don't have it in me to dig through Alive's beautifully constructed systems to find proper ways to 'hook' into it...so any help is appreciated. Any other important variables that come off the top of your head? Thank you.
  19. genesis92x

    Vcom AI V2.0 - AI Overhaul

    These are all good suggestions :) I will also be adding in automatic disabling of any units tagged with "ALIVE_CombatSupport" so that people will not have headaches with support vehicles and Vcom as well. 1) That is a good idea, I will add it to the TODO 2) This is a difficult one for me to justify spending time on at the moment. I will add it to the TODO list so I can look at it with fresh eyes at a later date. 3) I did not know CBA was so fast, that is good information. The only reason I have not adopted CBA for this is because I love keeping things simple for myself and others. Being able to plug-in-play means a lot to me, as well as challenging myself to optimize functions. For my future projects I will be looking into using CBA more frequently as it has great benefits (like you mentioned). My second concern would be the level of difficulty converting Vcom over to utilize CBA. Say, I Wanted to support a non-CBA version and a CBA version, how difficult would that be?
  20. genesis92x

    Vcom AI V2.0 - AI Overhaul

    Let me know if that does not work if you try it again. There might be something else going on :) I appreciate you being able to disable it in the pbo though! That is very helpful. Faction based skill levels is an interesting idea...I will save that for the next update - I think that is easily do-able. =========== Here is a video I just did of the AI responsiveness in combat. With good server settings and good AI settings I currently do not see a problem with AI responsiveness.
  21. genesis92x

    Vcom AI V2.0 - AI Overhaul

    *Sorry for the triple post - I am apparently having troubles with operating the forums..*
  22. genesis92x

    Vcom AI V2.0 - AI Overhaul

    Can you report to me your server settings for difficulty? Or any additional information that woudl be vital in de-bugging this? The video is nice but does not offer enough info unfortunately. Having the AI at high skills levels, both with the VCOMAI settings AND the server settings seems to produce no issues during my tests, besides the odd occasion of an AI missing each other. I will record a video and post as well. Thanks for the idea! I have thought about this for quite some time but was not sure if it would be a desired feature or not. I could always implement something and have it off by default...
  23. genesis92x

    Vcom AI V2.0 - AI Overhaul

    If your server is not running -filepatching (Or whatever the command is nowadays) then it actually isn't reading the userconfig folder. You can test this by creating a trigger that hints this -> hint format ["%1",VCOM_AIConfig]; If it returns "Userconfig Folder" then it is working correctly! As well as disabling the PP effects for the mod, you should be able to simply put this in the init.sqf if the userconfig folder is not being read VCOM_Suppression = false;VCOM_Adrenaline = false;publicvariable "VCOM_Suppression";publicvariable "VCOM_Adrenaline";
  24. genesis92x

    [CTI-COOP] Dissension

    There is a reason I was never an english major. I meant that RHS will be the first mod supported - so the host will have the option of selecting either RHS units or Vanilla units in the params. I hope to power through this and get it to a testable state soon! Thanks for reminding me Cosmic :) Degen will ALWAYS be my passion project. To date it is the largest, most complex, and difficult project I have ever done. I took a break because I hit a wall with optimization and decided that I needed to learn more. So I changed to other projects to sharpen my skills so I can return to the project I love most, Degeneration. I love discussing Degen, so a little news about that: My current project 'workflow' is: VcomAI (Bug fixing now, no new features for awhile) -> Dissension -> Winter Survival Game (WSG)-> Degeneration Vcom is the 2nd most challenging project I have done, while Dissension and the WSG gamemodes will be easier and easier respectively. For now, I chose this because each gamemode allows me to create functions and code that I want to use IN Degeneration. So once I approach Degen again I can start lifting code from my previous projects and transplant them into Degeneration (Ipad, AI decision making, optimized FSM's, etc.) The project I am looking forward to in terms of this would be WSG. I plan on creating a drag-and-drop UI, and a fancy world interaction menu. A system that I want Degen to have. So, summed up, every mini-project I do is actually a sneaky way for me to play around with mechanics and ideas for Degen while still creating a fun product.
×