Jump to content

Recommended Posts

Hey man, this script is a MUST HAVE...can'y play without it now. AWESOME job mate!

  • Like 1

Share this post


Link to post
Share on other sites
17 hours ago, zagor64bz said:

Hey man, this script is a MUST HAVE...can'y play without it now. AWESOME job mate!

 

14 hours ago, Alert23 said:

Thank you for this beauty, Mgs 3 anyone? 😅

 

Positive comments certainly help my motivation. Thanks guys! Don't forget to let me know if you are using this and have any observations about areas for improvement.

 

I've noticed myself for example that the way the script stands if I as player change stance then this forces a recalc for any unit using the script as is. I don't think this is desireable. My view is that when the script is running on AI's it should only do the autorecalc rather than a stance triggered recalc. The units stance is still picked up by the algorithm but to have every script instance recalculating just because the player unit changes stance doesn't seem to me optimal. Stance triggered recalc should imho be limited to player running the script and his squad ( if desired)

 

Ive thought a bit about altering the script so that it handles both player ( and player squad ai)  and non player squad AI separately but my feeling is that this is going to be more complicated than a simpler approach. I feel the simplest approach is to have a camoscript_Player.sqf  and a distinct camoscript_ai.sqf.  The former would essentially be the current script optimised to handle player and probably players squad and the second one would be essentially the same script but optimised for AI not in player squad. I know this means two scripts but it seems to me that this offers better flexibility and probably easier to maintain code. For example having a separate AI script might make it easier to handle interaction between  non player squad AI camo script and other possible AI behavioural type scripts. I've not finalised my views on this yet and would be interested in any observations on this or any other aspect.

  • Thanks 1

Share this post


Link to post
Share on other sites
4 hours ago, The Real Bunc said:

Don't forget to let me know if you are using this and have any observations about areas for improvement.

Indeed I'm using it. I mostly play/create SF/Black Ops type missions and your script adds that bit of stealth factor notoriously lacking in Arma 3.

4 hours ago, The Real Bunc said:

I feel the simplest approach is to have a camoscript_Player.sqf  and a distinct camoscript_ai.sqf.

Like many things in life, sometimes keeping it simple is the way to go.

Keep up the good work..... and the digging tho. 

  • Like 1

Share this post


Link to post
Share on other sites

When i last played a week ago, i had adjusted the values in the demo to all 0 (zeros) and 5 at the end i think it was, and i had a situation where somehow even tho the CSAT did not engage me

they did somehow come up to my position and stand there.

Even tho i had moved away from the area which there is no possible way for them to know where i was at, yet for some reason'

only in arma the AI have that psychic knows about bs where you are at even tho you did not shoot from where you are at.

 

That make sense?

  • Like 1

Share this post


Link to post
Share on other sites

Yes Gunter it does. I've had the experience of using this when the camo values are very small approaching zero (in a ghillie suit at night with full overcast and rain and wind  for example) and they sometimes act like they have some sense that something is up, that there's someone about. I've had them wander around near me like they know someone is there and only when they virtually walk on top of me do they suddenly recognise me and open fire. Yet I see none of that reflected in the knows about value really. In fact the knows about value rarely seems to be anything other than zero, 1.25 (from memory) for when they've clocked you but don't know who you are or 4 when they positively ID you as enemy. I haven't yet seen intermediate values which is interesting.  

 

Setting camo and audible to zero should in principle mean they could have no knowledge of you from sight or sound unless the engine has some other means of giving a residual base level of awareness. I'm not sure what this could be. Maybe something linked to changes in combat status from safe through aware. For example if the engine gave the ai an indicator "enemy in vicinity" but without specific identification of specific enemies. Who knows. 

I like the fact that there is some strange unfocused awareness that they seem to have when you are well camo'd as it makes for better play anyway I feel. Arma still hasn't it's secrets perhaps?

  • Like 4

Share this post


Link to post
Share on other sites

Also noticed and like this 'unfocused awareness' as tension mounts in those moments of uncertainty

Share this post


Link to post
Share on other sites

I've left this script alone for a few days while I was working on something else as sometimes I sort of work through things more mulling them over in the background . I've now figured a few things which should take this script to near its final stages. 1) I don't need two separate scripts - I'll simply have a switch sent through the spawn arguments which allows user to indicate if script instance should run on a) player only b) single ai (with no stance triggered update b) player and player ai squad ( probably with stance triggered update because those player squadies are dumb as housebricks and need all the help they can get ) and c) ai leader and ai squad.

 

More significantly I'm now certain I can do a test for actual shadows. This would be a major step forward in adapting this to be more responsive to urban environments as I can do away with any tests for being in buildings and simply use the shadow test which would give true if inside a building. The method would rely on Sun angle and testing for geometry between the sun and the unit so it wouldn't work for artificial light.  This would therefore be a test during daylight so it would apply during the main daylight hours as a shadow test arguably is pointless during the night ( given it won't test for artificial light. ) . Once I get the main bit working it could be enhanced by, for example reducing the shadow impact when there is fog as fog weakens visual contrast. I need to get my head down now to implementation.

Share this post


Link to post
Share on other sites

I'm on a roll. I've just thought how I can test for shadows from artificial lights at night, I think.

  • Like 1

Share this post


Link to post
Share on other sites

A question for you,

is if you had the chance to look into the editor module more, and sought help from those suggested members on the forum here?

 

 

  • Like 1

Share this post


Link to post
Share on other sites

I would absolutely still  love to turn this into an editor module but I'm still chasing my dream of having a dynamic camo that's responsive to mostly all the obvious factors that should impact visibility and audibility so I've still been driving down that road. However your reminder is timely because I need to know at least at this stage if there are things I should be doing re my code that'll help make it easier to turn into an editor module. So I do need to start asking those guys if they could give me some pointers and I can start figuring out what I need to do. Thanks for the dig in the ribs on that! 

  • Like 1

Share this post


Link to post
Share on other sites

Welcome!

47 minutes ago, The Real Bunc said:

I'm still chasing my dream of having a dynamic camo that's responsive to mostly all the obvious factors that should impact visibility and audibility

If you haven't seen it already, maybe this could help with your testing further, or get ideas from it:

 

48 minutes ago, The Real Bunc said:

So I do need to start asking those guys if they could give me some pointers and I can start figuring out what I need to do.

An idea would be to ask their permission if you could open their work up (files) and see how they did it,

i would suggest choosing a simple module with not alot involved but i guess that would all depend.

If they will go out of their way to show you how then by all means.

  • Like 1

Share this post


Link to post
Share on other sites

Something to take note of in your script:

Increased error of player position, when AI is killed by player

https://forums.bohemia.net/forums/topic/150500-development-branch-captains-ai-log/?do=findComment&comment=2393389

 

AI in groups share information about targets

https://forums.bohemia.net/forums/topic/150500-development-branch-captains-ai-log/?do=findComment&comment=2473418

 

Hope this can help in some way:

https://community.bistudio.com/wiki/Arma_3_AI_Skill

 

IDK if this means anything or has any use in terms of information for you:

Visibility raycast for dead bodies is limited to 50m. For alive soldiers it is limited to 3km.

https://forums.bohemia.net/forums/topic/150500-development-branch-captains-ai-log/?do=findComment&comment=2828429

https://forums.bohemia.net/forums/topic/150500-development-branch-captains-ai-log/?do=findComment&comment=2908714

 

Old info but provides details -Tweaked: The AI visibility at night was optimized

https://forums.bohemia.net/forums/topic/150500-development-branch-captains-ai-log/?do=findComment&comment=3045162

 

hope this helps!

Share this post


Link to post
Share on other sites

Very informative links Gunter. All stuff that gets me thinking. The detection test in particular looks like it could be very useful as I get to the final stages of this script and try to get the tuning of factors really spot on.  I've another development after this in mind and this sort of stuff is relevant for that as well.

 

btw Gunter, re our earlier discussion on that strange awareness they have - how about this? In configs units have a camo value I believe and an audibility value. I wonder if the engine uses the camcoef and audiblecoef to simply moderate these values? (I.e. Camcoef of zero doesn't actually set full cam but simply moderates the config starting cam) that would explain what we are seeing perhaps?

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, The Real Bunc said:

I wonder if the engine uses the camcoef and audiblecoef to simply moderate these values? (I.e. Camcoef of zero doesn't actually set full cam but simply moderates the config starting cam) that would explain what we are seeing perhaps?

An interesting thought, it could be based on the skill level of the enemy AI, and then taking into consideration the weapon you have alongside if its silenced or not.

To give you an idea of this, in your demo i changed the gear of the player and AI to have sniper rifle with silencer, i think bullet caliber, and the fact that the weapon is silenced play in the part if the player gets more or less heard then

if he were using a larger caliber while going loud.

 

Overall that Psychic knowsabout with the AI i think is their lead, so example is if they get your position but not exact position, im guessing there is a possible way for them to "follow" that position in terms of leading their target.

I noticed this in the detection tool test which im messing with atm, once the AI has spotted you, and you moved out of sight, he basically predicts the path that you were moving in and leads that, then assuming you have stopped somewhere

based on that, the AI then moves to a rough area of location where he thinks you are at and where you started.

So to answer your question i think yes i think those two functions are moderated by partly this factor, but thats just a theory, maybe someone else, or perhaps a dev can clear that up for us.

Share this post


Link to post
Share on other sites

In the script here:

Quote

// Camo  V1.5 includes uniform test. Default Camo is 1
_uniform = uniform _unit;
_camo = 1;
if ((str _uniform find "Combat" >=1) OR (str _uniform find "CTRG" >=1) OR (str _uniform find "Officer" >=1)) then
 {camo = 0.5;};
if ((str _uniform find "Ghillie" >=1) OR (str _uniform find "Sniper" >=1) OR (str _uniform find "Viper" >=1)) then {
_camo=0.4;};

Is their difference between the Ghillie and the Viper?

I mean does the Viper have more camo then the Ghillie?

Share this post


Link to post
Share on other sites

It means I've given the same uniform camo factor to anything with Ghillie, sniper or Viper in their class names.(0.4) and  I've given a slightly less camo to anything with combat, officer or CTRG in their uniform class names. (0.5) With everything else getting the default 1 (i.e. No camo impact from uniform) 

People may feel there should be more distinctions (or less) or other unit uniform class names tested for this part of dynamiccamo. The figures are not tuned yet. I can see an argument for slightly more difference between the full uniform camo and standard uniform group say 0.4 v 0.6 but I'd like to test that a bit further. 

This was simply a first stab to see if this simple approach worked. Which it does. 

One of the enhancements I am considering is to allow user to supply the list of uniform class name unique strings.

im entirely open to suggestions about what should or shouldn't be in each group or indeed whether three levels is enough for uniform camo distinctions. Personally I think it is but I'm open to argument. 

  • Like 1

Share this post


Link to post
Share on other sites
5 hours ago, The Real Bunc said:

It means I've given the same uniform camo factor to anything with Ghillie, sniper or Viper in their class names.(0.4) and  I've given a slightly less camo to anything with combat, officer or CTRG in their uniform class names. (0.5) With everything else getting the default 1 (i.e. No camo impact from uniform) 

People may feel there should be more distinctions (or less) or other unit uniform class names tested for this part of dynamiccamo. The figures are not tuned yet. I can see an argument for slightly more difference between the full uniform camo and standard uniform group say 0.4 v 0.6 but I'd like to test that a bit further. 

This was simply a first stab to see if this simple approach worked. Which it does. 

One of the enhancements I am considering is to allow user to supply the list of uniform class name unique strings.

im entirely open to suggestions about what should or shouldn't be in each group or indeed whether three levels is enough for uniform camo distinctions. Personally I think it is but I'm open to argument. 

Interesting.....mmmm...OK; I'm just throwing it there, and without even knowing IF and HOW is it possible, so be kind with me..HERE WE GO:

 

-in my Arma dreamworld, there should be a way for the script to check for terrain COLORS, let's say 300 mt. around the player, and if the uniform he's wearing match for a % of the MAJORITY of the surrounding color it gives you a camo coefficient. I/E...as it is now, a Ghillie with Jungle/Lush pattern will give you plenty of camo even in the snow, where you would stick out like a sore thumb. Or, wearing a snow-camo uniform-Ghillie in the jungle should sort the same negative effect.

 

More "simply"...😜😜

camo = if {uniformColor == terrain%color } then { camoValue true } else { camoValue false };
hint "you're spotted donkey!!"

 

  • Like 2

Share this post


Link to post
Share on other sites

I love the idea zagor, it makes sense and its realistic, i mean why wear camo to begin with to try to blend in if it doesn't actually do anything in terms of the AI having a more difficult time in spotting you.

Ideally your code should effect the AI's spotting and identification ability, like reduce it to the point where you become almost invisible.

  • Thanks 1

Share this post


Link to post
Share on other sites
1 minute ago, Gunter Severloh said:

your code

LOL..I was joking there...BUT indeed if I think about it it does make sense..HAHAHAHA..OK..here is another one:

camo = if {uniformType == mapType } then { camoValue true } else { camoValue false };
hint "you're spotted donkey!!"

😂😂😂😂

Share this post


Link to post
Share on other sites
6 minutes ago, Gunter Severloh said:

i mean why wear camo to begin with to try to blend in if it doesn't actually do anything in terms of the AI having a more difficult time in spotting you.

On a more serious note..THAT is EXACTLY what I was thinking about, and quite honestly, what's missing from Arma, to begin with. 

  • Like 1

Share this post


Link to post
Share on other sites

The only way offhand I can think of doing this easily is to figure out which uniform colours and camo types suit each map and then give better camo if the uniform is one of the identified types and less if it's not one that's a good fit for that island. That probably wouldn't be hard to do for the main uniform types.

  • Like 1

Share this post


Link to post
Share on other sites
7 minutes ago, pierremgi said:

Colors... I don't know, but surface type can help. A lot of work... as usual.

You little devil....you're GOOD man!!!

Share this post


Link to post
Share on other sites
18 minutes ago, The Real Bunc said:

The only way offhand I can think of doing this easily is to figure out which uniform colours and camo types suit each map and then give better camo if the uniform is one of the identified types and less if it's not one that's a good fit for that island. That probably wouldn't be hard to do for the main uniform types.

That would be a very,VERY good start. Even 3 or 4 types would suffice: Desert/Arid, Semi-Arid, lush and Jungle. An added bonus could be snow😋 

 

 

I took a glimpse at the "surface type" @pierremgi mentioned...it returns what surface type is at the given/player position. Could that be useful? 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×