Jump to content

Raining6

Member
  • Content Count

    36
  • Joined

  • Last visited

  • Medals

Everything posted by Raining6

  1. Howdy, it's been a while ๐Ÿ™‚ Thanks for the heads-up, I also made a reminder to myself to try your SOG AI. The subscribers lark... I sometimes feel like I've got a new pet that needs regular attention ๐Ÿ˜‚. And I've only got a couple mods (one really). Heaven knows how you manage with your little pet/script zoo of "50+ and growing" haha.
  2. With this mod the AI will lose sight of the player if its line of sight (LOS) is obstructed by grass. Unlike with Real Engine and Dynamic Camo mods, this means you can be hidden while on tarmac, bare ground, with wrong camouflage, you can be prone, crouch or standing upright - and remain hidden - IF enemy AI's LOS to you is obstructed by grass. It's been a long time coming, but it is finally in Arma 3. The mod was tested on default maps - Altis, Stratis, etc, but should work on any map that has a string "grass" in grass texture files. The first two videos below are with the Mod, the 3rd video is default Arma3 (for an easy comparison). How it is without the mod in vanilla Arma3 right now: AI has X-ray vision through grass. It is able to spot the player through the grass and, once spotted, maintain lock despite the player being obstructed by grass and changing directions hundreds of meters away. Playing without grass is not an option (very ugly), same with short grass mods (ugly ). Being unable to disengage and use grass for cover is also boring, as is being relentlessly pinged by the omniscient AI after the first shots have been fired, and our Dynamic Camo mod/Real Engine mod cover is blown. Short/medium grass looks great in Arma 3 and allows for deeper tactics - when this grass isn't ignored by the AI that is ๐Ÿ™‚ Move slowly and make use of LCtrl+W and LCtrl+S to gradually change your stance to carefully peek around and through the grass. Fast, abrupt movements can blow your cover. All (?) AI mods are compatible with this mod, as it does not change anything in the AI logic. The mod is doing quite a few calculations, but I notice no fps drop with 20 AI simultaneously swarming the player. Steam link: https://steamcommunity.com/sharedfiles/filedetails/?id=2946868556 PS Many thanks to @pierremgi, @johnnyboy and @EO for your great help with different bits of the mod! A separate big thanks to @Greenfist for the cool AI detection test tool!
  3. Happy to hear someone else found it useful! Feel free to use my invisible walls and I look forward to trying your mod :)
  4. I'm working on a "hide in grass" script where small barrier object is spawned in the line of sight of the AI (https://forums.bohemia.net/forums/topic/241358-towards-the-ai-cant-see-through-the-grass-holy-grail/). At the moment, I'm using small wall objects from the editor, e.g., Land_Shoot_House_Wall_Long_Prone_F. I need to make the barriers completely transparent for the player, but not transparent for the AI (to make them lose track of the player behind that barrier). [] spawn {_a = [[1818,6050.38,0], [1817.65,6103.3,0], [1817.65,6113.3,0]]; //some coords where 3 walls will be spawned _walls =[]; { createWall = createVehicle["Land_Shoot_House_Wall_Long_Prone_F ", _x, [], 0, "CAN_COLLIDE"]; hideObject createWall; createWall enableSimulation true; _walls pushBack createWall; } forEach _a; makes the barrier disappear not only for the player's eyes, but also the AI "vision" - the AI shoots though the hidden barrier. How could I make this barrier transparent for the player only?
  5. I have followed this guide on making the most simple mod possible - displaying "Hellow world!" in Arma 3. https://www.reddit.com/r/armadev/comments/hzcnb3/tutorial_creating_a_simple_mod_following_the_cba/ Firstly, the guide is 3 years old and I wonder if it is still relevant. Second, there is an important typo in the guide in the "XEH_preStart/preInit/postInit" section - the author confuses all three. Third, when following the "Building the addon" section my Pbo project 3.57 throws errors like: Any help would be appreciated!
  6. Here is a solution: Create a file structure "a Hello World mod\addons\HW_hello_world" in some folder -Desktop or My Documents, etc. Inside the "HW_hello_world" folder, create 3 files - with the following code inside each one: $PBOPREFIX$.txt prefix=HW_hello_world; config.cpp class CfgPatches { class HW_hello_world { units[] = {}; weapons[] = {}; requiredVersion = 1.0; requiredAddons[] = {"Extended_EventHandlers"}; }; }; class Extended_PostInit_EventHandlers { HW_hello_world_Post_Init = "HW_hello_world_Post_Init_Var = [] execVM ""\HW_hello_world\YourScript.sqf"""; }; YourScript.sqf hint "Hiiiiiiiiiiiiiiiiiiiiiiii World!"; Download PboManager https://github.com/winseros/pboman3 and install it. Select the "HW_hello_world" folder, right click it, select PBO Manager, select "pack as HW_hello_world.pbo". The mod is done. Download and install CBA A3 from the Arma 3 Workshop. Run Arma 3, click Mods, activate CBA A3. Click Select Local Mods, navigate to your "a Hello World mod" folder and select it. Run any mission in the game/editor and you will see the "Hiiiiiiiiiiiiiiiiiiiiiiii world!" greeting. Adjust the mod to your liking with other scripts and objects. Sit back and marvel at the possibilities.
  7. @oldy41 I have no idea about the kill statistics (what a weird bug that /is/was/would be :)), but the grenades bounce may have been an issue because of my hacky use of the disableCollisionWith and SetObjectScale functions. Apart from the grenades' issue, this also lead to a problem where the mod worked only in Eden Editor missions. I've updated the mod today with a bespoke custom made wall object that allows the mod to function in Campaign missions, and has no collision box whatsoever - so the grenades should fly freely again.
  8. The solution was to create a wall object with empty LOD 0, empty Geometry, empty Fire Geometry, and have the correct wall dimensions in ViewGeometry (as this is what the AI "see"). Many thanks to @HorribleGoat for the advice! He also recommends setting sbsource=none in the Geometry LOD to save on performance. Pics from Object Builder
  9. Do you mean like that? The object is indeed transparent while still being there (you can just about see its yellow outline in the editor). however, this makes the wall transparent not only to the player, but to the AI too - the AI keeps on shooting when I am behind it. Need settable textures like with the Arma Gallery label above to make it transparent to player only.
  10. I've created my own wall object, here it with Arma's GalleryLabel_01_F . It appears in the game and in the editor menu, it stops the AI from seeing me, it lets in bullets, has no shadow - so it ticks all the boxes. All the boxes, but one. I'm having a hard time making it invisible. I've made it with settable textures, just like Arma GalleryLabel_01_F again, but the magic ss2 setObjectTexture [0,""]; still does not seem to work. Usually, if the getObjectTextures command returns a non empty [ ], the setObjectTexture command above turns the object transparent. But not in this case, I get paths to textures, but no transparency. here is config.cpp model.cfg Link to the unpacked .pbo: https://app.box.com/s/63755308m0zto9pau5wrb20vo4mrut42 Any tips and advice would be much appreciated ๐Ÿ™‚
  11. Hmm, setObjectScale turns out to be limited to Eden Editor missions only: https://community.bistudio.com/wiki/setObjectScale. It does not work in campaigns' missions or scenarios, for example. Is there a way to make it work, or am I back to "make your own 3d object" stage?
  12. Just the player and the enemy AI, the computation is too costly to run for all AI units (plus there would be other snags - with the current version at least).
  13. Thanks for the kind words. The algorithm is covered in this thread: https://forums.bohemia.net/forums/topic/241358-towards-the-ai-cant-see-through-the-grass-holy-grail/ Basically, the algo takes coords of the player and an AI enemy and then calculates the line of sight that connects them, this LOS is split into sections. It then finds heights AGL of these sections. If LOS section height is below grass height and there is grass texture at that point, an invisible roughly grass-high wall is spawned at these coords. Other types of clatter are often objects (unlike Altis grass, which is not an object. We had these discussions in the thread above) so there are probably better and faster ways of dealing with them. Also I found Arma 3 does a decent job with bushes and trees obscuring player. Although, I've not done too much research into clatter, I focused on the picturesque and tacticool Arma 3 grass that the game designers wanted me to turn off (or so it seems ๐Ÿ™‚ )
  14. How it is right now: AI is able to spot the player through grass and, once spotted, is able to maintain lock despite the player being prone and changing directions hundreds of meters away. Playing without grass is not an option (very ugly), same with short grass mods (ugly ). Being unable to disengage and use grass for cover is also boring, as is being relentlessly pinged by the omniscient AI after the first shots have been fired, and our Dynamic Camo mod/Real Engine mod cover is blown. Long grass looks great and allows for deeper gameplay - when this grass isn't ignored by the AI that is ๐Ÿ™‚ I'm thinking about proceeding in two stages: 1) AI loses sight of player in prone stance far away in long grass. This part is kind of done - see below. Hacky and imperfect of course, but I much prefer it over the Vanilla, Dynamic Camo mod, Real Engine, etc. Plus it is straight forward to improve - add range circles, dynamic camo, detect buildings etc. Vanilla at the start, hiding script at 0:54 Code: 2) The harder part. The goal is for AI not to see even a standing upright player - when the view is obstructed by a patch of grass. My idea in pseudo code: Here is a sketch This I need help with. Any thoughts, tips, criticisms are most welcome! As are partial or full implementations ๐Ÿ™‚ EDIT: A very happy ending! The following script by Pierremgi solves this decade-old problem! Its only side effect is that this may affect AI mods, e.g., the VComAI becomes more static with this script. How to use: pause the game, paste the code below into the debug window, press "Local Exec". The game will remember the script and you will only need to pause and press the "Local Exec" before every mission. Pierremgi's script: Finally, combining the hide in grass scripts with VComAI leads to AI laying more suppressive fire onto a patch of grass where you were seen last. EDIT2: The ending is happier still ๐Ÿ™‚ I have finished the "invis wall" approach to this problem and, unlike the solution above, it has no side effects on the AI. This means that, e.g., Vcom AI mod's AI still aggressively flank and hunt the player down, and so on for all other types of AI behaviour -both vanilla and mods. The AI can no longer see through the grass, but behave exactly the same as before otherwise. The Code: EDIT 3: The mod is now also on Steam Workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=2946868556 , its thread is here https://forums.bohemia.net/forums/topic/241678-acstg-ai-cannot-see-through-grass/
  15. Function over form any day. Ok, I lie, but you know what I mean ๐Ÿ˜„ No idea! My second biggest gripe - no replays on helicopter flying in Arma is kinda sorted by A3RR mod and my single line hack... Not sure what next. Build ChatGPT? It's not really Arma though haha Sorting bugs with this mod will last me a while it looks like. I found another big one - player disableCollisionWith _createWall; that I heavily relied on in my mod, it only works with one object at a time. So one invisible wall I can ghost through without noticing, but all the others that are being spawned at the same time are quite literally invisible walls ๐Ÿ˜ฃ Here is a quick hacky solution, this is now my "Final" version ๐Ÿ™‚ Code: PS The mod is now on Steam Workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=2946868556 , local thread is here: https://forums.bohemia.net/forums/topic/241678-acstg-ai-cannot-see-through-grass/
  16. Slight further revision of the above "final" version (no such thing as "final" in nature :)) . Previously, the list of enemies was built from units that were already in combat mode. The walls were spawned only after they entered combat mode. This was problematic as they saw the player through the grass without any walls, opened fire and only then lost direct sight because of the newly spawned wall. By which time the player was sometimes injured or dead. In the current revision, I select enemies before they enter combat and it is thus easier (as well as more realistic) to dictate the start of the fight by using grass cover even before the start of the firefight. Code:
  17. @johnnyboy Ah, the shadow! i remembered to thank EO for suggesting the solution, but forgot to include the actual little mod file with it ๐Ÿ˜„ To remove the invisible walls' shadows, place this mod into steamapps/common/Arma3/!Workshop/ and activate as "Local mod" https://app.box.com/s/8celqpuft0qljj4m2oudzbmejt0sd1eb
  18. My final (for now at least) "invisible wall spawning" solution to this. The advantage of the invis wall approach is that it does not affect the AI algorithms. PierreMGI's disableFSM solution is faster than mine, shorter and way cooler overall, but it does affect the AI - for instance, VCom AI become more passive and no longer aggressively flank and hunt the player. With my walls, the AI is completely unaffected and all AI mods remain functioning, just without having X-ray vision through the grass ๐Ÿ™‚ A vid of a showcase grassy hill battle that is completely impossible/unrealistic with vanilla AI (they simply continuously shoot you in the face right through the grass), but is really quite cool now - I'm happy at least ๐Ÿ˜Ž I recommend slow movement and the use of Arma 3's (always cool, but seldom used) LCtrl+W/LCtrl+S gradual stance changes to carefully peek around the grass. Abrupt fast movements get you spotted. The VCom AI doesnt just stand there, waiting to be picked off, they move and change angles, and the grass hide'n'seek-pikaboo makes the fights much more varied still. EDIT: see my post below for the improved version. The script code: Many thanks to @pierremgi , @johnnyboy and @EO for your help, I may not have done it without you!
  19. I don't (yet? ) have the Contact DLC, so no Livonia - I'm very new to Arma, having never played Arma2/1/OFP, so saving shooting Aliens for (much?) later ๐Ÿ™‚ However, the mod should still work, it only needs correct ASL, AGL coords and grass textures with๏ปฟ string "grass" being part of the texture name. The height of grass=invisible wall is easy to adjust in the script. Thanks! A much more elegant solution than mine, I've simply copied the entire config and added the shadow=0 bit to the relevant class (But it also worked, which was cool as none of my previous attempts at a mod ever resulted in anything more than mournful Pachelbel music coming out from PboProject. And yes, my PDirve is set up, etc. PboManager was the saviour in the end :))
  20. All is well, here is a vid of the (still visible for testing, but it works when invisible too) GalleryLabel_01_F in action. Massive thanks again, Johnnyboy!: I have also made the small mod to remove the shadow (Massive thanks thanks also, EO!:). A little guide for posterity: add shadow=0 to GalleryLabel_01_F class in config.cpp in props_f_aow\a3\props_f_aow\Civilian\Gallery, put the config.cpp into some folder and make pbo of the folder with PboManager, create folder structure like steamapps/common/Arma3/!Workshop/@MyLittleMod/Addons, put the newly made pbo into the Addons folder, launch Arma, select add local mod, choose and activate the @MyLittleMod. (I've used PboManager as Mikero's PboProject I could not get to work, all it does is throw errors and play sad Pachelbel's music ๐Ÿ™‚ ). I will test some more and will add the full script code to my main thread: https://forums.bohemia.net/forums/topic/241358-towards-the-ai-cant-see-through-the-grass-holy-grail/?page=2
  21. A truly wonderous find! I've done a coup[le of quick tests tonight and it it perfect, it is exactly what the script needs. I can now uninstall Arma Object Builder/Mikero Tools and try to forget the whole thing as a bad dream ๐Ÿ™‚ Grass does obscure the shadow somewhat, but the shadow only become apparent as the sun moves away from its zentih. So at 12 noon the shadow is nearly unnoticeable and at 6am/pm it is pretty obnoxious. Not an issue at all with player disableCollisionWith ss2; I will put the whole script together tomorrow, but it does seem that all the parts are finally in place (Hooraaay!). Apart from the shadow, but that's more of a niggle than a showstopper. Will try 0 spawn BIS_fnc_configViewer (is that what you are using?) tomorrow, thanks for the cool tip!
  22. Nope, tarp and tents also do not seem to have settable textures. With the B_Boat_Transport_01_F boat _tgtAGL = [1818,6050.38,0]; cw = createVehicle["B_Boat_Transport_01_F", _tgtAGL, [], 0, "CAN_COLLIDE"]; publicVariable "cw"; getObjectTextures cw returns ["a3\boat_f\boat_transport_01\data\boat_transport_01_co.paa"]. With tarp (Tarp_01_Large_Green_F) and tents (Land_TentA_F) I get empty [ ] . They also do not become transparent with johnnyboy's code above. So it looks like I do need a modded object: a simple barrier with settable textures and paper-like bullet penetration.
  23. Tarp is a great idea! I could partly sink it underground to grass height too. Will try it tomorrow or day after. I've already created a 3d 4.5m x 0.7m x 0.05m barrier .OBJ, but you're right about the paygrade - importing it into Arma is super convoluted. I've wasted a couple of hours today and still pretty much where I've started. Tarp way sounds much easier. Sounds interesting, but, like with my .OBJ, the transparent donut requires extracting and changing in Arma Object Builder to fit my purposes... That's assuming that his method with textures and what not works in Arma3 :)
  24. Thanks, the boat trick works! It is completely transparent and the AI stops shooting when I am behind it. cw = "B_Boat_Transport_01_F" createVehicle [1818,6050.38,0]; publicVariable "cw"; cw enableSimulation false; _y=0; {cw setObjectTextureGlobal [_y,""]; _y=_y+1;} foreach getObjectTextures cw; But! ๐Ÿ˜ž Boat 's shadow is not the biggest problem. I can not shoot through the transparent boat myself, the bullets hit the boat with both simulation enabled or disabled. Being able to shoot through the invisible wall is crucial for grassy hill shootouts like below. Which is why I was using the plywood Land_Shoot_House_Wall_Long_Prone_F wall and hoping to make it transparent. The invisible wall which is available in the editor Land_InvisibleBarrier_F does not stop the AI shooting, neither does bill-board Land_Poster_01_F. ForgetTarget was something PierreMGI and myself tried in my main thread (https://forums.bohemia.net/forums/topic/241358-towards-the-ai-cant-see-through-the-grass-holy-grail/) . It completely breaks the AI squad logic. The current best solution is Pierre's disableFSM, but this also damages AI's logic and they hardly ever attempt to flank the player. A working invisible wall with bullet penetration would tick all the boxes on the other hand - AI can't see through grass, but will flank etc.
  25. On second thought, my "blocked by grass first person view" argument is not perfect. It is a fact of optics that if player's view of AI's eyes is blocked by grass, the AI's view of players eyes would also be blocked by grass. However, It is not a fact that player's FEET would be blocked by grass from the AI's line of sight (LOS) in that same case. So, was it justified to approximate the situation focusing purely on the LOS from players head to the AI's head? And at what distance to the AI does our approximation break down? Calculation: Result: At 2m distance the angle is 42.30deg, the obscured by grass dist is 0.7m At 6m distance the angle is 16.87deg, the obscured by grass dist is 2.0m At 10m distance the angle is 10.31deg, the obscured by grass dist is 3.3m At 30m distance the angle is 3.47deg, the obscured by grass dist is 9.9m At 50m distance the angle is 2.08deg, the obscured by grass dist is 16.5m At 70m distance the angle is 1.49deg, the obscured by grass dist is 23.1m At 90m distance the angle is 1.16deg, the obscured by grass dist is 29.7m At 110m distance the angle is 0.95deg, the obscured by grass dist is 36.3m At 130m distance the angle is 0.80deg, the obscured by grass dist is 42.9m At 150m distance the angle is 0.70deg, the obscured by grass dist is 49.5m At 170m distance the angle is 0.61deg, the obscured by grass dist is 56.0m At 190m distance the angle is 0.55deg, the obscured by grass dist is 62.6m So, the "player's head LOS to the AI's head" approximation in our "hide in grass" scripts is realistic when the player is over 6 meters away from the AI. And yes, the 0.6m tall "short" grass hides many lengths of a human body at a typical engagement distance in Arma. Call of Duty doesn't need to enter the argument ๐Ÿ™‚
ร—